Commit 189218c
refactor: drop the opener's is_dynamic gate and remove is_dynamic_physical_expr
Now that `FilePruner` watches dynamic filters through `DynamicFilterTracker`,
a non-dynamic predicate costs nothing beyond the one-shot prune: the tracker
reports no changes (so `should_prune` never rebuilds) and `is_watching()` is
false (so the scan is not wrapped in `EarlyStoppingStream`). The creation-time
"is this dynamic?" gate therefore no longer earns its keep.
Drop the `is_dynamic_physical_expr(p) || has_statistics()` filter and let
`FilePruner::try_new` (which already requires `statistics.is_some()`) plus the
self-regulating tracker decide. Behavior is identical for every real case:
files with column statistics already passed the gate via `has_statistics()`,
and dynamic partition-column pruning relies on a present (if all-`Absent`)
statistics struct, which `try_new` still accepts. The only difference is a rare,
harmless one-shot prune for static files whose stats struct is present but
entirely `Absent`.
With its sole caller gone, remove `is_dynamic_physical_expr`. `snapshot_generation`
itself is untouched (still used by the FFI vtable and proto roundtrip); its free
function is now unused in-workspace and can be retired in a later cleanup.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent c611461 commit 189218c
3 files changed
Lines changed: 33 additions & 52 deletions
File tree
- datafusion
- datasource-parquet/src/opener
- physical-expr-common/src
- physical-expr/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
57 | | - | |
| 55 | + | |
58 | 56 | | |
59 | 57 | | |
60 | 58 | | |
| |||
618 | 616 | | |
619 | 617 | | |
620 | 618 | | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
631 | | - | |
632 | | - | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
633 | 635 | | |
634 | 636 | | |
635 | 637 | | |
| |||
677 | 679 | | |
678 | 680 | | |
679 | 681 | | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | | - | |
692 | | - | |
693 | | - | |
694 | | - | |
695 | | - | |
696 | | - | |
697 | | - | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
698 | 689 | | |
699 | | - | |
700 | | - | |
701 | | - | |
702 | | - | |
703 | | - | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
704 | 696 | | |
705 | 697 | | |
706 | 698 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
867 | 867 | | |
868 | 868 | | |
869 | 869 | | |
870 | | - | |
871 | | - | |
872 | | - | |
873 | | - | |
874 | | - | |
875 | | - | |
876 | | - | |
877 | | - | |
878 | 870 | | |
879 | 871 | | |
880 | 872 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
102 | 99 | | |
103 | 100 | | |
104 | 101 | | |
| |||
0 commit comments