Ted-Jiang commented on code in PR #3780:
URL: https://github.com/apache/arrow-datafusion/pull/3780#discussion_r995745959
##########
datafusion/core/src/physical_plan/file_format/parquet.rs:
##########
@@ -460,6 +498,20 @@ impl FileOpener for ParquetOpener {
}
}
+// Check PruningPredicates just work on one column.
+fn check_page_index_push_down_valid(predicate: &Option<PruningPredicate>) ->
bool {
+ if let Some(predicate) = predicate {
+ // for now we only support pushDown on one col, because each col may
have different page numbers, its hard to get
+ // `num_containers` from `PruningStatistics`.
+ let cols = predicate.need_input_columns_ids();
+ //Todo more specific rules
Review Comment:
Forget above 😂, yes we need rewrite the pruning predicate down, combine by
`and`, each sub-expr should refer only one col, if not we will not push it to
parquet.
after evaluate each sub-expr one by one will do the intersection get the
final result.
The reason why we cannot evaluate muiti-column is in the
`build_statistics_record_batch` it will return a recordBatch: each col must
have the same length(not suitable for pageIndex).
https://github.com/apache/arrow-datafusion/blob/096627a2340aa33526c46eb551283eb88daabbea/datafusion/core/src/physical_optimizer/pruning.rs#L176-L177
--
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]