alamb commented on a change in pull request #657:
URL: https://github.com/apache/arrow-datafusion/pull/657#discussion_r663849500
##########
File path: datafusion/src/physical_plan/parquet.rs
##########
@@ -72,6 +76,8 @@ pub struct ParquetExec {
batch_size: usize,
/// Statistics for the data set (sum of statistics for all partitions)
statistics: Statistics,
+ /// Numer of times the pruning predicate could not be created
+ predicate_creation_errors: Arc<SQLMetric>,
Review comment:
The reason I didn't do this is because the other metrics are per
`ParquetPartition` (aka per each file / set of files) but this one is just one
metric for the overall `ParquetExec`
I agree this is confusing -- I'll make two statistics structures
(`ParquetPartitionMetrics` and `ParquetMetrics`) which hopefully will make this
clearer
##########
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
##########
File path: datafusion/src/physical_plan/parquet.rs
##########
@@ -72,6 +76,8 @@ pub struct ParquetExec {
batch_size: usize,
/// Statistics for the data set (sum of statistics for all partitions)
statistics: Statistics,
+ /// Numer of times the pruning predicate could not be created
+ predicate_creation_errors: Arc<SQLMetric>,
Review comment:
in 595fcdd07b
--
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]