Seanium commented on code in PR #11348:
URL: https://github.com/apache/arrow-rs/pull/11348#discussion_r4194002452


##########
parquet/src/arrow/arrow_reader/statistics.rs:
##########
@@ -85,6 +86,32 @@ pub(crate) fn from_bytes_to_f16(b: &[u8]) -> Option<f16> {
     }
 }
 
+/// Convert both bounds together: if either wraps in the reader's timestamp 
unit,
+/// neither bound can safely describe the decoded values.
+fn int96_statistics(min: &Int96, max: &Int96, unit: &TimeUnit) -> Option<(i64, 
i64)> {

Review Comment:
   Updated to reuse Int96::to_seconds() for the signed-day conversion, then 
scale in i128 and check the final i64. Both bounds are still discarded on 
overflow, since a wrapped endpoint can invalidate the other pruning bound. 
Added microsecond-limit and signed-day-extreme regressions against decoded 
values.



-- 
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]

Reply via email to