Skip to content

feat(parquet): wire in additional parquet writer settings#2887

Open
xanderbailey wants to merge 1 commit into
apache:mainfrom
xanderbailey:xb/parquet_writer_settings
Open

feat(parquet): wire in additional parquet writer settings#2887
xanderbailey wants to merge 1 commit into
apache:mainfrom
xanderbailey:xb/parquet_writer_settings

Conversation

@xanderbailey

@xanderbailey xanderbailey commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

What changes are included in this PR?

ParquetWriterBuilder::from_table_properties previously only translated the content-defined-chunking settings; every other Parquet knob silently fell through to parquet-rs (arrow-rs) defaults, which diverge from the Java implementation. This PR maps the row-group / page / dictionary sizing and compression table properties into the parquet-rs WriterProperties:

  • write.parquet.compression-codec (default zstd) and write.parquet.compression-level
  • write.parquet.row-group-size-bytes (default 128 MB)
  • write.parquet.page-size-bytes (default 1 MB)
  • write.parquet.page-row-limit (default 20000)
  • write.parquet.dict-size-bytes (default 2 MB)

How the new Iceberg defaults differ from the parquet-rs defaults that were previously in effect:

  • compression: parquet-rs defaults to UNCOMPRESSED, so files were previously written uncompressed; the Java default is zstd.
  • row group size: parquet-rs sets no byte limit and flushes row groups by row count only (~1M rows); we now apply a 128 MB byte budget. The row-count limit is left at the parquet-rs default since Iceberg has no property for it, so row groups now flush at 128 MB or ~1M rows, whichever comes first.
  • dictionary page size: parquet-rs defaults to 1 MB; the Iceberg default is 2 MB.
  • page size (1 MB) and page row limit (20000) already matched parquet-rs, so those are unchanged in practice.

Are these changes tested?

Yes

@xanderbailey
xanderbailey force-pushed the xb/parquet_writer_settings branch from abcfba9 to ca7d5ba Compare July 24, 2026 12:44
/// writer is built, not when properties are parsed.
pub const PROPERTY_PARQUET_COMPRESSION_CODEC: &str = "write.parquet.compression-codec";
/// Default Parquet compression codec (matches Iceberg's default since 1.4.0).
pub const PROPERTY_PARQUET_COMPRESSION_CODEC_DEFAULT: &str = "zstd";

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have called this out in the PR description but current default is actually uncompressed from what I can see.

This opens up a question generally as to if we should copy the Java defaults for these settings which might be more intuitive for user or keep the defaults as the arrow-rs defaults... I don't have a strong opinion here so interested to hear people's thoughts.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the matter of inconsistency, there are other places where arrow-rs has different defaults to parquet-java, like the compression level for zstd too:

assert_eq!(upper_bounds, HashMap::from([(0, Datum::int(i32::MAX))]));
}

// -----------------------------------------------------------------

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looked very claude so I removed

@xanderbailey xanderbailey changed the title feat(paquet): wire in additional parquet writer settings feat(parquet): wire in additional parquet writer settings Jul 24, 2026
@mbutrovich
mbutrovich self-requested a review July 24, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Iceberg table properties

2 participants