Jump to content

Apache DataFusion Comet

From Open Lakehouse Wiki
Apache DataFusion Comet
Developer Apache Software Foundation (sub-project of Apache DataFusion); originally developed at Apple
Initial release 0.1.0 (July 2024); 1.0.0 on 2026-08-07
Latest release 1.2.0
(2026-11-03)
Written in Rust, Scala, Java
Type Native execution plugin for Apache Spark
License Apache License 2.0
Website datafusion.apache.org/comet
Repository github.com/apache/datafusion-comet
Related Apache Spark, Apache Gluten, Native execution engine (Spark), Apache Iceberg, Project Tungsten
Last verified 23 November 2026 against the GitHub releases and tags of apache/datafusion-comet (1.0.0, 1.1.0, 1.2.0), README.md and the user guide at the 1.2.0 tag (installation, Spark version compatibility, configs, operators, Iceberg, Delta Lake, memory tuning), the Comet versus Gluten comparison page, the top-level project proposal page and issue #6793, and the Apache Arrow blog post of 2024-03-06 announcing the donation.

Apache DataFusion Comet (usually just Comet) is an open source plugin for Apache Spark that replaces supported Spark SQL operators and expressions with implementations that process Apache Arrow columnar data, most of them native Rust code built on the Apache DataFusion query engine.[1] Spark still parses, optimizes and schedules the query, and existing Spark SQL, DataFrame and PySpark code runs without changes.[1] Comet is a sub-project of Apache DataFusion and one of the native execution engines available for Spark.[2]

What is Apache DataFusion Comet?

Apache DataFusion Comet is a Spark plugin that translates a Spark physical plan into a serialized form and passes it to native code for execution. Comet uses its own Protocol Buffers format for the plan, and execution is delegated to Apache DataFusion, a query engine written in Rust.[3] Unlike Apache Gluten, which supports several native backends, Comet is built for one engine and does not plan to support others.[3]

Apache DataFusion Comet keeps data in Arrow columnar format through operators, expressions, shuffle and broadcast. Inside that pipeline, operators and expressions run either as Rust code through DataFusion or as JVM code that works directly on Arrow batches.[1]

History and status

Apache DataFusion Comet was originally implemented at Apple. The Apache Arrow project management committee announced the donation of Comet to Apache Arrow on 2024-03-06; at that time DataFusion was itself part of Arrow.[4] When DataFusion became a top-level ASF project in April 2024, Comet became a sub-project of Apache DataFusion.[2]

Apache DataFusion Comet published its first release, 0.1.0, in July 2024. Version 1.0.0 followed on 2026-08-07 and 1.1.0 on 2026-10-06.[2] The latest release is 1.2.0, published on GitHub on 2026-11-03.[5]

The Comet community is preparing to make Comet a separate top-level ASF project named "Apache Comet". As of 2026-11-23 this is a proposal: the tracking issue is open, the board resolution has not been adopted, and the plan lists the 2026-12-16 ASF board meeting as the target.[2][6]

Which Spark versions does Comet support?

Apache DataFusion Comet 1.2.0 supports Apache Spark 3.4, 3.5, 4.0, 4.1 and 4.2. The installation guide lists the tested patch versions 3.4.3, 3.5.9, 4.0.4, 4.1.3 and 4.2.0.[7] Spark 4.3 is not on the list. Comet requires JDK 17 or later; JDK 11 support ended with the 1.1.0 release. Spark 3.4 support has been deprecated since 1.0.0 and is planned for removal.[7]

The installation guide also notes that Comet may not fully work with proprietary forks of Apache Spark, such as the Spark versions offered by cloud service providers.[7]

How does Comet work with Apache Spark?

Apache DataFusion Comet is added to the Spark class path as a JAR built for a given Spark and Scala version, and enabled through Spark's plugin interface. A typical configuration from the project README:[1]

$SPARK_HOME/bin/spark-shell \
    --jars $COMET_JAR \
    --conf spark.driver.extraClassPath=$COMET_JAR \
    --conf spark.executor.extraClassPath=$COMET_JAR \
    --conf spark.plugins=org.apache.spark.CometPlugin \
    --conf spark.shuffle.manager=org.apache.spark.sql.comet.execution.shuffle.CometShuffleManager \
    --conf spark.comet.explain.fallback.enabled=true \
    --conf spark.memory.offHeap.enabled=true \
    --conf spark.memory.offHeap.size=4g \
    --conf spark.executor.memoryOverhead=2g

Apache DataFusion Comet has two main switches. spark.comet.enabled (default true) turns the extension on, and spark.comet.exec.enabled (default true) turns on native execution; both must be on for operators to run natively.[8]

