Commit f43e12b
Array VTables (#7215)
See #7181
This is a large break that changes how Vortex arrays are held in memory.
Previously they were modeled as Arc<dyn Array> where all array impls
used a vtable macro to unsafely transmute into a dyn Array.
This was cute, but meant that we were performing a lot of unnecessary
clones and Arc allocations for things that should never have required
them. We were also limited by how expressive we could make APIs since
Arc is considered a foreign type.
This PR makes ArrayRef a struct, makes typed arrays a struct of
`Array<V: VTable>`, and adds an `ArrayView<'a, V>`. This means all
arrays are Arc allocated up-front in any of these forms, and we pass the
Arc allocation around everywhere allowing us to cheaply clone in either
the type-erased or typed structs.
The main user-facing change is that array constructors should now live
on the vtable struct, e.g. `Primitive::new(...)` instead of
`PrimitiveArray::new(...)`
---------
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 38ab5af commit f43e12b
718 files changed
Lines changed: 23757 additions & 20555 deletions
File tree
- benchmarks/compress-bench/src
- encodings
- alp
- src
- alp_rd
- compute
- alp
- compute
- bytebool
- src
- datetime-parts
- src
- compute
- decimal-byte-parts
- src/decimal_byte_parts
- compute
- fastlanes
- benches
- src
- bitpacking
- array
- compute
- vtable
- delta
- array
- compute
- vtable
- for
- array
- compute
- vtable
- rle
- array
- compute
- vtable
- fsst
- benches
- src
- compute
- dfa
- parquet-variant/src
- pco
- src
- compute
- runend
- benches
- src
- compute
- sequence
- src
- compute
- sparse
- src
- compute
- zigzag
- src
- compute
- zstd
- benches
- src
- compute
- fuzz
- fuzz_targets
- src
- array
- java/testfiles/src
- vortex-array
- benches
- src
- aggregate_fn
- fns
- is_constant
- is_sorted
- sum
- aliases
- arrays
- bool
- compute
- vtable
- chunked
- compute
- vtable
- constant
- compute
- vtable
- datetime
- decimal
- compute
- vtable
- dict
- compute
- vtable
- extension
- compute
- vtable
- filter
- execute
- fixed_size_list
- compute
- tests
- vtable
- listview
- compute
- tests
- vtable
- list
- compute
- vtable
- masked
- compute
- vtable
- null
- compute
- patched
- compute
- vtable
- primitive
- array
- compute
- take
- vtable
- scalar_fn
- vtable
- slice
- struct_
- compute
- vtable
- varbinview
- compute
- vtable
- varbin
- compute
- vtable
- variant
- vtable
- array
- vtable
- arrow
- executor
- builders
- dict
- compute/conformance
- display
- extractors
- expr
- optimizer
- scalar_fn/fns
- between
- binary
- cast
- fill_null
- like
- list_contains
- mask
- not
- zip
- session
- stats
- stream
- vtable
- vortex-bench/src
- datasets
- random_access
- vortex-btrblocks
- src
- schemes
- vortex-compressor
- src
- builtins/dict
- stats
- vortex-cuda
- benches
- src
- arrow
- dynamic_dispatch
- hybrid_dispatch
- kernel
- arrays
- encodings
- filter
- patches
- slice
- vortex-datafusion
- examples
- src/persistent
- vortex-duckdb/src
- convert
- duckdb
- e2e_test
- exporter
- vortex-ffi
- examples
- src
- vortex-file
- src
- v2
- vortex-ipc
- src/messages
- vortex-jni/src
- vortex-layout
- src
- layouts
- chunked
- dict
- flat
- row_idx
- struct_
- zoned
- vortex-python/src
- arrays
- py
- iter
- vortex-tensor
- src/scalar_fns
- vortex-test/compat-gen/src
- fixtures
- arrays/synthetic
- arrays
- encodings
- vortex-tui/src/browse/ui
- vortex
- benches
- examples
- src
- wasm-test/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 | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | | - | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
54 | | - | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
Large diffs are not rendered by default.
0 commit comments