Repository navigation
Fix ORC filter pushdown dropping rows for TIMESTAMP columns when the writer or reader time zone is not UTC - #131274
Conversation
The reader keeps the wall clock of `TIMESTAMP` values in the reader time zone, while the statistics, bloom filters and filter literals are UTC instants, so the pushdown could drop matching rows. Skip the pruning unless the writer and reader time zones are both `UTC` or `GMT`. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Workflow [PR], commit [20ec922] Summary: ⏳ AI ReviewSummaryPR #131274, head Missing context / blind spots
Final VerdictStatus: ✅ Approve. No review changes requested; functional CI remains pending. |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Slowest function optimization changes (ThinLTO)Median per-function time ratio to the master baseline:
Compile time of recompiled translation units15 translation units recompiled, 68 s compile time in total, 15 of them have a recent master baseline. Median compile-time ratio to the baselines is ×1.08 (machine-speed difference or a change affecting every TU); per-TU deltas below are relative to that ratio. |
Closes: #129944
The native ORC reader keeps the wall clock of
TIMESTAMPvalues in the reader time zone, but the stripe, row group and bloom filter statistics, and the filter literals, are UTC instants. Withinput_format_orc_filter_push_downenabled, a predicate on such a column could prune rows that match. The reader now skips pruning onTIMESTAMPleaves unless both the writer time zone of the stripe and the reader time zone (input_format_orc_reader_time_zone_name) areUTCorGMT.IS NULLpredicates still prune. The file-level statistics never pruneTIMESTAMPleaves, because the writer time zone is stored per stripe.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix the native ORC reader returning fewer rows than expected for filters on
TIMESTAMPcolumns wheninput_format_orc_filter_push_downis enabled and the reader or writer time zone is notUTC.Workflow [PR]
Sync PR [sync-upstream/pr/131274]