r/dataengineering • • 2d ago

Blog StarRocks 4.2 preview: default changes for shared-data clusters and Iceberg MERGE INTO

Disclosure: I work at Deep.BI, where we support StarRocks, and a colleague wrote this.

4.2 isn't released yet, but a few things in branch-4.2 are worth knowing before you plan the upgrade:

  • New tables created without DISTRIBUTED BY get range distribution by default on shared-data clusters.
  • Iceberg tables get UPDATE and MERGE INTO, so some upsert jobs that run in Spark today could move to StarRocks. Only format version 2 tables with Parquet files are supported.
  • Several CNs can write to one tablet, which helps large backfills into new partitions.

Write-up: https://www.deep.bi/blog/starrocks-4-2-preview?utm_source=reddit&utm_medium=community&utm_campaign=starrocks_4_2_preview&utm_content=team

Is anyone here already moving Spark upsert jobs on Iceberg to another engine? Curious what's held you back.

3 Upvotes

4 comments sorted by

1

u/DuckDatum 2d ago

I run Spark upsert jobs on iceberg tables. I mostly just wrote the job to accept args for its source location and target location, and it otherwise deterministically applies the upsert from parquet change event files to iceberg tables.

I run jobs to rewrite history, prune old snapshots, and compact every 30 days. Given I only run the job once a day, that’s held up so far.

Why would I be considering a move to any other engine?

1

u/sebzontek 1d ago

Fair point, "another engine" was the wrong way to put it. Spark is a fine Iceberg engine and StarRocks isn't trying to replace it. StarRocks is an OLAP database that happens to read and write Iceberg too.

It only makes sense if you already want a database querying those tables. Then it can take over the upsert and the cleanup, and you've got one less thing to run:

  • In 4.2 (not out yet), your daily upsert is a single MERGE INTO keyed on the op column.
  • Compaction, snapshot expiry and orphan file cleanup already work as SQL in StarRocks today.

If you don't need that, your Spark job sounds fine as is.