feat: translate parquet.columnindex.truncate.length for native Iceberg writes #7776
All Vouch review confidence checks passed
Residual risk 0.26 = Change Risk (0.46) × (1 − Review Confidence (0.43)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.46 · 475 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.369
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #7776"
general
weight: 0.35
comphead
Which issue does this PR close?
Part of #6954 (one of the settings listed there;
parquet.enable.dictionaryis handled separately).Rationale for this change
iceberg-java's
ParquetWriterreadsparquet.columnindex.truncate.length(default 64) from its writer's Hadoop configuration, into which it copies the table and write properties. The native writer ignored it, so the gate declined every write that set the key, although parquet-rs has a direct equivalent (WriterProperties::set_column_index_truncate_length).What changes are included in this PR?
IcebergParquetWriteSettings.column_index_truncate_length.IcebergWriteProtoTranslation): resolves the key from the effective table/write properties the way Hadoop'sConfiguration.getIntreads a decimal (trimmed, optional+), defaulting to iceberg-java's 64.columnIndexTruncateLengthRejectiondeclines0, negative values, overflow, and valuesgetIntreads but the translation does not (hex,${var}).CometIcebergNativeWrite): admits the key as a table or write property.UnsupportedParquetMrKeysbecomesParquetMrKeysReadByWriter; a key set only in the session or FileIO Hadoop configuration still falls back, because iceberg-java sets the table/write properties over that configuration and the effective value there depends on the FileIO.build_writer_properties): passes the value to parquet-rs. A zero returns an error instead of reaching parquet-rs'sassert!, so no panic can cross JNI.parquet.paragraph and the fallback plan list in the user guide; contributor guide updated for the renamed set. A new accepted divergence documents how parquet-mr'sBinaryTruncatorand parquet-rs truncate column index bounds differently (raising a truncated non-ASCII string upper bound;binary/fixedcolumns without a logical type). Both produce valid bounds, so page pruning stays correct. The difference already exists at the default length of 64; a smaller length makes it reachable on shorter values.No new config keys. Manifest metrics are unaffected: they are rebuilt from footer statistics, which this setting does not touch.
How are these changes tested?
CometIcebergWriteActionSuite: writes the same rows through the native and iceberg-java writers with a length of 8. It asserts that rows andreadable_metricsmatch, and that every page's column index min/max is identical across the two writers and truncated to 8 bytes.CometIcebergWriteActionSuite: for the documented divergence, writes multi-byte UTF-8 strings (including a 4-byte code point straddling the cut) and binary values (valid UTF-8, invalid UTF-8, plain bytes) with a length of 4. For each writer it asserts the bounds are truncated to 4 bytes and contain every value of the page, so pruning stays correct even though the two writers' bytes differ.CometIcebergWriteDetectionSuite: a valid table property isCompatible;0and hex fall back; the key in the session Hadoop configuration alone still falls back; a table property overriding it isCompatible. The existing cataloghadoop.override test still falls back.IcebergWriteProtoTranslationSuite: default, accepted spellings (" 16 ",+32,0064) and rejected ones (0,-1,0x20,${len},abc, empty,2147483648).translates_column_index_truncate_length,rejects_zero_column_index_truncate_length.Run locally (Spark 4.1 default profile, JDK 17): the three suites above (the Action suite filtered to its
parquettests, including the parquet-mr key classification test),iceberg_writeRust tests,cargo clippy --all-targets --workspace -D warnings,cargo fmt, spotless, and the semantic scalafix check.