Repository navigation
Commit d02df89
Move expression analysis, rewrites and statistics pruning into vortex-expr (#10734)
Expression analysis, the rewrite transforms and statistics pruning are
only used by scan planning (vortex-layout, vortex-file, vortex-spatial
and one `replace` call in vortex-datafusion); nothing in vortex-array's
arrays or execution calls them. They move to a new `vortex-expr` crate:
- `vortex_expr::analysis` (annotations, labeling, field-access analysis,
`referenced_field_paths`), also re-exported at the crate root as before
- `vortex_expr::forms::conjuncts`
- `vortex_expr::transform::{partition_bound,
partition_bound_annotations, BoundPartitionedExpr, replace,
find_between}`
- `vortex_expr::stats`: the stat-expression helpers, `StatBinder`, the
falsify/satisfy rewrite rules and `StatsSession`, which turn filter
predicates into pruning predicates for zone maps and file stats
vortex-array keeps the statistics themselves (`StatsSet`, `ArrayStats`,
`Stat`, `Precision`) and the `StatFn` scalar function.
`vortex_array::expr::transform` is removed; `find_between` is no longer
part of `BoundExpression::optimize`.
- `BoundExpression::{falsify, satisfy}` were inherent methods; they
become the `BoundExpressionPruneExt` extension trait.
- `LikeVariant`, which only the LIKE pruning rule uses, moves with it.
- `DynamicComparisonExpr` gains `operator()`, `default()` and
`with_operator()`, since the pruning rules can no longer reach its
fields.
- The falsification tests for `is_null`, `is_not_null` and
`list_contains` move to `vortex_expr::stats::rewrite`, and the one
optimizer test that used `replace` builds the replaced expression
directly.
---------
Signed-off-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>1 parent c750fbd commit d02df89
172 files changed
Lines changed: 1036 additions & 1624 deletions
File tree
- docs/developer-guide/internals
- encodings
- alp/benches
- datetime-parts/benches
- decimal-byte-parts/benches
- fastlanes/benches
- fsst/benches
- onpair/benches
- pco/benches
- runend/benches
- sparse/benches
- vortex-array
- benches
- expr
- src
- expr
- scalar_fn/fns
- like
- list_contains
- stats
- vortex-arrow/benches
- vortex-btrblocks/benches
- vortex-compressor/benches
- vortex-cuda/benches
- vortex-expr
- src
- analysis
- forms
- stats
- rewrite
- transform
- vortex-file
- benches
- src
- vortex-layout
- benches
- src
- layouts
- dict
- row_idx
- struct_
- zoned
- aggregates/bloom_filter
- plan/physical
- plans
- scan
- execution
- vortex-row/benches
- vortex-spatial
- benches
- src
- prune
- vortex-tensor/benches
- vortex
- benches
- src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
319 | 320 | | |
320 | 321 | | |
321 | 322 | | |
| 323 | + | |
322 | 324 | | |
323 | 325 | | |
324 | 326 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
| 13 | + | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | 25 | | |
27 | 26 | | |
28 | | - | |
29 | 27 | | |
30 | | - | |
31 | 28 | | |
32 | 29 | | |
33 | 30 | | |
| |||
67 | 64 | | |
68 | 65 | | |
69 | 66 | | |
70 | | - | |
71 | | - | |
72 | 67 | | |
73 | | - | |
74 | | - | |
| 68 | + | |
75 | 69 | | |
76 | 70 | | |
77 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | | - | |
19 | 17 | | |
20 | | - | |
21 | 18 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | 19 | | |
26 | 20 | | |
27 | 21 | | |
| |||
35 | 29 | | |
36 | 30 | | |
37 | 31 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 32 | + | |
| 33 | + | |
48 | 34 | | |
49 | 35 | | |
50 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
115 | 114 | | |
116 | 115 | | |
117 | | - | |
118 | | - | |
119 | 116 | | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | 117 | | |
124 | 118 | | |
125 | 119 | | |
| |||
131 | 125 | | |
132 | 126 | | |
133 | 127 | | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
| 128 | + | |
| 129 | + | |
144 | 130 | | |
145 | 131 | | |
146 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
88 | 87 | | |
89 | | - | |
90 | | - | |
91 | 88 | | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | 89 | | |
96 | 90 | | |
97 | 91 | | |
| |||
100 | 94 | | |
101 | 95 | | |
102 | 96 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
| 97 | + | |
| 98 | + | |
113 | 99 | | |
114 | 100 | | |
115 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | 16 | | |
19 | | - | |
20 | 17 | | |
21 | | - | |
22 | 18 | | |
23 | 19 | | |
24 | 20 | | |
| |||
34 | 30 | | |
35 | 31 | | |
36 | 32 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
| 33 | + | |
42 | 34 | | |
43 | 35 | | |
44 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | 18 | | |
20 | 19 | | |
21 | | - | |
22 | 20 | | |
23 | | - | |
24 | 21 | | |
25 | 22 | | |
26 | 23 | | |
| |||
38 | 35 | | |
39 | 36 | | |
40 | 37 | | |
41 | | - | |
42 | | - | |
43 | 38 | | |
44 | | - | |
45 | | - | |
| 39 | + | |
46 | 40 | | |
47 | 41 | | |
48 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
31 | | - | |
32 | 30 | | |
33 | | - | |
34 | 31 | | |
35 | 32 | | |
36 | 33 | | |
| |||
52 | 49 | | |
53 | 50 | | |
54 | 51 | | |
55 | | - | |
56 | | - | |
57 | 52 | | |
58 | | - | |
59 | | - | |
| 53 | + | |
60 | 54 | | |
61 | 55 | | |
62 | 56 | | |
| |||
0 commit comments