Dandandan commented on code in PR #12471:
URL: https://github.com/apache/datafusion/pull/12471#discussion_r1771166051
##########
datafusion/core/src/datasource/physical_plan/parquet/mod.rs:
##########
@@ -741,7 +741,18 @@ impl ExecutionPlan for ParquetExec {
}
fn statistics(&self) -> Result<Statistics> {
- Ok(self.projected_statistics.clone())
+ // When filters are pushed down, we have no way of knowing the exact
statistics.
+ // Note that pruning predicate is also a kind of filter pushdown.
+ // (bloom filters use `pruning_predicate` too)
+ let stats = if self.pruning_predicate.is_some()
+ || self.page_pruning_predicate.is_some()
+ || (self.predicate.is_some() && self.pushdown_filters())
+ {
+ self.projected_statistics.clone().to_inexact()
Review Comment:
Shouldn't we make this absent, unless we actually estimate it using pushed
down filters? 🤔
--
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]