Visorgood opened a new pull request, #221: URL: https://github.com/apache/datafusion-site/pull/221
**Rendered version:** https://visorgood.github.io/datafusion-site/blog/2026/11/22/comet-spark-comparison/. This is a GitHub Pages preview built from this branch with the site's ASF Pelican build, so the preview URL has the same shape as production. Adds a blog post that follows one Iceberg-to-Iceberg ETL job through plain Spark and through Spark with Comet, step by step, and shows where Spark loses time and how Comet gets it back: 38.7 s and 295 CPU-seconds without Comet, 10.5 s and 76 CPU-seconds with it. The post covers: - Why "Comet is columnar and native" explains less than it seems: Spark's own Iceberg reader already decodes Parquet into Arrow vectors. - The job: an `INSERT INTO ... SELECT` that computes revenue per order from TPC-H `lineitem` at SF 100 (600 million rows, 15.1 GiB in Iceberg). Also the details that matter: about four lines per order, so the shuffle still carries 87 million rows, and decimal types wider than 18 digits. - How Spark runs each step: columnar at both ends, but filtering, `BigDecimal` math, hash map updates, partitioning and serialization run once per row in between, until Iceberg's writer turns the rows back into column pages. - How Comet runs the same steps on Arrow batches: iceberg-rust's scan filters rows while decoding, `Decimal128` arrays, a batch-wise hash aggregate, native shuffle, and the native Iceberg write. - CPU flame graphs of both executors and a per-step table of CPU-seconds. Decimal math is about a third of Spark's CPU (100 s) and about 7% of Comet's samples. Also covers why this speedup (3.7x) is about twice the 1.8x from Comet's TPC-DS numbers, and why Spark's executor CPU metric misses Comet's native threads. - Where the speedup disappears: one unsupported expression (`assert_true`) in the `WHERE` clause keeps the `Filter` in Spark, and the rest of the plan follows. The run takes 34.8 s, so of the 28 s that Comet saved per iteration, only 4 remain. Also lists the other ways out of the native path. - Does the API matter: SQL, DataFrame and Spark Connect produce the same plan. A table shows what Comet does with each kind of UDF and typed Dataset operation. - A practical guide: how to find where the native part of a plan ends, and which settings to tune. - Benchmark setup and limitations: one container with 8 CPUs and 24 GiB on a MacBook Pro M3 Pro, Spark 4.1.3, Iceberg 1.11.0, Comet 1.2.0, five measured iterations per configuration. One query on one machine, with local files. Files: - `content/blog/2026-11-22-comet-spark-comparison.md` - `content/images/comet-spark-comparison/`: ten PNG figures (three plan diagrams, two data walkthroughs, three Spark UI screenshots, two flame graphs). Each figure links to its full-size image. The SVG sources of the diagrams are in the benchmark repository. Everything in the post is reproducible with one `docker build` and one `docker run` from https://github.com/Visorgood/spark-comet-iceberg-bench. ## Before merging - **Cross-posting.** The post was first published on my site: https://viacheslavinozemtsev.io/blog-posts/where-spark-loses-time-and-how-comet-gets-it-back. I can add an "originally published at" note, or leave it out. - **Date.** The post date (2026-11-22) needs updating to the publish date. Checks: - `typos` passes. - The rendered version above is a full build of this branch with the ASF Pelican action, the same action the site's publish workflow uses. cc @comphead -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