Comet shuffle is controlled by spark.comet.shuffle.enabled, which requires spark.shuffle.manager to be set to CometShuffleManager or, for Apache Celeborn, CometCelebornShuffleManager. Shuffle data is written as Arrow IPC and compressed with lz4 by default (spark.comet.shuffle.compression.codec, which also accepts zstd and snappy).[8] The native shuffle supports hash and range partitioning, with a JVM path for partition key types that the native code does not handle.[1]

Apache DataFusion Comet shares Spark's off-heap memory pool, sized by spark.memory.offHeap.size, as a budget for its reservations. Native memory that the pools do not track has to fit in spark.executor.memoryOverhead.[9] The default pool type, set by spark.comet.exec.memoryPool, is fair_unified.[8]

What runs natively and what falls back?

Apache DataFusion Comet runs whole subtrees of native operators together. If a query stage contains an operator that Comet does not support, that stage falls back to regular Spark execution, and the operator reference states that results are unaffected.[10] Each supported operator can be turned off with spark.comet.exec.OPERATOR.enabled=false, for example spark.comet.exec.sort.enabled=false.[10]

Natively supported work in Comet 1.2.0 includes Parquet scans, projections and filters, hash aggregates, hash, sort-merge and broadcast joins, and shuffle, plus hundreds of Spark expressions in the math, string, date and time, array, map, JSON, hash and predicate categories.[1] Structured Streaming operators, Cartesian joins, pickled (non-Arrow) Python UDFs and typed Dataset operators such as map and groupByKey fall back to Spark and are not on the roadmap.[10]

Apache DataFusion Comet can report why a stage did not run natively. spark.comet.explain.fallback.enabled (default false) logs the reasons, and the extended explain format spark.comet.explain.format (default verbose) annotates the plan with fallback reasons and a summary of how much of it was accelerated.[8]

Does Comet support Apache Iceberg and Delta Lake?

Apache DataFusion Comet has a native Apache Iceberg reader that scans data and delete files in Rust and is enabled by default; spark.comet.scan.icebergNative.enabled=false turns it off. The guide says it was tested with Iceberg 1.5, 1.8, 1.9, 1.10 and 1.11 and with Hadoop, Hive and REST catalogs (Iceberg REST catalog). Native Iceberg writes are off by default and enabled with spark.comet.write.iceberg.enabled=true. HDFS-backed tables fall back to Spark.[11]

Support for Delta Lake in Comet is experimental. It covers DSv1 Delta table scans through Comet's native Parquet scan, needs a separate comet-contrib-delta-spark JAR next to delta-spark, and is off by default (spark.comet.scan.delta.enabled).[12]

Comet vs Gluten

Apache DataFusion Comet and Apache Gluten have similar architectures: both are Spark plugins that serialize the physical plan and execute it natively. Gluten serializes plans as Substrait and supports several engines (Velox and ClickHouse in Gluten 1.7.0), while Comet uses its own Protocol Buffers format and only DataFusion. The comparison page, maintained by the Comet community and described there as likely biased, names the implementation language (Rust for DataFusion, C++ for Velox) as the main practical difference, for example for teams that write native UDFs.[3] See Native execution engine (Spark) for a wider comparison.

See also

References

  1. ↑ 1.0 1.1 1.2 1.3 1.4 1.5 Apache DataFusion Comet README (1.2.0). Apache Software Foundation.Retrieved 2026-11-23.
  2. ↑ 2.0 2.1 2.2 2.3 Proposal to Establish Apache Comet as a Top-Level Project. Apache DataFusion Comet.Retrieved 2026-11-23.
  3. ↑ 3.0 3.1 3.2 Comparison of Comet and Gluten. Apache DataFusion Comet.Retrieved 2026-11-23.
  4. ↑ Announcing Apache Arrow DataFusion Comet. Apache Arrow, 2024-03-06.Retrieved 2026-11-23.
  5. ↑ Release 1.2.0. Apache Software Foundation (GitHub).Retrieved 2026-11-23.
  6. ↑ [EPIC Promote Comet to a top level Apache project (#6793)]. Apache Software Foundation (GitHub).Retrieved 2026-11-23.
  7. ↑ 7.0 7.1 7.2 Installing DataFusion Comet (1.2.0). Apache DataFusion Comet.Retrieved 2026-11-23.
  8. ↑ 8.0 8.1 8.2 8.3 Comet Configuration Settings (1.2.0). Apache DataFusion Comet.Retrieved 2026-11-23.
  9. ↑ Comet Memory Tuning (1.2.0). Apache DataFusion Comet.Retrieved 2026-11-23.
  10. ↑ 10.0 10.1 10.2 Spark Operator Support (1.2.0). Apache DataFusion Comet.Retrieved 2026-11-23.
  11. ↑ Apache Iceberg (Comet 1.2.0 user guide). Apache DataFusion Comet.Retrieved 2026-11-23.
  12. ↑ Delta Lake (experimental) (Comet 1.2.0 user guide). Apache DataFusion Comet.Retrieved 2026-11-23.