Copilot commented on code in PR #24074:
URL: https://github.com/apache/datafusion/pull/24074#discussion_r3709357219


##########
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:
   Docs reference `datafusion.execution.pruning_max_in_list_size`, but the 
config option added in this PR is 
`datafusion.execution.parquet.pruning_max_in_list_size`. Using the wrong key in 
docs will mislead users wiring this through `SessionConfig`.
   
   This issue also appears in the following locations of the same file:
   - line 490
   - line 1398
   - line 1442



##########
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:
   `build_pruning_predicate` is imported here but no longer used in this module 
(all call sites use `build_pruning_predicate_with_max_in_list_size`). With 
`clippy -D warnings`, this unused import will fail CI; remove it from the 
import list.



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