alamb commented on a change in pull request #657:
URL: https://github.com/apache/arrow-datafusion/pull/657#discussion_r663851278



##########
File path: datafusion/src/physical_plan/parquet.rs
##########
@@ -555,21 +625,29 @@ fn build_row_group_predicate(
         row_group_metadata,
         parquet_schema,
     };
-
     let predicate_values = predicate_builder.prune(&pruning_stats);
 
-    let predicate_values = match predicate_values {
-        Ok(values) => values,
+    match predicate_values {
+        Ok(values) => Box::new(move |_, i| {
+            // NB: false means don't scan row group
+            if !values[i] {

Review comment:
       One difference that results from updating the metrics right before use 
is what happens in a `limit` query -- ala `SELECT * from parquet_table where 
date < 2012-20-20 limit 10` -- in this case the  query might never even 
contemplate reading a particular partition due to the limit
   
   However, having written that I think it would make the statistics easier to 
understand (and more consistent query to query) to report the stats prior to 
the actual function. I will make that change




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