Repository navigation
fix(iceberg): honor Parquet compression and encode strings with dictionaries - #32548
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
…af2ce4c5ca65702ba96865fc7ec17ac92f42670
|
Queue requested — the merge queue status continues in this comment ↓. |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: ffebfe3b9c3fa360ad0e7708b46cd40b39f90799
Assessment: approve
Compression settings and default ZSTD now reach append and replacement data files through the existing writer owners. Dictionary encoding, bounded row-group input and shared per-fanout compression state form a coherent fix; failure poisoning preserves commit safety. The fixed-dictionary performance tradeoff is documented and no actionable defect remains.
Model: gpt-6.1-sol / max
Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0
Validation:
-
Reviewed the complete 16-file delta, issue 32466, all three discussion entries, append/UPDATE/MERGE/OVERWRITE propagation, DELETE independence, reader/metadata contracts and abort/orphan paths. discussion-assessment.json covers every discussion key exactly once.
-
Frozen evidence reports successful final-head Ubuntu UT, SCA on arm64, shared build, coverage and both active compose BVT jobs (13 success, 14 skipped, 2 neutral). Iceberg E2E Local was skipped and is not counted as execution proof.
-
Author reports all six codecs, default ZSTD, dictionary round trips, focused race coverage, live append/overwrite and independent Parquet/PyIceberg reads at 701f9a8/7413b03. Compared all PR-owned changed inputs and go.mod/go.sum: only E2E statement-capacity preallocation differs from final head. These remain author-reported results; whole-server integration inputs were not established equal.
-
Supplied preflight passed. Downloaded and inspected exact pinned parquet-go v0.25.1 and klauspost/compress v1.19.0 encoder ownership, concurrency and standard decoding behavior; no product test execution is claimed by that check.
-
Local bounded delivery check passed: frozen clean head/full patch identity, git diff --check, gofmt for 14 changed Go files, checker Python syntax, author-input comparison and exact discussion-key coverage. validation-audit.json matches all three executor receipts to command, source, exit and retained stdout/stderr logs.
Limitations:
-
No local Go product/race suite or live Iceberg service was rerun; raw author/CI execution logs were not supplied. The independent checker was syntax-checked locally, not executed against a catalog.
-
Fixed dictionaries have no adaptive plain fallback. Author measurements report a 96.1% low-cardinality size reduction and 2.85x CPU/2.68x cumulative allocations for wide random strings versus the old uncompressed baseline; these do not establish production throughput or peak-memory equivalence. The 1 MiB string-input bound permits one oversized row and does not bound total SQL memory.
-
Compression-level tuning and configurable row-group byte size remain outside this fix. The disclosed PyIceberg UPDATE snapshot-operation limitation belongs to unchanged baseline DML metadata code; it is not validated as corrected here. No old-binary/new-file or end-to-end backup/restore claim is made.
🚫 Left the queue · pull request dequeued1 h 8 min in the queue, with no time running CI. So far
Reason Pull request #32548 has been dequeued Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.
To get back in the queue
Merge conditions not met when it left the queue
Tick the box to put this pull request back in the merge queue (same as
2 merge conditions met
Times in UTC · dashboard · how the merge queue works |
…af2ce4c5ca65702ba96865fc7ec17ac92f42670
What type of PR is this?
Which issue(s) this PR fixes:
What this PR does / why we need it:
Iceberg data writes ignored
write.parquet.compression-codecand used plain string encoding, producing unnecessarily large files. Propagate the table's codec to append and replacement writers, default to ZSTD, and use dictionary encoding for strings. Bound string input per row group and reuse a limited ZSTD encoder per fanout writer. Compression level and a configurable row-group byte limit are not supported by this change.Validation:
701f9a84531dd79b6a16fee3ad7be4cde2779476, relevant package tests, focused race tests, vet and lint passed. Independent file tests covered all six supported codecs and old-format reads. A real Linux SQL append suite passed 10/10, with committed footers and PyIceberg reads for default ZSTD, explicit ZSTD and UNCOMPRESSED. A mixed snapshot of old PLAIN/UNCOMPRESSED and new ZSTD files returned 8,194 rows including NULL through MatrixOne and PyIceberg. The old file came from a baseline writer overlay, not a complete old server. RealINSERT OVERWRITEcommitted a SNAPPY replacement whose footer, MatrixOne result and normal PyIceberg snapshot scan agreed, including NULL.7413b03bb5da564bcf5209146aa503c767398cd5, a targeted real-service public-path check repeated three-table append and committed footer checks, SNAPPY OVERWRITE and a mixed snapshot scan. This was not a rerun of the full 10/10 suite.7413b03toffebfe3b9c3fa360ad0e7708b46cd40b39f90799preallocates the 12 local Iceberg E2E setup statements; production service inputs are unchanged. On the final head, Ubuntu/x86 UT, SCA, and CI Required completed successfully. An earlier Ubuntu UT run at7413b03failed with several timeouts; its root cause remains undetermined, and the later success does not establish that the preallocation fixed it.UPDATE committed a SNAPPY replacement and MatrixOne returned the expected values, but PyIceberg 0.12.0 rejected the snapshot's
operation=updateduring metadata loading. The assignment exists in baseline source and the relevant DML package is unchanged; a clean baseline server was not tested. This change does not resolve that metadata limitation or establish that UPDATE snapshots can be scanned by PyIceberg.Performance depends on data. In a small local eight-partition benchmark, low-cardinality output was 96.1% smaller than the baseline, while wide random strings used about 2.85 times the CPU time and 2.68 times the cumulative allocations. Fixed dictionary encoding has no automatic plain fallback; these measurements are not production throughput or peak-memory guarantees. The 1 MiB string-input limit allows an oversized single row and does not bound total SQL memory. Old binaries reading newly written files, end-to-end backup/restore, and a merge with newer main have not been validated.