@@ -47,12 +47,10 @@ use datafusion_common::{Column, ScalarValue};
4747use datafusion_expr_common:: operator:: Operator ;
4848use datafusion_physical_expr:: PhysicalExprRef ;
4949use datafusion_physical_expr:: expressions:: { BinaryExpr , col, in_list, lit} ;
50- use datafusion_pruning:: {
51- MAX_IN_LIST_SIZE , PruningPredicate , PruningPredicateBuilder , PruningStatistics ,
52- } ;
50+ use datafusion_pruning:: { PruningPredicate , PruningPredicateBuilder , PruningStatistics } ;
5351
5452const DOMAIN_SIZES : [ usize ; 9 ] = [ 1 , 2 , 4 , 8 , 16 , 20 , 21 , 256 , 1024 ] ;
55- const CONTAINER_COUNTS : [ usize ; 3 ] = [ 16 , 256 , 4096 ] ;
53+ const CONTAINER_COUNTS : [ usize ; 4 ] = [ 1 , 16 , 256 , 4096 ] ;
5654const BASELINE_CONTAINER_COUNT : usize = 4096 ;
5755
5856fn value ( index : usize ) -> String {
@@ -332,7 +330,12 @@ fn assert_equivalent_results(case: &BenchmarkCase, statistics: &IntervalStatisti
332330 . not_in_list_with_null_predicate
333331 . prune ( statistics)
334332 . unwrap ( ) ;
335- if case. size + 1 > MAX_IN_LIST_SIZE {
333+ if case
334+ . in_list_with_null_predicate
335+ . predicate_expr ( )
336+ . to_string ( )
337+ . contains ( "IN_SET_INTERSECTS" )
338+ {
336339 // Compact pruning applies filter semantics: NULL does not change which
337340 // rows can satisfy IN, while NOT IN (..., NULL) can never be true.
338341 assert_eq ! ( in_with_null, expected) ;
@@ -435,11 +438,11 @@ fn criterion_benchmark(criterion: &mut Criterion) {
435438 criterion. benchmark_group ( "string_in_list_pruning/not_in_distributions" ) ;
436439 distributions. throughput ( Throughput :: Elements ( BASELINE_CONTAINER_COUNT as u64 ) ) ;
437440 let singleton = IntervalStatistics :: uniform_singleton ( ) ;
438- for case in cases. iter ( ) . filter ( |case| case . size > 20 ) {
439- let compact = case. not_in_list_predicate . prune ( & singleton) . unwrap ( ) ;
440- assert ! ( compact . iter( ) . all( |keep| !keep) ) ;
441+ for case in & cases {
442+ let actual = case. not_in_list_predicate . prune ( & singleton) . unwrap ( ) ;
443+ assert ! ( actual . iter( ) . all( |keep| !keep) ) ;
441444 assert_eq ! (
442- compact ,
445+ actual ,
443446 case. expanded_and_predicate. prune( & singleton) . unwrap( )
444447 ) ;
445448 for ( name, predicate) in [
0 commit comments