fix: ignore reader-side parquet.hadoop.vectored.io.enabled in Iceberg native-write detection (#5410)

Avoid mis-classifying Compatible Iceberg V2 writes as Unsupported due to
well-known parquet reader settings.

CometIcebergNativeWrite's `requireNoParquetHadoopConfOverrides` (added
in #5298) walks the entire session Hadoop Configuration and returns an
`Unsupported` fall-back reason for any key starting with `parquet.`.
The intent is sound (a `parquet.*` key in the Hadoop conf reaches
iceberg-java's writer but not Comet's native writer), but the
predicate is too broad: it checks reader-side `parquet.*` keys the
same as writer-side ones.

`parquet.hadoop.vectored.io.enabled` is a reader-side vectored-IO
knob:

- Declared in parquet-hadoop as
  `org.apache.parquet.hadoop.ParquetInputFormat.HADOOP_VECTORED_IO_ENABLED`
  with default `true` in parquet-hadoop 1.16+.
- Only consulted by parquet-mr's Hadoop reader path (via
  `HadoopReadOptions.useHadoopVectoredIo`); iceberg-java's writer
  never reads it.

Any environment that seeds it into the session Hadoop configuration
trips this rule, and every otherwise-Compatible Iceberg V2 write is
silently mis-classified as Unsupported — the native writer is
disabled without the user having changed any writer-relevant setting.

Add an `IgnoredHadoopParquetConfKeys` set containing
`parquet.hadoop.vectored.io.enabled` and consult it inside the
`parquet.*` walk before emitting the fall-back reason. The broad
`startsWith("parquet.")` gate remains in place for every
writer-relevant knob.

Add a regression test that pins
`parquet.hadoop.vectored.io.enabled=true` in the session Hadoop
configuration via `withSQLConf` and asserts Compatible. The existing
negative test ("fall-back: parquet.* key in the session Hadoop
configuration", keyed on `parquet.block.size`) continues to exercise
the rejection path for real writer-relevant `parquet.*` keys.

Co-authored-by: Steve Vaughan Jr <s_vaughan@apple.com>
2 files changed
tree: 86fa081172c7c48f12a6d9fdbe1927bc98cc4555
  1. .claude/
  2. .github/
  3. .mvn/
  4. benchmarks/
  5. common/
  6. conf/
  7. contrib/
  8. dev/
  9. docs/
  10. kube/
  11. native/
  12. spark/
  13. spark-integration/
  14. .asf.yaml
  15. .dockerignore
  16. .gitignore
  17. .prettierignore
  18. .scalafix-syntactic.conf
  19. .scalafix.conf
  20. AGENTS.md
  21. CHANGELOG.md
  22. LICENSE.txt
  23. Makefile
  24. mvnw
  25. mvnw.cmd
  26. NOTICE.txt
  27. pom.xml
  28. README.md
  29. rust-toolchain.toml
  30. scalafmt.conf
README.md

Apache DataFusion Comet

Apache licensed Discord chat Pending PRs Maven Central

Apache DataFusion Comet is a high-performance accelerator for Apache Spark. Comet keeps Spark queries Arrow-native end-to-end: operators, expressions, shuffle, and broadcast all stay in Apache Arrow columnar format, avoiding the per-row overhead of Spark's row-based engine. Within the Arrow-native pipeline, operators and expressions execute as Rust code (via the Apache DataFusion query engine) or as JVM code that operates directly on Arrow batches. Comet integrates with the Spark ecosystem without requiring any code changes.

Comet provides a ~2x speedup for TPC-DS @ SF 1000 (1TB), resulting in ~50% cost savings.

That 2x speedup gives you a choice: finish the same Spark workload in half the time on the cluster you already have, or match your current Spark performance on roughly half the resources. Either way, the gain translates directly into lower cloud bills, reduced on-prem capacity, and lower energy usage, with no changes to your existing Spark SQL, DataFrame, or PySpark code. Comet runs on commodity hardware: no GPUs, FPGAs, or other specialized accelerators are required, so the savings come from better utilization of the infrastructure you already run on.

See the Comet Benchmarking Guide for more details.

What Comet Accelerates

Comet accelerates Spark workloads by replacing Spark operators and expressions with high-performance implementations that process Apache Arrow columnar data directly. Most operators are powered by native Rust execution built on Apache DataFusion, while others run efficiently in the JVM on Arrow batches. This unified columnar execution model keeps processing within the Comet engine end-to-end, reducing overhead and delivering faster, more efficient query execution without reverting to Spark's traditional row-based engine.

  • Parquet scans: native Parquet reader integrated with Spark's query planner
  • Apache Iceberg: accelerated Parquet scans when reading Iceberg tables from Spark (see the Iceberg guide)
  • Shuffle: Arrow-IPC columnar shuffle with support for hash and range partitioning, in a native Rust implementation paired with a JVM fallback for unsupported partition key types
  • Expressions: hundreds of supported Spark expressions across math, string, datetime, array, map, JSON, hash, and predicate categories
  • Aggregations: hash aggregate with support for FILTER (WHERE ...) clauses
  • Joins: hash join, sort-merge join, and broadcast join
  • Scala/Java UDFs: support for keeping Scala/Java scalar UDFs in the Comet pipeline via Spark's whole-stage codegen (see the Scala UDF guide)

For the authoritative lists, see the supported expressions and supported operators pages.

Drop-In Integration

Comet is designed as a drop-in accelerator for Apache Spark, allowing you to integrate Comet into your existing Spark deployments and workflows seamlessly. With no code changes required, you can immediately harness the benefits of Comet's acceleration capabilities without disrupting your Spark applications.

Getting Started

Comet supports Apache Spark 3.4, 3.5, 4.0, and 4.1, and provides experimental support for Spark 4.2. See the installation guide for the detailed version, Java, and Scala compatibility matrix.

Install Comet by adding the jar for your Spark and Scala version to the Spark classpath and enabling the plugin. A typical configuration looks like:

export COMET_JAR=/path/to/comet-spark-spark3.5_2.12-<version>.jar

$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

For full installation instructions, published jar downloads, and configuration reference, see the installation guide and the configuration reference.

Community

Join the DataFusion Slack and Discord channels to connect with other users, ask questions, and share your experiences with Comet.

Contributing

We welcome contributions from the community to help improve and enhance Apache DataFusion Comet. Whether it's fixing bugs, adding new features, writing documentation, or optimizing performance, your contributions are invaluable in shaping the future of Comet. Check out our contributor guide to get started.

License

Apache DataFusion Comet is licensed under the Apache License 2.0. See the LICENSE.txt file for details.