xinlifoobar commented on code in PR #10711:
URL: https://github.com/apache/datafusion/pull/10711#discussion_r1618850434


##########
datafusion/core/src/datasource/physical_plan/parquet/statistics.rs:
##########
@@ -211,32 +394,25 @@ pub(crate) fn min_statistics<'a, I: Iterator<Item = 
Option<&'a ParquetStatistics
     data_type: &DataType,
     iterator: I,
 ) -> Result<ArrayRef> {
-    let scalars = iterator
-        .map(|x| x.and_then(|s| get_statistic!(s, min, min_bytes, 
Some(data_type))));
-    collect_scalars(data_type, scalars)
+    match get_statistics_iter!(iterator, min, min_bytes, Some(data_type)) {

Review Comment:
   This looks good to me but without macros the repetitions between `min` and 
`max` are  still there ... Do you suggest to have another macro to wrap all 
above and reuse it in min statistic and max statistic?



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