Commit e344306
fix: start optional filters as RowFilter when byte ratio is small
Optional/dynamic filters from hash-join build sides were unconditionally
placed as PostScan on first encounter, losing late-materialization
benefits even when filter columns were small relative to the projection.
With few file splits opened in parallel, the tracker rarely accumulated
enough samples to promote them mid-query.
Apply the same byte_ratio_threshold heuristic used for static filters.
The CI lower-bound promotion and CI upper-bound demotion paths still
apply, including Drop for ineffective optional filters.
Local TPC-DS sf1 (M-series, pushdown_filters=true):
| Query | Main | Branch | Branch+Fix |
|-------|-------|--------|------------|
| Q24 | 72 | 452 | 70 |
| Q17 | 124 | 212 | 121 |
| Q25 | 182 | 379 | 203 |
| Q29 | 152 | 312 | 145 |
| Q7 | 224 | 297 | 220 |
| Q58 | 129 | 191 | 133 |
| Q64 | 28213 | 672 | 578 |
| Q9 | 228 | 96 | 87 |
| Q76 | 172 | 105 | 156 |
Q76 regresses slightly vs the no-fix branch (CASE/hash_lookup is CPU-
heavy at row level) but still beats main.
Also updates dynamic_filter_pushdown_config.slt to match the
Optional(DynamicFilter ...) display introduced earlier in the branch.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent ba83e88 commit e344306
3 files changed
Lines changed: 9 additions & 38 deletions
File tree
- datafusion
- datasource-parquet/src
- physical-expr-common/src
- sqllogictest/test_files
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
540 | 540 | | |
541 | 541 | | |
542 | 542 | | |
543 | | - | |
544 | | - | |
545 | | - | |
546 | | - | |
| 543 | + | |
547 | 544 | | |
548 | 545 | | |
549 | 546 | | |
| |||
640 | 637 | | |
641 | 638 | | |
642 | 639 | | |
643 | | - | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | | - | |
648 | | - | |
649 | | - | |
650 | | - | |
651 | | - | |
652 | | - | |
653 | | - | |
654 | | - | |
655 | | - | |
656 | | - | |
657 | | - | |
658 | | - | |
659 | | - | |
660 | | - | |
661 | | - | |
662 | | - | |
663 | | - | |
664 | | - | |
665 | | - | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
666 | 643 | | |
667 | 644 | | |
668 | 645 | | |
| |||
757 | 734 | | |
758 | 735 | | |
759 | 736 | | |
760 | | - | |
761 | | - | |
762 | | - | |
| 737 | + | |
763 | 738 | | |
764 | 739 | | |
765 | 740 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1036 | 1036 | | |
1037 | 1037 | | |
1038 | 1038 | | |
1039 | | - | |
1040 | | - | |
1041 | | - | |
1042 | | - | |
1043 | | - | |
| 1039 | + | |
1044 | 1040 | | |
1045 | 1041 | | |
1046 | 1042 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
340 | | - | |
341 | | - | |
| 340 | + | |
| 341 | + | |
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
| |||
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
364 | | - | |
| 364 | + | |
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
| |||
0 commit comments