rgbuilds opened a new pull request, #26452:
URL: https://github.com/apache/datafusion/pull/26452

   ## Which issue does this PR close?
   
   - Closes #26451.
   
   ## Rationale for this change
   
   Casting timestamp statistics to time-of-day values does not preserve 
ordering across midnight. This can invert the minimum and maximum used by 
statistics pruning and incorrectly discard files or row groups that contain 
matching rows.
   
   ## What changes are included in this PR?
   
   - Prevent timestamp-to-`Time32` and timestamp-to-`Time64` casts from being 
used for statistics pruning.
   - Add pruning-expression coverage for both `CAST` and `TRY_CAST` across all 
supported time units.
   - Add a Parquet regression test whose timestamp bounds cross midnight.
   
   ## What is the testing strategy for this PR?
   
   The regression test verifies equality and range predicates for `Time32` and 
`Time64`, including the expected row counts and pruning metrics. The full 
extended workspace test suite also passes.
   
   ## Are there any user-facing changes?
   
   Queries that cast timestamps to time-of-day values may perform less 
statistics pruning, but they no longer risk incorrect results when timestamp 
bounds cross a day boundary.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to