Repository navigation
Fix ORC timestamp pruning for UTC aliases and Iceberg ORC timestamps - #132657
Conversation
Filter push down disabled the `TIMESTAMP` statistics unless the writer and reader zones were named `UTC` or `GMT`, so `Etc/UTC` and the other aliases read every row group. Decide by the offset, as `hasFixedOffset` does elsewhere. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ORC stores the timestamps between -1 and 0 seconds as the epoch, while the Iceberg bounds came from the original values, so pruning skipped data files whose rows a full read returns at the epoch. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Workflow [PR], commit [a7e5a3e] Summary: ✅
AI ReviewSummaryThe PR enables Findings❌ Blockers
Tests
Missing context / blind spots
Final VerdictStatus: ❌ Block. Minimum required actions: prevent partition-changing compaction from publishing stale tuples, and prevent legacy non-UTC files from being pruned with bounds that disagree with their interpreted values, with the focused regression coverage above. |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units1450 translation units recompiled, 611 s compile time in total, 1450 of them have a recent master baseline. |
…lues Decide whether an ORC time zone is UTC or has a fixed offset by the absence of transitions, since `hasFixedOffset` only covers the years 1900-2299 and the wall clock conversion of older timestamps depends on the older offsets. Replace the timestamps that ORC stores as the epoch before the Iceberg inserts derive the partitions and the bounds, and before the compaction computes the bounds, instead of only raising the upper bounds. The Iceberg timestamps are UTC instants and the reference implementation reads and writes ORC with `useUTCTimestamp`, but the ORC time zone settings shifted them while the bounds stayed in UTC. Use UTC for both time zones in the Iceberg reads, inserts and compaction. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…build The Cloud build reads `allow_experimental_iceberg_compaction` when the table is created, not on `OPTIMIZE`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
📊 Cloud Performance Report ✅ AI verdict: No performance change can be attributed to this PR. The tested build changes only how ORC files handle timestamp time zones and how Iceberg tables read, write and compact ORC files, and none of the clickbench or tpch_adapted_1_official queries use that code. Two clickbench queries were slower and are marked not sure, not regressions: Q30 (+18.5%, 186 ms vs 157 ms) and Q31 (+18.1%, 254 ms vs 215 ms). Both are GROUP BY ... ClientIP aggregations on the MergeTree hits table, both new medians fall inside master's own current range for those queries, and both queries have a noisy history, so leaving them as not sure is consistent with the diff. clickbenchFlagged queries (2 of 43)
Change = percent below ×2; the ratio of medians (×N faster/slower) beyond, where percent understates the scale. q-value = BH-FDR adjusted p; smaller is stronger evidence. MIRAI flags a query when q < fdr_q (default 0.10) — the value the verdict is based on. tpch_adapted_1_official🟢 No significant changes Debug info
|
873a218
ORC
TIMESTAMPfixes for regressions that are only on master, plus the Iceberg ORC time zones:UTCandGMTas UTC, soEtc/UTC,Zuluand the other aliases read every row group. The reader and the writer now decide by the zone file: no transitions and a zero offset. The column reader also skips the wall clock conversion between two zones without transitions and with the same offset (hasFixedOffsetis not enough, it only covers the years 1900-2299).useUTCTimestamp, butoutput_format_orc_writer_time_zone_nameandinput_format_orc_reader_time_zone_nameshifted them while the bounds stayed in UTC, so pruning skipped rows. The Iceberg reads, inserts and compaction now use UTC for both. Iceberg ORC files written by ClickHouse before this change with a non-UTC writer time zone are now read as the reference implementation reads them, shifted by that offset, even when the reader time zone matches.Closes: #132383
Closes: #131492
Related: #131274
Related: #131036
Changelog category (leave one):
Workflow [PR]
Sync PR [sync-upstream/pr/132657]
Version info
26.12.1.127-master(included in26.12and later)