Repository navigation
Add column size statistics in metadata files - #121392
Conversation
|
Workflow [PR], commit [a29b7cd] Summary: ❌
AI ReviewSummaryThis PR switches Iceberg PR Metadata
### Changelog category (leave one):
- Bug Fix
### Changelog entry:
Iceberg manifest files now write `data_file.column_sizes` from the encoded Parquet footer, so per-column sizes match the bytes stored in each data file instead of in-memory column sizes.Findings
Final VerdictRequest changes: the new Parquet path is reasonable, but the current patch regresses supported non-Parquet Iceberg write formats by dropping LLVM Coverage ReportMeasured on commit a29b7cd.
Changed lines: Changed C/C++ lines covered: 102/128 (79.69%) · Uncovered code |
| virtual bool supportsWritingException() const { return false; } | ||
| virtual void setException(const String & /*exception_message*/) {} | ||
|
|
||
| virtual std::unordered_map<String, size_t> getColumnSizesOnDisk() const { return {}; } |
There was a problem hiding this comment.
Removing the old byteSize() accumulation makes column_sizes depend entirely on IOutputFormat::getColumnSizesOnDisk(), but only ParquetBlockOutputFormat overrides that hook. Iceberg INSERT still supports non-Parquet data files (ORC and Avro; see 04293_iceberg_mutate_non_parquet_reject.sh), so after this change those tables will start committing manifest entries with an empty data_file.column_sizes map. That is a user-visible regression from the current behavior for non-Parquet tables. Please either keep a fallback for formats that cannot report on-disk sizes yet, or implement this hook for every Iceberg write format before removing the old path.
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Object file sizes166 object files changed (+169.61 KiB total), 0 added.
716 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only Compile time of recompiled translation units10984 translation units recompiled, 12113 s compile time in total, 10491 of them have a recent master baseline.
|
Backport #121392 to 26.9: Add column size statistics in metadata files
Backport #121392 to 26.8: Add column size statistics in metadata files
Cherry pick #121392 to 26.7: Add column size statistics in metadata files
Backport #121392 to 26.7: Add column size statistics in metadata files
The 26.8.27 bump combined two Iceberg changes that each predate the other: upstream ClickHouse#121392 added addColumnSizesOnDisk(), which iterates every schema field and throws LOGICAL_ERROR if a field reports no on-disk size; Altinity #2363 added the `unknown`-type write path, which strips columns that are not physically written (e.g. a column of only the Iceberg `unknown` type) and marks their schema positions via excludeColumns(). The getters (getColumnSizes / getNullCounts / getLowerBounds / getUpperBounds) all skip excluded positions, but addColumnSizesOnDisk() did not, so finalize() aborted with "Written data file does not report the on-disk size of column <name>" and took the server down. Skip excluded positions there too, matching the getters. This crashed test_storage_iceberg_no_spark/test_unknown_type.py (the write tests, plus the cascade of Connection-refused failures after the server died). For normal tables excludeColumns() is never called, so isExcluded() is always false and behavior is unchanged. Validated by CI on this PR, not locally (no build in this environment). Signed-off-by: blau-ai <[email protected]> Co-Authored-By: Claude Opus 4.8 <[email protected]>
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Add column size statistics in Avro files
Workflow [PR]
Sync PR [sync-upstream/pr/121392]
Version info
26.10.1.410-master(included in26.10and later)26.9.2.9,26.8.11.14,26.7.14.31