Repository navigation
Commit 5f31505
authored
Make between matching a Binary AND simplify rule (#10505)
`find_between` ran once at the top of `optimize_recursive`, flattening
the whole predicate into conjuncts and rebuilding it as a balanced CNF
even when there was nothing to merge, and it never reached ANDs nested
under other nodes such as OR.
Move it into `Binary::simplify` for `AND`. Because the optimizer
simplifies children before parents, each AND node only needs to pair
range comparisons that straddle it: pairs inside one side were already
handled when that side's AND was simplified. The search walks the
conjuncts by reference and allocates nothing unless it finds a pair, and
a match rewrites only the path to the merged conjuncts, so the rest of
the tree keeps its shape.1 parent 00250fd commit 5f31505
6 files changed
Lines changed: 366 additions & 348 deletions
File tree
- vortex-array/src/expr
- transform
- vortex-layout/src
- plan/physical
- scan
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
92 | 91 | | |
93 | 92 | | |
94 | 93 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | 94 | | |
105 | 95 | | |
106 | 96 | | |
| |||
110 | 100 | | |
111 | 101 | | |
112 | 102 | | |
113 | | - | |
| 103 | + | |
114 | 104 | | |
115 | 105 | | |
116 | 106 | | |
| |||
0 commit comments