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 <[email protected]>
|
Workflow [PR], commit [eec5ede] Summary: ✅
AI ReviewSummaryThe change prevents the native ORC reader from dropping matching Missing context / blind spots
Final VerdictStatus: ✅ Approve |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units15 translation units recompiled, 84 s compile time in total, 15 of them have a recent master baseline. |
…down-reader-timezone Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@Algunenano — ClickGap found the following in this PR:
Close anything that's wrong or already addressed. |
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]
Version info
26.11.1.2526-master(included in26.11and later)