feat(iceberg): honor write.parquet.* via ParquetWriterBuilder::from_table_properties#2561
Draft
kszucs wants to merge 1 commit into
Draft
feat(iceberg): honor write.parquet.* via ParquetWriterBuilder::from_table_properties#2561kszucs wants to merge 1 commit into
kszucs wants to merge 1 commit into
Conversation
…able_properties Add ParquetWriterBuilder::from_table_properties(&TableProperties, schema), which translates write.parquet.* settings into parquet WriterProperties instead of using parquet-rs defaults. Currently translates the content-defined-chunking keys; other keys fall back to parquet-rs defaults and can be added to this one translation point later. Add a chainable with_match_mode setter to override field matching. The DataFusion insert_into path now builds its writer from the table properties it already parsed, instead of translating CDC options inline, so the direct (non-DataFusion) writer path picks up the same behavior. Add an HF-gated Rust integration test that writes a CDC parquet file to HuggingFace Hub and verifies the payload column is content-chunked, and wire it into the existing HF CI workflow.
8cb9071 to
2c8caf5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
What changes are included in this PR?
write.parquet.*table properties were only honored on the DataFusionINSERT INTOpath, via an inline content-defined-chunking (CDC) translation. Any code writing through the writer stack directly (DataFileWriter→ParquetWriterBuilder) silently used parquet-rs defaults.ParquetWriterBuilder::from_table_properties(&TableProperties, schema), which translateswrite.parquet.*settings intoWriterProperties. It currently translates the content-defined-chunking keys (write.parquet.content-defined-chunking.*); other keys fall back to parquet-rs defaults and can be added to this single translation point later.with_match_modesetter so the field match mode can be overridden (DataFusion needs name-based matching, since its Arrow batches carry no field-id metadata).insert_intowriter to build viafrom_table_properties, reusing theTablePropertiesit has already parsed instead of translating CDC options inline.Additive only:
newandnew_with_match_modeare unchanged; no breaking changes.Are these changes tested?
parquet_writer.rs: CDC off by default, CDC options translated from properties, and an end-to-end test that writes through the writer to local FS and asserts thepayloadcolumn is split into multiple variable-sized data pages with CDC, and a single page without.test_insert_into*DataFusion integration tests cover the refactored path (behaviorally unchanged).hf_cdc_write_test) writes a CDC parquet file to a HuggingFace bucket and verifies content-chunking on read-back, wired into the existingci_hf_cdc.ymlworkflow. Runs only whenHF_TOKEN/HF_BUCKETare set.