Repository navigation
Commit b691d5a
committed
Move expressions out of vortex-array into vortex-expr
Unbound `Expression`, binding, traversal, lambdas, proto serialization and
the expression constructors now live in `vortex-expr`; `vortex-array`
keeps arrays, the scalar function machinery, the builtins it is built on,
and `BoundExpression` with its reduce node and optimizer. The scalar
function vtable reduces over bound expressions, so keeping them next to it
lets every reduction rule stay monomorphized for expression trees as well
as array trees. `vortex-expr` re-exports `BoundExpression`. The layering is
`vortex-array -> vortex-expr -> vortex-functions`.
- `ScalarFnVTable::simplify` is generic over `ReduceNode`, like `reduce`,
but stays a separate hook that only the expression optimizer applies: a
simplification may rewrite a node into one whose nullability differs,
which the array optimizer cannot accept (it must keep the exact dtype and
defer constant masks to the kernel rules). `ReduceNode::is_same` lets
rules such as the COALESCE rewrite compare operands.
- `new_expr`, `try_new_expr` and `try_new_bound_expr` move to
`vortex_expr::ScalarFnExprExt`, `ArrayRef::apply`/`apply_bound` to
`vortex_expr::ArrayExprExt`, and the expression half of the builtins to
`vortex_expr::ExprBuiltins`. `ExprDisplay` moves to
`vortex_array::scalar_fn::display`, and the tree renderer to
`vortex_array::expr::display`.
- `ArrayRef::take_slot_unchecked`/`put_slot_unchecked` become public, like
`with_slots`, so row-count substitution in `vortex-expr` still rewrites
lazy arrays in place.
`vortex_array::expr` otherwise keeps only `stats`, which moves with the
aggregate split. The core builtins' expression-level tests move to
`vortex-expr`; the few array-level tests that used expressions now go through
`ArrayBuiltins`. The `expr_*` benches move to `vortex-expr`, which joins
the CodSpeed shard that builds `vortex-functions`.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ps4mp7KF5c4p66aoSoXx5j
Signed-off-by: Claude <noreply@anthropic.com>1 parent b6e0486 commit b691d5a
187 files changed
Lines changed: 3994 additions & 3845 deletions
File tree
- .github/workflows
- docs/concepts
- encodings
- fsst
- benches
- src
- parquet-variant
- src
- sequence
- src/compute
- fuzz
- fuzz_targets
- src
- file
- vortex-array
- benches
- src
- arrays
- datetime
- scalar_fn
- array
- expr
- scalar_fn
- builtin
- binary
- cast
- fill_null
- mask
- not
- internal
- vortex-cuda/src
- vortex-datafusion/src/convert/exprs
- vortex-expr
- benches
- src
- analysis
- forms
- lambda
- proto
- stats
- rewrite
- tests
- transform
- traversal
- vortex-ffi/src
- vortex-file/src
- v2
- vortex-functions
- benches
- src
- between
- like
- list_contains
- prepared
- pruning
- variant_get
- zip
- vortex-jni/src
- vortex-json
- src
- vortex-layout
- benches
- examples/reverse_index
- src
- layouts
- chunked
- dict
- flat
- indexed
- list
- row_idx
- struct_
- zoned
- aggregates/bloom_filter
- plan/physical
- operators
- pipeline
- plans
- scan
- execution
- v2
- vortex-python/src
- arrays
- expr
- vortex-scan
- src
- vortex-spatial/src/prune
- vortex-test/compat-gen/src
- vortex/src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
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 | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | 19 | | |
22 | 20 | | |
23 | 21 | | |
24 | 22 | | |
25 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | 47 | | |
| 48 | + | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
| 32 | + | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | | - | |
329 | 328 | | |
330 | 329 | | |
331 | 330 | | |
332 | 331 | | |
333 | 332 | | |
334 | 333 | | |
| 334 | + | |
| 335 | + | |
335 | 336 | | |
336 | 337 | | |
337 | 338 | | |
| |||
0 commit comments