CurtHagenlocher commented on code in PR #7098:
URL: https://github.com/apache/arrow-rs/pull/7098#discussion_r1947819822
##########
parquet/src/arrow/arrow_reader/statistics.rs:
##########
@@ -263,9 +275,10 @@ macro_rules! make_decimal_stats_iterator {
ParquetStatistics::Int32(s) => {
s.$func().map(|x| $stat_value_type::from(*x))
}
- ParquetStatistics::Int64(s) => {
- s.$func().map(|x| $stat_value_type::from(*x))
- }
+ ParquetStatistics::Int64(s) => s
+ .$func()
+ .map(|x| $stat_value_type::try_from(*x).ok())
+ .flatten(),
Review Comment:
Both of these changes are required for the code to compile, so I'm somewhat
leaning on the compiler here. My naive take was that there shouldn't be a
performance loss from the change (and that this wouldn't be a
performance-critical path anyway) but I'm willing to believe that I might be
wrong.
--
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]