zhuqi-lucas commented on code in PR #24074:
URL: https://github.com/apache/datafusion/pull/24074#discussion_r3719916722


##########
datafusion/pruning/src/pruning_predicate.rs:
##########
@@ -388,7 +388,29 @@ pub fn build_pruning_predicate(
     file_schema: &SchemaRef,
     predicate_creation_errors: &Count,
 ) -> Option<Arc<PruningPredicate>> {
-    match PruningPredicate::try_new(predicate, Arc::clone(file_schema)) {
+    build_pruning_predicate_with_max_in_list_size(
+        predicate,
+        file_schema,
+        predicate_creation_errors,
+        MAX_LIST_VALUE_SIZE_REWRITE,
+    )
+}
+
+/// Same as [`build_pruning_predicate`] but with an explicit cap on the size
+/// of `IN (...)` lists rewritten into per-value statistics checks. Query
+/// engines typically pass `datafusion.execution.pruning_max_in_list_size`
+/// here.

Review Comment:
   Fixed by renaming to `datafusion.execution.parquet.max_in_list_size` (per 
alamb below) — docs now match the actual config key.



##########
datafusion/datasource-parquet/src/opener/mod.rs:
##########
@@ -65,7 +65,10 @@ use datafusion_physical_expr_common::sort_expr::LexOrdering;
 use datafusion_physical_plan::metrics::{
     BaselineMetrics, Count, ExecutionPlanMetricsSet, MetricBuilder, 
MetricCategory,
 };
-use datafusion_pruning::{FilePruner, PruningPredicate, 
build_pruning_predicate};
+use datafusion_pruning::{
+    FilePruner, PruningPredicate, build_pruning_predicate,
+    build_pruning_predicate_with_max_in_list_size,
+};

Review Comment:
   Fixed — switched to `PruningPredicateBuilder` and dropped the unused import.



##########
datafusion/datasource-parquet/src/opener/mod.rs:
##########
@@ -65,7 +65,10 @@ use datafusion_physical_expr_common::sort_expr::LexOrdering;
 use datafusion_physical_plan::metrics::{
     BaselineMetrics, Count, ExecutionPlanMetricsSet, MetricBuilder, 
MetricCategory,
 };
-use datafusion_pruning::{FilePruner, PruningPredicate, 
build_pruning_predicate};
+use datafusion_pruning::{
+    FilePruner, PruningPredicate, build_pruning_predicate,
+    build_pruning_predicate_with_max_in_list_size,
+};

Review Comment:
   Fixed above — the builder refactor removed the standalone helper call, so 
the unused import is gone.



##########
datafusion/datasource-parquet/src/opener/mod.rs:
##########
@@ -1860,6 +1875,7 @@ mod test {
                 enable_row_group_stats_pruning: false,
                 coerce_int96: None,
                 max_predicate_cache_size: None,
+                pruning_max_in_list_size: MAX_LIST_VALUE_SIZE_REWRITE,

Review Comment:
   Fixed — renamed the field to `max_in_list_size` and the const to 
`MAX_IN_LIST_SIZE` so the shapes match.



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