@@ -634,9 +634,10 @@ mod tests {
634634 assert ! ( retain_primary_key_conjuncts( & [ or] , & fields, & pks) . is_empty( ) ) ;
635635
636636 // Constant predicates reference no columns and must survive the PK
637- // trim verbatim. Dropping AlwaysFalse here would be catastrophic:
638- // scan-side stats pruning treats it as prune-everything, so losing it
639- // would flip "return no rows" into "return every row".
637+ // trim verbatim. The post-merge residual (full predicate set) would
638+ // still mask every row to false if AlwaysFalse were dropped here, but
639+ // the scan/pushdown layers would lose their prune-everything fast
640+ // path (stats_filter treats any AlwaysFalse as prune-all).
640641 let kept = retain_primary_key_conjuncts ( & [ Predicate :: AlwaysFalse ] , & fields, & pks) ;
641642 assert_eq ! ( kept. len( ) , 1 ) ;
642643 assert ! ( matches!( & kept[ 0 ] , Predicate :: AlwaysFalse ) ) ;
@@ -1050,11 +1051,11 @@ mod tests {
10501051 assert_eq ! ( int_column( & batches, "b" ) , vec![ 7 ] ) ;
10511052 }
10521053
1053- /// An AlwaysFalse filter on a PK table must return nothing. AlwaysFalse
1054- /// references no columns, so a PK-conjunct trim that dropped it (instead
1055- /// of preserving it verbatim) would remove the only thing stopping the
1056- /// read — stats pruning treats AlwaysFalse as prune-everything, and the
1057- /// residual masks every row to false — and every row would come back .
1054+ /// An AlwaysFalse filter on a PK table must return nothing, end to end.
1055+ /// Two layers enforce it: scan-side stats pruning treats AlwaysFalse as
1056+ /// prune-everything (plans no files), and the post-merge residual masks
1057+ /// every row to false. This locks the composed contract regardless of
1058+ /// which layer short-circuits first .
10581059 #[ tokio:: test]
10591060 async fn kv_read_always_false_filter_returns_nothing ( ) {
10601061 let file_io = test_file_io ( ) ;
0 commit comments