samarkumar4355 opened a new pull request, #7775:
URL: https://github.com/apache/datafusion-comet/pull/7775
## Which issue does this PR close?
Part of #6954.
## Rationale for this change
Setting `parquet.enable.dictionary` currently causes native Iceberg writes
to fall back to `iceberg-java`, even though `parquet-rs` already supports
disabling dictionary encoding via
`WriterProperties::set_dictionary_enabled(false)`.
In `iceberg-java`, `Parquet.WriteBuilder` reads `parquet.enable.dictionary`
from table/write properties using `PropertyUtil.propertyAsBoolean`
(`Boolean.parseBoolean` semantics, defaulting to `true` when unset) and ignores
it when set in Hadoop configuration. Supporting this directly avoids
unnecessary fallbacks when dictionary encoding is disabled.
## What changes are included in this PR?
- **Vetting & Proto Translation:** Removed the `parquet.enable.dictionary`
fallback check in `CometIcebergNativeWrite`, added `dictionary_enabled` to
`IcebergParquetWriteSettings` in `operator.proto`, and translated the property
in `IcebergWriteProtoTranslation` matching `Boolean.parseBoolean` semantics.
- **Native Writer:** Passed `settings.dictionary_enabled` to
`WriterProperties::set_dictionary_enabled(...)` in `build_writer_properties`
and skipped `DictionaryChooser` sampling/selection when dictionary encoding is
disabled.
- **Tests:**
- Added Rust unit tests in `iceberg_dictionary.rs` and `iceberg_write.rs`.
- Added translation unit tests in `IcebergWriteProtoTranslationSuite`.
- Updated `CometIcebergWriteDetectionSuite` to verify `Compatible`
detection for table properties and write options.
- Updated `CometIcebergWriteActionSuite` key classification and added a
both-writers comparison test (`parquet.enable.dictionary=false`) checking
output rows, `readable_metrics`, and column chunk encodings.
- **Docs:** Added `parquet.enable.dictionary` to the native Iceberg write
eligibility table in `docs/source/user-guide/latest/iceberg.md` and removed it
from the `#6954` fallback list.
## How are these changes tested?
- Rust unit tests: `cargo test -p datafusion-comet --lib iceberg_dictionary`
and `cargo test -p datafusion-comet --lib iceberg_write`
- JVM suites: `IcebergWriteProtoTranslationSuite`,
`CometIcebergWriteDetectionSuite`, and `CometIcebergWriteActionSuite`
- Formatting and lint checks: `cargo fmt --check`, `cargo clippy
--all-targets --workspace -- -D warnings`, `./mvnw spotless:check`,
`scalastyle:check`, Prettier, Apache RAT, and `-Pspark-3.5,delta
-Pstrict-warnings` compilation
--
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]