From 643b1a784013b188f6fd515d3b4a9b02e883f70a Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Sun, 29 Mar 2026 16:59:07 +0100 Subject: [PATCH 01/11] Array VTables 5 Signed-off-by: Nicholas Gates --- Cargo.lock | 1 + benchmarks/compress-bench/src/vortex.rs | 5 +- encodings/alp/public-api.lock | 4 +- encodings/alp/src/alp/array.rs | 102 ++-- encodings/alp/src/alp/compress.rs | 5 +- encodings/alp/src/alp/compute/cast.rs | 9 +- encodings/alp/src/alp/compute/filter.rs | 2 +- encodings/alp/src/alp/compute/mask.rs | 4 +- encodings/alp/src/alp/compute/slice.rs | 5 +- encodings/alp/src/alp/compute/take.rs | 2 +- encodings/alp/src/alp/decompress.rs | 4 +- encodings/alp/src/alp/ops.rs | 8 +- encodings/alp/src/alp_rd/array.rs | 98 +++- encodings/alp/src/alp_rd/compute/cast.rs | 2 +- encodings/alp/src/alp_rd/compute/filter.rs | 2 +- encodings/alp/src/alp_rd/compute/mask.rs | 2 +- encodings/alp/src/alp_rd/compute/take.rs | 2 +- encodings/alp/src/alp_rd/mod.rs | 2 +- encodings/alp/src/alp_rd/ops.rs | 4 +- encodings/alp/src/alp_rd/slice.rs | 5 +- encodings/bytebool/Cargo.toml | 1 + encodings/bytebool/public-api.lock | 2 +- encodings/bytebool/src/array.rs | 77 +-- encodings/bytebool/src/compute.rs | 7 +- encodings/bytebool/src/slice.rs | 3 +- encodings/datetime-parts/public-api.lock | 2 +- encodings/datetime-parts/src/array.rs | 76 +-- encodings/datetime-parts/src/canonical.rs | 2 +- encodings/datetime-parts/src/compress.rs | 6 +- encodings/datetime-parts/src/compute/cast.rs | 13 +- .../datetime-parts/src/compute/compare.rs | 7 +- .../datetime-parts/src/compute/filter.rs | 9 +- encodings/datetime-parts/src/compute/mask.rs | 5 +- encodings/datetime-parts/src/compute/mod.rs | 17 +- encodings/datetime-parts/src/compute/rules.rs | 8 +- encodings/datetime-parts/src/compute/slice.rs | 6 +- encodings/datetime-parts/src/compute/take.rs | 22 +- encodings/datetime-parts/src/ops.rs | 4 +- encodings/decimal-byte-parts/public-api.lock | 2 +- .../src/decimal_byte_parts/compute/cast.rs | 18 +- .../src/decimal_byte_parts/compute/compare.rs | 12 +- .../src/decimal_byte_parts/compute/filter.rs | 8 +- .../src/decimal_byte_parts/compute/mask.rs | 3 +- .../src/decimal_byte_parts/compute/mod.rs | 21 +- .../src/decimal_byte_parts/compute/take.rs | 3 +- .../src/decimal_byte_parts/mod.rs | 81 +-- .../src/decimal_byte_parts/rules.rs | 3 +- .../src/decimal_byte_parts/slice.rs | 3 +- encodings/fastlanes/public-api.lock | 8 +- .../src/bitpacking/array/bitpack_compress.rs | 52 +- .../bitpacking/array/bitpack_decompress.rs | 11 +- .../fastlanes/src/bitpacking/array/mod.rs | 43 +- .../src/bitpacking/array/unpack_iter.rs | 5 +- .../fastlanes/src/bitpacking/compute/cast.rs | 19 +- .../src/bitpacking/compute/filter.rs | 23 +- .../src/bitpacking/compute/is_constant.rs | 5 +- .../fastlanes/src/bitpacking/compute/mod.rs | 2 +- .../fastlanes/src/bitpacking/compute/slice.rs | 5 +- .../fastlanes/src/bitpacking/compute/take.rs | 29 +- encodings/fastlanes/src/bitpacking/mod.rs | 3 +- .../fastlanes/src/bitpacking/vtable/mod.rs | 48 +- .../src/bitpacking/vtable/operations.rs | 25 +- .../src/bitpacking/vtable/validity.rs | 4 +- .../src/delta/array/delta_compress.rs | 8 +- .../src/delta/array/delta_decompress.rs | 2 +- encodings/fastlanes/src/delta/array/mod.rs | 6 +- encodings/fastlanes/src/delta/compute/cast.rs | 10 +- encodings/fastlanes/src/delta/mod.rs | 3 +- encodings/fastlanes/src/delta/vtable/mod.rs | 53 +- .../fastlanes/src/delta/vtable/operations.rs | 54 +- encodings/fastlanes/src/delta/vtable/slice.rs | 7 +- .../fastlanes/src/delta/vtable/validity.rs | 4 +- .../fastlanes/src/for/array/for_compress.rs | 58 ++- .../fastlanes/src/for/array/for_decompress.rs | 5 +- encodings/fastlanes/src/for/array/mod.rs | 23 +- encodings/fastlanes/src/for/compute/cast.rs | 18 +- .../fastlanes/src/for/compute/compare.rs | 9 +- .../fastlanes/src/for/compute/is_sorted.rs | 19 +- encodings/fastlanes/src/for/compute/mod.rs | 57 +-- encodings/fastlanes/src/for/mod.rs | 3 +- encodings/fastlanes/src/for/vtable/mod.rs | 53 +- .../fastlanes/src/for/vtable/operations.rs | 15 +- encodings/fastlanes/src/for/vtable/rules.rs | 3 +- encodings/fastlanes/src/for/vtable/slice.rs | 7 +- .../fastlanes/src/for/vtable/validity.rs | 4 +- encodings/fastlanes/src/rle/array/mod.rs | 31 +- .../fastlanes/src/rle/array/rle_compress.rs | 35 +- .../fastlanes/src/rle/array/rle_decompress.rs | 1 + encodings/fastlanes/src/rle/compute/cast.rs | 10 +- encodings/fastlanes/src/rle/kernel.rs | 3 +- encodings/fastlanes/src/rle/mod.rs | 3 +- encodings/fastlanes/src/rle/vtable/mod.rs | 65 ++- .../fastlanes/src/rle/vtable/operations.rs | 17 +- .../fastlanes/src/rle/vtable/validity.rs | 6 +- encodings/fsst/benches/fsst_compress.rs | 16 +- encodings/fsst/benches/fsst_url_compare.rs | 12 +- encodings/fsst/public-api.lock | 2 +- encodings/fsst/src/array.rs | 90 +++- encodings/fsst/src/canonical.rs | 5 +- encodings/fsst/src/compress.rs | 17 +- encodings/fsst/src/compute/cast.rs | 10 +- encodings/fsst/src/compute/compare.rs | 4 +- encodings/fsst/src/compute/filter.rs | 10 +- encodings/fsst/src/compute/like.rs | 7 +- encodings/fsst/src/compute/mod.rs | 25 +- encodings/fsst/src/dfa/tests.rs | 4 +- encodings/fsst/src/kernel.rs | 10 +- encodings/fsst/src/ops.rs | 11 +- encodings/fsst/src/slice.rs | 8 +- encodings/fsst/src/test_utils.rs | 36 +- encodings/fsst/src/tests.rs | 4 +- encodings/pco/public-api.lock | 2 +- encodings/pco/src/array.rs | 82 +++- encodings/pco/src/compute/cast.rs | 16 +- encodings/pco/src/compute/mod.rs | 17 +- encodings/pco/src/slice.rs | 3 +- encodings/pco/src/test.rs | 14 +- encodings/runend/public-api.lock | 2 +- encodings/runend/src/arbitrary.rs | 7 +- encodings/runend/src/array.rs | 109 ++-- encodings/runend/src/arrow.rs | 33 +- encodings/runend/src/compress.rs | 19 +- encodings/runend/src/compute/cast.rs | 20 +- encodings/runend/src/compute/compare.rs | 3 +- encodings/runend/src/compute/fill_null.rs | 5 +- encodings/runend/src/compute/filter.rs | 8 +- encodings/runend/src/compute/is_sorted.rs | 5 +- encodings/runend/src/compute/mod.rs | 13 +- encodings/runend/src/compute/take.rs | 15 +- encodings/runend/src/compute/take_from.rs | 11 +- encodings/runend/src/decompress_bool.rs | 2 +- encodings/runend/src/kernel.rs | 3 +- encodings/runend/src/ops.rs | 19 +- encodings/runend/src/rules.rs | 3 +- encodings/sequence/public-api.lock | 2 +- encodings/sequence/src/array.rs | 119 +++-- encodings/sequence/src/compress.rs | 10 +- encodings/sequence/src/compute/cast.rs | 24 +- encodings/sequence/src/compute/compare.rs | 7 +- encodings/sequence/src/compute/filter.rs | 25 +- .../sequence/src/compute/list_contains.rs | 8 +- encodings/sequence/src/compute/mod.rs | 19 +- encodings/sequence/src/compute/slice.rs | 6 +- encodings/sequence/src/compute/take.rs | 19 +- encodings/sequence/src/lib.rs | 1 + encodings/sparse/public-api.lock | 2 +- encodings/sparse/src/canonical.rs | 61 +-- encodings/sparse/src/compute/cast.rs | 20 +- encodings/sparse/src/compute/filter.rs | 16 +- encodings/sparse/src/compute/mod.rs | 41 +- encodings/sparse/src/compute/take.rs | 18 +- encodings/sparse/src/lib.rs | 99 ++-- encodings/sparse/src/ops.rs | 7 +- encodings/sparse/src/rules.rs | 3 +- encodings/sparse/src/slice.rs | 3 +- encodings/zigzag/public-api.lock | 2 +- encodings/zigzag/src/array.rs | 66 ++- encodings/zigzag/src/compress.rs | 6 +- encodings/zigzag/src/compute/cast.rs | 4 +- encodings/zigzag/src/compute/mod.rs | 7 +- encodings/zigzag/src/slice.rs | 6 +- encodings/zstd/public-api.lock | 2 +- encodings/zstd/src/array.rs | 121 +++-- encodings/zstd/src/compute/cast.rs | 21 +- encodings/zstd/src/compute/mod.rs | 17 +- encodings/zstd/src/slice.rs | 3 +- encodings/zstd/src/test.rs | 19 +- encodings/zstd/src/zstd_buffers.rs | 74 +-- fuzz/fuzz_targets/file_io.rs | 6 +- fuzz/src/array/fill_null.rs | 6 +- fuzz/src/array/scalar_at.rs | 6 +- fuzz/src/array/search_sorted.rs | 6 +- fuzz/src/array/sort.rs | 6 +- fuzz/src/fsst_like.rs | 7 +- vortex-array/benches/dict_compare.rs | 5 +- vortex-array/benches/dict_compress.rs | 11 +- vortex-array/benches/filter_bool.rs | 34 ++ vortex-array/benches/scalar_at_struct.rs | 9 +- vortex-array/benches/take_fsl.rs | 4 + vortex-array/benches/take_primitive.rs | 6 +- vortex-array/benches/take_struct.rs | 17 +- vortex-array/benches/varbinview_compact.rs | 4 +- vortex-array/public-api.lock | 172 ++++--- .../src/aggregate_fn/accumulator_grouped.rs | 1 - .../src/aggregate_fn/fns/is_sorted/bool.rs | 2 +- .../src/aggregate_fn/fns/is_sorted/decimal.rs | 2 +- .../aggregate_fn/fns/is_sorted/primitive.rs | 2 +- .../src/aggregate_fn/fns/min_max/bool.rs | 2 +- .../src/aggregate_fn/fns/min_max/decimal.rs | 2 +- .../src/aggregate_fn/fns/min_max/primitive.rs | 2 +- .../aggregate_fn/fns/nan_count/primitive.rs | 2 +- vortex-array/src/aggregate_fn/fns/sum/bool.rs | 2 +- .../src/aggregate_fn/fns/sum/decimal.rs | 2 +- .../src/aggregate_fn/fns/sum/primitive.rs | 2 +- vortex-array/src/array/mod.rs | 464 ++---------------- vortex-array/src/arrays/assertions.rs | 29 +- vortex-array/src/arrays/bool/array.rs | 255 ++++++---- vortex-array/src/arrays/bool/compute/cast.rs | 1 - .../src/arrays/bool/compute/fill_null.rs | 1 - .../src/arrays/bool/compute/filter.rs | 1 - vortex-array/src/arrays/bool/compute/mask.rs | 1 - vortex-array/src/arrays/bool/compute/rules.rs | 1 - vortex-array/src/arrays/bool/compute/slice.rs | 3 +- vortex-array/src/arrays/bool/compute/take.rs | 1 - vortex-array/src/arrays/bool/mod.rs | 3 +- vortex-array/src/arrays/bool/patch.rs | 6 +- vortex-array/src/arrays/bool/test_harness.rs | 3 - vortex-array/src/arrays/bool/vtable/mod.rs | 38 +- .../src/arrays/bool/vtable/operations.rs | 13 +- .../src/arrays/bool/vtable/validity.rs | 4 +- vortex-array/src/arrays/chunked/array.rs | 78 ++- .../src/arrays/chunked/compute/cast.rs | 3 +- .../src/arrays/chunked/compute/fill_null.rs | 3 +- .../src/arrays/chunked/compute/filter.rs | 9 +- .../src/arrays/chunked/compute/mask.rs | 3 +- .../src/arrays/chunked/compute/rules.rs | 5 +- .../src/arrays/chunked/compute/slice.rs | 3 +- .../src/arrays/chunked/compute/take.rs | 7 +- .../src/arrays/chunked/compute/zip.rs | 4 +- vortex-array/src/arrays/chunked/mod.rs | 3 +- .../src/arrays/chunked/vtable/canonical.rs | 5 +- vortex-array/src/arrays/chunked/vtable/mod.rs | 57 ++- .../src/arrays/chunked/vtable/operations.rs | 4 +- .../src/arrays/chunked/vtable/validity.rs | 7 +- vortex-array/src/arrays/constant/array.rs | 31 +- .../src/arrays/constant/compute/between.rs | 6 +- .../src/arrays/constant/compute/cast.rs | 3 +- .../src/arrays/constant/compute/fill_null.rs | 4 +- .../src/arrays/constant/compute/filter.rs | 3 +- .../src/arrays/constant/compute/not.rs | 3 +- .../src/arrays/constant/compute/rules.rs | 3 +- .../src/arrays/constant/compute/slice.rs | 3 +- .../src/arrays/constant/compute/take.rs | 3 +- vortex-array/src/arrays/constant/mod.rs | 3 +- .../src/arrays/constant/vtable/canonical.rs | 7 +- .../src/arrays/constant/vtable/mod.rs | 44 +- .../src/arrays/constant/vtable/operations.rs | 4 +- .../src/arrays/constant/vtable/validity.rs | 4 +- vortex-array/src/arrays/datetime/mod.rs | 46 +- vortex-array/src/arrays/datetime/test.rs | 41 +- vortex-array/src/arrays/decimal/array.rs | 127 ++++- .../src/arrays/decimal/compute/between.rs | 9 +- .../src/arrays/decimal/compute/cast.rs | 6 +- .../src/arrays/decimal/compute/fill_null.rs | 8 +- .../src/arrays/decimal/compute/mask.rs | 4 +- .../src/arrays/decimal/compute/rules.rs | 6 +- .../src/arrays/decimal/compute/take.rs | 4 +- vortex-array/src/arrays/decimal/mod.rs | 3 +- vortex-array/src/arrays/decimal/utils.rs | 1 - vortex-array/src/arrays/decimal/vtable/mod.rs | 38 +- .../src/arrays/decimal/vtable/operations.rs | 4 +- .../src/arrays/decimal/vtable/validity.rs | 4 +- vortex-array/src/arrays/dict/array.rs | 60 ++- vortex-array/src/arrays/dict/compute/cast.rs | 3 +- .../src/arrays/dict/compute/compare.rs | 3 +- .../src/arrays/dict/compute/fill_null.rs | 3 +- vortex-array/src/arrays/dict/compute/like.rs | 3 +- vortex-array/src/arrays/dict/compute/mask.rs | 3 +- vortex-array/src/arrays/dict/compute/mod.rs | 5 +- vortex-array/src/arrays/dict/compute/rules.rs | 9 +- vortex-array/src/arrays/dict/compute/slice.rs | 3 +- vortex-array/src/arrays/dict/take.rs | 22 +- vortex-array/src/arrays/dict/vtable/mod.rs | 42 +- .../src/arrays/dict/vtable/operations.rs | 8 +- .../src/arrays/dict/vtable/validity.rs | 9 +- vortex-array/src/arrays/extension/array.rs | 40 +- .../src/arrays/extension/compute/cast.rs | 6 +- .../src/arrays/extension/compute/compare.rs | 4 +- .../src/arrays/extension/compute/filter.rs | 3 +- .../src/arrays/extension/compute/mask.rs | 3 +- .../src/arrays/extension/compute/rules.rs | 3 +- .../src/arrays/extension/compute/slice.rs | 3 +- .../src/arrays/extension/compute/take.rs | 3 +- vortex-array/src/arrays/extension/mod.rs | 3 +- .../src/arrays/extension/vtable/mod.rs | 42 +- .../src/arrays/extension/vtable/operations.rs | 5 +- .../src/arrays/extension/vtable/validity.rs | 4 +- vortex-array/src/arrays/filter/array.rs | 31 +- .../src/arrays/filter/execute/bool.rs | 3 +- .../src/arrays/filter/execute/decimal.rs | 1 - .../arrays/filter/execute/fixed_size_list.rs | 1 - .../src/arrays/filter/execute/listview.rs | 1 - vortex-array/src/arrays/filter/execute/mod.rs | 3 +- .../src/arrays/filter/execute/primitive.rs | 5 +- .../src/arrays/filter/execute/struct_.rs | 1 - vortex-array/src/arrays/filter/kernel.rs | 15 +- vortex-array/src/arrays/filter/mod.rs | 3 +- vortex-array/src/arrays/filter/rules.rs | 7 +- vortex-array/src/arrays/filter/vtable.rs | 44 +- .../src/arrays/fixed_size_list/array.rs | 70 ++- .../arrays/fixed_size_list/compute/cast.rs | 4 +- .../arrays/fixed_size_list/compute/mask.rs | 4 +- .../arrays/fixed_size_list/compute/slice.rs | 4 +- .../arrays/fixed_size_list/compute/take.rs | 19 +- .../src/arrays/fixed_size_list/mod.rs | 3 +- .../src/arrays/fixed_size_list/vtable/mod.rs | 50 +- .../fixed_size_list/vtable/operations.rs | 4 +- .../arrays/fixed_size_list/vtable/validity.rs | 4 +- vortex-array/src/arrays/list/array.rs | 62 ++- vortex-array/src/arrays/list/compute/cast.rs | 4 +- .../src/arrays/list/compute/filter.rs | 4 +- vortex-array/src/arrays/list/compute/mask.rs | 4 +- vortex-array/src/arrays/list/compute/slice.rs | 4 +- vortex-array/src/arrays/list/compute/take.rs | 21 +- vortex-array/src/arrays/list/mod.rs | 3 +- vortex-array/src/arrays/list/vtable/mod.rs | 44 +- .../src/arrays/list/vtable/operations.rs | 8 +- .../src/arrays/list/vtable/validity.rs | 4 +- vortex-array/src/arrays/listview/array.rs | 85 +++- .../src/arrays/listview/compute/cast.rs | 4 +- .../src/arrays/listview/compute/mask.rs | 4 +- .../src/arrays/listview/compute/rules.rs | 4 +- .../src/arrays/listview/compute/slice.rs | 5 +- .../src/arrays/listview/compute/take.rs | 4 +- .../src/arrays/listview/conversion.rs | 5 +- vortex-array/src/arrays/listview/mod.rs | 3 +- vortex-array/src/arrays/listview/rebuild.rs | 5 +- .../src/arrays/listview/vtable/mod.rs | 46 +- .../src/arrays/listview/vtable/operations.rs | 4 +- .../src/arrays/listview/vtable/validity.rs | 4 +- vortex-array/src/arrays/masked/array.rs | 39 +- .../src/arrays/masked/compute/filter.rs | 4 +- .../src/arrays/masked/compute/mask.rs | 5 +- .../src/arrays/masked/compute/slice.rs | 18 +- .../src/arrays/masked/compute/take.rs | 4 +- vortex-array/src/arrays/masked/execute.rs | 1 - vortex-array/src/arrays/masked/mod.rs | 3 +- vortex-array/src/arrays/masked/tests.rs | 2 +- .../src/arrays/masked/vtable/canonical.rs | 16 +- vortex-array/src/arrays/masked/vtable/mod.rs | 46 +- .../src/arrays/masked/vtable/operations.rs | 5 +- .../src/arrays/masked/vtable/validity.rs | 4 +- vortex-array/src/arrays/mod.rs | 21 + vortex-array/src/arrays/null/compute/cast.rs | 4 +- .../src/arrays/null/compute/filter.rs | 3 +- vortex-array/src/arrays/null/compute/mask.rs | 4 +- vortex-array/src/arrays/null/compute/slice.rs | 3 +- vortex-array/src/arrays/null/compute/take.rs | 3 +- vortex-array/src/arrays/null/mod.rs | 64 ++- .../src/arrays/primitive/array/accessor.rs | 1 - .../src/arrays/primitive/array/cast.rs | 1 - .../src/arrays/primitive/array/conversion.rs | 23 +- .../src/arrays/primitive/array/mod.rs | 161 +++++- .../src/arrays/primitive/array/patch.rs | 1 - .../src/arrays/primitive/array/top_value.rs | 5 +- .../src/arrays/primitive/compute/between.rs | 9 +- .../src/arrays/primitive/compute/cast.rs | 8 +- .../src/arrays/primitive/compute/fill_null.rs | 4 +- .../src/arrays/primitive/compute/mask.rs | 4 +- .../src/arrays/primitive/compute/rules.rs | 4 +- .../src/arrays/primitive/compute/slice.rs | 4 +- .../src/arrays/primitive/compute/take/mod.rs | 12 +- vortex-array/src/arrays/primitive/mod.rs | 3 +- .../src/arrays/primitive/vtable/mod.rs | 40 +- .../src/arrays/primitive/vtable/operations.rs | 4 +- .../src/arrays/primitive/vtable/validity.rs | 4 +- vortex-array/src/arrays/scalar_fn/array.rs | 46 +- vortex-array/src/arrays/scalar_fn/mod.rs | 2 +- vortex-array/src/arrays/scalar_fn/rules.rs | 27 +- .../src/arrays/scalar_fn/vtable/mod.rs | 40 +- .../src/arrays/scalar_fn/vtable/operations.rs | 6 +- .../src/arrays/scalar_fn/vtable/validity.rs | 4 +- vortex-array/src/arrays/shared/array.rs | 30 +- vortex-array/src/arrays/shared/mod.rs | 3 +- vortex-array/src/arrays/shared/vtable.rs | 44 +- vortex-array/src/arrays/slice/array.rs | 36 +- vortex-array/src/arrays/slice/mod.rs | 20 +- vortex-array/src/arrays/slice/slice_.rs | 3 +- vortex-array/src/arrays/slice/vtable.rs | 45 +- vortex-array/src/arrays/struct_/array.rs | 113 ++++- .../src/arrays/struct_/compute/cast.rs | 4 +- .../src/arrays/struct_/compute/mask.rs | 4 +- .../src/arrays/struct_/compute/rules.rs | 6 +- .../src/arrays/struct_/compute/slice.rs | 4 +- .../src/arrays/struct_/compute/take.rs | 4 +- .../src/arrays/struct_/compute/zip.rs | 4 +- vortex-array/src/arrays/struct_/mod.rs | 3 +- vortex-array/src/arrays/struct_/vtable/mod.rs | 38 +- .../src/arrays/struct_/vtable/operations.rs | 4 +- .../src/arrays/struct_/vtable/validity.rs | 4 +- vortex-array/src/arrays/varbin/accessor.rs | 1 - vortex-array/src/arrays/varbin/array.rs | 154 +++++- vortex-array/src/arrays/varbin/builder.rs | 14 +- .../src/arrays/varbin/compute/cast.rs | 4 +- .../src/arrays/varbin/compute/compare.rs | 5 +- .../src/arrays/varbin/compute/filter.rs | 12 +- .../src/arrays/varbin/compute/mask.rs | 4 +- .../src/arrays/varbin/compute/slice.rs | 7 +- .../src/arrays/varbin/compute/take.rs | 7 +- vortex-array/src/arrays/varbin/mod.rs | 3 +- .../src/arrays/varbin/vtable/canonical.rs | 2 +- vortex-array/src/arrays/varbin/vtable/mod.rs | 40 +- .../src/arrays/varbin/vtable/operations.rs | 4 +- .../src/arrays/varbin/vtable/validity.rs | 4 +- .../src/arrays/varbinview/accessor.rs | 1 - vortex-array/src/arrays/varbinview/array.rs | 124 ++++- vortex-array/src/arrays/varbinview/compact.rs | 2 +- .../src/arrays/varbinview/compute/cast.rs | 4 +- .../src/arrays/varbinview/compute/mask.rs | 4 +- .../src/arrays/varbinview/compute/slice.rs | 5 +- .../src/arrays/varbinview/compute/take.rs | 6 +- .../src/arrays/varbinview/compute/zip.rs | 9 +- vortex-array/src/arrays/varbinview/mod.rs | 3 +- .../src/arrays/varbinview/vtable/mod.rs | 46 +- .../arrays/varbinview/vtable/operations.rs | 4 +- .../src/arrays/varbinview/vtable/validity.rs | 4 +- vortex-array/src/arrays/variant/mod.rs | 34 +- vortex-array/src/arrays/variant/vtable/mod.rs | 32 +- .../src/arrays/variant/vtable/operations.rs | 3 +- .../src/arrays/variant/vtable/validity.rs | 4 +- vortex-array/src/arrow/executor/bool.rs | 2 +- vortex-array/src/arrow/executor/byte.rs | 1 - vortex-array/src/arrow/executor/byte_view.rs | 3 +- vortex-array/src/arrow/executor/decimal.rs | 8 +- vortex-array/src/arrow/executor/dictionary.rs | 2 +- .../src/arrow/executor/fixed_size_list.rs | 1 - vortex-array/src/arrow/executor/list.rs | 3 +- vortex-array/src/arrow/executor/list_view.rs | 2 +- vortex-array/src/arrow/executor/primitive.rs | 2 +- vortex-array/src/arrow/executor/temporal.rs | 2 +- vortex-array/src/arrow/record_batch.rs | 2 +- vortex-array/src/builders/bool.rs | 7 +- vortex-array/src/builders/decimal.rs | 7 +- vortex-array/src/builders/list.rs | 2 +- vortex-array/src/builders/listview.rs | 2 + vortex-array/src/builders/primitive.rs | 7 +- vortex-array/src/builders/struct_.rs | 6 +- vortex-array/src/builders/varbinview.rs | 11 +- vortex-array/src/canonical.rs | 54 +- vortex-array/src/columnar.rs | 9 +- .../src/compute/conformance/consistency.rs | 4 +- vortex-array/src/kernel.rs | 9 +- vortex-array/src/mask.rs | 2 +- vortex-array/src/optimizer/rules.rs | 13 +- vortex-array/src/patches.rs | 5 +- .../src/scalar_fn/fns/between/kernel.rs | 9 +- .../src/scalar_fn/fns/binary/compare.rs | 9 +- vortex-array/src/scalar_fn/fns/cast/kernel.rs | 13 +- vortex-array/src/scalar_fn/fns/cast/mod.rs | 4 +- .../src/scalar_fn/fns/fill_null/kernel.rs | 13 +- .../src/scalar_fn/fns/fill_null/mod.rs | 4 +- vortex-array/src/scalar_fn/fns/get_item.rs | 2 +- vortex-array/src/scalar_fn/fns/like/kernel.rs | 9 +- .../src/scalar_fn/fns/list_contains/kernel.rs | 9 +- .../src/scalar_fn/fns/list_contains/mod.rs | 3 +- vortex-array/src/scalar_fn/fns/mask/kernel.rs | 9 +- vortex-array/src/scalar_fn/fns/not/kernel.rs | 9 +- vortex-array/src/scalar_fn/fns/not/mod.rs | 2 +- vortex-array/src/scalar_fn/fns/zip/kernel.rs | 9 +- vortex-array/src/test_harness.rs | 2 +- vortex-array/src/validity.rs | 12 + vortex-array/src/vtable/dyn_.rs | 2 +- vortex-array/src/vtable/mod.rs | 83 ++-- vortex-array/src/vtable/operations.rs | 5 +- vortex-array/src/vtable/typed.rs | 104 +++- vortex-array/src/vtable/validity.rs | 19 +- vortex-bench/src/conversions.rs | 3 +- vortex-bench/src/datasets/taxi_data.rs | 5 +- vortex-bench/src/downloadable_dataset.rs | 3 +- vortex-bench/src/public_bi.rs | 3 +- vortex-btrblocks/src/canonical_compressor.rs | 3 +- vortex-btrblocks/src/compressor/decimal.rs | 5 +- .../src/compressor/float/dictionary.rs | 1 - vortex-btrblocks/src/compressor/float/mod.rs | 46 +- .../src/compressor/float/stats.rs | 15 +- .../src/compressor/integer/dictionary.rs | 1 - .../src/compressor/integer/mod.rs | 55 +-- .../src/compressor/integer/stats.rs | 18 +- vortex-btrblocks/src/compressor/mod.rs | 21 +- vortex-btrblocks/src/compressor/rle.rs | 6 +- vortex-btrblocks/src/compressor/string.rs | 39 +- vortex-btrblocks/src/compressor/temporal.rs | 4 +- vortex-btrblocks/src/scheme.rs | 6 +- vortex-cuda/src/arrow/canonical.rs | 6 +- vortex-cuda/src/arrow/varbinview.rs | 2 +- vortex-cuda/src/canonical.rs | 6 +- .../src/dynamic_dispatch/plan_builder.rs | 8 +- vortex-cuda/src/hybrid_dispatch/mod.rs | 2 +- vortex-cuda/src/kernel/arrays/dict.rs | 18 +- vortex-cuda/src/kernel/encodings/alp.rs | 2 +- vortex-cuda/src/kernel/encodings/bitpacked.rs | 2 +- .../src/kernel/encodings/date_time_parts.rs | 6 +- .../kernel/encodings/decimal_byte_parts.rs | 9 +- vortex-cuda/src/kernel/encodings/for_.rs | 9 +- vortex-cuda/src/kernel/encodings/runend.rs | 8 +- vortex-cuda/src/kernel/encodings/sequence.rs | 2 +- vortex-cuda/src/kernel/encodings/zigzag.rs | 2 +- vortex-cuda/src/kernel/encodings/zstd.rs | 4 +- vortex-cuda/src/kernel/filter/decimal.rs | 2 +- vortex-cuda/src/kernel/filter/mod.rs | 2 +- vortex-cuda/src/kernel/filter/primitive.rs | 2 +- vortex-cuda/src/kernel/filter/varbinview.rs | 2 +- vortex-cuda/src/kernel/patches/mod.rs | 4 +- vortex-cuda/src/kernel/slice/mod.rs | 23 +- vortex-duckdb/src/exporter/bool.rs | 6 +- vortex-duckdb/src/exporter/decimal.rs | 2 +- vortex-duckdb/src/exporter/fixed_size_list.rs | 2 +- vortex-duckdb/src/exporter/list.rs | 2 +- vortex-duckdb/src/exporter/list_view.rs | 2 +- vortex-duckdb/src/exporter/run_end.rs | 2 +- vortex-duckdb/src/exporter/varbinview.rs | 2 +- vortex-file/src/v2/file_stats_reader.rs | 1 + vortex-layout/src/layouts/repartition.rs | 4 +- vortex-layout/src/layouts/row_idx/mod.rs | 3 +- vortex-layout/src/layouts/zoned/writer.rs | 3 + vortex-python/src/arrays/native.rs | 13 +- vortex-python/src/arrays/py/vtable.rs | 28 +- vortex-python/src/arrays/range_to_sequence.rs | 4 +- .../fixtures/arrays/synthetic/arrays/list.rs | 2 +- .../arrays/synthetic/arrays/listview.rs | 2 +- .../arrays/synthetic/arrays/struct_nested.rs | 2 +- .../arrays/synthetic/arrays/varbin.rs | 4 +- .../arrays/synthetic/encodings/bytebool.rs | 21 +- .../synthetic/encodings/datetimeparts.rs | 6 +- .../synthetic/encodings/decimal_byte_parts.rs | 18 +- .../arrays/synthetic/encodings/delta.rs | 21 +- .../arrays/synthetic/encodings/dict.rs | 23 +- .../arrays/synthetic/encodings/for_.rs | 21 +- .../arrays/synthetic/encodings/fsst.rs | 63 ++- .../arrays/synthetic/encodings/pco.rs | 17 +- .../arrays/synthetic/encodings/rle.rs | 17 +- .../arrays/synthetic/encodings/runend.rs | 17 +- .../arrays/synthetic/encodings/sequence.rs | 31 +- .../arrays/synthetic/encodings/sparse.rs | 23 +- .../arrays/synthetic/encodings/zstd.rs | 17 +- .../common_encoding_tree_throughput.rs | 14 +- vortex/benches/single_encoding_throughput.rs | 9 +- 527 files changed, 5149 insertions(+), 3442 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f43fe0b8314..e0752b042ce 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10244,6 +10244,7 @@ dependencies = [ "vortex-array", "vortex-buffer", "vortex-error", + "vortex-mask", "vortex-session", ] diff --git a/benchmarks/compress-bench/src/vortex.rs b/benchmarks/compress-bench/src/vortex.rs index b2eb1a5d490..9d548fd60ec 100644 --- a/benchmarks/compress-bench/src/vortex.rs +++ b/benchmarks/compress-bench/src/vortex.rs @@ -12,6 +12,7 @@ use async_trait::async_trait; use bytes::Bytes; use futures::StreamExt; use futures::pin_mut; +use vortex::array::IntoArray; use vortex::file::OpenOptionsSessionExt; use vortex::file::WriteOptionsSessionExt; use vortex_bench::Format; @@ -37,7 +38,7 @@ impl Compressor for VortexCompressor { let mut cursor = Cursor::new(&mut buf); SESSION .write_options() - .write(&mut cursor, uncompressed.to_array_stream()) + .write(&mut cursor, uncompressed.into_array().to_array_stream()) .await?; let elapsed = start.elapsed(); @@ -51,7 +52,7 @@ impl Compressor for VortexCompressor { let mut cursor = Cursor::new(&mut buf); SESSION .write_options() - .write(&mut cursor, uncompressed.to_array_stream()) + .write(&mut cursor, uncompressed.into_array().to_array_stream()) .await?; // Now decompress diff --git a/encodings/alp/public-api.lock b/encodings/alp/public-api.lock index 0446871e200..28660e3d656 100644 --- a/encodings/alp/public-api.lock +++ b/encodings/alp/public-api.lock @@ -94,7 +94,7 @@ pub fn vortex_alp::ALP::reduce_parent(array: &vortex_array::vtable::typed::Array pub fn vortex_alp::ALP::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_alp::ALP::stats(array: &vortex_alp::ALPArray) -> vortex_array::stats::array::StatsSetRef<'_> +pub fn vortex_alp::ALP::stats(array: &vortex_alp::ALPArray) -> &vortex_array::stats::array::ArrayStats pub fn vortex_alp::ALP::vtable(_array: &Self::Array) -> &Self @@ -256,7 +256,7 @@ pub fn vortex_alp::ALPRD::reduce_parent(array: &vortex_array::vtable::typed::Arr pub fn vortex_alp::ALPRD::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_alp::ALPRD::stats(array: &vortex_alp::ALPRDArray) -> vortex_array::stats::array::StatsSetRef<'_> +pub fn vortex_alp::ALPRD::stats(array: &vortex_alp::ALPRDArray) -> &vortex_array::stats::array::ArrayStats pub fn vortex_alp::ALPRD::vtable(_array: &Self::Array) -> &Self diff --git a/encodings/alp/src/alp/array.rs b/encodings/alp/src/alp/array.rs index 467ff3fdee1..2ea537d7e67 100644 --- a/encodings/alp/src/alp/array.rs +++ b/encodings/alp/src/alp/array.rs @@ -23,7 +23,6 @@ use vortex_array::patches::Patches; use vortex_array::patches::PatchesMetadata; use vortex_array::serde::ArrayChildren; use vortex_array::stats::ArrayStats; -use vortex_array::stats::StatsSetRef; use vortex_array::vtable; use vortex_array::vtable::Array; use vortex_array::vtable::ArrayId; @@ -47,10 +46,10 @@ use crate::alp::decompress::execute_decompress; use crate::alp::rules::PARENT_KERNELS; use crate::alp::rules::RULES; -vtable!(ALP); +vtable!(ALP, ALP, ALPData); impl VTable for ALP { - type Array = ALPArray; + type Array = ALPData; type Metadata = ProstMetadata; type OperationsVTable = Self; @@ -64,49 +63,49 @@ impl VTable for ALP { Self::ID } - fn len(array: &ALPArray) -> usize { + fn len(array: &ALPData) -> usize { array.encoded.len() } - fn dtype(array: &ALPArray) -> &DType { + fn dtype(array: &ALPData) -> &DType { &array.dtype } - fn stats(array: &ALPArray) -> StatsSetRef<'_> { - array.stats_set.to_ref(array.as_ref()) + fn stats(array: &ALPData) -> &ArrayStats { + &array.stats_set } - fn array_hash(array: &ALPArray, state: &mut H, precision: Precision) { + fn array_hash(array: &Array, state: &mut H, precision: Precision) { array.dtype.hash(state); array.encoded.array_hash(state, precision); array.exponents.hash(state); array.patches.array_hash(state, precision); } - fn array_eq(array: &ALPArray, other: &ALPArray, precision: Precision) -> bool { + fn array_eq(array: &Array, other: &Array, precision: Precision) -> bool { array.dtype == other.dtype && array.encoded.array_eq(&other.encoded, precision) && array.exponents == other.exponents && array.patches.array_eq(&other.patches, precision) } - fn nbuffers(_array: &ALPArray) -> usize { + fn nbuffers(_array: &Array) -> usize { 0 } - fn buffer(_array: &ALPArray, idx: usize) -> BufferHandle { + fn buffer(_array: &Array, idx: usize) -> BufferHandle { vortex_panic!("ALPArray buffer index {idx} out of bounds") } - fn buffer_name(_array: &ALPArray, _idx: usize) -> Option { + fn buffer_name(_array: &Array, _idx: usize) -> Option { None } - fn nchildren(array: &ALPArray) -> usize { + fn nchildren(array: &Array) -> usize { 1 + array.patches().map_or(0, patches_nchildren) } - fn child(array: &ALPArray, idx: usize) -> ArrayRef { + fn child(array: &Array, idx: usize) -> ArrayRef { match idx { 0 => array.encoded().clone(), _ => { @@ -118,7 +117,7 @@ impl VTable for ALP { } } - fn child_name(array: &ALPArray, idx: usize) -> String { + fn child_name(array: &Array, idx: usize) -> String { match idx { 0 => "encoded".to_string(), _ => { @@ -130,7 +129,7 @@ impl VTable for ALP { } } - fn metadata(array: &ALPArray) -> VortexResult { + fn metadata(array: &Array) -> VortexResult { let exponents = array.exponents(); Ok(ProstMetadata(ALPMetadata { exp_e: exponents.e as u32, @@ -164,7 +163,7 @@ impl VTable for ALP { metadata: &Self::Metadata, _buffers: &[BufferHandle], children: &dyn ArrayChildren, - ) -> VortexResult { + ) -> VortexResult { let encoded_ptype = match &dtype { DType::Primitive(PType::F32, n) => DType::Primitive(PType::I32, *n), DType::Primitive(PType::F64, n) => DType::Primitive(PType::I64, *n), @@ -186,7 +185,7 @@ impl VTable for ALP { }) .transpose()?; - ALPArray::try_new( + ALPData::try_new( encoded, Exponents { e: u8::try_from(metadata.exp_e)?, @@ -243,7 +242,7 @@ impl VTable for ALP { fn execute(array: Arc>, ctx: &mut ExecutionCtx) -> VortexResult { Ok(ExecutionResult::done( - execute_decompress(Arc::unwrap_or_clone(array).into_inner(), ctx)?.into_array(), + execute_decompress(Arc::unwrap_or_clone(array), ctx)?.into_array(), )) } @@ -266,7 +265,7 @@ impl VTable for ALP { } #[derive(Clone, Debug)] -pub struct ALPArray { +pub struct ALPData { encoded: ArrayRef, patches: Option, dtype: DType, @@ -291,7 +290,7 @@ pub struct ALPMetadata { pub(crate) patches: Option, } -impl ALPArray { +impl ALPData { fn validate( encoded: &ArrayRef, exponents: Exponents, @@ -363,10 +362,10 @@ impl ALPArray { } } -impl ALPArray { +impl ALPData { /// Build a new `ALPArray` from components, panicking on validation failure. /// - /// See [`ALPArray::try_new`] for reference on preconditions that must pass before + /// See [`ALPData::try_new`] for reference on preconditions that must pass before /// calling this method. pub fn new(encoded: ArrayRef, exponents: Exponents, patches: Option) -> Self { Self::try_new(encoded, exponents, patches).vortex_expect("ALPArray new") @@ -399,7 +398,7 @@ impl ALPArray { /// # use vortex_buffer::buffer; /// /// // Returns error because buffer has wrong PType. - /// let result = ALPArray::try_new( + /// let result = ALPData::try_new( /// buffer![1i8].into_array(), /// Exponents { e: 1, f: 1 }, /// None @@ -407,7 +406,7 @@ impl ALPArray { /// assert!(result.is_err()); /// /// // Returns error because Exponents are out of bounds for f32 - /// let result = ALPArray::try_new( + /// let result = ALPData::try_new( /// buffer![1i32, 2i32].into_array(), /// Exponents { e: 100, f: 100 }, /// None @@ -415,7 +414,7 @@ impl ALPArray { /// assert!(result.is_err()); /// /// // Success! - /// let value = ALPArray::try_new( + /// let value = ALPData::try_new( /// buffer![0i32].into_array(), /// Exponents { e: 1, f: 1 }, /// None @@ -447,7 +446,7 @@ impl ALPArray { /// Build a new `ALPArray` from components without validation. /// - /// See [`ALPArray::try_new`] for information about the preconditions that should be checked + /// See [`ALPData::try_new`] for information about the preconditions that should be checked /// **before** calling this method. pub(crate) unsafe fn new_unchecked( encoded: ArrayRef, @@ -463,6 +462,51 @@ impl ALPArray { stats_set: Default::default(), } } +} + +/// Constructors for [`ALPArray`]. +impl ALP { + pub fn new(encoded: ArrayRef, exponents: Exponents, patches: Option) -> ALPArray { + Array::from_inner(ALPData::new(encoded, exponents, patches)) + } + + pub fn try_new( + encoded: ArrayRef, + exponents: Exponents, + patches: Option, + ) -> VortexResult { + Ok(Array::from_inner(ALPData::try_new( + encoded, exponents, patches, + )?)) + } + + /// # Safety + /// See [`ALPData::try_new`] for preconditions. + pub unsafe fn new_unchecked( + encoded: ArrayRef, + exponents: Exponents, + patches: Option, + dtype: DType, + ) -> ALPArray { + Array::from_inner(unsafe { ALPData::new_unchecked(encoded, exponents, patches, dtype) }) + } +} + +impl ALPData { + /// Returns the number of elements in the array. + pub fn len(&self) -> usize { + self.encoded.len() + } + + /// Returns `true` if the array contains no elements. + pub fn is_empty(&self) -> bool { + self.encoded.len() == 0 + } + + /// Returns the logical data type of the array. + pub fn dtype(&self) -> &DType { + &self.dtype + } pub fn ptype(&self) -> PType { self.dtype.as_ptype() @@ -489,7 +533,7 @@ impl ALPArray { } impl ValidityChild for ALP { - fn validity_child(array: &ALPArray) -> &ArrayRef { + fn validity_child(array: &ALPData) -> &ArrayRef { array.encoded() } } @@ -809,7 +853,7 @@ mod tests { .unwrap(); // Build a new ALPArray with the same encoded data but patches without chunk_offsets. - let alp_without_chunk_offsets = ALPArray::new( + let alp_without_chunk_offsets = ALPData::new( normally_encoded.encoded().clone(), normally_encoded.exponents(), Some(patches_without_chunk_offsets), diff --git a/encodings/alp/src/alp/compress.rs b/encodings/alp/src/alp/compress.rs index 3759f354a22..e474238da98 100644 --- a/encodings/alp/src/alp/compress.rs +++ b/encodings/alp/src/alp/compress.rs @@ -15,6 +15,7 @@ use vortex_error::VortexResult; use vortex_error::vortex_bail; use vortex_mask::Mask; +use crate::ALP; use crate::Exponents; use crate::alp::ALPArray; use crate::alp::ALPFloat; @@ -48,7 +49,7 @@ pub fn alp_encode(parray: &PrimitiveArray, exponents: Option) -> Vort // SAFETY: alp_encode_components_typed must return well-formed components unsafe { - Ok(ALPArray::new_unchecked( + Ok(ALP::new_unchecked( encoded, exponents, patches, @@ -75,7 +76,7 @@ where let encoded_array = PrimitiveArray::new(encoded, values.validity().clone()).into_array(); - let validity = values.validity_mask()?; + let validity = values.validity_mask(); // exceptional_positions may contain exceptions at invalid positions (which contain garbage // data). We remove null exceptions in order to keep the Patches small. let (valid_exceptional_positions, valid_exceptional_values): (Buffer, Buffer) = diff --git a/encodings/alp/src/alp/compute/cast.rs b/encodings/alp/src/alp/compute/cast.rs index 813f195c3b8..8a14520823d 100644 --- a/encodings/alp/src/alp/compute/cast.rs +++ b/encodings/alp/src/alp/compute/cast.rs @@ -45,13 +45,8 @@ impl CastReduce for ALP { // SAFETY: casting nullability doesn't alter the invariants unsafe { Ok(Some( - ALPArray::new_unchecked( - new_encoded, - array.exponents(), - new_patches, - dtype.clone(), - ) - .into_array(), + ALP::new_unchecked(new_encoded, array.exponents(), new_patches, dtype.clone()) + .into_array(), )) } } else { diff --git a/encodings/alp/src/alp/compute/filter.rs b/encodings/alp/src/alp/compute/filter.rs index cfe00c2e1ae..f14c7a6cfaf 100644 --- a/encodings/alp/src/alp/compute/filter.rs +++ b/encodings/alp/src/alp/compute/filter.rs @@ -26,7 +26,7 @@ impl FilterKernel for ALP { // SAFETY: filtering the values does not change correctness unsafe { Ok(Some( - ALPArray::new_unchecked( + ALP::new_unchecked( array.encoded().filter(mask.clone())?, array.exponents(), patches, diff --git a/encodings/alp/src/alp/compute/mask.rs b/encodings/alp/src/alp/compute/mask.rs index d4f63475c9e..d5b3ebeb745 100644 --- a/encodings/alp/src/alp/compute/mask.rs +++ b/encodings/alp/src/alp/compute/mask.rs @@ -21,7 +21,7 @@ impl MaskReduce for ALP { } let masked_encoded = array.encoded().clone().mask(mask.clone())?; Ok(Some( - ALPArray::new(masked_encoded, array.exponents(), None).into_array(), + ALP::new(masked_encoded, array.exponents(), None).into_array(), )) } } @@ -40,7 +40,7 @@ impl MaskKernel for ALP { .transpose()? .flatten(); Ok(Some( - ALPArray::new(masked_encoded, array.exponents(), masked_patches).into_array(), + ALP::new(masked_encoded, array.exponents(), masked_patches).into_array(), )) } } diff --git a/encodings/alp/src/alp/compute/slice.rs b/encodings/alp/src/alp/compute/slice.rs index f7e2a7bdfde..bcd0ddd7500 100644 --- a/encodings/alp/src/alp/compute/slice.rs +++ b/encodings/alp/src/alp/compute/slice.rs @@ -7,6 +7,7 @@ use vortex_array::ArrayRef; use vortex_array::ExecutionCtx; use vortex_array::IntoArray; use vortex_array::arrays::slice::SliceKernel; +use vortex_array::vtable::Array; use vortex_error::VortexResult; use crate::ALP; @@ -14,11 +15,11 @@ use crate::ALPArray; impl SliceKernel for ALP { fn slice( - array: &Self::Array, + array: &Array, range: Range, _ctx: &mut ExecutionCtx, ) -> VortexResult> { - let sliced_alp = ALPArray::new( + let sliced_alp = ALP::new( array.encoded().slice(range.clone())?, array.exponents(), array diff --git a/encodings/alp/src/alp/compute/take.rs b/encodings/alp/src/alp/compute/take.rs index 15d32a5acc0..d58b60c7fb5 100644 --- a/encodings/alp/src/alp/compute/take.rs +++ b/encodings/alp/src/alp/compute/take.rs @@ -32,7 +32,7 @@ impl TakeExecute for ALP { }) .transpose()?; Ok(Some( - ALPArray::new(taken_encoded, array.exponents(), taken_patches).into_array(), + ALP::new(taken_encoded, array.exponents(), taken_patches).into_array(), )) } } diff --git a/encodings/alp/src/alp/decompress.rs b/encodings/alp/src/alp/decompress.rs index d2a921dfaed..cf678d9908c 100644 --- a/encodings/alp/src/alp/decompress.rs +++ b/encodings/alp/src/alp/decompress.rs @@ -28,7 +28,7 @@ pub fn decompress_into_array( array: ALPArray, ctx: &mut ExecutionCtx, ) -> VortexResult { - let (encoded, exponents, patches, dtype) = array.into_parts(); + let (encoded, exponents, patches, dtype) = array.into_inner().into_parts(); if let Some(ref patches) = patches && let Some(chunk_offsets) = patches.chunk_offsets() { @@ -60,7 +60,7 @@ pub fn decompress_into_array( /// /// A `PrimitiveArray` containing the decompressed floating-point values with all patches applied. pub fn execute_decompress(array: ALPArray, ctx: &mut ExecutionCtx) -> VortexResult { - let (encoded, exponents, patches, dtype) = array.into_parts(); + let (encoded, exponents, patches, dtype) = array.into_inner().into_parts(); if let Some(ref patches) = patches && let Some(chunk_offsets) = patches.chunk_offsets() { diff --git a/encodings/alp/src/alp/ops.rs b/encodings/alp/src/alp/ops.rs index 2877e2cb264..cd637232112 100644 --- a/encodings/alp/src/alp/ops.rs +++ b/encodings/alp/src/alp/ops.rs @@ -3,17 +3,21 @@ use vortex_array::ExecutionCtx; use vortex_array::scalar::Scalar; +use vortex_array::vtable::Array; use vortex_array::vtable::OperationsVTable; use vortex_error::VortexExpect; use vortex_error::VortexResult; use crate::ALP; -use crate::ALPArray; use crate::ALPFloat; use crate::match_each_alp_float_ptype; impl OperationsVTable for ALP { - fn scalar_at(array: &ALPArray, index: usize, _ctx: &mut ExecutionCtx) -> VortexResult { + fn scalar_at( + array: &Array, + index: usize, + _ctx: &mut ExecutionCtx, + ) -> VortexResult { if let Some(patches) = array.patches() && let Some(patch) = patches.get_patched(index)? { diff --git a/encodings/alp/src/alp_rd/array.rs b/encodings/alp/src/alp_rd/array.rs index bc5bcde0a5b..21d2d2e0c9d 100644 --- a/encodings/alp/src/alp_rd/array.rs +++ b/encodings/alp/src/alp_rd/array.rs @@ -28,7 +28,6 @@ use vortex_array::patches::PatchesMetadata; use vortex_array::require_child; use vortex_array::serde::ArrayChildren; use vortex_array::stats::ArrayStats; -use vortex_array::stats::StatsSetRef; use vortex_array::validity::Validity; use vortex_array::vtable; use vortex_array::vtable::Array; @@ -52,7 +51,7 @@ use crate::alp_rd::kernel::PARENT_KERNELS; use crate::alp_rd::rules::RULES; use crate::alp_rd_decode; -vtable!(ALPRD); +vtable!(ALPRD, ALPRD, ALPRDData); #[derive(Clone, prost::Message)] pub struct ALPRDMetadata { @@ -69,7 +68,7 @@ pub struct ALPRDMetadata { } impl VTable for ALPRD { - type Array = ALPRDArray; + type Array = ALPRDData; type Metadata = ProstMetadata; type OperationsVTable = Self; @@ -83,19 +82,19 @@ impl VTable for ALPRD { Self::ID } - fn len(array: &ALPRDArray) -> usize { + fn len(array: &ALPRDData) -> usize { array.left_parts.len() } - fn dtype(array: &ALPRDArray) -> &DType { + fn dtype(array: &ALPRDData) -> &DType { &array.dtype } - fn stats(array: &ALPRDArray) -> StatsSetRef<'_> { - array.stats_set.to_ref(array.as_ref()) + fn stats(array: &ALPRDData) -> &ArrayStats { + &array.stats_set } - fn array_hash(array: &ALPRDArray, state: &mut H, precision: Precision) { + fn array_hash(array: &Array, state: &mut H, precision: Precision) { array.dtype.hash(state); array.left_parts.array_hash(state, precision); array.left_parts_dictionary.array_hash(state, precision); @@ -104,7 +103,7 @@ impl VTable for ALPRD { array.left_parts_patches.array_hash(state, precision); } - fn array_eq(array: &ALPRDArray, other: &ALPRDArray, precision: Precision) -> bool { + fn array_eq(array: &Array, other: &Array, precision: Precision) -> bool { array.dtype == other.dtype && array.left_parts.array_eq(&other.left_parts, precision) && array @@ -117,23 +116,23 @@ impl VTable for ALPRD { .array_eq(&other.left_parts_patches, precision) } - fn nbuffers(_array: &ALPRDArray) -> usize { + fn nbuffers(_array: &Array) -> usize { 0 } - fn buffer(_array: &ALPRDArray, idx: usize) -> BufferHandle { + fn buffer(_array: &Array, idx: usize) -> BufferHandle { vortex_panic!("ALPRDArray buffer index {idx} out of bounds") } - fn buffer_name(_array: &ALPRDArray, _idx: usize) -> Option { + fn buffer_name(_array: &Array, _idx: usize) -> Option { None } - fn nchildren(array: &ALPRDArray) -> usize { + fn nchildren(array: &Array) -> usize { 2 + array.left_parts_patches().map_or(0, patches_nchildren) } - fn child(array: &ALPRDArray, idx: usize) -> ArrayRef { + fn child(array: &Array, idx: usize) -> ArrayRef { match idx { 0 => array.left_parts().clone(), 1 => array.right_parts().clone(), @@ -146,7 +145,7 @@ impl VTable for ALPRD { } } - fn child_name(array: &ALPRDArray, idx: usize) -> String { + fn child_name(array: &Array, idx: usize) -> String { match idx { 0 => "left_parts".to_string(), 1 => "right_parts".to_string(), @@ -159,7 +158,7 @@ impl VTable for ALPRD { } } - fn metadata(array: &ALPRDArray) -> VortexResult { + fn metadata(array: &Array) -> VortexResult { let dict = array .left_parts_dictionary() .iter() @@ -200,7 +199,7 @@ impl VTable for ALPRD { metadata: &Self::Metadata, _buffers: &[BufferHandle], children: &dyn ArrayChildren, - ) -> VortexResult { + ) -> VortexResult { if children.len() < 2 { vortex_bail!( "Expected at least 2 children for ALPRD encoding, found {}", @@ -248,7 +247,7 @@ impl VTable for ALPRD { }) .transpose()?; - ALPRDArray::try_new( + ALPRDData::try_new( dtype.clone(), left_parts, left_parts_dictionary, @@ -330,7 +329,7 @@ impl VTable for ALPRD { // Decode the left_parts using our builtin dictionary. let left_parts_dict = left_parts_dictionary; - let validity = left_parts.validity_mask()?; + let validity = left_parts.validity_mask(); let decoded_array = if ptype == PType::F32 { // TODO(joe): use iterative execution for the patches. @@ -381,7 +380,7 @@ impl VTable for ALPRD { } #[derive(Clone, Debug)] -pub struct ALPRDArray { +pub struct ALPRDData { dtype: DType, left_parts: ArrayRef, left_parts_patches: Option, @@ -405,9 +404,49 @@ pub struct ALPRD; impl ALPRD { pub const ID: ArrayId = ArrayId::new_ref("vortex.alprd"); + + pub fn try_new( + dtype: DType, + left_parts: ArrayRef, + left_parts_dictionary: Buffer, + right_parts: ArrayRef, + right_bit_width: u8, + left_parts_patches: Option, + ) -> VortexResult { + Ok(Array::from_inner(ALPRDData::try_new( + dtype, + left_parts, + left_parts_dictionary, + right_parts, + right_bit_width, + left_parts_patches, + )?)) + } + + /// # Safety + /// See [`ALPRDData::try_new`] for preconditions. + pub unsafe fn new_unchecked( + dtype: DType, + left_parts: ArrayRef, + left_parts_dictionary: Buffer, + right_parts: ArrayRef, + right_bit_width: u8, + left_parts_patches: Option, + ) -> ALPRDArray { + Array::from_inner(unsafe { + ALPRDData::new_unchecked( + dtype, + left_parts, + left_parts_dictionary, + right_parts, + right_bit_width, + left_parts_patches, + ) + }) + } } -impl ALPRDArray { +impl ALPRDData { /// Build a new `ALPRDArray` from components. pub fn try_new( dtype: DType, @@ -505,6 +544,21 @@ impl ALPRDArray { } } + /// Returns the number of elements in the array. + pub fn len(&self) -> usize { + self.left_parts.len() + } + + /// Returns `true` if the array contains no elements. + pub fn is_empty(&self) -> bool { + self.left_parts.len() == 0 + } + + /// Returns the logical data type of the array. + pub fn dtype(&self) -> &DType { + &self.dtype + } + /// Returns true if logical type of the array values is f32. /// /// Returns false if the logical type of the array values is f64. @@ -548,7 +602,7 @@ impl ALPRDArray { } impl ValidityChild for ALPRD { - fn validity_child(array: &ALPRDArray) -> &ArrayRef { + fn validity_child(array: &ALPRDData) -> &ArrayRef { array.left_parts() } } diff --git a/encodings/alp/src/alp_rd/compute/cast.rs b/encodings/alp/src/alp_rd/compute/cast.rs index 9a2b4d73ec2..41048193e79 100644 --- a/encodings/alp/src/alp_rd/compute/cast.rs +++ b/encodings/alp/src/alp_rd/compute/cast.rs @@ -28,7 +28,7 @@ impl CastReduce for ALPRD { )?; return Ok(Some( - ALPRDArray::try_new( + ALPRD::try_new( dtype.clone(), new_left_parts, array.left_parts_dictionary().clone(), diff --git a/encodings/alp/src/alp_rd/compute/filter.rs b/encodings/alp/src/alp_rd/compute/filter.rs index f45740c9b4e..8b8ef7c9a97 100644 --- a/encodings/alp/src/alp_rd/compute/filter.rs +++ b/encodings/alp/src/alp_rd/compute/filter.rs @@ -24,7 +24,7 @@ impl FilterKernel for ALPRD { .flatten(); Ok(Some( - ALPRDArray::try_new( + ALPRD::try_new( array.dtype().clone(), array.left_parts().filter(mask.clone())?, array.left_parts_dictionary().clone(), diff --git a/encodings/alp/src/alp_rd/compute/mask.rs b/encodings/alp/src/alp_rd/compute/mask.rs index 4a6ad8a7b6a..ff36de3e24f 100644 --- a/encodings/alp/src/alp_rd/compute/mask.rs +++ b/encodings/alp/src/alp_rd/compute/mask.rs @@ -20,7 +20,7 @@ impl MaskReduce for ALPRD { [array.left_parts().clone(), mask.clone()], )?; Ok(Some( - ALPRDArray::try_new( + ALPRD::try_new( array.dtype().as_nullable(), masked_left_parts, array.left_parts_dictionary().clone(), diff --git a/encodings/alp/src/alp_rd/compute/take.rs b/encodings/alp/src/alp_rd/compute/take.rs index a7b8a85ece8..3df7b4af012 100644 --- a/encodings/alp/src/alp_rd/compute/take.rs +++ b/encodings/alp/src/alp_rd/compute/take.rs @@ -39,7 +39,7 @@ impl TakeExecute for ALPRD { .fill_null(Scalar::zero_value(array.right_parts().dtype()))?; Ok(Some( - ALPRDArray::try_new( + ALPRD::try_new( array .dtype() .with_nullability(taken_left_parts.dtype().nullability()), diff --git a/encodings/alp/src/alp_rd/mod.rs b/encodings/alp/src/alp_rd/mod.rs index 7521ff15b7c..9dab6979fd2 100644 --- a/encodings/alp/src/alp_rd/mod.rs +++ b/encodings/alp/src/alp_rd/mod.rs @@ -273,7 +273,7 @@ impl RDEncoder { .vortex_expect("Patches construction in encode") }); - ALPRDArray::try_new( + ALPRD::try_new( DType::Primitive(T::PTYPE, packed_left.dtype().nullability()), packed_left, Buffer::::copy_from(&self.codes), diff --git a/encodings/alp/src/alp_rd/ops.rs b/encodings/alp/src/alp_rd/ops.rs index e27434a7979..c906216cd44 100644 --- a/encodings/alp/src/alp_rd/ops.rs +++ b/encodings/alp/src/alp_rd/ops.rs @@ -4,16 +4,16 @@ use vortex_array::DynArray; use vortex_array::ExecutionCtx; use vortex_array::scalar::Scalar; +use vortex_array::vtable::Array; use vortex_array::vtable::OperationsVTable; use vortex_error::VortexExpect; use vortex_error::VortexResult; use crate::ALPRD; -use crate::ALPRDArray; impl OperationsVTable for ALPRD { fn scalar_at( - array: &ALPRDArray, + array: &Array, index: usize, _ctx: &mut ExecutionCtx, ) -> VortexResult { diff --git a/encodings/alp/src/alp_rd/slice.rs b/encodings/alp/src/alp_rd/slice.rs index be6fc803be3..7e728f32927 100644 --- a/encodings/alp/src/alp_rd/slice.rs +++ b/encodings/alp/src/alp_rd/slice.rs @@ -7,6 +7,7 @@ use vortex_array::ArrayRef; use vortex_array::ExecutionCtx; use vortex_array::IntoArray; use vortex_array::arrays::slice::SliceKernel; +use vortex_array::vtable::Array; use vortex_error::VortexResult; use crate::alp_rd::ALPRD; @@ -14,7 +15,7 @@ use crate::alp_rd::ALPRDArray; impl SliceKernel for ALPRD { fn slice( - array: &Self::Array, + array: &Array, range: Range, _ctx: &mut ExecutionCtx, ) -> VortexResult> { @@ -26,7 +27,7 @@ impl SliceKernel for ALPRD { // SAFETY: slicing components does not change the encoded values Ok(Some(unsafe { - ALPRDArray::new_unchecked( + ALPRD::new_unchecked( array.dtype().clone(), array.left_parts().slice(range.clone())?, array.left_parts_dictionary().clone(), diff --git a/encodings/bytebool/Cargo.toml b/encodings/bytebool/Cargo.toml index 53197452ff5..bca2ed71aa9 100644 --- a/encodings/bytebool/Cargo.toml +++ b/encodings/bytebool/Cargo.toml @@ -21,6 +21,7 @@ num-traits = { workspace = true } vortex-array = { workspace = true } vortex-buffer = { workspace = true } vortex-error = { workspace = true } +vortex-mask = { workspace = true } vortex-session = { workspace = true } [dev-dependencies] diff --git a/encodings/bytebool/public-api.lock b/encodings/bytebool/public-api.lock index 287d87047ab..fefe8f07fe1 100644 --- a/encodings/bytebool/public-api.lock +++ b/encodings/bytebool/public-api.lock @@ -76,7 +76,7 @@ pub fn vortex_bytebool::ByteBool::reduce_parent(array: &vortex_array::vtable::ty pub fn vortex_bytebool::ByteBool::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_bytebool::ByteBool::stats(array: &vortex_bytebool::ByteBoolArray) -> vortex_array::stats::array::StatsSetRef<'_> +pub fn vortex_bytebool::ByteBool::stats(array: &vortex_bytebool::ByteBoolArray) -> &vortex_array::stats::array::ArrayStats pub fn vortex_bytebool::ByteBool::vtable(_array: &Self::Array) -> &Self diff --git a/encodings/bytebool/src/array.rs b/encodings/bytebool/src/array.rs index 93d55e6513a..2db4a306b45 100644 --- a/encodings/bytebool/src/array.rs +++ b/encodings/bytebool/src/array.rs @@ -19,7 +19,6 @@ use vortex_array::dtype::DType; use vortex_array::scalar::Scalar; use vortex_array::serde::ArrayChildren; use vortex_array::stats::ArrayStats; -use vortex_array::stats::StatsSetRef; use vortex_array::validity::Validity; use vortex_array::vtable; use vortex_array::vtable::Array; @@ -37,14 +36,15 @@ use vortex_error::VortexResult; use vortex_error::vortex_bail; use vortex_error::vortex_ensure; use vortex_error::vortex_panic; +use vortex_mask::Mask; use vortex_session::VortexSession; use crate::kernel::PARENT_KERNELS; -vtable!(ByteBool); +vtable!(ByteBool, ByteBool, ByteBoolData); impl VTable for ByteBool { - type Array = ByteBoolArray; + type Array = ByteBoolData; type Metadata = EmptyMetadata; type OperationsVTable = Self; @@ -58,57 +58,53 @@ impl VTable for ByteBool { Self::ID } - fn len(array: &ByteBoolArray) -> usize { + fn len(array: &ByteBoolData) -> usize { array.buffer.len() } - fn dtype(array: &ByteBoolArray) -> &DType { + fn dtype(array: &ByteBoolData) -> &DType { &array.dtype } - fn stats(array: &ByteBoolArray) -> StatsSetRef<'_> { - array.stats_set.to_ref(array.as_ref()) + fn stats(array: &ByteBoolData) -> &ArrayStats { + &array.stats_set } - fn array_hash( - array: &ByteBoolArray, - state: &mut H, - precision: Precision, - ) { + fn array_hash(array: &Array, state: &mut H, precision: Precision) { array.dtype.hash(state); array.buffer.array_hash(state, precision); array.validity.array_hash(state, precision); } - fn array_eq(array: &ByteBoolArray, other: &ByteBoolArray, precision: Precision) -> bool { + fn array_eq(array: &Array, other: &Array, precision: Precision) -> bool { array.dtype == other.dtype && array.buffer.array_eq(&other.buffer, precision) && array.validity.array_eq(&other.validity, precision) } - fn nbuffers(_array: &ByteBoolArray) -> usize { + fn nbuffers(_array: &Array) -> usize { 1 } - fn buffer(array: &ByteBoolArray, idx: usize) -> BufferHandle { + fn buffer(array: &Array, idx: usize) -> BufferHandle { match idx { 0 => array.buffer().clone(), _ => vortex_panic!("ByteBoolArray buffer index {idx} out of bounds"), } } - fn buffer_name(_array: &ByteBoolArray, idx: usize) -> Option { + fn buffer_name(_array: &Array, idx: usize) -> Option { match idx { 0 => Some("values".to_string()), _ => vortex_panic!("ByteBoolArray buffer_name index {idx} out of bounds"), } } - fn nchildren(array: &ByteBoolArray) -> usize { + fn nchildren(array: &Array) -> usize { validity_nchildren(array.validity()) } - fn child(array: &ByteBoolArray, idx: usize) -> ArrayRef { + fn child(array: &Array, idx: usize) -> ArrayRef { match idx { 0 => validity_to_child(array.validity(), array.len()) .vortex_expect("ByteBoolArray validity child out of bounds"), @@ -116,14 +112,14 @@ impl VTable for ByteBool { } } - fn child_name(_array: &ByteBoolArray, idx: usize) -> String { + fn child_name(_array: &Array, idx: usize) -> String { match idx { 0 => "validity".to_string(), _ => vortex_panic!("ByteBoolArray child_name index {idx} out of bounds"), } } - fn metadata(_array: &ByteBoolArray) -> VortexResult { + fn metadata(_array: &Array) -> VortexResult { Ok(EmptyMetadata) } @@ -147,7 +143,7 @@ impl VTable for ByteBool { _metadata: &Self::Metadata, buffers: &[BufferHandle], children: &dyn ArrayChildren, - ) -> VortexResult { + ) -> VortexResult { let validity = if children.is_empty() { Validity::from(dtype.nullability()) } else if children.len() == 1 { @@ -162,7 +158,7 @@ impl VTable for ByteBool { } let buffer = buffers[0].clone(); - Ok(ByteBoolArray::new(buffer, validity)) + Ok(ByteBoolData::new(buffer, validity)) } fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { @@ -208,7 +204,7 @@ impl VTable for ByteBool { } #[derive(Clone, Debug)] -pub struct ByteBoolArray { +pub struct ByteBoolData { dtype: DType, buffer: BufferHandle, validity: Validity, @@ -220,9 +216,14 @@ pub struct ByteBool; impl ByteBool { pub const ID: ArrayId = ArrayId::new_ref("vortex.bytebool"); + + /// Construct a [`ByteBoolArray`] from a `Vec` and validity. + pub fn from_vec>(data: Vec, validity: V) -> ByteBoolArray { + Array::from_inner(ByteBoolData::from_vec(data, validity)) + } } -impl ByteBoolArray { +impl ByteBoolData { pub fn new(buffer: BufferHandle, validity: Validity) -> Self { let length = buffer.len(); if let Some(vlen) = validity.maybe_len() @@ -242,6 +243,26 @@ impl ByteBoolArray { } } + /// Returns the number of elements in the array. + pub fn len(&self) -> usize { + self.buffer.len() + } + + /// Returns `true` if the array contains no elements. + pub fn is_empty(&self) -> bool { + self.buffer.len() == 0 + } + + /// Returns the logical data type of the array. + pub fn dtype(&self) -> &DType { + &self.dtype + } + + /// Returns the validity mask for this array. + pub fn validity_mask(&self) -> Mask { + self.validity.to_mask(self.len()) + } + // TODO(ngates): deprecate construction from vec pub fn from_vec>(data: Vec, validity: V) -> Self { let validity = validity.into(); @@ -260,7 +281,7 @@ impl ByteBoolArray { } } -impl ValidityHelper for ByteBoolArray { +impl ValidityHelper for ByteBoolData { fn validity(&self) -> &Validity { &self.validity } @@ -268,7 +289,7 @@ impl ValidityHelper for ByteBoolArray { impl OperationsVTable for ByteBool { fn scalar_at( - array: &ByteBoolArray, + array: &Array, index: usize, _ctx: &mut ExecutionCtx, ) -> VortexResult { @@ -279,13 +300,13 @@ impl OperationsVTable for ByteBool { } } -impl From> for ByteBoolArray { +impl From> for ByteBoolData { fn from(value: Vec) -> Self { Self::from_vec(value, Validity::AllValid) } } -impl From>> for ByteBoolArray { +impl From>> for ByteBoolData { fn from(value: Vec>) -> Self { let validity = Validity::from_iter(value.iter().map(|v| v.is_some())); diff --git a/encodings/bytebool/src/compute.rs b/encodings/bytebool/src/compute.rs index b0583961638..317312102c0 100644 --- a/encodings/bytebool/src/compute.rs +++ b/encodings/bytebool/src/compute.rs @@ -17,6 +17,7 @@ use vortex_error::VortexResult; use super::ByteBool; use super::ByteBoolArray; +use super::ByteBoolData; impl CastReduce for ByteBool { fn cast(array: &ByteBoolArray, dtype: &DType) -> VortexResult> { @@ -32,7 +33,7 @@ impl CastReduce for ByteBool { .cast_nullability(dtype.nullability(), array.len())?; return Ok(Some( - ByteBoolArray::new(array.buffer().clone(), new_validity).into_array(), + ByteBoolData::new(array.buffer().clone(), new_validity).into_array(), )); } @@ -44,7 +45,7 @@ impl CastReduce for ByteBool { impl MaskReduce for ByteBool { fn mask(array: &ByteBoolArray, mask: &ArrayRef) -> VortexResult> { Ok(Some( - ByteBoolArray::new( + ByteBoolData::new( array.buffer().clone(), array .validity() @@ -80,7 +81,7 @@ impl TakeExecute for ByteBool { }); Ok(Some( - ByteBoolArray::from_vec(taken_bools, validity).into_array(), + ByteBoolData::from_vec(taken_bools, validity).into_array(), )) } } diff --git a/encodings/bytebool/src/slice.rs b/encodings/bytebool/src/slice.rs index c80be024fd1..4248f8008fd 100644 --- a/encodings/bytebool/src/slice.rs +++ b/encodings/bytebool/src/slice.rs @@ -11,11 +11,12 @@ use vortex_error::VortexResult; use crate::ByteBool; use crate::ByteBoolArray; +use crate::ByteBoolData; impl SliceReduce for ByteBool { fn slice(array: &ByteBoolArray, range: Range) -> VortexResult> { Ok(Some( - ByteBoolArray::new( + ByteBoolData::new( array.buffer().slice(range.clone()), array.validity().slice(range)?, ) diff --git a/encodings/datetime-parts/public-api.lock b/encodings/datetime-parts/public-api.lock index 039f980af1a..def613d61f4 100644 --- a/encodings/datetime-parts/public-api.lock +++ b/encodings/datetime-parts/public-api.lock @@ -84,7 +84,7 @@ pub fn vortex_datetime_parts::DateTimeParts::reduce_parent(array: &vortex_array: pub fn vortex_datetime_parts::DateTimeParts::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_datetime_parts::DateTimeParts::stats(array: &vortex_datetime_parts::DateTimePartsArray) -> vortex_array::stats::array::StatsSetRef<'_> +pub fn vortex_datetime_parts::DateTimeParts::stats(array: &vortex_datetime_parts::DateTimePartsArray) -> &vortex_array::stats::array::ArrayStats pub fn vortex_datetime_parts::DateTimeParts::vtable(_array: &Self::Array) -> &Self diff --git a/encodings/datetime-parts/src/array.rs b/encodings/datetime-parts/src/array.rs index feed6b968a4..c775970e3eb 100644 --- a/encodings/datetime-parts/src/array.rs +++ b/encodings/datetime-parts/src/array.rs @@ -22,7 +22,6 @@ use vortex_array::dtype::Nullability; use vortex_array::dtype::PType; use vortex_array::serde::ArrayChildren; use vortex_array::stats::ArrayStats; -use vortex_array::stats::StatsSetRef; use vortex_array::vtable; use vortex_array::vtable::Array; use vortex_array::vtable::ArrayId; @@ -41,7 +40,7 @@ use crate::canonical::decode_to_temporal; use crate::compute::kernel::PARENT_KERNELS; use crate::compute::rules::PARENT_RULES; -vtable!(DateTimeParts); +vtable!(DateTimeParts, DateTimeParts, DateTimePartsData); #[derive(Clone, prost::Message)] #[repr(C)] @@ -74,7 +73,7 @@ impl DateTimePartsMetadata { } impl VTable for DateTimeParts { - type Array = DateTimePartsArray; + type Array = DateTimePartsData; type Metadata = ProstMetadata; type OperationsVTable = Self; @@ -88,57 +87,49 @@ impl VTable for DateTimeParts { Self::ID } - fn len(array: &DateTimePartsArray) -> usize { + fn len(array: &DateTimePartsData) -> usize { array.days.len() } - fn dtype(array: &DateTimePartsArray) -> &DType { + fn dtype(array: &DateTimePartsData) -> &DType { &array.dtype } - fn stats(array: &DateTimePartsArray) -> StatsSetRef<'_> { - array.stats_set.to_ref(array.as_ref()) + fn stats(array: &DateTimePartsData) -> &ArrayStats { + &array.stats_set } - fn array_hash( - array: &DateTimePartsArray, - state: &mut H, - precision: Precision, - ) { + fn array_hash(array: &Array, state: &mut H, precision: Precision) { array.dtype.hash(state); array.days.array_hash(state, precision); array.seconds.array_hash(state, precision); array.subseconds.array_hash(state, precision); } - fn array_eq( - array: &DateTimePartsArray, - other: &DateTimePartsArray, - precision: Precision, - ) -> bool { + fn array_eq(array: &Array, other: &Array, precision: Precision) -> bool { array.dtype == other.dtype && array.days.array_eq(&other.days, precision) && array.seconds.array_eq(&other.seconds, precision) && array.subseconds.array_eq(&other.subseconds, precision) } - fn nbuffers(_array: &DateTimePartsArray) -> usize { + fn nbuffers(_array: &Array) -> usize { 0 } - fn buffer(_array: &DateTimePartsArray, idx: usize) -> BufferHandle { + fn buffer(_array: &Array, idx: usize) -> BufferHandle { vortex_panic!("DateTimePartsArray buffer index {idx} out of bounds") } - fn buffer_name(_array: &DateTimePartsArray, idx: usize) -> Option { + fn buffer_name(_array: &Array, idx: usize) -> Option { vortex_panic!("DateTimePartsArray buffer_name index {idx} out of bounds") } - fn nchildren(_array: &DateTimePartsArray) -> usize { + fn nchildren(_array: &Array) -> usize { 3 } - fn child(array: &DateTimePartsArray, idx: usize) -> ArrayRef { + fn child(array: &Array, idx: usize) -> ArrayRef { match idx { 0 => array.days().clone(), 1 => array.seconds().clone(), @@ -147,7 +138,7 @@ impl VTable for DateTimeParts { } } - fn child_name(_array: &DateTimePartsArray, idx: usize) -> String { + fn child_name(_array: &Array, idx: usize) -> String { match idx { 0 => "days".to_string(), 1 => "seconds".to_string(), @@ -156,7 +147,7 @@ impl VTable for DateTimeParts { } } - fn metadata(array: &DateTimePartsArray) -> VortexResult { + fn metadata(array: &Array) -> VortexResult { Ok(ProstMetadata(DateTimePartsMetadata { days_ptype: PType::try_from(array.days().dtype())? as i32, seconds_ptype: PType::try_from(array.seconds().dtype())? as i32, @@ -186,7 +177,7 @@ impl VTable for DateTimeParts { metadata: &Self::Metadata, _buffers: &[BufferHandle], children: &dyn ArrayChildren, - ) -> VortexResult { + ) -> VortexResult { if children.len() != 3 { vortex_bail!( "Expected 3 children for datetime-parts encoding, found {}", @@ -210,7 +201,7 @@ impl VTable for DateTimeParts { len, )?; - DateTimePartsArray::try_new(dtype.clone(), days, seconds, subseconds) + DateTimePartsData::try_new(dtype.clone(), days, seconds, subseconds) } fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { @@ -253,7 +244,7 @@ impl VTable for DateTimeParts { } #[derive(Clone, Debug)] -pub struct DateTimePartsArray { +pub struct DateTimePartsData { dtype: DType, days: ArrayRef, seconds: ArrayRef, @@ -274,9 +265,21 @@ pub struct DateTimeParts; impl DateTimeParts { pub const ID: ArrayId = ArrayId::new_ref("vortex.datetimeparts"); + + /// Construct a new [`DateTimePartsArray`] from its components. + pub fn try_new( + dtype: DType, + days: ArrayRef, + seconds: ArrayRef, + subseconds: ArrayRef, + ) -> VortexResult { + Ok(Array::from_inner(DateTimePartsData::try_new( + dtype, days, seconds, subseconds, + )?)) + } } -impl DateTimePartsArray { +impl DateTimePartsData { pub fn try_new( dtype: DType, days: ArrayRef, @@ -340,6 +343,21 @@ impl DateTimePartsArray { } } + /// Returns the number of elements in the array. + pub fn len(&self) -> usize { + self.days.len() + } + + /// Returns `true` if the array contains no elements. + pub fn is_empty(&self) -> bool { + self.days.len() == 0 + } + + /// Returns the logical data type of the array. + pub fn dtype(&self) -> &DType { + &self.dtype + } + pub fn days(&self) -> &ArrayRef { &self.days } @@ -354,7 +372,7 @@ impl DateTimePartsArray { } impl ValidityChild for DateTimeParts { - fn validity_child(array: &DateTimePartsArray) -> &ArrayRef { + fn validity_child(array: &DateTimePartsData) -> &ArrayRef { array.days() } } diff --git a/encodings/datetime-parts/src/canonical.rs b/encodings/datetime-parts/src/canonical.rs index f619dd70a40..29b4d7e34df 100644 --- a/encodings/datetime-parts/src/canonical.rs +++ b/encodings/datetime-parts/src/canonical.rs @@ -140,7 +140,7 @@ mod test { ], validity.clone(), ); - let date_times = DateTimePartsArray::try_from(TemporalArray::new_timestamp( + let date_times = DateTimePartsData::try_from(TemporalArray::new_timestamp( milliseconds.clone().into_array(), TimeUnit::Milliseconds, Some("UTC".into()), diff --git a/encodings/datetime-parts/src/compress.rs b/encodings/datetime-parts/src/compress.rs index 6010f6adeaf..a0b62de3666 100644 --- a/encodings/datetime-parts/src/compress.rs +++ b/encodings/datetime-parts/src/compress.rs @@ -15,8 +15,8 @@ use vortex_error::VortexError; use vortex_error::VortexResult; use crate::DateTimePartsArray; +use crate::DateTimePartsData; use crate::timestamp; - pub struct TemporalParts { pub days: ArrayRef, pub seconds: ArrayRef, @@ -59,7 +59,7 @@ pub fn split_temporal(array: TemporalArray) -> VortexResult { }) } -impl TryFrom for DateTimePartsArray { +impl TryFrom for DateTimePartsData { type Error = VortexError; fn try_from(array: TemporalArray) -> Result { @@ -69,7 +69,7 @@ impl TryFrom for DateTimePartsArray { seconds, subseconds, } = split_temporal(array)?; - DateTimePartsArray::try_new(DType::Extension(ext_dtype), days, seconds, subseconds) + DateTimePartsData::try_new(DType::Extension(ext_dtype), days, seconds, subseconds) } } diff --git a/encodings/datetime-parts/src/compute/cast.rs b/encodings/datetime-parts/src/compute/cast.rs index 916da53d619..3f303db1db7 100644 --- a/encodings/datetime-parts/src/compute/cast.rs +++ b/encodings/datetime-parts/src/compute/cast.rs @@ -11,7 +11,7 @@ use vortex_error::VortexResult; use crate::DateTimeParts; use crate::DateTimePartsArray; - +use crate::DateTimePartsData; impl CastReduce for DateTimeParts { fn cast(array: &DateTimePartsArray, dtype: &DType) -> VortexResult> { if !array.dtype().eq_ignore_nullability(dtype) { @@ -19,7 +19,7 @@ impl CastReduce for DateTimeParts { }; Ok(Some( - DateTimePartsArray::try_new( + DateTimePartsData::try_new( dtype.clone(), array .days() @@ -48,9 +48,10 @@ mod tests { use vortex_buffer::buffer; use crate::DateTimePartsArray; + use crate::DateTimePartsData; fn date_time_array(validity: Validity) -> ArrayRef { - DateTimePartsArray::try_from(TemporalArray::new_timestamp( + DateTimePartsData::try_from(TemporalArray::new_timestamp( PrimitiveArray::new( buffer![ 86_400i64, // element with only day component @@ -105,7 +106,7 @@ mod tests { } #[rstest] - #[case(DateTimePartsArray::try_from(TemporalArray::new_timestamp( + #[case(DateTimePartsData::try_from(TemporalArray::new_timestamp( buffer![ 0i64, 86_400_000, // 1 day in ms @@ -116,7 +117,7 @@ mod tests { TimeUnit::Milliseconds, Some("UTC".into()) )).unwrap())] - #[case(DateTimePartsArray::try_from(TemporalArray::new_timestamp( + #[case(DateTimePartsData::try_from(TemporalArray::new_timestamp( PrimitiveArray::from_option_iter([ Some(0i64), None, @@ -127,7 +128,7 @@ mod tests { TimeUnit::Milliseconds, Some("UTC".into()) )).unwrap())] - #[case(DateTimePartsArray::try_from(TemporalArray::new_timestamp( + #[case(DateTimePartsData::try_from(TemporalArray::new_timestamp( buffer![86_400_000_000_000i64].into_array(), // 1 day in ns TimeUnit::Nanoseconds, Some("UTC".into()) diff --git a/encodings/datetime-parts/src/compute/compare.rs b/encodings/datetime-parts/src/compute/compare.rs index c69fd3d1b93..9bbd9ee5501 100644 --- a/encodings/datetime-parts/src/compute/compare.rs +++ b/encodings/datetime-parts/src/compute/compare.rs @@ -16,6 +16,7 @@ use vortex_array::scalar_fn::fns::operators::CompareOperator; use vortex_array::scalar_fn::fns::operators::Operator; use vortex_error::VortexResult; +use crate::DateTimePartsData; use crate::array::DateTimeParts; use crate::array::DateTimePartsArray; use crate::timestamp; @@ -210,8 +211,8 @@ mod test { fn dtp_array_from_timestamp( value: T, validity: Validity, - ) -> DateTimePartsArray { - DateTimePartsArray::try_from(TemporalArray::new_timestamp( + ) -> DateTimePartsData { + DateTimePartsData::try_from(TemporalArray::new_timestamp( PrimitiveArray::new(buffer![value], validity).into_array(), TimeUnit::Seconds, Some("UTC".into()), @@ -312,7 +313,7 @@ mod test { Some("UTC".into()), ); - let lhs = DateTimePartsArray::try_new( + let lhs = DateTimePartsData::try_new( DType::Extension(temporal_array.ext_dtype()), PrimitiveArray::new(buffer![0i32], lhs_validity).into_array(), PrimitiveArray::new(buffer![0u32], Validity::NonNullable).into_array(), diff --git a/encodings/datetime-parts/src/compute/filter.rs b/encodings/datetime-parts/src/compute/filter.rs index cc66bd75299..63a1f1a11d8 100644 --- a/encodings/datetime-parts/src/compute/filter.rs +++ b/encodings/datetime-parts/src/compute/filter.rs @@ -9,11 +9,11 @@ use vortex_mask::Mask; use crate::DateTimeParts; use crate::DateTimePartsArray; - +use crate::DateTimePartsData; impl FilterReduce for DateTimeParts { fn filter(array: &DateTimePartsArray, mask: &Mask) -> VortexResult> { Ok(Some( - DateTimePartsArray::try_new( + DateTimePartsData::try_new( array.dtype().clone(), array.days().filter(mask.clone())?, array.seconds().filter(mask.clone())?, @@ -34,6 +34,7 @@ mod test { use vortex_buffer::buffer; use crate::DateTimePartsArray; + use crate::DateTimePartsData; #[test] fn test_filter_datetime_parts() { @@ -50,7 +51,7 @@ mod test { let temporal = TemporalArray::new_timestamp(timestamps, TimeUnit::Milliseconds, Some("UTC".into())); - let array = DateTimePartsArray::try_from(temporal).unwrap(); + let array = DateTimePartsData::try_from(temporal).unwrap(); test_filter_conformance(&array.into_array()); // Test with nullable values @@ -66,7 +67,7 @@ mod test { let temporal = TemporalArray::new_timestamp(timestamps, TimeUnit::Milliseconds, Some("UTC".into())); - let array = DateTimePartsArray::try_from(temporal).unwrap(); + let array = DateTimePartsData::try_from(temporal).unwrap(); test_filter_conformance(&array.into_array()); } } diff --git a/encodings/datetime-parts/src/compute/mask.rs b/encodings/datetime-parts/src/compute/mask.rs index 686d63ef1bd..94de496d538 100644 --- a/encodings/datetime-parts/src/compute/mask.rs +++ b/encodings/datetime-parts/src/compute/mask.rs @@ -10,6 +10,7 @@ use vortex_error::VortexResult; use crate::DateTimeParts; use crate::DateTimePartsArray; use crate::DateTimePartsArrayParts; +use crate::DateTimePartsData; impl MaskReduce for DateTimeParts { fn mask(array: &DateTimePartsArray, mask: &ArrayRef) -> VortexResult> { @@ -18,10 +19,10 @@ impl MaskReduce for DateTimeParts { days, seconds, subseconds, - } = array.clone().into_parts(); + } = array.clone().into_inner().into_parts(); let masked_days = days.mask(mask.clone())?; Ok(Some( - DateTimePartsArray::try_new(dtype.as_nullable(), masked_days, seconds, subseconds)? + DateTimePartsData::try_new(dtype.as_nullable(), masked_days, seconds, subseconds)? .into_array(), )) } diff --git a/encodings/datetime-parts/src/compute/mod.rs b/encodings/datetime-parts/src/compute/mod.rs index 46ce9cf89e3..0f13adfce5b 100644 --- a/encodings/datetime-parts/src/compute/mod.rs +++ b/encodings/datetime-parts/src/compute/mod.rs @@ -22,49 +22,50 @@ mod tests { use vortex_buffer::buffer; use crate::DateTimePartsArray; + use crate::DateTimePartsData; #[rstest] // Basic datetime arrays - #[case::datetime_seconds(DateTimePartsArray::try_from(TemporalArray::new_timestamp( + #[case::datetime_seconds(DateTimePartsData::try_from(TemporalArray::new_timestamp( buffer![0i64, 86400, 172800, 259200, 345600].into_array(), TimeUnit::Seconds, Some("UTC".into()), )).unwrap())] - #[case::datetime_millis(DateTimePartsArray::try_from(TemporalArray::new_timestamp( + #[case::datetime_millis(DateTimePartsData::try_from(TemporalArray::new_timestamp( buffer![0i64, 86400000, 172800000].into_array(), TimeUnit::Milliseconds, Some("UTC".into()), )).unwrap())] - #[case::datetime_micros(DateTimePartsArray::try_from(TemporalArray::new_timestamp( + #[case::datetime_micros(DateTimePartsData::try_from(TemporalArray::new_timestamp( buffer![0i64, 86400000000, 172800000000].into_array(), TimeUnit::Microseconds, Some("UTC".into()), )).unwrap())] - #[case::datetime_nanos(DateTimePartsArray::try_from(TemporalArray::new_timestamp( + #[case::datetime_nanos(DateTimePartsData::try_from(TemporalArray::new_timestamp( buffer![0i64, 86400000000000].into_array(), TimeUnit::Nanoseconds, Some("UTC".into()), )).unwrap())] // Nullable arrays - #[case::datetime_nullable_seconds(DateTimePartsArray::try_from(TemporalArray::new_timestamp( + #[case::datetime_nullable_seconds(DateTimePartsData::try_from(TemporalArray::new_timestamp( PrimitiveArray::from_option_iter([Some(0i64), None, Some(86400), Some(172800), None]).into_array(), TimeUnit::Seconds, Some("UTC".into()), )).unwrap())] // Edge cases - #[case::datetime_single(DateTimePartsArray::try_from(TemporalArray::new_timestamp( + #[case::datetime_single(DateTimePartsData::try_from(TemporalArray::new_timestamp( buffer![1234567890i64].into_array(), TimeUnit::Seconds, Some("UTC".into()), )).unwrap())] // Large arrays (> 1024 elements) - #[case::datetime_large(DateTimePartsArray::try_from(TemporalArray::new_timestamp( + #[case::datetime_large(DateTimePartsData::try_from(TemporalArray::new_timestamp( PrimitiveArray::from_iter((0..1500).map(|i| i as i64 * 86400)).into_array(), TimeUnit::Seconds, Some("UTC".into()), )).unwrap())] // Different time patterns - #[case::datetime_with_subseconds(DateTimePartsArray::try_from(TemporalArray::new_timestamp( + #[case::datetime_with_subseconds(DateTimePartsData::try_from(TemporalArray::new_timestamp( buffer![123456789i64, 234567890, 345678901, 456789012, 567890123].into_array(), TimeUnit::Milliseconds, Some("UTC".into()), diff --git a/encodings/datetime-parts/src/compute/rules.rs b/encodings/datetime-parts/src/compute/rules.rs index 6ac0de3c290..03d1b2eee3c 100644 --- a/encodings/datetime-parts/src/compute/rules.rs +++ b/encodings/datetime-parts/src/compute/rules.rs @@ -27,8 +27,8 @@ use vortex_error::VortexResult; use crate::DateTimeParts; use crate::DateTimePartsArray; +use crate::DateTimePartsData; use crate::timestamp; - pub(crate) const PARENT_RULES: ParentRuleSet = ParentRuleSet::new(&[ ParentRuleSet::lift(&DTPFilterPushDownRule), ParentRuleSet::lift(&DTPComparisonPushDownRule), @@ -58,7 +58,7 @@ impl ArrayParentReduceRule for DTPFilterPushDownRule { return Ok(None); } - DateTimePartsArray::try_new( + DateTimePartsData::try_new( child.dtype().clone(), child.days().clone().filter(parent.filter_mask().clone())?, ConstantArray::new( @@ -216,7 +216,7 @@ mod tests { time_unit, None, ); - DateTimePartsArray::try_from(temporal).unwrap() + DateTimePartsData::try_from(temporal).unwrap() } /// Create a constant timestamp scalar at midnight for the given day. @@ -348,7 +348,7 @@ mod tests { TimeUnit::Seconds, None, ); - let dtp = DateTimePartsArray::try_from(temporal).unwrap(); + let dtp = DateTimePartsData::try_from(temporal).unwrap(); let len = dtp.len(); // Compare against midnight constant diff --git a/encodings/datetime-parts/src/compute/slice.rs b/encodings/datetime-parts/src/compute/slice.rs index bc723bdc8ed..70a588b0a95 100644 --- a/encodings/datetime-parts/src/compute/slice.rs +++ b/encodings/datetime-parts/src/compute/slice.rs @@ -6,16 +6,18 @@ use std::ops::Range; use vortex_array::ArrayRef; use vortex_array::IntoArray; use vortex_array::arrays::slice::SliceReduce; +use vortex_array::vtable::Array; use vortex_error::VortexResult; use crate::DateTimeParts; use crate::DateTimePartsArray; +use crate::DateTimePartsData; impl SliceReduce for DateTimeParts { - fn slice(array: &Self::Array, range: Range) -> VortexResult> { + fn slice(array: &Array, range: Range) -> VortexResult> { // SAFETY: slicing all components preserves values Ok(Some(unsafe { - DateTimePartsArray::new_unchecked( + DateTimePartsData::new_unchecked( array.dtype().clone(), array.days().slice(range.clone())?, array.seconds().slice(range.clone())?, diff --git a/encodings/datetime-parts/src/compute/take.rs b/encodings/datetime-parts/src/compute/take.rs index 8960cb1f41e..19b19be5837 100644 --- a/encodings/datetime-parts/src/compute/take.rs +++ b/encodings/datetime-parts/src/compute/take.rs @@ -17,7 +17,7 @@ use vortex_error::vortex_panic; use crate::DateTimeParts; use crate::DateTimePartsArray; - +use crate::DateTimePartsData; fn take_datetime_parts(array: &DateTimePartsArray, indices: &ArrayRef) -> VortexResult { // we go ahead and canonicalize here to avoid worst-case canonicalizing 3 separate times let indices = indices.to_primitive(); @@ -36,13 +36,10 @@ fn take_datetime_parts(array: &DateTimePartsArray, indices: &ArrayRef) -> Vortex }; if !taken_seconds.dtype().is_nullable() && !taken_subseconds.dtype().is_nullable() { - return Ok(DateTimePartsArray::try_new( - dtype, - taken_days, - taken_seconds, - taken_subseconds, - )? - .into_array()); + return Ok( + DateTimePartsData::try_new(dtype, taken_days, taken_seconds, taken_subseconds)? + .into_array(), + ); } // DateTimePartsArray requires seconds and subseconds to be non-nullable. @@ -80,7 +77,7 @@ fn take_datetime_parts(array: &DateTimePartsArray, indices: &ArrayRef) -> Vortex let taken_subseconds = taken_subseconds.fill_null(subseconds_fill)?; Ok( - DateTimePartsArray::try_new(dtype, taken_days, taken_seconds, taken_subseconds)? + DateTimePartsData::try_new(dtype, taken_days, taken_seconds, taken_subseconds)? .into_array(), ) } @@ -106,9 +103,10 @@ mod tests { use vortex_buffer::buffer; use crate::DateTimePartsArray; + use crate::DateTimePartsData; #[rstest] - #[case(DateTimePartsArray::try_from(TemporalArray::new_timestamp( + #[case(DateTimePartsData::try_from(TemporalArray::new_timestamp( buffer![ 0i64, 86_400_000, // 1 day in ms @@ -119,7 +117,7 @@ mod tests { TimeUnit::Milliseconds, Some("UTC".into()) )).unwrap())] - #[case(DateTimePartsArray::try_from(TemporalArray::new_timestamp( + #[case(DateTimePartsData::try_from(TemporalArray::new_timestamp( PrimitiveArray::from_option_iter([ Some(0i64), None, @@ -130,7 +128,7 @@ mod tests { TimeUnit::Milliseconds, Some("UTC".into()) )).unwrap())] - #[case(DateTimePartsArray::try_from(TemporalArray::new_timestamp( + #[case(DateTimePartsData::try_from(TemporalArray::new_timestamp( buffer![86_400_000i64].into_array(), TimeUnit::Milliseconds, Some("UTC".into()) diff --git a/encodings/datetime-parts/src/ops.rs b/encodings/datetime-parts/src/ops.rs index 167829b2fe0..a0afddfc056 100644 --- a/encodings/datetime-parts/src/ops.rs +++ b/encodings/datetime-parts/src/ops.rs @@ -6,19 +6,19 @@ use vortex_array::ExecutionCtx; use vortex_array::dtype::DType; use vortex_array::extension::datetime::Timestamp; use vortex_array::scalar::Scalar; +use vortex_array::vtable::Array; use vortex_array::vtable::OperationsVTable; use vortex_error::VortexExpect; use vortex_error::VortexResult; use vortex_error::vortex_panic; use crate::DateTimeParts; -use crate::DateTimePartsArray; use crate::timestamp; use crate::timestamp::TimestampParts; impl OperationsVTable for DateTimeParts { fn scalar_at( - array: &DateTimePartsArray, + array: &Array, index: usize, _ctx: &mut ExecutionCtx, ) -> VortexResult { diff --git a/encodings/decimal-byte-parts/public-api.lock b/encodings/decimal-byte-parts/public-api.lock index cf5f0278275..c046b7af686 100644 --- a/encodings/decimal-byte-parts/public-api.lock +++ b/encodings/decimal-byte-parts/public-api.lock @@ -84,7 +84,7 @@ pub fn vortex_decimal_byte_parts::DecimalByteParts::reduce_parent(array: &vortex pub fn vortex_decimal_byte_parts::DecimalByteParts::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_decimal_byte_parts::DecimalByteParts::stats(array: &vortex_decimal_byte_parts::DecimalBytePartsArray) -> vortex_array::stats::array::StatsSetRef<'_> +pub fn vortex_decimal_byte_parts::DecimalByteParts::stats(array: &vortex_decimal_byte_parts::DecimalBytePartsArray) -> &vortex_array::stats::array::ArrayStats pub fn vortex_decimal_byte_parts::DecimalByteParts::vtable(_array: &Self::Array) -> &Self diff --git a/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/cast.rs b/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/cast.rs index 04016fead44..85f3fb7d132 100644 --- a/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/cast.rs +++ b/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/cast.rs @@ -9,9 +9,9 @@ use vortex_array::dtype::DType; use vortex_array::scalar_fn::fns::cast::CastReduce; use vortex_error::VortexResult; +use super::DecimalBytePartsData; use crate::DecimalByteParts; use crate::DecimalBytePartsArray; - impl CastReduce for DecimalByteParts { fn cast(array: &DecimalBytePartsArray, dtype: &DType) -> VortexResult> { // DecimalBytePartsArray can only have Decimal dtype, so we only handle decimal-to-decimal casts @@ -30,7 +30,7 @@ impl CastReduce for DecimalByteParts { .cast(array.msp().dtype().with_nullability(*target_nullability))?; return Ok(Some( - DecimalBytePartsArray::try_new(new_msp, *target_decimal)?.into_array(), + DecimalBytePartsData::try_new(new_msp, *target_decimal)?.into_array(), )); } @@ -57,7 +57,7 @@ mod tests { #[test] fn test_cast_decimal_byte_parts_nullability() { let decimal_dtype = DecimalDType::new(10, 2); - let array = DecimalBytePartsArray::try_new( + let array = DecimalBytePartsData::try_new( buffer![100i32, 200, 300, 400].into_array(), decimal_dtype, ) @@ -81,7 +81,7 @@ mod tests { #[test] fn test_cast_decimal_byte_parts_nullable_to_non_nullable() { let decimal_dtype = DecimalDType::new(10, 2); - let array = DecimalBytePartsArray::try_new( + let array = DecimalBytePartsData::try_new( PrimitiveArray::from_option_iter([Some(100i32), None, Some(300)]).into_array(), decimal_dtype, ) @@ -96,24 +96,24 @@ mod tests { } #[rstest] - #[case::i32(DecimalBytePartsArray::try_new( + #[case::i32(DecimalBytePartsData::try_new( buffer![100i32, 200, 300, 400, 500].into_array(), DecimalDType::new(10, 2), ).unwrap())] - #[case::i64(DecimalBytePartsArray::try_new( + #[case::i64(DecimalBytePartsData::try_new( buffer![1000i64, 2000, 3000, 4000].into_array(), DecimalDType::new(19, 4), ).unwrap())] - #[case::nullable(DecimalBytePartsArray::try_new( + #[case::nullable(DecimalBytePartsData::try_new( PrimitiveArray::from_option_iter([Some(100i32), None, Some(300), Some(400), None]) .into_array(), DecimalDType::new(10, 2), ).unwrap())] - #[case::single(DecimalBytePartsArray::try_new( + #[case::single(DecimalBytePartsData::try_new( buffer![42i32].into_array(), DecimalDType::new(5, 1), ).unwrap())] - #[case::negative(DecimalBytePartsArray::try_new( + #[case::negative(DecimalBytePartsData::try_new( buffer![-100i32, -200, 300, -400, 500].into_array(), DecimalDType::new(10, 2), ).unwrap())] diff --git a/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/compare.rs b/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/compare.rs index 1c0c043f83f..244e17a77aa 100644 --- a/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/compare.rs +++ b/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/compare.rs @@ -21,15 +21,17 @@ use vortex_array::scalar::ScalarValue; use vortex_array::scalar_fn::fns::binary::CompareKernel; use vortex_array::scalar_fn::fns::operators::CompareOperator; use vortex_array::scalar_fn::fns::operators::Operator; +use vortex_array::vtable::Array; use vortex_error::VortexExpect; use vortex_error::VortexResult; +use super::DecimalBytePartsData; use crate::DecimalByteParts; use crate::decimal_byte_parts::compute::compare::Sign::Positive; impl CompareKernel for DecimalByteParts { fn compare( - lhs: &Self::Array, + lhs: &Array, rhs: &ArrayRef, operator: CompareOperator, _ctx: &mut ExecutionCtx, @@ -62,7 +64,7 @@ impl CompareKernel for DecimalByteParts { // (depending on the `sign`) than all values in MSP. // If the LHS or the RHS contain nulls, then we must fallback to the canonicalized // implementation which does null-checking instead. - if lhs.all_valid()? && rhs.all_valid()? { + if lhs.clone().into_array().all_valid()? && rhs.all_valid()? { Ok(Some( ConstantArray::new( unconvertible_value(sign, operator, nullability), @@ -164,7 +166,7 @@ mod tests { fn compare_decimal_const() { let decimal_dtype = DecimalDType::new(8, 2); let dtype = DType::Decimal(decimal_dtype, Nullability::Nullable); - let lhs = DecimalBytePartsArray::try_new( + let lhs = DecimalBytePartsData::try_new( PrimitiveArray::new(buffer![100i32, 200i32, 400i32], Validity::AllValid).into_array(), decimal_dtype, ) @@ -184,7 +186,7 @@ mod tests { #[test] fn test_byteparts_compare_nullable() -> VortexResult<()> { let decimal_type = DecimalDType::new(19, -11); - let lhs = DecimalBytePartsArray::try_new( + let lhs = DecimalBytePartsData::try_new( PrimitiveArray::new( buffer![1i64, 2i64, 3i64, 4i64], Validity::Array(BoolArray::from_iter([false, true, true, true]).into_array()), @@ -215,7 +217,7 @@ mod tests { fn compare_decimal_const_unconvertible_comparison() { let decimal_dtype = DecimalDType::new(40, 2); let dtype = DType::Decimal(decimal_dtype, Nullability::Nullable); - let lhs = DecimalBytePartsArray::try_new( + let lhs = DecimalBytePartsData::try_new( PrimitiveArray::new(buffer![100i32, 200i32, 400i32], Validity::AllValid).into_array(), decimal_dtype, ) diff --git a/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/filter.rs b/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/filter.rs index a25521db8e7..d6ffcb51b12 100644 --- a/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/filter.rs +++ b/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/filter.rs @@ -7,12 +7,12 @@ use vortex_array::arrays::filter::FilterReduce; use vortex_error::VortexResult; use vortex_mask::Mask; +use super::DecimalBytePartsData; use crate::DecimalByteParts; use crate::DecimalBytePartsArray; - impl FilterReduce for DecimalByteParts { fn filter(array: &DecimalBytePartsArray, mask: &Mask) -> VortexResult> { - DecimalBytePartsArray::try_new(array.msp.filter(mask.clone())?, *array.decimal_dtype()) + DecimalBytePartsData::try_new(array.msp.filter(mask.clone())?, *array.decimal_dtype()) .map(|d| Some(d.into_array())) } } @@ -33,7 +33,7 @@ mod test { let msp = buffer![100i32, 200, 300, 400, 500].into_array(); let decimal_dtype = DecimalDType::new(8, 2); - let array = DecimalBytePartsArray::try_new(msp, decimal_dtype).unwrap(); + let array = DecimalBytePartsData::try_new(msp, decimal_dtype).unwrap(); test_filter_conformance(&array.into_array()); // Test with nullable values @@ -41,7 +41,7 @@ mod test { .into_array(); let decimal_dtype = DecimalDType::new(18, 4); - let array = DecimalBytePartsArray::try_new(msp, decimal_dtype).unwrap(); + let array = DecimalBytePartsData::try_new(msp, decimal_dtype).unwrap(); test_filter_conformance(&array.into_array()); } } diff --git a/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/mask.rs b/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/mask.rs index 8bc05af2ff0..cef7c390575 100644 --- a/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/mask.rs +++ b/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/mask.rs @@ -9,6 +9,7 @@ use vortex_array::scalar_fn::fns::mask::Mask as MaskExpr; use vortex_array::scalar_fn::fns::mask::MaskReduce; use vortex_error::VortexResult; +use super::DecimalBytePartsData; use crate::DecimalByteParts; use crate::DecimalBytePartsArray; @@ -20,7 +21,7 @@ impl MaskReduce for DecimalByteParts { [array.msp.clone(), mask.clone()], )?; Ok(Some( - DecimalBytePartsArray::try_new(masked_msp, *array.decimal_dtype())?.into_array(), + DecimalBytePartsData::try_new(masked_msp, *array.decimal_dtype())?.into_array(), )) } } diff --git a/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/mod.rs b/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/mod.rs index 77ede1a4563..24e09031a21 100644 --- a/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/mod.rs +++ b/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/mod.rs @@ -1,6 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors +use super::DecimalBytePartsData; mod cast; mod compare; mod filter; @@ -22,47 +23,47 @@ mod tests { #[rstest] // Basic decimal byte parts arrays - #[case::decimal_i32(DecimalBytePartsArray::try_new( + #[case::decimal_i32(DecimalBytePartsData::try_new( buffer![100i32, 200, 300, 400, 500].into_array(), DecimalDType::new(10, 2) ).unwrap())] - #[case::decimal_i64(DecimalBytePartsArray::try_new( + #[case::decimal_i64(DecimalBytePartsData::try_new( buffer![1000i64, 2000, 3000, 4000, 5000].into_array(), DecimalDType::new(19, 4) ).unwrap())] // Nullable arrays - #[case::decimal_nullable_i32(DecimalBytePartsArray::try_new( + #[case::decimal_nullable_i32(DecimalBytePartsData::try_new( PrimitiveArray::from_option_iter([Some(100i32), None, Some(300), Some(400), None]).into_array(), DecimalDType::new(10, 2) ).unwrap())] - #[case::decimal_nullable_i64(DecimalBytePartsArray::try_new( + #[case::decimal_nullable_i64(DecimalBytePartsData::try_new( PrimitiveArray::from_option_iter([Some(1000i64), None, Some(3000), Some(4000), None]).into_array(), DecimalDType::new(19, 4) ).unwrap())] // Different precision/scale combinations - #[case::decimal_high_precision(DecimalBytePartsArray::try_new( + #[case::decimal_high_precision(DecimalBytePartsData::try_new( buffer![123456789i32, 987654321, -123456789].into_array(), DecimalDType::new(38, 10) ).unwrap())] - #[case::decimal_zero_scale(DecimalBytePartsArray::try_new( + #[case::decimal_zero_scale(DecimalBytePartsData::try_new( buffer![100i32, 200, 300].into_array(), DecimalDType::new(10, 0) ).unwrap())] // Edge cases - #[case::decimal_single(DecimalBytePartsArray::try_new( + #[case::decimal_single(DecimalBytePartsData::try_new( buffer![42i32].into_array(), DecimalDType::new(5, 1) ).unwrap())] - #[case::decimal_negative(DecimalBytePartsArray::try_new( + #[case::decimal_negative(DecimalBytePartsData::try_new( buffer![-100i32, -200, 300, -400, 500].into_array(), DecimalDType::new(10, 2) ).unwrap())] // Large arrays - #[case::decimal_large(DecimalBytePartsArray::try_new( + #[case::decimal_large(DecimalBytePartsData::try_new( PrimitiveArray::from_iter((0..1500).map(|i| i * 100)).into_array(), DecimalDType::new(10, 2) ).unwrap())] - #[case::decimal_large_i64(DecimalBytePartsArray::try_new( + #[case::decimal_large_i64(DecimalBytePartsData::try_new( PrimitiveArray::from_iter((0..2000i64).map(|i| i * 1000000)).into_array(), DecimalDType::new(19, 6) ).unwrap())] diff --git a/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/take.rs b/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/take.rs index 580fa514558..c18c21e4067 100644 --- a/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/take.rs +++ b/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/take.rs @@ -8,6 +8,7 @@ use vortex_array::IntoArray; use vortex_array::arrays::dict::TakeExecute; use vortex_error::VortexResult; +use super::DecimalBytePartsData; use crate::DecimalByteParts; use crate::DecimalBytePartsArray; @@ -17,7 +18,7 @@ impl TakeExecute for DecimalByteParts { indices: &ArrayRef, _ctx: &mut ExecutionCtx, ) -> VortexResult> { - DecimalBytePartsArray::try_new(array.msp.take(indices.to_array())?, *array.decimal_dtype()) + DecimalBytePartsData::try_new(array.msp.take(indices.to_array())?, *array.decimal_dtype()) .map(|a| Some(a.into_array())) } } diff --git a/encodings/decimal-byte-parts/src/decimal_byte_parts/mod.rs b/encodings/decimal-byte-parts/src/decimal_byte_parts/mod.rs index 6f14649bc91..dc62ed8d09b 100644 --- a/encodings/decimal-byte-parts/src/decimal_byte_parts/mod.rs +++ b/encodings/decimal-byte-parts/src/decimal_byte_parts/mod.rs @@ -1,6 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors +use vortex_array::vtable::Array; pub(crate) mod compute; mod rules; mod slice; @@ -31,9 +32,7 @@ use vortex_array::scalar::Scalar; use vortex_array::scalar::ScalarValue; use vortex_array::serde::ArrayChildren; use vortex_array::stats::ArrayStats; -use vortex_array::stats::StatsSetRef; use vortex_array::vtable; -use vortex_array::vtable::Array; use vortex_array::vtable::ArrayId; use vortex_array::vtable::OperationsVTable; use vortex_array::vtable::VTable; @@ -50,7 +49,7 @@ use vortex_session::VortexSession; use crate::decimal_byte_parts::compute::kernel::PARENT_KERNELS; use crate::decimal_byte_parts::rules::PARENT_RULES; -vtable!(DecimalByteParts); +vtable!(DecimalByteParts, DecimalByteParts, DecimalBytePartsData); #[derive(Clone, prost::Message)] pub struct DecimalBytesPartsMetadata { @@ -61,7 +60,7 @@ pub struct DecimalBytesPartsMetadata { } impl VTable for DecimalByteParts { - type Array = DecimalBytePartsArray; + type Array = DecimalBytePartsData; type Metadata = ProstMetadata; type OperationsVTable = Self; @@ -75,66 +74,58 @@ impl VTable for DecimalByteParts { Self::ID } - fn len(array: &DecimalBytePartsArray) -> usize { + fn len(array: &DecimalBytePartsData) -> usize { array.msp.len() } - fn dtype(array: &DecimalBytePartsArray) -> &DType { + fn dtype(array: &DecimalBytePartsData) -> &DType { &array.dtype } - fn stats(array: &DecimalBytePartsArray) -> StatsSetRef<'_> { - array.stats_set.to_ref(array.as_ref()) + fn stats(array: &DecimalBytePartsData) -> &ArrayStats { + &array.stats_set } - fn array_hash( - array: &DecimalBytePartsArray, - state: &mut H, - precision: Precision, - ) { + fn array_hash(array: &Array, state: &mut H, precision: Precision) { array.dtype.hash(state); array.msp.array_hash(state, precision); } - fn array_eq( - array: &DecimalBytePartsArray, - other: &DecimalBytePartsArray, - precision: Precision, - ) -> bool { + fn array_eq(array: &Array, other: &Array, precision: Precision) -> bool { array.dtype == other.dtype && array.msp.array_eq(&other.msp, precision) } - fn nbuffers(_array: &DecimalBytePartsArray) -> usize { + fn nbuffers(_array: &Array) -> usize { 0 } - fn buffer(_array: &DecimalBytePartsArray, idx: usize) -> BufferHandle { + fn buffer(_array: &Array, idx: usize) -> BufferHandle { vortex_panic!("DecimalBytePartsArray buffer index {idx} out of bounds") } - fn buffer_name(_array: &DecimalBytePartsArray, idx: usize) -> Option { + fn buffer_name(_array: &Array, idx: usize) -> Option { vortex_panic!("DecimalBytePartsArray buffer_name index {idx} out of bounds") } - fn nchildren(_array: &DecimalBytePartsArray) -> usize { + fn nchildren(_array: &Array) -> usize { 1 } - fn child(array: &DecimalBytePartsArray, idx: usize) -> ArrayRef { + fn child(array: &Array, idx: usize) -> ArrayRef { match idx { 0 => array.msp.clone(), _ => vortex_panic!("DecimalBytePartsArray child index {idx} out of bounds"), } } - fn child_name(_array: &DecimalBytePartsArray, idx: usize) -> String { + fn child_name(_array: &Array, idx: usize) -> String { match idx { 0 => "msp".to_string(), _ => vortex_panic!("DecimalBytePartsArray child_name index {idx} out of bounds"), } } - fn metadata(array: &DecimalBytePartsArray) -> VortexResult { + fn metadata(array: &Array) -> VortexResult { Ok(ProstMetadata(DecimalBytesPartsMetadata { zeroth_child_ptype: PType::try_from(array.msp.dtype())? as i32, lower_part_count: 0, @@ -161,7 +152,7 @@ impl VTable for DecimalByteParts { metadata: &Self::Metadata, _buffers: &[BufferHandle], children: &dyn ArrayChildren, - ) -> VortexResult { + ) -> VortexResult { let Some(decimal_dtype) = dtype.as_decimal_opt() else { vortex_bail!("decoding decimal but given non decimal dtype {}", dtype) }; @@ -175,7 +166,7 @@ impl VTable for DecimalByteParts { "lower_part_count > 0 not currently supported" ); - DecimalBytePartsArray::try_new(msp, *decimal_dtype) + DecimalBytePartsData::try_new(msp, *decimal_dtype) } fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { @@ -216,7 +207,7 @@ impl VTable for DecimalByteParts { /// /// e.g. for a decimal i128 \[ 127..64 | 64..0 \] msp = 127..64 and lower_part\[0\] = 64..0 #[derive(Clone, Debug)] -pub struct DecimalBytePartsArray { +pub struct DecimalBytePartsData { msp: ArrayRef, // NOTE: the lower_parts is currently unused, we reserve this field so that it is properly // read/written during serde, but provide no constructor to initialize this to anything @@ -232,7 +223,7 @@ pub struct DecimalBytePartsArrayParts { pub dtype: DType, } -impl DecimalBytePartsArray { +impl DecimalBytePartsData { pub fn try_new(msp: ArrayRef, decimal_dtype: DecimalDType) -> VortexResult { if !msp.dtype().is_signed_int() { vortex_bail!("decimal bytes parts, first part must be a signed array") @@ -265,6 +256,21 @@ impl DecimalBytePartsArray { } } + /// Returns the number of elements in the array. + pub fn len(&self) -> usize { + self.msp.len() + } + + /// Returns `true` if the array contains no elements. + pub fn is_empty(&self) -> bool { + self.msp.len() == 0 + } + + /// Returns the logical data type of the array. + pub fn dtype(&self) -> &DType { + &self.dtype + } + pub fn decimal_dtype(&self) -> &DecimalDType { self.dtype .as_decimal_opt() @@ -281,6 +287,17 @@ pub struct DecimalByteParts; impl DecimalByteParts { pub const ID: ArrayId = ArrayId::new_ref("vortex.decimal_byte_parts"); + + /// Construct a new [`DecimalBytePartsArray`] from an MSP array and decimal dtype. + pub fn try_new( + msp: ArrayRef, + decimal_dtype: DecimalDType, + ) -> VortexResult { + Ok(Array::from_inner(DecimalBytePartsData::try_new( + msp, + decimal_dtype, + )?)) + } } /// Converts a DecimalBytePartsArray to its canonical DecimalArray representation. @@ -309,7 +326,7 @@ fn to_canonical_decimal( impl OperationsVTable for DecimalByteParts { fn scalar_at( - array: &DecimalBytePartsArray, + array: &Array, index: usize, _ctx: &mut ExecutionCtx, ) -> VortexResult { @@ -328,7 +345,7 @@ impl OperationsVTable for DecimalByteParts { } impl ValidityChild for DecimalByteParts { - fn validity_child(array: &DecimalBytePartsArray) -> &ArrayRef { + fn validity_child(array: &DecimalBytePartsData) -> &ArrayRef { // validity stored in 0th child &array.msp } @@ -355,7 +372,7 @@ mod tests { fn test_scalar_at_decimal_parts() { let decimal_dtype = DecimalDType::new(8, 2); let dtype = DType::Decimal(decimal_dtype, Nullability::Nullable); - let array = DecimalBytePartsArray::try_new( + let array = DecimalBytePartsData::try_new( PrimitiveArray::new( buffer![100i32, 200i32, 400i32], Validity::Array(BoolArray::from_iter(vec![false, true, true]).into_array()), diff --git a/encodings/decimal-byte-parts/src/decimal_byte_parts/rules.rs b/encodings/decimal-byte-parts/src/decimal_byte_parts/rules.rs index a658d15d1a4..c398cdb8ed4 100644 --- a/encodings/decimal-byte-parts/src/decimal_byte_parts/rules.rs +++ b/encodings/decimal-byte-parts/src/decimal_byte_parts/rules.rs @@ -14,6 +14,7 @@ use vortex_array::scalar_fn::fns::cast::CastReduceAdaptor; use vortex_array::scalar_fn::fns::mask::MaskReduceAdaptor; use vortex_error::VortexResult; +use super::DecimalBytePartsData; use crate::DecimalByteParts; use crate::DecimalBytePartsArray; @@ -45,7 +46,7 @@ impl ArrayParentReduceRule for DecimalBytePartsFilterPushDownR let new_msp = child.msp.filter(parent.filter_mask().clone())?; let new_child = - DecimalBytePartsArray::try_new(new_msp, *child.decimal_dtype())?.into_array(); + DecimalBytePartsData::try_new(new_msp, *child.decimal_dtype())?.into_array(); Ok(Some(new_child)) } } diff --git a/encodings/decimal-byte-parts/src/decimal_byte_parts/slice.rs b/encodings/decimal-byte-parts/src/decimal_byte_parts/slice.rs index 4f0d3ec36fb..70b3682606d 100644 --- a/encodings/decimal-byte-parts/src/decimal_byte_parts/slice.rs +++ b/encodings/decimal-byte-parts/src/decimal_byte_parts/slice.rs @@ -8,6 +8,7 @@ use vortex_array::IntoArray; use vortex_array::arrays::slice::SliceReduce; use vortex_error::VortexResult; +use super::DecimalBytePartsData; use crate::DecimalByteParts; use crate::DecimalBytePartsArray; @@ -15,7 +16,7 @@ impl SliceReduce for DecimalByteParts { fn slice(array: &DecimalBytePartsArray, range: Range) -> VortexResult> { // SAFETY: slicing encoded MSP does not change the encoded values Ok(Some(unsafe { - DecimalBytePartsArray::new_unchecked(array.msp().slice(range)?, *array.decimal_dtype()) + DecimalBytePartsData::new_unchecked(array.msp().slice(range)?, *array.decimal_dtype()) .into_array() })) } diff --git a/encodings/fastlanes/public-api.lock b/encodings/fastlanes/public-api.lock index bac3994aac8..35360475979 100644 --- a/encodings/fastlanes/public-api.lock +++ b/encodings/fastlanes/public-api.lock @@ -194,7 +194,7 @@ pub fn vortex_fastlanes::BitPacked::reduce_parent(array: &vortex_array::vtable:: pub fn vortex_fastlanes::BitPacked::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_fastlanes::BitPacked::stats(array: &vortex_fastlanes::BitPackedArray) -> vortex_array::stats::array::StatsSetRef<'_> +pub fn vortex_fastlanes::BitPacked::stats(array: &vortex_fastlanes::BitPackedArray) -> &vortex_array::stats::array::ArrayStats pub fn vortex_fastlanes::BitPacked::vtable(_array: &Self::Array) -> &Self @@ -346,7 +346,7 @@ pub fn vortex_fastlanes::Delta::reduce_parent(array: &vortex_array::vtable::type pub fn vortex_fastlanes::Delta::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_fastlanes::Delta::stats(array: &vortex_fastlanes::DeltaArray) -> vortex_array::stats::array::StatsSetRef<'_> +pub fn vortex_fastlanes::Delta::stats(array: &vortex_fastlanes::DeltaArray) -> &vortex_array::stats::array::ArrayStats pub fn vortex_fastlanes::Delta::vtable(_array: &Self::Array) -> &Self @@ -490,7 +490,7 @@ pub fn vortex_fastlanes::FoR::reduce_parent(array: &vortex_array::vtable::typed: pub fn vortex_fastlanes::FoR::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_fastlanes::FoR::stats(array: &vortex_fastlanes::FoRArray) -> vortex_array::stats::array::StatsSetRef<'_> +pub fn vortex_fastlanes::FoR::stats(array: &vortex_fastlanes::FoRArray) -> &vortex_array::stats::array::ArrayStats pub fn vortex_fastlanes::FoR::vtable(_array: &Self::Array) -> &Self @@ -618,7 +618,7 @@ pub fn vortex_fastlanes::RLE::reduce_parent(array: &vortex_array::vtable::typed: pub fn vortex_fastlanes::RLE::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_fastlanes::RLE::stats(array: &vortex_fastlanes::RLEArray) -> vortex_array::stats::array::StatsSetRef<'_> +pub fn vortex_fastlanes::RLE::stats(array: &vortex_fastlanes::RLEArray) -> &vortex_array::stats::array::ArrayStats pub fn vortex_fastlanes::RLE::vtable(_array: &Self::Array) -> &Self diff --git a/encodings/fastlanes/src/bitpacking/array/bitpack_compress.rs b/encodings/fastlanes/src/bitpacking/array/bitpack_compress.rs index 6f29a72db0c..2e64e823ab1 100644 --- a/encodings/fastlanes/src/bitpacking/array/bitpack_compress.rs +++ b/encodings/fastlanes/src/bitpacking/array/bitpack_compress.rs @@ -14,7 +14,6 @@ use vortex_array::match_each_integer_ptype; use vortex_array::match_each_unsigned_integer_ptype; use vortex_array::patches::Patches; use vortex_array::validity::Validity; -use vortex_array::vtable::ValidityHelper; use vortex_buffer::Buffer; use vortex_buffer::BufferMut; use vortex_buffer::ByteBuffer; @@ -24,10 +23,10 @@ use vortex_error::vortex_bail; use vortex_mask::AllOr; use vortex_mask::Mask; -use crate::BitPackedArray; +use crate::BitPackedData; use crate::bitpack_decompress; -pub fn bitpack_to_best_bit_width(array: &PrimitiveArray) -> VortexResult { +pub fn bitpack_to_best_bit_width(array: &PrimitiveArray) -> VortexResult { let bit_width_freq = bit_width_histogram(array)?; let best_bit_width = find_best_bit_width(array.ptype(), &bit_width_freq)?; bitpack_encode(array, best_bit_width, Some(&bit_width_freq)) @@ -38,16 +37,21 @@ pub fn bitpack_encode( array: &PrimitiveArray, bit_width: u8, bit_width_freq: Option<&[usize]>, -) -> VortexResult { +) -> VortexResult { let bit_width_freq = match bit_width_freq { Some(freq) => freq, None => &bit_width_histogram(array)?, }; // Check array contains no negative values. + let array_ref = array.clone().into_array(); if array.ptype().is_signed_int() { let has_negative_values = match_each_integer_ptype!(array.ptype(), |P| { - array.statistics().compute_min::

().unwrap_or_default() < 0 + array_ref + .statistics() + .compute_min::

() + .unwrap_or_default() + < 0 }); if has_negative_values { vortex_bail!(InvalidArgument: "cannot bitpack_encode array containing negative integers") @@ -73,7 +77,7 @@ pub fn bitpack_encode( // SAFETY: all components validated above let bitpacked = unsafe { - BitPackedArray::new_unchecked( + BitPackedData::new_unchecked( BufferHandle::new_host(packed), array.dtype().clone(), array.validity().clone(), @@ -83,10 +87,13 @@ pub fn bitpack_encode( 0, ) }; - bitpacked - .stats_set - .to_ref(bitpacked.as_ref()) - .inherit_from(array.statistics()); + { + let bp_ref = bitpacked.clone().into_array(); + bitpacked + .stats_set + .to_ref(&*bp_ref) + .inherit_from(array_ref.statistics()); + } Ok(bitpacked) } @@ -101,13 +108,13 @@ pub fn bitpack_encode( pub unsafe fn bitpack_encode_unchecked( array: PrimitiveArray, bit_width: u8, -) -> VortexResult { +) -> VortexResult { // SAFETY: non-negativity of input checked by caller. let packed = unsafe { bitpack_unchecked(&array, bit_width) }; // SAFETY: checked by bitpack_unchecked let bitpacked = unsafe { - BitPackedArray::new_unchecked( + BitPackedData::new_unchecked( BufferHandle::new_host(packed), array.dtype().clone(), array.validity().clone(), @@ -117,10 +124,14 @@ pub unsafe fn bitpack_encode_unchecked( 0, ) }; - bitpacked - .stats_set - .to_ref(bitpacked.as_ref()) - .inherit_from(array.statistics()); + { + let bp_ref = bitpacked.clone().into_array(); + let arr_ref = array.into_array(); + bitpacked + .stats_set + .to_ref(&*bp_ref) + .inherit_from(arr_ref.statistics()); + } Ok(bitpacked) } @@ -207,7 +218,7 @@ pub fn gather_patches( }; let array_len = parray.len(); - let validity_mask = parray.validity_mask()?; + let validity_mask = parray.validity_mask(); let patches = if array_len < u8::MAX as usize { match_each_integer_ptype!(parray.ptype(), |T| { @@ -309,7 +320,7 @@ fn bit_width_histogram_typed( |v: T| (8 * size_of::()) - (PrimInt::leading_zeros(v) as usize); let mut bit_widths = vec![0usize; size_of::() * 8 + 1]; - match array.validity_mask()?.bit_buffer() { + match array.validity_mask().bit_buffer() { AllOr::All => { // All values are valid. for v in array.as_slice::() { @@ -457,13 +468,12 @@ mod test { Validity::from_iter(valid_values), ); assert!(values.ptype().is_unsigned_int()); - let compressed = BitPackedArray::encode(&values.into_array(), 4).unwrap(); + let compressed = BitPackedData::encode(&values.into_array(), 4).unwrap(); assert!(compressed.patches().is_none()); assert_eq!( (0..(1 << 4)).collect::>(), compressed .validity_mask() - .unwrap() .to_bit_buffer() .set_indices() .collect::>() @@ -476,7 +486,7 @@ mod test { let array = PrimitiveArray::new(values, Validity::AllValid); assert!(array.ptype().is_signed_int()); - let err = BitPackedArray::encode(&array.into_array(), 1024u32.ilog2() as u8).unwrap_err(); + let err = BitPackedData::encode(&array.into_array(), 1024u32.ilog2() as u8).unwrap_err(); assert!(matches!(err, VortexError::InvalidArgument(_, _))); } diff --git a/encodings/fastlanes/src/bitpacking/array/bitpack_decompress.rs b/encodings/fastlanes/src/bitpacking/array/bitpack_decompress.rs index e4099cdcf24..1e658eb0e73 100644 --- a/encodings/fastlanes/src/bitpacking/array/bitpack_decompress.rs +++ b/encodings/fastlanes/src/bitpacking/array/bitpack_decompress.rs @@ -5,6 +5,7 @@ use fastlanes::BitPacking; use itertools::Itertools; use num_traits::AsPrimitive; use vortex_array::ExecutionCtx; +use vortex_array::IntoArray; use vortex_array::arrays::PrimitiveArray; use vortex_array::builders::ArrayBuilder; use vortex_array::builders::PrimitiveBuilder; @@ -18,6 +19,7 @@ use vortex_error::VortexExpect; use vortex_error::VortexResult; use crate::BitPackedArray; +use crate::BitPackedData; use crate::unpack_iter::BitPacked; /// Unpacks a bit-packed array into a primitive array. @@ -56,7 +58,7 @@ pub(crate) fn unpack_into_primitive_builder( // SAFETY: We later initialize the the uninitialized range of values with `copy_from_slice`. unsafe { // Append a dense null Mask. - uninit_range.append_mask(array.validity_mask()?); + uninit_range.append_mask(array.validity_mask()); } // SAFETY: `decode_into` will initialize all values in this range. @@ -95,7 +97,10 @@ pub fn apply_patches_to_uninit_range_fn T>( let indices = patches.indices().clone().execute::(ctx)?; let values = patches.values().clone().execute::(ctx)?; - assert!(values.all_valid()?, "Patch values must be all valid"); + assert!( + values.clone().into_array().all_valid()?, + "Patch values must be all valid" + ); let values = values.as_slice::(); match_each_unsigned_integer_ptype!(indices.ptype(), |P| { @@ -177,7 +182,7 @@ mod tests { fn compression_roundtrip(n: usize) { let values = PrimitiveArray::from_iter((0..n).map(|i| (i % 2047) as u16)); - let compressed = BitPackedArray::encode(&values.clone().into_array(), 11).unwrap(); + let compressed = BitPackedData::encode(&values.clone().into_array(), 11).unwrap(); assert_arrays_eq!(compressed, values); values diff --git a/encodings/fastlanes/src/bitpacking/array/mod.rs b/encodings/fastlanes/src/bitpacking/array/mod.rs index dfe02730cb0..89c02b37b17 100644 --- a/encodings/fastlanes/src/bitpacking/array/mod.rs +++ b/encodings/fastlanes/src/bitpacking/array/mod.rs @@ -33,7 +33,7 @@ pub struct BitPackedArrayParts { } #[derive(Clone, Debug)] -pub struct BitPackedArray { +pub struct BitPackedData { /// The offset within the first block (created with a slice). /// 0 <= offset < 1024 pub(super) offset: u16, @@ -46,7 +46,7 @@ pub struct BitPackedArray { pub(super) stats_set: ArrayStats, } -impl BitPackedArray { +impl BitPackedData { /// Create a new bitpacked array using a buffer of packed data. /// /// The packed data should be interpreted as a sequence of values with size `bit_width`. @@ -199,6 +199,35 @@ impl BitPackedArray { Ok(()) } + /// Returns the length of the array. + #[inline] + pub fn len(&self) -> usize { + self.len + } + + /// Returns `true` if the array is empty. + #[inline] + pub fn is_empty(&self) -> bool { + self.len == 0 + } + + /// Returns the dtype of the array. + #[inline] + pub fn dtype(&self) -> &DType { + &self.dtype + } + + /// Returns the validity of the array. + #[allow(clippy::same_name_method)] + pub fn validity(&self) -> &Validity { + &self.validity + } + + /// Returns the validity as a [`Mask`](vortex_mask::Mask). + pub fn validity_mask(&self) -> vortex_mask::Mask { + self.validity.to_mask(self.len()) + } + pub fn ptype(&self) -> PType { self.dtype.as_ptype() } @@ -305,8 +334,6 @@ mod test { use vortex_array::assert_arrays_eq; use vortex_buffer::Buffer; - use crate::BitPackedArray; - #[test] fn test_encode() { let values = [ @@ -319,7 +346,7 @@ mod test { Some(u64::MAX), ]; let uncompressed = PrimitiveArray::from_option_iter(values); - let packed = BitPackedArray::encode(&uncompressed.into_array(), 1).unwrap(); + let packed = BitPackedData::encode(&uncompressed.into_array(), 1).unwrap(); let expected = PrimitiveArray::from_option_iter(values); assert_arrays_eq!(packed.to_primitive(), expected); } @@ -328,9 +355,9 @@ mod test { fn test_encode_too_wide() { let values = [Some(1u8), None, Some(1), None, Some(1), None]; let uncompressed = PrimitiveArray::from_option_iter(values); - let _packed = BitPackedArray::encode(&uncompressed.clone().into_array(), 8) + let _packed = BitPackedData::encode(&uncompressed.clone().into_array(), 8) .expect_err("Cannot pack value into the same width"); - let _packed = BitPackedArray::encode(&uncompressed.into_array(), 9) + let _packed = BitPackedData::encode(&uncompressed.into_array(), 9) .expect_err("Cannot pack value into larger width"); } @@ -339,7 +366,7 @@ mod test { let values: Buffer = (0i32..=512).collect(); let parray = values.clone().into_array(); - let packed_with_patches = BitPackedArray::encode(&parray, 9).unwrap(); + let packed_with_patches = BitPackedData::encode(&parray, 9).unwrap(); assert!(packed_with_patches.patches().is_some()); assert_arrays_eq!( packed_with_patches.to_primitive(), diff --git a/encodings/fastlanes/src/bitpacking/array/unpack_iter.rs b/encodings/fastlanes/src/bitpacking/array/unpack_iter.rs index 412dab90d39..9fa9a1cb31a 100644 --- a/encodings/fastlanes/src/bitpacking/array/unpack_iter.rs +++ b/encodings/fastlanes/src/bitpacking/array/unpack_iter.rs @@ -13,6 +13,7 @@ use vortex_array::dtype::PhysicalPType; use vortex_buffer::ByteBuffer; use crate::BitPackedArray; +use crate::BitPackedData; const CHUNK_SIZE: usize = 1024; @@ -57,7 +58,7 @@ impl> UnpackStrategy for BitPackingStr /// use vortex_fastlanes::BitPackedArray; /// use vortex_fastlanes::unpack_iter::BitUnpackedChunks; /// -/// let array = BitPackedArray::encode(&buffer![2, 3, 4, 5].into_array(), 2).unwrap(); +/// let array = BitPackedData::encode(&buffer![2, 3, 4, 5].into_array(), 2).unwrap(); /// let mut unpacked_chunks: BitUnpackedChunks = array.unpacked_chunks(); /// /// if let Some(header) = unpacked_chunks.initial() { @@ -89,7 +90,7 @@ pub struct UnpackedChunks> { pub type BitUnpackedChunks = UnpackedChunks; impl BitUnpackedChunks { - pub fn new(array: &BitPackedArray) -> Self { + pub fn new(array: &BitPackedData) -> Self { Self::new_with_strategy( BitPackingStrategy, array.packed().clone().unwrap_host(), diff --git a/encodings/fastlanes/src/bitpacking/compute/cast.rs b/encodings/fastlanes/src/bitpacking/compute/cast.rs index b6ba46626d3..39250269723 100644 --- a/encodings/fastlanes/src/bitpacking/compute/cast.rs +++ b/encodings/fastlanes/src/bitpacking/compute/cast.rs @@ -7,12 +7,11 @@ use vortex_array::builtins::ArrayBuiltins; use vortex_array::dtype::DType; use vortex_array::patches::Patches; use vortex_array::scalar_fn::fns::cast::CastReduce; -use vortex_array::vtable::ValidityHelper; use vortex_error::VortexResult; +use crate::BitPackedData; use crate::bitpacking::BitPacked; use crate::bitpacking::BitPackedArray; - impl CastReduce for BitPacked { fn cast(array: &BitPackedArray, dtype: &DType) -> VortexResult> { if array.dtype().eq_ignore_nullability(dtype) { @@ -21,7 +20,7 @@ impl CastReduce for BitPacked { .clone() .cast_nullability(dtype.nullability(), array.len())?; return Ok(Some( - BitPackedArray::try_new( + BitPackedData::try_new( array.packed().clone(), dtype.as_ptype(), new_validity, @@ -63,12 +62,10 @@ mod tests { use vortex_array::dtype::PType; use vortex_buffer::buffer; - use crate::BitPackedArray; - #[test] fn test_cast_bitpacked_u8_to_u32() { let packed = - BitPackedArray::encode(&buffer![10u8, 20, 30, 40, 50, 60].into_array(), 6).unwrap(); + BitPackedData::encode(&buffer![10u8, 20, 30, 40, 50, 60].into_array(), 6).unwrap(); let casted = packed .into_array() @@ -88,7 +85,7 @@ mod tests { #[test] fn test_cast_bitpacked_nullable() { let values = PrimitiveArray::from_option_iter([Some(5u16), None, Some(10), Some(15), None]); - let packed = BitPackedArray::encode(&values.into_array(), 4).unwrap(); + let packed = BitPackedData::encode(&values.into_array(), 4).unwrap(); let casted = packed .into_array() @@ -101,10 +98,10 @@ mod tests { } #[rstest] - #[case(BitPackedArray::encode(&buffer![0u8, 10, 20, 30, 40, 50, 60, 63].into_array(), 6).unwrap())] - #[case(BitPackedArray::encode(&buffer![0u16, 100, 200, 300, 400, 500].into_array(), 9).unwrap())] - #[case(BitPackedArray::encode(&buffer![0u32, 1000, 2000, 3000, 4000].into_array(), 12).unwrap())] - #[case(BitPackedArray::encode(&PrimitiveArray::from_option_iter([Some(1u32), None, Some(7), Some(15), None]).into_array(), 4).unwrap())] + #[case(BitPackedData::encode(&buffer![0u8, 10, 20, 30, 40, 50, 60, 63].into_array(), 6).unwrap())] + #[case(BitPackedData::encode(&buffer![0u16, 100, 200, 300, 400, 500].into_array(), 9).unwrap())] + #[case(BitPackedData::encode(&buffer![0u32, 1000, 2000, 3000, 4000].into_array(), 12).unwrap())] + #[case(BitPackedData::encode(&PrimitiveArray::from_option_iter([Some(1u32), None, Some(7), Some(15), None]).into_array(), 4).unwrap())] fn test_cast_bitpacked_conformance(#[case] array: BitPackedArray) { test_cast_conformance(&array.into_array()); } diff --git a/encodings/fastlanes/src/bitpacking/compute/filter.rs b/encodings/fastlanes/src/bitpacking/compute/filter.rs index f394f76a26f..b400efbfa97 100644 --- a/encodings/fastlanes/src/bitpacking/compute/filter.rs +++ b/encodings/fastlanes/src/bitpacking/compute/filter.rs @@ -25,6 +25,7 @@ use super::chunked_indices; use super::take::UNPACK_CHUNK_THRESHOLD; use crate::BitPacked; use crate::BitPackedArray; +use crate::BitPackedData; /// The threshold over which it is faster to fully unpack the entire [`BitPackedArray`] and then /// filter the result than to unpack only specific bitpacked values into the output buffer. @@ -98,7 +99,7 @@ fn filter_primitive_without_patches( selection: &Arc, ) -> VortexResult<(Buffer, Validity)> { let values = filter_with_indices(array, selection.indices()); - let validity = array.validity()?.filter(&Mask::Values(selection.clone()))?; + let validity = array.validity().filter(&Mask::Values(selection.clone()))?; Ok((values.freeze(), validity)) } @@ -172,13 +173,11 @@ mod test { use vortex_buffer::buffer; use vortex_mask::Mask; - use crate::BitPackedArray; - #[test] fn take_indices() { // Create a u8 array modulo 63. let unpacked = PrimitiveArray::from_iter((0..4096).map(|i| (i % 63) as u8)); - let bitpacked = BitPackedArray::encode(&unpacked.into_array(), 6).unwrap(); + let bitpacked = BitPackedData::encode(&unpacked.into_array(), 6).unwrap(); let mask = Mask::from_indices(bitpacked.len(), vec![0, 125, 2047, 2049, 2151, 2790]); @@ -193,7 +192,7 @@ mod test { fn take_sliced_indices() { // Create a u8 array modulo 63. let unpacked = PrimitiveArray::from_iter((0..4096).map(|i| (i % 63) as u8)); - let bitpacked = BitPackedArray::encode(&unpacked.into_array(), 6).unwrap(); + let bitpacked = BitPackedData::encode(&unpacked.into_array(), 6).unwrap(); let sliced = bitpacked.slice(128..2050).unwrap(); let mask = Mask::from_indices(sliced.len(), vec![1919, 1921]); @@ -205,7 +204,7 @@ mod test { #[test] fn filter_bitpacked() { let unpacked = PrimitiveArray::from_iter((0..4096).map(|i| (i % 63) as u8)); - let bitpacked = BitPackedArray::encode(&unpacked.into_array(), 6).unwrap(); + let bitpacked = BitPackedData::encode(&unpacked.into_array(), 6).unwrap(); let filtered = bitpacked .filter(Mask::from_indices(4096, (0..1024).collect())) .unwrap(); @@ -219,7 +218,7 @@ mod test { fn filter_bitpacked_signed() { let values: Buffer = (0..500).collect(); let unpacked = PrimitiveArray::new(values.clone(), Validity::NonNullable); - let bitpacked = BitPackedArray::encode(&unpacked.into_array(), 9).unwrap(); + let bitpacked = BitPackedData::encode(&unpacked.into_array(), 9).unwrap(); let filtered = bitpacked .filter(Mask::from_indices(values.len(), (0..250).collect())) .unwrap() @@ -235,17 +234,17 @@ mod test { fn test_filter_bitpacked_conformance() { // Test with u8 values let unpacked = buffer![1u8, 2, 3, 4, 5].into_array(); - let bitpacked = BitPackedArray::encode(&unpacked, 3).unwrap(); + let bitpacked = BitPackedData::encode(&unpacked, 3).unwrap(); test_filter_conformance(&bitpacked.into_array()); // Test with u32 values let unpacked = buffer![100u32, 200, 300, 400, 500].into_array(); - let bitpacked = BitPackedArray::encode(&unpacked, 9).unwrap(); + let bitpacked = BitPackedData::encode(&unpacked, 9).unwrap(); test_filter_conformance(&bitpacked.into_array()); // Test with nullable values let unpacked = PrimitiveArray::from_option_iter([Some(1u16), None, Some(3), Some(4), None]); - let bitpacked = BitPackedArray::encode(&unpacked.into_array(), 3).unwrap(); + let bitpacked = BitPackedData::encode(&unpacked.into_array(), 3).unwrap(); test_filter_conformance(&bitpacked.into_array()); } @@ -260,7 +259,7 @@ mod test { // Values 0-127 fit in 7 bits, but 1000 and 2000 do not. let values: Vec = vec![0, 10, 1000, 20, 30, 2000, 40, 50, 60, 70]; let unpacked = PrimitiveArray::from_iter(values.clone()); - let bitpacked = BitPackedArray::encode(&unpacked.into_array(), 7).unwrap(); + let bitpacked = BitPackedData::encode(&unpacked.into_array(), 7).unwrap(); assert!( bitpacked.patches().is_some(), "Expected patches for values exceeding bit width" @@ -292,7 +291,7 @@ mod test { }) .collect(); let unpacked = PrimitiveArray::from_iter(values.clone()); - let bitpacked = BitPackedArray::encode(&unpacked.into_array(), 7).unwrap(); + let bitpacked = BitPackedData::encode(&unpacked.into_array(), 7).unwrap(); assert!( bitpacked.patches().is_some(), "Expected patches for values exceeding bit width" diff --git a/encodings/fastlanes/src/bitpacking/compute/is_constant.rs b/encodings/fastlanes/src/bitpacking/compute/is_constant.rs index d3efa37adef..b17f8e1f014 100644 --- a/encodings/fastlanes/src/bitpacking/compute/is_constant.rs +++ b/encodings/fastlanes/src/bitpacking/compute/is_constant.rs @@ -22,6 +22,7 @@ use vortex_error::VortexResult; use crate::BitPacked; use crate::BitPackedArray; +use crate::BitPackedData; use crate::unpack_iter::BitPacked as BitPackedUnpack; /// BitPacked-specific is_constant kernel with SIMD support. @@ -187,11 +188,9 @@ mod tests { use vortex_buffer::buffer; use vortex_error::VortexResult; - use crate::BitPackedArray; - #[test] fn is_constant_with_patches() -> VortexResult<()> { - let array = BitPackedArray::encode(&buffer![4; 1025].into_array(), 2)?; + let array = BitPackedData::encode(&buffer![4; 1025].into_array(), 2)?; let mut ctx = LEGACY_SESSION.create_execution_ctx(); assert!(is_constant(&array.into_array(), &mut ctx)?); Ok(()) diff --git a/encodings/fastlanes/src/bitpacking/compute/mod.rs b/encodings/fastlanes/src/bitpacking/compute/mod.rs index f17054fc081..cf3a536ea47 100644 --- a/encodings/fastlanes/src/bitpacking/compute/mod.rs +++ b/encodings/fastlanes/src/bitpacking/compute/mod.rs @@ -1,6 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors +use crate::BitPackedData; mod cast; mod filter; pub(crate) mod is_constant; @@ -46,7 +47,6 @@ mod tests { use vortex_array::compute::conformance::binary_numeric::test_binary_numeric_array; use vortex_array::compute::conformance::consistency::test_array_consistency; - use crate::BitPackedArray; use crate::bitpack_compress::bitpack_encode; use crate::bitpacking::compute::chunked_indices; diff --git a/encodings/fastlanes/src/bitpacking/compute/slice.rs b/encodings/fastlanes/src/bitpacking/compute/slice.rs index 8d0328725f8..f2dbc206cfc 100644 --- a/encodings/fastlanes/src/bitpacking/compute/slice.rs +++ b/encodings/fastlanes/src/bitpacking/compute/slice.rs @@ -12,6 +12,7 @@ use vortex_error::VortexResult; use crate::BitPacked; use crate::BitPackedArray; +use crate::BitPackedData; impl SliceKernel for BitPacked { fn slice( @@ -31,10 +32,10 @@ impl SliceKernel for BitPacked { // slice the buffer using the encoded start/stop values // SAFETY: slicing packed values without decoding preserves invariants Ok(Some(unsafe { - BitPackedArray::new_unchecked( + BitPackedData::new_unchecked( array.packed().slice(encoded_start..encoded_stop), array.dtype().clone(), - array.validity()?.slice(range.clone())?, + array.validity().slice(range.clone())?, array .patches() .map(|p| p.slice(range.clone())) diff --git a/encodings/fastlanes/src/bitpacking/compute/take.rs b/encodings/fastlanes/src/bitpacking/compute/take.rs index 4405645ace3..e941cb48e5a 100644 --- a/encodings/fastlanes/src/bitpacking/compute/take.rs +++ b/encodings/fastlanes/src/bitpacking/compute/take.rs @@ -17,7 +17,6 @@ use vortex_array::dtype::PType; use vortex_array::match_each_integer_ptype; use vortex_array::match_each_unsigned_integer_ptype; use vortex_array::validity::Validity; -use vortex_array::vtable::ValidityHelper; use vortex_buffer::Buffer; use vortex_buffer::BufferMut; use vortex_error::VortexExpect as _; @@ -26,6 +25,7 @@ use vortex_error::VortexResult; use super::chunked_indices; use crate::BitPacked; use crate::BitPackedArray; +use crate::BitPackedData; use crate::bitpack_decompress; // TODO(connor): This is duplicated in `encodings/fastlanes/src/bitpacking/kernels/mod.rs`. @@ -43,7 +43,7 @@ impl TakeExecute for BitPacked { // If the indices are large enough, it's faster to flatten and take the primitive array. if indices.len() * UNPACK_CHUNK_THRESHOLD > array.len() { let prim = array.clone().into_array().execute::(ctx)?; - return prim.take(indices.to_array()).map(Some); + return prim.into_array().take(indices.to_array()).map(Some); } // NOTE: we use the unsigned PType because all values in the BitPackedArray must @@ -162,7 +162,6 @@ mod test { use vortex_buffer::Buffer; use vortex_buffer::buffer; - use crate::BitPackedArray; use crate::bitpacking::compute::take::take_primitive; #[test] @@ -171,7 +170,7 @@ mod test { // Create a u8 array modulo 63. let unpacked = PrimitiveArray::from_iter((0..4096).map(|i| (i % 63) as u8)); - let bitpacked = BitPackedArray::encode(&unpacked.into_array(), 6).unwrap(); + let bitpacked = BitPackedData::encode(&unpacked.into_array(), 6).unwrap(); let primitive_result = bitpacked.take(indices.to_array()).unwrap(); assert_arrays_eq!( @@ -183,7 +182,7 @@ mod test { #[test] fn take_with_patches() { let unpacked = Buffer::from_iter(0u32..1024).into_array(); - let bitpacked = BitPackedArray::encode(&unpacked, 2).unwrap(); + let bitpacked = BitPackedData::encode(&unpacked, 2).unwrap(); let indices = buffer![0, 2, 4, 6].into_array(); @@ -197,7 +196,7 @@ mod test { // Create a u8 array modulo 63. let unpacked = PrimitiveArray::from_iter((0..4096).map(|i| (i % 63) as u8)); - let bitpacked = BitPackedArray::encode(&unpacked.into_array(), 6).unwrap(); + let bitpacked = BitPackedData::encode(&unpacked.into_array(), 6).unwrap(); let sliced = bitpacked.slice(128..2050).unwrap(); let primitive_result = sliced.take(indices.to_array()).unwrap(); @@ -210,7 +209,7 @@ mod test { let num_patches: usize = 128; let values = (0..u16::MAX as u32 + num_patches as u32).collect::>(); let uncompressed = PrimitiveArray::new(values.clone(), Validity::NonNullable); - let packed = BitPackedArray::encode(&uncompressed.into_array(), 16).unwrap(); + let packed = BitPackedData::encode(&uncompressed.into_array(), 16).unwrap(); assert!(packed.patches().is_some()); let rng = rng(); @@ -240,7 +239,7 @@ mod test { #[cfg_attr(miri, ignore)] fn take_signed_with_patches() { let start = - BitPackedArray::encode(&buffer![1i32, 2i32, 3i32, 4i32].into_array(), 1).unwrap(); + BitPackedData::encode(&buffer![1i32, 2i32, 3i32, 4i32].into_array(), 1).unwrap(); let taken_primitive = take_primitive::( &start, @@ -255,7 +254,7 @@ mod test { #[test] fn take_nullable_with_nullables() { let start = - BitPackedArray::encode(&buffer![1i32, 2i32, 3i32, 4i32].into_array(), 1).unwrap(); + BitPackedData::encode(&buffer![1i32, 2i32, 3i32, 4i32].into_array(), 1).unwrap(); let taken_primitive = start .take( @@ -270,15 +269,15 @@ mod test { } #[rstest] - #[case(BitPackedArray::encode(&PrimitiveArray::from_iter((0..100).map(|i| (i % 63) as u8)).into_array(), 6).unwrap())] - #[case(BitPackedArray::encode(&PrimitiveArray::from_iter((0..256).map(|i| i as u32)).into_array(), 8).unwrap())] - #[case(BitPackedArray::encode(&buffer![1i32, 2, 3, 4, 5, 6, 7, 8].into_array(), 3).unwrap())] - #[case(BitPackedArray::encode( + #[case(BitPackedData::encode(&PrimitiveArray::from_iter((0..100).map(|i| (i % 63) as u8)).into_array(), 6).unwrap())] + #[case(BitPackedData::encode(&PrimitiveArray::from_iter((0..256).map(|i| i as u32)).into_array(), 8).unwrap())] + #[case(BitPackedData::encode(&buffer![1i32, 2, 3, 4, 5, 6, 7, 8].into_array(), 3).unwrap())] + #[case(BitPackedData::encode( &PrimitiveArray::from_option_iter([Some(10u16), None, Some(20), Some(30), None]).into_array(), 5 ).unwrap())] - #[case(BitPackedArray::encode(&buffer![42u32].into_array(), 6).unwrap())] - #[case(BitPackedArray::encode(&PrimitiveArray::from_iter((0..1024).map(|i| i as u32)).into_array(), 8).unwrap())] + #[case(BitPackedData::encode(&buffer![42u32].into_array(), 6).unwrap())] + #[case(BitPackedData::encode(&PrimitiveArray::from_iter((0..1024).map(|i| i as u32)).into_array(), 8).unwrap())] fn test_take_bitpacked_conformance(#[case] bitpacked: BitPackedArray) { use vortex_array::compute::conformance::take::test_take_conformance; test_take_conformance(&bitpacked.into_array()); diff --git a/encodings/fastlanes/src/bitpacking/mod.rs b/encodings/fastlanes/src/bitpacking/mod.rs index 5130836e424..5a3a6ed0200 100644 --- a/encodings/fastlanes/src/bitpacking/mod.rs +++ b/encodings/fastlanes/src/bitpacking/mod.rs @@ -2,8 +2,8 @@ // SPDX-FileCopyrightText: Copyright the Vortex contributors mod array; -pub use array::BitPackedArray; pub use array::BitPackedArrayParts; +pub use array::BitPackedData; pub use array::bitpack_compress; pub use array::bitpack_decompress; pub use array::unpack_iter; @@ -12,3 +12,4 @@ pub(crate) mod compute; mod vtable; pub use vtable::BitPacked; +pub use vtable::BitPackedArray; diff --git a/encodings/fastlanes/src/bitpacking/vtable/mod.rs b/encodings/fastlanes/src/bitpacking/vtable/mod.rs index 58553d4d639..032ae106dd4 100644 --- a/encodings/fastlanes/src/bitpacking/vtable/mod.rs +++ b/encodings/fastlanes/src/bitpacking/vtable/mod.rs @@ -22,7 +22,7 @@ use vortex_array::match_each_integer_ptype; use vortex_array::patches::Patches; use vortex_array::patches::PatchesMetadata; use vortex_array::serde::ArrayChildren; -use vortex_array::stats::StatsSetRef; +use vortex_array::stats::ArrayStats; use vortex_array::validity::Validity; use vortex_array::vtable; use vortex_array::vtable::Array; @@ -42,7 +42,7 @@ use vortex_error::vortex_err; use vortex_error::vortex_panic; use vortex_session::VortexSession; -use crate::BitPackedArray; +use crate::BitPackedData; use crate::bitpack_decompress::unpack_array; use crate::bitpack_decompress::unpack_into_primitive_builder; use crate::bitpacking::vtable::kernels::PARENT_KERNELS; @@ -52,7 +52,7 @@ mod operations; mod rules; mod validity; -vtable!(BitPacked); +vtable!(BitPacked, BitPacked, BitPackedData); #[derive(Clone, prost::Message)] pub struct BitPackedMetadata { @@ -65,14 +65,14 @@ pub struct BitPackedMetadata { } impl VTable for BitPacked { - type Array = BitPackedArray; + type Array = BitPackedData; type Metadata = ProstMetadata; type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromValidityHelper; - fn vtable(_array: &Self::Array) -> &Self { + fn vtable(_array: &BitPackedData) -> &Self { &BitPacked } @@ -80,23 +80,19 @@ impl VTable for BitPacked { Self::ID } - fn len(array: &BitPackedArray) -> usize { + fn len(array: &BitPackedData) -> usize { array.len } - fn dtype(array: &BitPackedArray) -> &DType { + fn dtype(array: &BitPackedData) -> &DType { &array.dtype } - fn stats(array: &BitPackedArray) -> StatsSetRef<'_> { - array.stats_set.to_ref(array.as_ref()) + fn stats(array: &BitPackedData) -> &ArrayStats { + &array.stats_set } - fn array_hash( - array: &BitPackedArray, - state: &mut H, - precision: Precision, - ) { + fn array_hash(array: &Array, state: &mut H, precision: Precision) { array.offset.hash(state); array.len.hash(state); array.dtype.hash(state); @@ -106,7 +102,7 @@ impl VTable for BitPacked { array.validity.array_hash(state, precision); } - fn array_eq(array: &BitPackedArray, other: &BitPackedArray, precision: Precision) -> bool { + fn array_eq(array: &Array, other: &Array, precision: Precision) -> bool { array.offset == other.offset && array.len == other.len && array.dtype == other.dtype @@ -116,29 +112,29 @@ impl VTable for BitPacked { && array.validity.array_eq(&other.validity, precision) } - fn nbuffers(_array: &BitPackedArray) -> usize { + fn nbuffers(_array: &Array) -> usize { 1 } - fn buffer(array: &BitPackedArray, idx: usize) -> BufferHandle { + fn buffer(array: &Array, idx: usize) -> BufferHandle { match idx { 0 => array.packed().clone(), _ => vortex_panic!("BitPackedArray buffer index {idx} out of bounds"), } } - fn buffer_name(_array: &BitPackedArray, idx: usize) -> Option { + fn buffer_name(_array: &Array, idx: usize) -> Option { match idx { 0 => Some("packed".to_string()), _ => None, } } - fn nchildren(array: &BitPackedArray) -> usize { + fn nchildren(array: &Array) -> usize { array.patches().map_or(0, patches_nchildren) + validity_nchildren(&array.validity) } - fn child(array: &BitPackedArray, idx: usize) -> ArrayRef { + fn child(array: &Array, idx: usize) -> ArrayRef { let pc = array.patches().map_or(0, patches_nchildren); if idx < pc { patches_child( @@ -155,7 +151,7 @@ impl VTable for BitPacked { } } - fn child_name(array: &BitPackedArray, idx: usize) -> String { + fn child_name(array: &Array, idx: usize) -> String { let pc = array.patches().map_or(0, patches_nchildren); if idx < pc { patches_child_name(idx).to_string() @@ -172,7 +168,7 @@ impl VTable for BitPacked { RULES.evaluate(array, parent, child_idx) } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut BitPackedData, children: Vec) -> VortexResult<()> { // Children: patches (if present): indices, values, chunk_offsets; then validity (if present) let patches_info = array .patches() @@ -241,7 +237,7 @@ impl VTable for BitPacked { Ok(()) } - fn metadata(array: &BitPackedArray) -> VortexResult { + fn metadata(array: &Array) -> VortexResult { Ok(ProstMetadata(BitPackedMetadata { bit_width: array.bit_width() as u32, offset: array.offset() as u32, @@ -278,7 +274,7 @@ impl VTable for BitPacked { metadata: &Self::Metadata, buffers: &[BufferHandle], children: &dyn ArrayChildren, - ) -> VortexResult { + ) -> VortexResult { if buffers.len() != 1 { vortex_bail!("Expected 1 buffer, got {}", buffers.len()); } @@ -322,7 +318,7 @@ impl VTable for BitPacked { }) .transpose()?; - BitPackedArray::try_new( + BitPackedData::try_new( packed, PType::try_from(dtype)?, validity, @@ -344,7 +340,7 @@ impl VTable for BitPacked { } fn append_to_builder( - array: &BitPackedArray, + array: &Array, builder: &mut dyn ArrayBuilder, ctx: &mut ExecutionCtx, ) -> VortexResult<()> { diff --git a/encodings/fastlanes/src/bitpacking/vtable/operations.rs b/encodings/fastlanes/src/bitpacking/vtable/operations.rs index fb897de3db1..b146e9ba119 100644 --- a/encodings/fastlanes/src/bitpacking/vtable/operations.rs +++ b/encodings/fastlanes/src/bitpacking/vtable/operations.rs @@ -3,16 +3,16 @@ use vortex_array::ExecutionCtx; use vortex_array::scalar::Scalar; +use vortex_array::vtable::Array; use vortex_array::vtable::OperationsVTable; use vortex_error::VortexResult; use crate::BitPacked; -use crate::BitPackedArray; +use crate::BitPackedData; use crate::bitpack_decompress; - impl OperationsVTable for BitPacked { fn scalar_at( - array: &BitPackedArray, + array: &Array, index: usize, _ctx: &mut ExecutionCtx, ) -> VortexResult { @@ -54,7 +54,6 @@ mod test { use vortex_buffer::buffer; use crate::BitPacked; - use crate::BitPackedArray; static SESSION: LazyLock = LazyLock::new(|| vortex_session::VortexSession::empty().with::()); @@ -73,7 +72,7 @@ mod test { #[test] pub fn slice_block() { - let arr = BitPackedArray::encode( + let arr = BitPackedData::encode( &PrimitiveArray::from_iter((0u32..2048).map(|v| v % 64)).into_array(), 6, ) @@ -87,7 +86,7 @@ mod test { #[test] pub fn slice_within_block() { - let arr = BitPackedArray::encode( + let arr = BitPackedData::encode( &PrimitiveArray::from_iter((0u32..2048).map(|v| v % 64)).into_array(), 6, ) @@ -101,7 +100,7 @@ mod test { #[test] fn slice_within_block_u8s() { - let packed = BitPackedArray::encode( + let packed = BitPackedData::encode( &PrimitiveArray::from_iter((0..10_000).map(|i| (i % 63) as u8)).into_array(), 7, ) @@ -114,7 +113,7 @@ mod test { #[test] fn slice_block_boundary_u8s() { - let packed = BitPackedArray::encode( + let packed = BitPackedData::encode( &PrimitiveArray::from_iter((0..10_000).map(|i| (i % 63) as u8)).into_array(), 7, ) @@ -127,7 +126,7 @@ mod test { #[test] fn double_slice_within_block() { - let arr = BitPackedArray::encode( + let arr = BitPackedData::encode( &PrimitiveArray::from_iter((0u32..2048).map(|v| v % 64)).into_array(), 6, ) @@ -147,7 +146,7 @@ mod test { #[test] fn slice_empty_patches() { // We create an array that has 1 element that does not fit in the 6-bit range. - let array = BitPackedArray::encode(&buffer![0u32..=64].into_array(), 6).unwrap(); + let array = BitPackedData::encode(&buffer![0u32..=64].into_array(), 6).unwrap(); assert!(array.patches().is_some()); @@ -163,7 +162,7 @@ mod test { fn take_after_slice() { // Check that our take implementation respects the offsets applied after slicing. - let array = BitPackedArray::encode( + let array = BitPackedData::encode( &PrimitiveArray::from_iter((63u32..).take(3072)).into_array(), 6, ) @@ -187,7 +186,7 @@ mod test { #[test] fn scalar_at_invalid_patches() { let packed_array = unsafe { - BitPackedArray::new_unchecked( + BitPackedData::new_unchecked( BufferHandle::new_host(ByteBuffer::copy_from_aligned( [0u8; 128], Alignment::of::(), @@ -220,7 +219,7 @@ mod test { fn scalar_at() { let values = (0u32..257).collect::>(); let uncompressed = values.clone().into_array(); - let packed = BitPackedArray::encode(&uncompressed, 8).unwrap(); + let packed = BitPackedData::encode(&uncompressed, 8).unwrap(); assert!(packed.patches().is_some()); let patches = packed.patches().unwrap().indices().clone(); diff --git a/encodings/fastlanes/src/bitpacking/vtable/validity.rs b/encodings/fastlanes/src/bitpacking/vtable/validity.rs index feafa6fbc44..1bfaae668ca 100644 --- a/encodings/fastlanes/src/bitpacking/vtable/validity.rs +++ b/encodings/fastlanes/src/bitpacking/vtable/validity.rs @@ -4,9 +4,9 @@ use vortex_array::validity::Validity; use vortex_array::vtable::ValidityHelper; -use crate::BitPackedArray; +use crate::BitPackedData; -impl ValidityHelper for BitPackedArray { +impl ValidityHelper for BitPackedData { fn validity(&self) -> &Validity { &self.validity } diff --git a/encodings/fastlanes/src/delta/array/delta_compress.rs b/encodings/fastlanes/src/delta/array/delta_compress.rs index 94862ff26e6..8fc47a26aa6 100644 --- a/encodings/fastlanes/src/delta/array/delta_compress.rs +++ b/encodings/fastlanes/src/delta/array/delta_compress.rs @@ -11,15 +11,14 @@ use vortex_array::ExecutionCtx; use vortex_array::arrays::PrimitiveArray; use vortex_array::dtype::NativePType; use vortex_array::match_each_unsigned_integer_ptype; -use vortex_array::vtable::ValidityHelper; use vortex_buffer::Buffer; use vortex_buffer::BufferMut; use vortex_error::VortexResult; +use crate::DeltaData; use crate::FL_CHUNK_SIZE; use crate::bit_transpose::transpose_validity; use crate::fill_forward_nulls; - pub fn delta_compress( array: &PrimitiveArray, ctx: &mut ExecutionCtx, @@ -105,7 +104,6 @@ mod tests { use vortex_error::VortexResult; use vortex_session::VortexSession; - use crate::DeltaArray; use crate::bitpack_compress::bitpack_encode; use crate::delta::array::delta_decompress::delta_decompress; use crate::delta_compress; @@ -121,7 +119,7 @@ mod tests { ))] fn test_compress(#[case] array: PrimitiveArray) -> VortexResult<()> { let delta = - DeltaArray::try_from_primitive_array(&array, &mut SESSION.create_execution_ctx())?; + DeltaData::try_from_primitive_array(&array, &mut SESSION.create_execution_ctx())?; assert_eq!(delta.len(), array.len()); let decompressed = delta_decompress(&delta, &mut SESSION.create_execution_ctx())?; assert_arrays_eq!(decompressed, array); @@ -138,7 +136,7 @@ mod tests { ); let (bases, deltas) = delta_compress(&array, &mut SESSION.create_execution_ctx()).unwrap(); let bitpacked_deltas = bitpack_encode(&deltas, 1, None).unwrap(); - let packed_delta = DeltaArray::try_new( + let packed_delta = DeltaData::try_new( bases.into_array(), bitpacked_deltas.into_array(), 0, diff --git a/encodings/fastlanes/src/delta/array/delta_decompress.rs b/encodings/fastlanes/src/delta/array/delta_decompress.rs index c678b7d9b87..3c32c87e3de 100644 --- a/encodings/fastlanes/src/delta/array/delta_decompress.rs +++ b/encodings/fastlanes/src/delta/array/delta_decompress.rs @@ -12,12 +12,12 @@ use vortex_array::ExecutionCtx; use vortex_array::arrays::PrimitiveArray; use vortex_array::dtype::NativePType; use vortex_array::match_each_unsigned_integer_ptype; -use vortex_array::vtable::ValidityHelper; use vortex_buffer::Buffer; use vortex_buffer::BufferMut; use vortex_error::VortexResult; use crate::DeltaArray; +use crate::DeltaData; use crate::bit_transpose::untranspose_validity; pub fn delta_decompress( diff --git a/encodings/fastlanes/src/delta/array/mod.rs b/encodings/fastlanes/src/delta/array/mod.rs index 1b98d97522e..7e65ec3591b 100644 --- a/encodings/fastlanes/src/delta/array/mod.rs +++ b/encodings/fastlanes/src/delta/array/mod.rs @@ -34,7 +34,7 @@ pub mod delta_decompress; /// /// let session = VortexSession::empty().with::(); /// let primitive = PrimitiveArray::from_iter([1_u32, 2, 3, 5, 10, 11]); -/// let array = DeltaArray::try_from_primitive_array(&primitive, &mut session.create_execution_ctx()).unwrap(); +/// let array = DeltaData::try_from_primitive_array(&primitive, &mut session.create_execution_ctx()).unwrap(); /// ``` /// /// # Details @@ -57,7 +57,7 @@ pub mod delta_decompress; /// /// Note the validity is stored in the deltas array. #[derive(Clone, Debug)] -pub struct DeltaArray { +pub struct DeltaData { pub(super) offset: usize, pub(super) len: usize, pub(super) dtype: DType, @@ -66,7 +66,7 @@ pub struct DeltaArray { pub(super) stats_set: ArrayStats, } -impl DeltaArray { +impl DeltaData { pub fn try_from_primitive_array( array: &PrimitiveArray, ctx: &mut ExecutionCtx, diff --git a/encodings/fastlanes/src/delta/compute/cast.rs b/encodings/fastlanes/src/delta/compute/cast.rs index e93680e939a..5e65db2af53 100644 --- a/encodings/fastlanes/src/delta/compute/cast.rs +++ b/encodings/fastlanes/src/delta/compute/cast.rs @@ -10,9 +10,9 @@ use vortex_array::scalar_fn::fns::cast::CastReduce; use vortex_error::VortexResult; use vortex_error::vortex_panic; +use crate::DeltaData; use crate::delta::Delta; use crate::delta::DeltaArray; - impl CastReduce for Delta { fn cast(array: &DeltaArray, dtype: &DType) -> VortexResult> { // Delta encoding stores differences between consecutive values, which requires @@ -38,7 +38,7 @@ impl CastReduce for Delta { // Create a new DeltaArray with the casted components, preserving offset and logical length Ok(Some( - DeltaArray::try_new(casted_bases, casted_deltas, array.offset(), array.len())? + DeltaData::try_new(casted_bases, casted_deltas, array.offset(), array.len())? .into_array(), )) } @@ -70,7 +70,7 @@ mod tests { fn test_cast_delta_u8_to_u32() { let primitive = PrimitiveArray::from_iter([10u8, 20, 30, 40, 50]); let array = - DeltaArray::try_from_primitive_array(&primitive, &mut SESSION.create_execution_ctx()) + DeltaData::try_from_primitive_array(&primitive, &mut SESSION.create_execution_ctx()) .unwrap(); let casted = array @@ -95,7 +95,7 @@ mod tests { vortex_array::validity::Validity::NonNullable, ); let array = - DeltaArray::try_from_primitive_array(&values, &mut SESSION.create_execution_ctx()) + DeltaData::try_from_primitive_array(&values, &mut SESSION.create_execution_ctx()) .unwrap(); let casted = array @@ -135,7 +135,7 @@ mod tests { )] fn test_cast_delta_conformance(#[case] primitive: PrimitiveArray) { let delta_array = - DeltaArray::try_from_primitive_array(&primitive, &mut SESSION.create_execution_ctx()) + DeltaData::try_from_primitive_array(&primitive, &mut SESSION.create_execution_ctx()) .unwrap(); test_cast_conformance(&delta_array.into_array()); } diff --git a/encodings/fastlanes/src/delta/mod.rs b/encodings/fastlanes/src/delta/mod.rs index da4f390d37b..52ea9b33574 100644 --- a/encodings/fastlanes/src/delta/mod.rs +++ b/encodings/fastlanes/src/delta/mod.rs @@ -2,10 +2,11 @@ // SPDX-FileCopyrightText: Copyright the Vortex contributors mod array; -pub use array::DeltaArray; +pub use array::DeltaData; pub use array::delta_compress::delta_compress; mod compute; mod vtable; pub use vtable::Delta; +pub use vtable::DeltaArray; diff --git a/encodings/fastlanes/src/delta/vtable/mod.rs b/encodings/fastlanes/src/delta/vtable/mod.rs index 67b1325bd4e..b1608faacfb 100644 --- a/encodings/fastlanes/src/delta/vtable/mod.rs +++ b/encodings/fastlanes/src/delta/vtable/mod.rs @@ -14,12 +14,13 @@ use vortex_array::ExecutionResult; use vortex_array::IntoArray; use vortex_array::Precision; use vortex_array::ProstMetadata; +use vortex_array::arrays::PrimitiveArray; use vortex_array::buffer::BufferHandle; use vortex_array::dtype::DType; use vortex_array::dtype::PType; use vortex_array::match_each_unsigned_integer_ptype; use vortex_array::serde::ArrayChildren; -use vortex_array::stats::StatsSetRef; +use vortex_array::stats::ArrayStats; use vortex_array::vtable; use vortex_array::vtable::Array; use vortex_array::vtable::ArrayId; @@ -30,7 +31,7 @@ use vortex_error::vortex_err; use vortex_error::vortex_panic; use vortex_session::VortexSession; -use crate::DeltaArray; +use crate::DeltaData; use crate::delta::array::delta_decompress::delta_decompress; mod operations; @@ -38,7 +39,7 @@ mod rules; mod slice; mod validity; -vtable!(Delta); +vtable!(Delta, Delta, DeltaData); #[derive(Clone, prost::Message)] #[repr(C)] @@ -50,14 +51,14 @@ pub struct DeltaMetadata { } impl VTable for Delta { - type Array = DeltaArray; + type Array = DeltaData; type Metadata = ProstMetadata; type OperationsVTable = Self; type ValidityVTable = Self; - fn vtable(_array: &Self::Array) -> &Self { + fn vtable(_array: &DeltaData) -> &Self { &Delta } @@ -65,19 +66,19 @@ impl VTable for Delta { Self::ID } - fn len(array: &DeltaArray) -> usize { + fn len(array: &DeltaData) -> usize { array.len() } - fn dtype(array: &DeltaArray) -> &DType { + fn dtype(array: &DeltaData) -> &DType { array.dtype() } - fn stats(array: &DeltaArray) -> StatsSetRef<'_> { - array.stats_set().to_ref(array.as_ref()) + fn stats(array: &DeltaData) -> &ArrayStats { + array.stats_set() } - fn array_hash(array: &DeltaArray, state: &mut H, precision: Precision) { + fn array_hash(array: &Array, state: &mut H, precision: Precision) { array.offset().hash(state); array.len().hash(state); array.dtype().hash(state); @@ -85,7 +86,7 @@ impl VTable for Delta { array.deltas().array_hash(state, precision); } - fn array_eq(array: &DeltaArray, other: &DeltaArray, precision: Precision) -> bool { + fn array_eq(array: &Array, other: &Array, precision: Precision) -> bool { array.offset() == other.offset() && array.len() == other.len() && array.dtype() == other.dtype() @@ -93,23 +94,23 @@ impl VTable for Delta { && array.deltas().array_eq(other.deltas(), precision) } - fn nbuffers(_array: &DeltaArray) -> usize { + fn nbuffers(_array: &Array) -> usize { 0 } - fn buffer(_array: &DeltaArray, idx: usize) -> BufferHandle { + fn buffer(_array: &Array, idx: usize) -> BufferHandle { vortex_panic!("DeltaArray buffer index {idx} out of bounds") } - fn buffer_name(_array: &DeltaArray, _idx: usize) -> Option { + fn buffer_name(_array: &Array, _idx: usize) -> Option { None } - fn nchildren(_array: &DeltaArray) -> usize { + fn nchildren(_array: &Array) -> usize { 2 } - fn child(array: &DeltaArray, idx: usize) -> ArrayRef { + fn child(array: &Array, idx: usize) -> ArrayRef { match idx { 0 => array.bases().clone(), 1 => array.deltas().clone(), @@ -117,7 +118,7 @@ impl VTable for Delta { } } - fn child_name(_array: &DeltaArray, idx: usize) -> String { + fn child_name(_array: &Array, idx: usize) -> String { match idx { 0 => "bases".to_string(), 1 => "deltas".to_string(), @@ -133,7 +134,7 @@ impl VTable for Delta { rules::RULES.evaluate(array, parent, child_idx) } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut DeltaData, children: Vec) -> VortexResult<()> { // DeltaArray children order (from visit_children): // 1. bases // 2. deltas @@ -150,7 +151,7 @@ impl VTable for Delta { Ok(()) } - fn metadata(array: &DeltaArray) -> VortexResult { + fn metadata(array: &Array) -> VortexResult { Ok(ProstMetadata(DeltaMetadata { deltas_len: array.deltas().len() as u64, offset: array.offset() as u32, @@ -177,7 +178,7 @@ impl VTable for Delta { metadata: &Self::Metadata, _buffers: &[BufferHandle], children: &dyn ArrayChildren, - ) -> VortexResult { + ) -> VortexResult { assert_eq!(children.len(), 2); let ptype = PType::try_from(dtype)?; let lanes = match_each_unsigned_integer_ptype!(ptype, |T| { ::LANES }); @@ -192,7 +193,7 @@ impl VTable for Delta { let bases = children.get(0, dtype, bases_len)?; let deltas = children.get(1, dtype, deltas_len)?; - DeltaArray::try_new(bases, deltas, metadata.0.offset as usize, len) + DeltaData::try_new(bases, deltas, metadata.0.offset as usize, len) } fn execute(array: Arc>, ctx: &mut ExecutionCtx) -> VortexResult { @@ -207,6 +208,16 @@ pub struct Delta; impl Delta { pub const ID: ArrayId = ArrayId::new_ref("fastlanes.delta"); + + /// Compress a primitive array using Delta encoding. + pub fn try_from_primitive_array( + array: &PrimitiveArray, + ctx: &mut ExecutionCtx, + ) -> VortexResult { + Ok(Array::from_inner(DeltaData::try_from_primitive_array( + array, ctx, + )?)) + } } #[cfg(test)] diff --git a/encodings/fastlanes/src/delta/vtable/operations.rs b/encodings/fastlanes/src/delta/vtable/operations.rs index 91e7501b308..ad3a314123f 100644 --- a/encodings/fastlanes/src/delta/vtable/operations.rs +++ b/encodings/fastlanes/src/delta/vtable/operations.rs @@ -1,23 +1,25 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors +use vortex_array::DynArray; use vortex_array::ExecutionCtx; +use vortex_array::IntoArray; use vortex_array::ToCanonical; use vortex_array::scalar::Scalar; +use vortex_array::vtable::Array; use vortex_array::vtable::OperationsVTable; use vortex_error::VortexResult; use super::Delta; -use crate::DeltaArray; - +use crate::DeltaData; impl OperationsVTable for Delta { fn scalar_at( - array: &DeltaArray, + array: &Array, index: usize, _ctx: &mut ExecutionCtx, ) -> VortexResult { - let decompressed = array.slice(index..index + 1)?.to_primitive(); - decompressed.scalar_at(0) + let decompressed = array.to_array_ref().slice(index..index + 1)?.to_primitive(); + decompressed.into_array().scalar_at(0) } } @@ -37,14 +39,12 @@ mod tests { use vortex_buffer::buffer; use vortex_session::VortexSession; - use crate::DeltaArray; - static SESSION: LazyLock = LazyLock::new(|| VortexSession::empty().with::()); #[test] fn test_slice_non_jagged_array_first_chunk_of_two() { - let delta = DeltaArray::try_from_primitive_array( + let delta = DeltaData::try_from_primitive_array( &(0u32..2048).collect(), &mut SESSION.create_execution_ctx(), ) @@ -57,7 +57,7 @@ mod tests { #[test] fn test_slice_non_jagged_array_second_chunk_of_two() { - let delta = DeltaArray::try_from_primitive_array( + let delta = DeltaData::try_from_primitive_array( &(0u32..2048).collect(), &mut SESSION.create_execution_ctx(), ) @@ -70,7 +70,7 @@ mod tests { #[test] fn test_slice_non_jagged_array_span_two_chunks_chunk_of_two() { - let delta = DeltaArray::try_from_primitive_array( + let delta = DeltaData::try_from_primitive_array( &(0u32..2048).collect(), &mut SESSION.create_execution_ctx(), ) @@ -83,7 +83,7 @@ mod tests { #[test] fn test_slice_non_jagged_array_span_two_chunks_chunk_of_four() { - let delta = DeltaArray::try_from_primitive_array( + let delta = DeltaData::try_from_primitive_array( &(0u32..4096).collect(), &mut SESSION.create_execution_ctx(), ) @@ -96,7 +96,7 @@ mod tests { #[test] fn test_slice_non_jagged_array_whole() { - let delta = DeltaArray::try_from_primitive_array( + let delta = DeltaData::try_from_primitive_array( &(0u32..4096).collect(), &mut SESSION.create_execution_ctx(), ) @@ -109,7 +109,7 @@ mod tests { #[test] fn test_slice_non_jagged_array_empty() { - let delta = DeltaArray::try_from_primitive_array( + let delta = DeltaData::try_from_primitive_array( &(0u32..4096).collect(), &mut SESSION.create_execution_ctx(), ) @@ -130,7 +130,7 @@ mod tests { #[test] fn test_slice_jagged_array_second_chunk_of_two() { - let delta = DeltaArray::try_from_primitive_array( + let delta = DeltaData::try_from_primitive_array( &(0u32..2000).collect(), &mut SESSION.create_execution_ctx(), ) @@ -143,7 +143,7 @@ mod tests { #[test] fn test_slice_jagged_array_empty() { - let delta = DeltaArray::try_from_primitive_array( + let delta = DeltaData::try_from_primitive_array( &(0u32..4000).collect(), &mut SESSION.create_execution_ctx(), ) @@ -164,7 +164,7 @@ mod tests { #[test] fn test_slice_of_slice_of_non_jagged() { - let delta = DeltaArray::try_from_primitive_array( + let delta = DeltaData::try_from_primitive_array( &(0u32..2048).collect(), &mut SESSION.create_execution_ctx(), ) @@ -179,7 +179,7 @@ mod tests { #[test] fn test_slice_of_slice_of_jagged() { - let delta = DeltaArray::try_from_primitive_array( + let delta = DeltaData::try_from_primitive_array( &(0u32..2000).collect(), &mut SESSION.create_execution_ctx(), ) @@ -194,7 +194,7 @@ mod tests { #[test] fn test_slice_of_slice_second_chunk_of_non_jagged() { - let delta = DeltaArray::try_from_primitive_array( + let delta = DeltaData::try_from_primitive_array( &(0u32..2048).collect(), &mut SESSION.create_execution_ctx(), ) @@ -209,7 +209,7 @@ mod tests { #[test] fn test_slice_of_slice_second_chunk_of_jagged() { - let delta = DeltaArray::try_from_primitive_array( + let delta = DeltaData::try_from_primitive_array( &(0u32..2000).collect(), &mut SESSION.create_execution_ctx(), ) @@ -224,7 +224,7 @@ mod tests { #[test] fn test_slice_of_slice_spanning_two_chunks_of_non_jagged() { - let delta = DeltaArray::try_from_primitive_array( + let delta = DeltaData::try_from_primitive_array( &(0u32..2048).collect(), &mut SESSION.create_execution_ctx(), ) @@ -239,7 +239,7 @@ mod tests { #[test] fn test_slice_of_slice_spanning_two_chunks_of_jagged() { - let delta = DeltaArray::try_from_primitive_array( + let delta = DeltaData::try_from_primitive_array( &(0u32..2000).collect(), &mut SESSION.create_execution_ctx(), ) @@ -254,7 +254,7 @@ mod tests { #[test] fn test_scalar_at_non_jagged_array() { - let delta = DeltaArray::try_from_primitive_array( + let delta = DeltaData::try_from_primitive_array( &(0u32..2048).collect(), &mut SESSION.create_execution_ctx(), ) @@ -268,7 +268,7 @@ mod tests { #[test] #[should_panic] fn test_scalar_at_non_jagged_array_oob() { - let delta = DeltaArray::try_from_primitive_array( + let delta = DeltaData::try_from_primitive_array( &(0u32..2048).collect(), &mut SESSION.create_execution_ctx(), ) @@ -278,7 +278,7 @@ mod tests { } #[test] fn test_scalar_at_jagged_array() { - let delta = DeltaArray::try_from_primitive_array( + let delta = DeltaData::try_from_primitive_array( &(0u32..2000).collect(), &mut SESSION.create_execution_ctx(), ) @@ -292,7 +292,7 @@ mod tests { #[test] #[should_panic] fn test_scalar_at_jagged_array_oob() { - let delta = DeltaArray::try_from_primitive_array( + let delta = DeltaData::try_from_primitive_array( &(0u32..2000).collect(), &mut SESSION.create_execution_ctx(), ) @@ -312,7 +312,7 @@ mod tests { #[case::delta_single(PrimitiveArray::new(buffer![42u32], Validity::NonNullable))] fn test_delta_consistency(#[case] array: PrimitiveArray) { test_array_consistency( - &DeltaArray::try_from_primitive_array(&array, &mut SESSION.create_execution_ctx()) + &DeltaData::try_from_primitive_array(&array, &mut SESSION.create_execution_ctx()) .unwrap() .into_array(), ); @@ -326,7 +326,7 @@ mod tests { #[case::delta_u32_large(PrimitiveArray::new(buffer![1u32; 100], Validity::NonNullable))] fn test_delta_binary_numeric(#[case] array: PrimitiveArray) { test_binary_numeric_array( - DeltaArray::try_from_primitive_array(&array, &mut SESSION.create_execution_ctx()) + DeltaData::try_from_primitive_array(&array, &mut SESSION.create_execution_ctx()) .unwrap() .into_array(), ); diff --git a/encodings/fastlanes/src/delta/vtable/slice.rs b/encodings/fastlanes/src/delta/vtable/slice.rs index 6c589b85db2..82f2171e312 100644 --- a/encodings/fastlanes/src/delta/vtable/slice.rs +++ b/encodings/fastlanes/src/delta/vtable/slice.rs @@ -7,13 +7,14 @@ use std::ops::Range; use vortex_array::ArrayRef; use vortex_array::IntoArray; use vortex_array::arrays::slice::SliceReduce; +use vortex_array::vtable::Array; use vortex_error::VortexResult; -use crate::DeltaArray; +use crate::DeltaData; use crate::delta::vtable::Delta; impl SliceReduce for Delta { - fn slice(array: &Self::Array, range: Range) -> VortexResult> { + fn slice(array: &Array, range: Range) -> VortexResult> { let physical_start = range.start + array.offset(); let physical_stop = range.end + array.offset(); @@ -34,7 +35,7 @@ impl SliceReduce for Delta { // SAFETY: slicing valid bases/deltas preserves correctness Ok(Some(unsafe { - DeltaArray::new_unchecked(new_bases, new_deltas, physical_start % 1024, range.len()) + DeltaData::new_unchecked(new_bases, new_deltas, physical_start % 1024, range.len()) .into_array() })) } diff --git a/encodings/fastlanes/src/delta/vtable/validity.rs b/encodings/fastlanes/src/delta/vtable/validity.rs index 17dc2063206..ed4e41f2edd 100644 --- a/encodings/fastlanes/src/delta/vtable/validity.rs +++ b/encodings/fastlanes/src/delta/vtable/validity.rs @@ -4,15 +4,15 @@ use vortex_array::LEGACY_SESSION; use vortex_array::VortexSessionExecute; use vortex_array::validity::Validity; +use vortex_array::vtable::Array; use vortex_array::vtable::ValidityVTable; use vortex_error::VortexResult; use crate::Delta; -use crate::DeltaArray; use crate::bit_transpose::untranspose_validity; impl ValidityVTable for Delta { - fn validity(array: &DeltaArray) -> VortexResult { + fn validity(array: &Array) -> VortexResult { let start = array.offset(); let end = start + array.len(); diff --git a/encodings/fastlanes/src/for/array/for_compress.rs b/encodings/fastlanes/src/for/array/for_compress.rs index 95277505360..584fd72c538 100644 --- a/encodings/fastlanes/src/for/array/for_compress.rs +++ b/encodings/fastlanes/src/for/array/for_compress.rs @@ -5,6 +5,7 @@ use num_traits::PrimInt; use num_traits::WrappingSub; use vortex_array::IntoArray; use vortex_array::arrays::PrimitiveArray; +use vortex_array::arrays::PrimitiveData; use vortex_array::dtype::NativePType; use vortex_array::expr::stats::Stat; use vortex_array::match_each_integer_ptype; @@ -12,12 +13,13 @@ use vortex_array::stats::ArrayStats; use vortex_error::VortexResult; use vortex_error::vortex_err; -use crate::FoRArray; - -impl FoRArray { - pub fn encode(array: PrimitiveArray) -> VortexResult { - let stats = ArrayStats::from(array.statistics().to_owned()); - let min = array +use crate::BitPackedData; +use crate::FoRData; +impl FoRData { + pub fn encode(array: PrimitiveArray) -> VortexResult { + let array_ref = array.clone().into_array(); + let stats = ArrayStats::from(array_ref.statistics().to_owned()); + let min = array_ref .statistics() .compute_stat(Stat::Min)? .ok_or_else(|| vortex_err!("Min stat not found"))?; @@ -25,11 +27,12 @@ impl FoRArray { let encoded = match_each_integer_ptype!(array.ptype(), |T| { compress_primitive::(array, T::try_from(&min)?)?.into_array() }); - let for_array = FoRArray::try_new(encoded, min)?; + let for_array = FoRData::try_new(encoded, min)?; + let for_ref = for_array.clone().into_array(); for_array .stats_set() - .to_ref(for_array.as_ref()) - .inherit_from(stats.to_ref(for_array.as_ref())); + .to_ref(&*for_ref) + .inherit_from(stats.to_ref(&*for_ref)); Ok(for_array) } } @@ -37,16 +40,18 @@ impl FoRArray { fn compress_primitive( parray: PrimitiveArray, min: T, -) -> VortexResult { +) -> VortexResult { // Set null values to the min value, ensuring that decompress into a value in the primitive // range (and stop them wrapping around). - parray.map_each_with_validity::(|(v, bool)| { - if bool { - v.wrapping_sub(&min) - } else { - T::zero() - } - }) + parray + .into_inner() + .map_each_with_validity::(|(v, bool)| { + if bool { + v.wrapping_sub(&min) + } else { + T::zero() + } + }) } #[cfg(test)] @@ -67,7 +72,6 @@ mod test { use vortex_session::VortexSession; use super::*; - use crate::BitPackedArray; use crate::r#for::array::for_decompress::decompress; use crate::r#for::array::for_decompress::fused_decompress; @@ -80,7 +84,7 @@ mod test { (1i32..10).collect::>(), Validity::NonNullable, ); - let compressed = FoRArray::encode(array.clone()).unwrap(); + let compressed = FoRData::encode(array.clone()).unwrap(); assert_eq!(i32::try_from(compressed.reference_scalar()).unwrap(), 1); assert_arrays_eq!(compressed, array); @@ -95,7 +99,7 @@ mod test { .collect::>(), Validity::NonNullable, ); - let compressed = FoRArray::encode(array).unwrap(); + let compressed = FoRData::encode(array).unwrap(); assert_eq!( u32::try_from(compressed.reference_scalar()).unwrap(), 1_000_000u32 @@ -108,7 +112,7 @@ mod test { assert_eq!(array.statistics().len(), 0); let dtype = array.dtype().clone(); - let compressed = FoRArray::encode(array).unwrap(); + let compressed = FoRData::encode(array).unwrap(); assert_eq!(compressed.reference_scalar().dtype(), &dtype); assert!(compressed.reference_scalar().dtype().is_signed_int()); assert!(compressed.encoded().dtype().is_signed_int()); @@ -121,7 +125,7 @@ mod test { fn test_decompress() { // Create a range offset by a million. let array = PrimitiveArray::from_iter((0u32..100_000).step_by(1024).map(|v| v + 1_000_000)); - let compressed = FoRArray::encode(array.clone()).unwrap(); + let compressed = FoRData::encode(array.clone()).unwrap(); assert_arrays_eq!(compressed, array); } @@ -130,8 +134,8 @@ mod test { // Create a range offset by a million. let expect = PrimitiveArray::from_iter((0u32..1024).map(|x| x % 7 + 10)); let array = PrimitiveArray::from_iter((0u32..1024).map(|x| x % 7)); - let bp = BitPackedArray::encode(&array.into_array(), 3).unwrap(); - let compressed = FoRArray::try_new(bp.into_array(), 10u32.into()).unwrap(); + let bp = BitPackedData::encode(&array.into_array(), 3).unwrap(); + let compressed = FoRData::try_new(bp.into_array(), 10u32.into()).unwrap(); assert_arrays_eq!(compressed, expect); } @@ -140,8 +144,8 @@ mod test { // Create a range offset by a million. let expect = PrimitiveArray::from_iter((0u32..1024).map(|x| x % 7 + 10)); let array = PrimitiveArray::from_iter((0u32..1024).map(|x| x % 7)); - let bp = BitPackedArray::encode(&array.into_array(), 2).unwrap(); - let compressed = FoRArray::try_new(bp.clone().into_array(), 10u32.into()).unwrap(); + let bp = BitPackedData::encode(&array.into_array(), 2).unwrap(); + let compressed = FoRData::try_new(bp.clone().into_array(), 10u32.into()).unwrap(); let decompressed = fused_decompress::(&compressed, &bp, &mut SESSION.create_execution_ctx())?; assert_arrays_eq!(decompressed, expect); @@ -151,7 +155,7 @@ mod test { #[test] fn test_overflow() -> VortexResult<()> { let array = PrimitiveArray::from_iter(i8::MIN..=i8::MAX); - let compressed = FoRArray::encode(array.clone()).unwrap(); + let compressed = FoRData::encode(array.clone()).unwrap(); assert_eq!( i8::MIN, compressed diff --git a/encodings/fastlanes/src/for/array/for_decompress.rs b/encodings/fastlanes/src/for/array/for_decompress.rs index bffca15840b..5f606e24077 100644 --- a/encodings/fastlanes/src/for/array/for_decompress.rs +++ b/encodings/fastlanes/src/for/array/for_decompress.rs @@ -12,14 +12,15 @@ use vortex_array::dtype::PhysicalPType; use vortex_array::dtype::UnsignedPType; use vortex_array::match_each_integer_ptype; use vortex_array::match_each_unsigned_integer_ptype; -use vortex_array::vtable::ValidityHelper; use vortex_buffer::Buffer; use vortex_error::VortexExpect; use vortex_error::VortexResult; use crate::BitPacked; use crate::BitPackedArray; +use crate::BitPackedData; use crate::FoRArray; +use crate::FoRData; use crate::bitpack_decompress; use crate::unpack_iter::UnpackStrategy; use crate::unpack_iter::UnpackedChunks; @@ -108,7 +109,7 @@ pub(crate) fn fused_decompress< let mut uninit_range = builder.uninit_range(bp.len()); unsafe { // Append a dense null Mask. - uninit_range.append_mask(bp.validity_mask()?); + uninit_range.append_mask(bp.validity_mask()); } // SAFETY: `decode_into` will initialize all values in this range. diff --git a/encodings/fastlanes/src/for/array/mod.rs b/encodings/fastlanes/src/for/array/mod.rs index 0f90e6fcd08..b9686117440 100644 --- a/encodings/fastlanes/src/for/array/mod.rs +++ b/encodings/fastlanes/src/for/array/mod.rs @@ -2,6 +2,7 @@ // SPDX-FileCopyrightText: Copyright the Vortex contributors use vortex_array::ArrayRef; +use vortex_array::dtype::DType; use vortex_array::dtype::PType; use vortex_array::scalar::Scalar; use vortex_array::stats::ArrayStats; @@ -16,13 +17,13 @@ pub mod for_decompress; /// This encoding stores values as offsets from a reference value, which can significantly reduce /// storage requirements when values are clustered around a specific point. #[derive(Clone, Debug)] -pub struct FoRArray { +pub struct FoRData { pub(super) encoded: ArrayRef, pub(super) reference: Scalar, pub(super) stats_set: ArrayStats, } -impl FoRArray { +impl FoRData { pub fn try_new(encoded: ArrayRef, reference: Scalar) -> VortexResult { if reference.is_null() { vortex_bail!("Reference value cannot be null"); @@ -48,6 +49,24 @@ impl FoRArray { } } + /// Returns the length of the array. + #[inline] + pub fn len(&self) -> usize { + self.encoded.len() + } + + /// Returns `true` if the array is empty. + #[inline] + pub fn is_empty(&self) -> bool { + self.encoded.is_empty() + } + + /// Returns the dtype of the array. + #[inline] + pub fn dtype(&self) -> &DType { + self.reference.dtype() + } + #[inline] pub fn ptype(&self) -> PType { self.dtype().as_ptype() diff --git a/encodings/fastlanes/src/for/compute/cast.rs b/encodings/fastlanes/src/for/compute/cast.rs index 0524ba68bcf..5f37777d4c3 100644 --- a/encodings/fastlanes/src/for/compute/cast.rs +++ b/encodings/fastlanes/src/for/compute/cast.rs @@ -8,9 +8,9 @@ use vortex_array::dtype::DType; use vortex_array::scalar_fn::fns::cast::CastReduce; use vortex_error::VortexResult; +use crate::FoRData; use crate::r#for::FoR; use crate::r#for::FoRArray; - impl CastReduce for FoR { fn cast(array: &FoRArray, dtype: &DType) -> VortexResult> { // FoR only supports integer types @@ -23,7 +23,7 @@ impl CastReduce for FoR { let casted_reference = array.reference_scalar().cast(dtype)?; Ok(Some( - FoRArray::try_new(casted_child, casted_reference)?.into_array(), + FoRData::try_new(casted_child, casted_reference)?.into_array(), )) } } @@ -42,11 +42,9 @@ mod tests { use vortex_array::scalar::Scalar; use vortex_buffer::buffer; - use crate::FoRArray; - #[test] fn test_cast_for_i32_to_i64() { - let for_array = FoRArray::try_new( + let for_array = FoRData::try_new( buffer![0i32, 10, 20, 30, 40].into_array(), Scalar::from(100i32), ) @@ -71,7 +69,7 @@ mod tests { #[test] fn test_cast_for_nullable() { let values = PrimitiveArray::from_option_iter([Some(0i32), None, Some(20), Some(30), None]); - let for_array = FoRArray::try_new(values.into_array(), Scalar::from(50i32)).unwrap(); + let for_array = FoRData::try_new(values.into_array(), Scalar::from(50i32)).unwrap(); let casted = for_array .into_array() @@ -84,19 +82,19 @@ mod tests { } #[rstest] - #[case(FoRArray::try_new( + #[case(FoRData::try_new( buffer![0i32, 1, 2, 3, 4].into_array(), Scalar::from(100i32) ).unwrap())] - #[case(FoRArray::try_new( + #[case(FoRData::try_new( buffer![0u64, 10, 20, 30].into_array(), Scalar::from(1000u64) ).unwrap())] - #[case(FoRArray::try_new( + #[case(FoRData::try_new( PrimitiveArray::from_option_iter([Some(0i16), None, Some(5), Some(10), None]).into_array(), Scalar::from(50i16) ).unwrap())] - #[case(FoRArray::try_new( + #[case(FoRData::try_new( buffer![-10i32, -5, 0, 5, 10].into_array(), Scalar::from(-100i32) ).unwrap())] diff --git a/encodings/fastlanes/src/for/compute/compare.rs b/encodings/fastlanes/src/for/compute/compare.rs index 79629b6df92..89274efff02 100644 --- a/encodings/fastlanes/src/for/compute/compare.rs +++ b/encodings/fastlanes/src/for/compute/compare.rs @@ -24,6 +24,7 @@ use vortex_error::VortexResult; use crate::FoR; use crate::FoRArray; +use crate::FoRData; impl CompareKernel for FoR { fn compare( @@ -104,7 +105,7 @@ mod tests { fn test_compare_constant() { let reference = Scalar::from(10); // 10, 30, 12 - let lhs = FoRArray::try_new( + let lhs = FoRData::try_new( PrimitiveArray::new(buffer!(0i32, 20, 2), Validity::AllValid).into_array(), reference, ) @@ -143,7 +144,7 @@ mod tests { fn test_compare_nullable_constant() { let reference = Scalar::from(0); // 10, 30, 12 - let lhs = FoRArray::try_new( + let lhs = FoRData::try_new( PrimitiveArray::new(buffer!(0i32, 20, 2), Validity::NonNullable).into_array(), reference, ) @@ -169,7 +170,7 @@ mod tests { fn compare_non_encodable_constant() { let reference = Scalar::from(10); // 10, 30, 12 - let lhs = FoRArray::try_new( + let lhs = FoRData::try_new( PrimitiveArray::new(buffer!(0i32, 10, 1), Validity::AllValid).into_array(), reference, ) @@ -198,7 +199,7 @@ mod tests { fn compare_large_constant() { let reference = Scalar::from(-9219218377546224477i64); #[allow(clippy::cast_possible_truncation)] - let lhs = FoRArray::try_new( + let lhs = FoRData::try_new( PrimitiveArray::new( buffer![0i64, 9654309310445864926u64 as i64], Validity::AllValid, diff --git a/encodings/fastlanes/src/for/compute/is_sorted.rs b/encodings/fastlanes/src/for/compute/is_sorted.rs index 110c2b575f6..ea6adce5389 100644 --- a/encodings/fastlanes/src/for/compute/is_sorted.rs +++ b/encodings/fastlanes/src/for/compute/is_sorted.rs @@ -14,7 +14,6 @@ use vortex_array::scalar::Scalar; use vortex_error::VortexResult; use crate::FoR; - /// FoR can express sortedness directly on its encoded form. /// /// If the minimum is greater than or equal to zero, subtracting it from the other values does not @@ -73,6 +72,8 @@ use crate::FoR; /// Addition is order-preserving, so all the wrapped values preserve their order and they're all /// represented as unsigned values larger than 127 so they also preserve their order with the /// unwrapped values. +use crate::FoRData; + #[derive(Debug)] pub(crate) struct FoRIsSortedKernel; @@ -116,14 +117,12 @@ mod test { use vortex_array::validity::Validity; use vortex_buffer::buffer; - use crate::FoRArray; - #[test] fn test_sorted() { let mut ctx = LEGACY_SESSION.create_execution_ctx(); let a = PrimitiveArray::new(buffer![-1, 0, i8::MAX], Validity::NonNullable); - let b = FoRArray::encode(a).unwrap(); + let b = FoRData::encode(a).unwrap(); assert!( is_sorted(&b.clone().into_array(), &mut ctx).unwrap(), "{}", @@ -131,7 +130,7 @@ mod test { ); let a = PrimitiveArray::new(buffer![i8::MIN, 0, i8::MAX], Validity::NonNullable); - let b = FoRArray::encode(a).unwrap(); + let b = FoRData::encode(a).unwrap(); assert!( is_sorted(&b.clone().into_array(), &mut ctx).unwrap(), "{}", @@ -139,7 +138,7 @@ mod test { ); let a = PrimitiveArray::new(buffer![i8::MIN, 0, 30, 127], Validity::NonNullable); - let b = FoRArray::encode(a).unwrap(); + let b = FoRData::encode(a).unwrap(); assert!( is_sorted(&b.clone().into_array(), &mut ctx).unwrap(), "{}", @@ -147,7 +146,7 @@ mod test { ); let a = PrimitiveArray::new(buffer![i8::MIN, -3, -1], Validity::NonNullable); - let b = FoRArray::encode(a).unwrap(); + let b = FoRData::encode(a).unwrap(); assert!( is_sorted(&b.clone().into_array(), &mut ctx).unwrap(), "{}", @@ -155,7 +154,7 @@ mod test { ); let a = PrimitiveArray::new(buffer![-10, -3, -1], Validity::NonNullable); - let b = FoRArray::encode(a).unwrap(); + let b = FoRData::encode(a).unwrap(); assert!( is_sorted(&b.clone().into_array(), &mut ctx).unwrap(), "{}", @@ -163,7 +162,7 @@ mod test { ); let a = PrimitiveArray::new(buffer![-10, -11, -1], Validity::NonNullable); - let b = FoRArray::encode(a).unwrap(); + let b = FoRData::encode(a).unwrap(); assert!( !is_sorted(&b.clone().into_array(), &mut ctx).unwrap(), "{}", @@ -171,7 +170,7 @@ mod test { ); let a = PrimitiveArray::new(buffer![-10, i8::MIN, -1], Validity::NonNullable); - let b = FoRArray::encode(a).unwrap(); + let b = FoRData::encode(a).unwrap(); assert!( !is_sorted(&b.clone().into_array(), &mut ctx).unwrap(), "{}", diff --git a/encodings/fastlanes/src/for/compute/mod.rs b/encodings/fastlanes/src/for/compute/mod.rs index 921cc7affe7..9a08697afdb 100644 --- a/encodings/fastlanes/src/for/compute/mod.rs +++ b/encodings/fastlanes/src/for/compute/mod.rs @@ -17,6 +17,7 @@ use vortex_mask::Mask; use crate::FoR; use crate::FoRArray; +use crate::FoRData; impl TakeExecute for FoR { fn take( @@ -25,7 +26,7 @@ impl TakeExecute for FoR { _ctx: &mut ExecutionCtx, ) -> VortexResult> { Ok(Some( - FoRArray::try_new( + FoRData::try_new( array.encoded().take(indices.to_array())?, array.reference_scalar().clone(), )? @@ -36,7 +37,7 @@ impl TakeExecute for FoR { impl FilterReduce for FoR { fn filter(array: &FoRArray, mask: &Mask) -> VortexResult> { - FoRArray::try_new( + FoRData::try_new( array.encoded().filter(mask.clone())?, array.reference_scalar().clone(), ) @@ -53,39 +54,37 @@ mod test { use vortex_array::scalar::Scalar; use vortex_buffer::buffer; - use crate::FoRArray; - #[test] fn test_filter_for_array() { // Test with i32 values let values = buffer![100i32, 101, 102, 103, 104].into_array(); let reference = Scalar::from(100i32); - let for_array = FoRArray::try_new(values, reference).unwrap(); + let for_array = FoRData::try_new(values, reference).unwrap(); test_filter_conformance(&for_array.into_array()); // Test with u64 values let values = buffer![1000u64, 1001, 1002, 1003, 1004].into_array(); let reference = Scalar::from(1000u64); - let for_array = FoRArray::try_new(values, reference).unwrap(); + let for_array = FoRData::try_new(values, reference).unwrap(); test_filter_conformance(&for_array.into_array()); // Test with nullable values let values = PrimitiveArray::from_option_iter([Some(50i16), None, Some(52), Some(53), None]); let reference = Scalar::from(50i16); - let for_array = FoRArray::try_new(values.into_array(), reference).unwrap(); + let for_array = FoRData::try_new(values.into_array(), reference).unwrap(); test_filter_conformance(&for_array.into_array()); } #[rstest] - #[case(FoRArray::try_new(buffer![100i32, 101, 102, 103, 104].into_array(), Scalar::from(100i32)).unwrap())] - #[case(FoRArray::try_new(buffer![1000u64, 1001, 1002, 1003, 1004].into_array(), Scalar::from(1000u64)).unwrap())] - #[case(FoRArray::try_new( + #[case(FoRData::try_new(buffer![100i32, 101, 102, 103, 104].into_array(), Scalar::from(100i32)).unwrap())] + #[case(FoRData::try_new(buffer![1000u64, 1001, 1002, 1003, 1004].into_array(), Scalar::from(1000u64)).unwrap())] + #[case(FoRData::try_new( PrimitiveArray::from_option_iter([Some(50i16), None, Some(52), Some(53), None]).into_array(), Scalar::from(50i16) ).unwrap())] - #[case(FoRArray::try_new(buffer![-100i32, -99, -98, -97, -96].into_array(), Scalar::from(-100i32)).unwrap())] - #[case(FoRArray::try_new(buffer![42i64].into_array(), Scalar::from(40i64)).unwrap())] + #[case(FoRData::try_new(buffer![-100i32, -99, -98, -97, -96].into_array(), Scalar::from(-100i32)).unwrap())] + #[case(FoRData::try_new(buffer![42i64].into_array(), Scalar::from(40i64)).unwrap())] fn test_take_for_conformance(#[case] for_array: FoRArray) { use vortex_array::compute::conformance::take::test_take_conformance; test_take_conformance(&for_array.into_array()); @@ -102,56 +101,54 @@ mod tests { use vortex_array::scalar::Scalar; use vortex_buffer::buffer; - use crate::FoRArray; - #[rstest] // Basic FoR arrays - #[case::for_i32(FoRArray::try_new( + #[case::for_i32(FoRData::try_new( buffer![100i32, 101, 102, 103, 104].into_array(), Scalar::from(100i32) ).unwrap())] - #[case::for_u64(FoRArray::try_new( + #[case::for_u64(FoRData::try_new( buffer![1000u64, 1001, 1002, 1003, 1004].into_array(), Scalar::from(1000u64) ).unwrap())] // Nullable arrays - #[case::for_nullable_i16(FoRArray::try_new( + #[case::for_nullable_i16(FoRData::try_new( PrimitiveArray::from_option_iter([Some(50i16), None, Some(52), Some(53), None]).into_array(), Scalar::from(50i16) ).unwrap())] - #[case::for_nullable_i32(FoRArray::try_new( + #[case::for_nullable_i32(FoRData::try_new( PrimitiveArray::from_option_iter([Some(200i32), None, Some(202), Some(203), None]).into_array(), Scalar::from(200i32) ).unwrap())] // Negative values - #[case::for_negative(FoRArray::try_new( + #[case::for_negative(FoRData::try_new( buffer![-100i32, -99, -98, -97, -96].into_array(), Scalar::from(-100i32) ).unwrap())] // Edge cases - #[case::for_single(FoRArray::try_new( + #[case::for_single(FoRData::try_new( buffer![42i64].into_array(), Scalar::from(40i64) ).unwrap())] - #[case::for_zero_ref(FoRArray::try_new( + #[case::for_zero_ref(FoRData::try_new( buffer![0u32, 1, 2, 3, 4].into_array(), Scalar::from(0u32) ).unwrap())] // Large arrays (> 1024 elements for fastlanes chunking) - #[case::for_large(FoRArray::try_new( + #[case::for_large(FoRData::try_new( PrimitiveArray::from_iter((0..1500).map(|i| 5000 + i)).into_array(), Scalar::from(5000i32) ).unwrap())] - #[case::for_very_large(FoRArray::try_new( + #[case::for_very_large(FoRData::try_new( PrimitiveArray::from_iter((0..3072).map(|i| 10000 + i as i64)).into_array(), Scalar::from(10000i64) ).unwrap())] - #[case::for_large_nullable(FoRArray::try_new( + #[case::for_large_nullable(FoRData::try_new( PrimitiveArray::from_option_iter((0..2048).map(|i| (i % 15 == 0).then_some(1000 + i))).into_array(), Scalar::from(1000i32) ).unwrap())] // Arrays with large deltas from reference - #[case::for_large_deltas(FoRArray::try_new( + #[case::for_large_deltas(FoRData::try_new( buffer![100i64, 200, 300, 400, 500].into_array(), Scalar::from(100i64) ).unwrap())] @@ -161,23 +158,23 @@ mod tests { } #[rstest] - #[case::for_i32_basic(FoRArray::try_new( + #[case::for_i32_basic(FoRData::try_new( buffer![100i32, 101, 102, 103, 104].into_array(), Scalar::from(100i32) ).unwrap())] - #[case::for_u32_basic(FoRArray::try_new( + #[case::for_u32_basic(FoRData::try_new( buffer![1000u32, 1001, 1002, 1003, 1004].into_array(), Scalar::from(1000u32) ).unwrap())] - #[case::for_i64_basic(FoRArray::try_new( + #[case::for_i64_basic(FoRData::try_new( buffer![5000i64, 5001, 5002, 5003, 5004].into_array(), Scalar::from(5000i64) ).unwrap())] - #[case::for_u64_basic(FoRArray::try_new( + #[case::for_u64_basic(FoRData::try_new( buffer![10000u64, 10001, 10002, 10003, 10004].into_array(), Scalar::from(10000u64) ).unwrap())] - #[case::for_i32_large(FoRArray::try_new( + #[case::for_i32_large(FoRData::try_new( PrimitiveArray::from_iter((0..100).map(|i| 2000 + i)).into_array(), Scalar::from(2000i32) ).unwrap())] diff --git a/encodings/fastlanes/src/for/mod.rs b/encodings/fastlanes/src/for/mod.rs index 1dfaf61114f..99f19486e91 100644 --- a/encodings/fastlanes/src/for/mod.rs +++ b/encodings/fastlanes/src/for/mod.rs @@ -2,9 +2,10 @@ // SPDX-FileCopyrightText: Copyright the Vortex contributors mod array; -pub use array::FoRArray; +pub use array::FoRData; pub(crate) mod compute; mod vtable; pub use vtable::FoR; +pub use vtable::FoRArray; diff --git a/encodings/fastlanes/src/for/vtable/mod.rs b/encodings/fastlanes/src/for/vtable/mod.rs index 54ab93d93e4..2f3284471f6 100644 --- a/encodings/fastlanes/src/for/vtable/mod.rs +++ b/encodings/fastlanes/src/for/vtable/mod.rs @@ -12,12 +12,13 @@ use vortex_array::ExecutionCtx; use vortex_array::ExecutionResult; use vortex_array::IntoArray; use vortex_array::Precision; +use vortex_array::arrays::PrimitiveArray; use vortex_array::buffer::BufferHandle; use vortex_array::dtype::DType; use vortex_array::scalar::Scalar; use vortex_array::scalar::ScalarValue; use vortex_array::serde::ArrayChildren; -use vortex_array::stats::StatsSetRef; +use vortex_array::stats::ArrayStats; use vortex_array::vtable; use vortex_array::vtable::Array; use vortex_array::vtable::ArrayId; @@ -29,7 +30,7 @@ use vortex_error::vortex_ensure; use vortex_error::vortex_panic; use vortex_session::VortexSession; -use crate::FoRArray; +use crate::FoRData; use crate::r#for::array::for_decompress::decompress; use crate::r#for::vtable::kernels::PARENT_KERNELS; use crate::r#for::vtable::rules::PARENT_RULES; @@ -40,17 +41,17 @@ mod rules; mod slice; mod validity; -vtable!(FoR); +vtable!(FoR, FoR, FoRData); impl VTable for FoR { - type Array = FoRArray; + type Array = FoRData; type Metadata = Scalar; type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromChild; - fn vtable(_array: &Self::Array) -> &Self { + fn vtable(_array: &FoRData) -> &Self { &FoR } @@ -58,59 +59,59 @@ impl VTable for FoR { Self::ID } - fn len(array: &FoRArray) -> usize { + fn len(array: &FoRData) -> usize { array.encoded().len() } - fn dtype(array: &FoRArray) -> &DType { + fn dtype(array: &FoRData) -> &DType { array.reference_scalar().dtype() } - fn stats(array: &FoRArray) -> StatsSetRef<'_> { - array.stats_set().to_ref(array.as_ref()) + fn stats(array: &FoRData) -> &ArrayStats { + array.stats_set() } - fn array_hash(array: &FoRArray, state: &mut H, precision: Precision) { + fn array_hash(array: &Array, state: &mut H, precision: Precision) { array.encoded().array_hash(state, precision); array.reference_scalar().hash(state); } - fn array_eq(array: &FoRArray, other: &FoRArray, precision: Precision) -> bool { + fn array_eq(array: &Array, other: &Array, precision: Precision) -> bool { array.encoded().array_eq(other.encoded(), precision) && array.reference_scalar() == other.reference_scalar() } - fn nbuffers(_array: &FoRArray) -> usize { + fn nbuffers(_array: &Array) -> usize { 0 } - fn buffer(_array: &FoRArray, idx: usize) -> BufferHandle { + fn buffer(_array: &Array, idx: usize) -> BufferHandle { vortex_panic!("FoRArray buffer index {idx} out of bounds") } - fn buffer_name(_array: &FoRArray, _idx: usize) -> Option { + fn buffer_name(_array: &Array, _idx: usize) -> Option { None } - fn nchildren(_array: &FoRArray) -> usize { + fn nchildren(_array: &Array) -> usize { 1 } - fn child(array: &FoRArray, idx: usize) -> ArrayRef { + fn child(array: &Array, idx: usize) -> ArrayRef { match idx { 0 => array.encoded().clone(), _ => vortex_panic!("FoRArray child index {idx} out of bounds"), } } - fn child_name(_array: &FoRArray, idx: usize) -> String { + fn child_name(_array: &Array, idx: usize) -> String { match idx { 0 => "encoded".to_string(), _ => vortex_panic!("FoRArray child name index {idx} out of bounds"), } } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut FoRData, children: Vec) -> VortexResult<()> { // FoRArray children order (from visit_children): // 1. encoded @@ -125,7 +126,7 @@ impl VTable for FoR { Ok(()) } - fn metadata(array: &FoRArray) -> VortexResult { + fn metadata(array: &Array) -> VortexResult { Ok(array.reference_scalar().clone()) } @@ -151,7 +152,7 @@ impl VTable for FoR { metadata: &Self::Metadata, _buffers: &[BufferHandle], children: &dyn ArrayChildren, - ) -> VortexResult { + ) -> VortexResult { if children.len() != 1 { vortex_bail!( "Expected 1 child for FoR encoding, found {}", @@ -161,7 +162,7 @@ impl VTable for FoR { let encoded = children.get(0, dtype, len)?; - FoRArray::try_new(encoded, metadata.clone()) + FoRData::try_new(encoded, metadata.clone()) } fn reduce_parent( @@ -191,4 +192,14 @@ pub struct FoR; impl FoR { pub const ID: ArrayId = ArrayId::new_ref("fastlanes.for"); + + /// Construct a new FoR array from an encoded array and a reference scalar. + pub fn try_new(encoded: ArrayRef, reference: Scalar) -> VortexResult { + Ok(Array::from_inner(FoRData::try_new(encoded, reference)?)) + } + + /// Encode a primitive array using Frame of Reference encoding. + pub fn encode(array: PrimitiveArray) -> VortexResult { + Ok(Array::from_inner(FoRData::encode(array)?)) + } } diff --git a/encodings/fastlanes/src/for/vtable/operations.rs b/encodings/fastlanes/src/for/vtable/operations.rs index 21f0fed5da9..2d36d198826 100644 --- a/encodings/fastlanes/src/for/vtable/operations.rs +++ b/encodings/fastlanes/src/for/vtable/operations.rs @@ -4,15 +4,19 @@ use vortex_array::ExecutionCtx; use vortex_array::match_each_integer_ptype; use vortex_array::scalar::Scalar; +use vortex_array::vtable::Array; use vortex_array::vtable::OperationsVTable; use vortex_error::VortexExpect; use vortex_error::VortexResult; use super::FoR; -use crate::FoRArray; - +use crate::FoRData; impl OperationsVTable for FoR { - fn scalar_at(array: &FoRArray, index: usize, _ctx: &mut ExecutionCtx) -> VortexResult { + fn scalar_at( + array: &Array, + index: usize, + _ctx: &mut ExecutionCtx, + ) -> VortexResult { let encoded_pvalue = array.encoded().scalar_at(index)?; let encoded_pvalue = encoded_pvalue.as_primitive(); let reference = array.reference_scalar(); @@ -39,12 +43,9 @@ mod test { use vortex_array::arrays::PrimitiveArray; use vortex_array::assert_arrays_eq; - use crate::FoRArray; - #[test] fn for_scalar_at() { - let for_arr = - FoRArray::encode(PrimitiveArray::from_iter([-100, 1100, 1500, 1900])).unwrap(); + let for_arr = FoRData::encode(PrimitiveArray::from_iter([-100, 1100, 1500, 1900])).unwrap(); let expected = PrimitiveArray::from_iter([-100, 1100, 1500, 1900]); assert_arrays_eq!(for_arr, expected); } diff --git a/encodings/fastlanes/src/for/vtable/rules.rs b/encodings/fastlanes/src/for/vtable/rules.rs index edeffda8bd7..d33d67d1278 100644 --- a/encodings/fastlanes/src/for/vtable/rules.rs +++ b/encodings/fastlanes/src/for/vtable/rules.rs @@ -15,6 +15,7 @@ use vortex_error::VortexResult; use crate::FoR; use crate::FoRArray; +use crate::FoRData; pub(super) const PARENT_RULES: ParentRuleSet = ParentRuleSet::new(&[ // TODO: add BetweenReduceAdaptor(FoR) @@ -37,7 +38,7 @@ impl ArrayParentReduceRule for FoRFilterPushDownRule { _child_idx: usize, ) -> VortexResult> { let new_array = unsafe { - FoRArray::new_unchecked( + FoRData::new_unchecked( child.encoded.filter(parent.filter_mask().clone())?, child.reference.clone(), ) diff --git a/encodings/fastlanes/src/for/vtable/slice.rs b/encodings/fastlanes/src/for/vtable/slice.rs index 2bf9a7ff7da..9a3abb85653 100644 --- a/encodings/fastlanes/src/for/vtable/slice.rs +++ b/encodings/fastlanes/src/for/vtable/slice.rs @@ -6,16 +6,17 @@ use std::ops::Range; use vortex_array::ArrayRef; use vortex_array::IntoArray; use vortex_array::arrays::slice::SliceReduce; +use vortex_array::vtable::Array; use vortex_error::VortexResult; use crate::FoR; -use crate::FoRArray; +use crate::FoRData; impl SliceReduce for FoR { - fn slice(array: &Self::Array, range: Range) -> VortexResult> { + fn slice(array: &Array, range: Range) -> VortexResult> { // SAFETY: Just slicing encoded data does not affect FOR. Ok(Some(unsafe { - FoRArray::new_unchecked( + FoRData::new_unchecked( array.encoded().slice(range)?, array.reference_scalar().clone(), ) diff --git a/encodings/fastlanes/src/for/vtable/validity.rs b/encodings/fastlanes/src/for/vtable/validity.rs index 3b86795d458..2131f0ba2f4 100644 --- a/encodings/fastlanes/src/for/vtable/validity.rs +++ b/encodings/fastlanes/src/for/vtable/validity.rs @@ -5,10 +5,10 @@ use vortex_array::ArrayRef; use vortex_array::vtable::ValidityChild; use super::FoR; -use crate::FoRArray; +use crate::FoRData; impl ValidityChild for FoR { - fn validity_child(array: &FoRArray) -> &ArrayRef { + fn validity_child(array: &FoRData) -> &ArrayRef { array.encoded() } } diff --git a/encodings/fastlanes/src/rle/array/mod.rs b/encodings/fastlanes/src/rle/array/mod.rs index 6faa1951999..9e4c46cf74c 100644 --- a/encodings/fastlanes/src/rle/array/mod.rs +++ b/encodings/fastlanes/src/rle/array/mod.rs @@ -15,7 +15,7 @@ pub mod rle_compress; pub mod rle_decompress; #[derive(Clone, Debug)] -pub struct RLEArray { +pub struct RLEData { pub(super) dtype: DType, /// Run value in the dictionary. pub(super) values: ArrayRef, @@ -38,7 +38,7 @@ pub struct RLEArray { pub(super) length: usize, } -impl RLEArray { +impl RLEData { fn validate( values: &ArrayRef, indices: &ArrayRef, @@ -234,7 +234,6 @@ mod tests { use vortex_session::registry::ReadContext; use crate::FL_CHUNK_SIZE; - use crate::RLEArray; use crate::test::SESSION; #[test] @@ -246,7 +245,7 @@ mod tests { PrimitiveArray::from_iter([0u16, 0, 1, 1, 2].iter().cycle().take(1024).copied()) .into_array(); let values_idx_offsets = PrimitiveArray::from_iter([0u64]).into_array(); - let rle_array = RLEArray::try_new(values, indices, values_idx_offsets, 0, 5).unwrap(); + let rle_array = RLEData::try_new(values, indices, values_idx_offsets, 0, 5).unwrap(); assert_eq!(rle_array.len(), 5); assert_eq!(rle_array.values().len(), 3); @@ -273,7 +272,7 @@ mod tests { ) .into_array(); - let rle_array = RLEArray::try_new( + let rle_array = RLEData::try_new( values.clone(), indices_with_validity, values_idx_offsets, @@ -309,7 +308,7 @@ mod tests { ) .into_array(); - let rle_array = RLEArray::try_new( + let rle_array = RLEData::try_new( values.clone(), indices_with_validity, values_idx_offsets, @@ -346,7 +345,7 @@ mod tests { ) .into_array(); - let rle_array = RLEArray::try_new( + let rle_array = RLEData::try_new( values.clone(), indices_with_validity, values_idx_offsets, @@ -388,7 +387,7 @@ mod tests { ) .into_array(); - let rle_array = RLEArray::try_new( + let rle_array = RLEData::try_new( values.clone(), indices_with_validity, values_idx_offsets, @@ -415,7 +414,7 @@ mod tests { let values = PrimitiveArray::from_iter(Vec::::new()).into_array(); let indices = PrimitiveArray::from_iter(Vec::::new()).into_array(); let values_idx_offsets = PrimitiveArray::from_iter(Vec::::new()).into_array(); - let rle_array = RLEArray::try_new( + let rle_array = RLEData::try_new( values, indices.clone(), values_idx_offsets, @@ -433,7 +432,7 @@ mod tests { let values = PrimitiveArray::from_iter([10u32, 20, 30, 40]).into_array(); let indices = PrimitiveArray::from_iter([0u16, 1].repeat(1024)).into_array(); let values_idx_offsets = PrimitiveArray::from_iter([0u64, 2]).into_array(); - let rle_array = RLEArray::try_new(values, indices, values_idx_offsets, 0, 2048).unwrap(); + let rle_array = RLEData::try_new(values, indices, values_idx_offsets, 0, 2048).unwrap(); assert_eq!(rle_array.len(), 2048); assert_eq!(rle_array.values().len(), 4); @@ -445,7 +444,7 @@ mod tests { #[test] fn test_rle_serialization() { let primitive = PrimitiveArray::from_iter((0..2048).map(|i| (i / 100) as u32)); - let rle_array = RLEArray::encode(&primitive).unwrap(); + let rle_array = RLEData::encode(&primitive).unwrap(); assert_eq!(rle_array.len(), 2048); let original_data = rle_array.to_primitive(); @@ -480,9 +479,9 @@ mod tests { #[test] fn test_rle_serialization_slice() { let primitive = PrimitiveArray::from_iter((0..2048).map(|i| (i / 100) as u32)); - let rle_array = RLEArray::encode(&primitive).unwrap(); + let rle_array = RLEData::encode(&primitive).unwrap(); - let sliced = RLEArray::try_new( + let sliced = RLEData::try_new( rle_array.values().clone(), rle_array.indices().clone(), rle_array.values_idx_offsets().clone(), @@ -539,17 +538,17 @@ mod tests { // Chunk 1 (positions 1024..) is all-null. let original = PrimitiveArray::from_option_iter(values); - let rle = RLEArray::encode(&original)?; + let rle = RLEData::encode(&original)?; // Simulate cascading compression: narrow u16→u8 then re-encode with RLE, // matching the path taken by the BtrBlocks compressor. let indices_prim = rle.indices().to_primitive().narrow()?; - let re_encoded = RLEArray::encode(&indices_prim)?; + let re_encoded = RLEData::encode(&indices_prim)?; // Reconstruct the outer RLE with re-encoded indices. // SAFETY: we only replace the indices child; all other invariants hold. let reconstructed = unsafe { - RLEArray::new_unchecked( + RLEData::new_unchecked( rle.values().clone(), re_encoded.into_array(), rle.values_idx_offsets().clone(), diff --git a/encodings/fastlanes/src/rle/array/rle_compress.rs b/encodings/fastlanes/src/rle/array/rle_compress.rs index 51cf30c447e..01047a156c4 100644 --- a/encodings/fastlanes/src/rle/array/rle_compress.rs +++ b/encodings/fastlanes/src/rle/array/rle_compress.rs @@ -10,16 +10,15 @@ use vortex_array::arrays::primitive::NativeValue; use vortex_array::dtype::NativePType; use vortex_array::match_each_native_ptype; use vortex_array::validity::Validity; -use vortex_array::vtable::ValidityHelper; use vortex_buffer::BitBufferMut; use vortex_buffer::BufferMut; use vortex_error::VortexResult; use crate::FL_CHUNK_SIZE; -use crate::RLEArray; +use crate::RLEData; use crate::fill_forward_nulls; -impl RLEArray { +impl RLEData { /// Encodes a primitive array of unsigned integers using FastLanes RLE. pub fn encode(array: &PrimitiveArray) -> VortexResult { match_each_native_ptype!(array.ptype(), |T| { rle_encode_typed::(array) }) @@ -29,7 +28,7 @@ impl RLEArray { /// Encodes a primitive array of unsigned integers using FastLanes RLE. /// /// In case the input array length is % 1024 != 0, the last chunk is padded. -fn rle_encode_typed(array: &PrimitiveArray) -> VortexResult +fn rle_encode_typed(array: &PrimitiveArray) -> VortexResult where T: NativePType + RLE, NativeValue: RLE, @@ -98,7 +97,7 @@ where // SAFETY: NativeValue is repr(transparent) to T. let values_buf = unsafe { values_buf.transmute::().freeze() }; - RLEArray::try_new( + RLEData::try_new( values_buf.into_array(), PrimitiveArray::new(indices_buf.freeze(), padded_validity(array)).into_array(), values_idx_offsets.into_array(), @@ -149,7 +148,7 @@ mod tests { // u8 let array_u8: Buffer = buffer![1, 1, 2, 2, 3, 3]; let encoded_u8 = - RLEArray::encode(&PrimitiveArray::new(array_u8, Validity::NonNullable)).unwrap(); + RLEData::encode(&PrimitiveArray::new(array_u8, Validity::NonNullable)).unwrap(); let decoded_u8 = encoded_u8.to_primitive(); let expected_u8 = PrimitiveArray::from_iter(vec![1u8, 1, 2, 2, 3, 3]); assert_arrays_eq!(decoded_u8, expected_u8); @@ -157,7 +156,7 @@ mod tests { // u16 let array_u16: Buffer = buffer![100, 100, 200, 200]; let encoded_u16 = - RLEArray::encode(&PrimitiveArray::new(array_u16, Validity::NonNullable)).unwrap(); + RLEData::encode(&PrimitiveArray::new(array_u16, Validity::NonNullable)).unwrap(); let decoded_u16 = encoded_u16.to_primitive(); let expected_u16 = PrimitiveArray::from_iter(vec![100u16, 100, 200, 200]); assert_arrays_eq!(decoded_u16, expected_u16); @@ -165,7 +164,7 @@ mod tests { // u64 let array_u64: Buffer = buffer![1000, 1000, 2000]; let encoded_u64 = - RLEArray::encode(&PrimitiveArray::new(array_u64, Validity::NonNullable)).unwrap(); + RLEData::encode(&PrimitiveArray::new(array_u64, Validity::NonNullable)).unwrap(); let decoded_u64 = encoded_u64.to_primitive(); let expected_u64 = PrimitiveArray::from_iter(vec![1000u64, 1000, 2000]); assert_arrays_eq!(decoded_u64, expected_u64); @@ -174,16 +173,14 @@ mod tests { #[test] fn test_length() { let values: Buffer = buffer![1, 1, 2, 2, 2, 3]; - let encoded = - RLEArray::encode(&PrimitiveArray::new(values, Validity::NonNullable)).unwrap(); + let encoded = RLEData::encode(&PrimitiveArray::new(values, Validity::NonNullable)).unwrap(); assert_eq!(encoded.len(), 6); } #[test] fn test_empty_length() { let values: Buffer = Buffer::empty(); - let encoded = - RLEArray::encode(&PrimitiveArray::new(values, Validity::NonNullable)).unwrap(); + let encoded = RLEData::encode(&PrimitiveArray::new(values, Validity::NonNullable)).unwrap(); assert_eq!(encoded.len(), 0); assert_eq!(encoded.values().len(), 0); @@ -193,8 +190,7 @@ mod tests { fn test_single_value() { let values: Buffer = vec![42; 2000].into_iter().collect(); - let encoded = - RLEArray::encode(&PrimitiveArray::new(values, Validity::NonNullable)).unwrap(); + let encoded = RLEData::encode(&PrimitiveArray::new(values, Validity::NonNullable)).unwrap(); assert_eq!(encoded.values().len(), 2); // 2 chunks, each storing value 42 let decoded = encoded.to_primitive(); // Verify round-trip @@ -206,8 +202,7 @@ mod tests { fn test_all_different() { let values: Buffer = (0u8..=255).collect(); - let encoded = - RLEArray::encode(&PrimitiveArray::new(values, Validity::NonNullable)).unwrap(); + let encoded = RLEData::encode(&PrimitiveArray::new(values, Validity::NonNullable)).unwrap(); assert_eq!(encoded.values().len(), 256); let decoded = encoded.to_primitive(); // Verify round-trip @@ -221,7 +216,7 @@ mod tests { let values: Buffer = (0..1500).map(|i| (i / 100) as u32).collect(); let array = PrimitiveArray::new(values, Validity::NonNullable); - let encoded = RLEArray::encode(&array).unwrap(); + let encoded = RLEData::encode(&array).unwrap(); assert_eq!(encoded.len(), 1500); assert_arrays_eq!(encoded, array); @@ -235,7 +230,7 @@ mod tests { let values: Buffer = (0..2048).map(|i| (i / 100) as u32).collect(); let array = PrimitiveArray::new(values, Validity::NonNullable); - let encoded = RLEArray::encode(&array).unwrap(); + let encoded = RLEData::encode(&array).unwrap(); assert_eq!(encoded.len(), 2048); assert_arrays_eq!(encoded, array); @@ -256,7 +251,7 @@ mod tests { #[case::f64((-2000..2000).map(|i| i as f64).collect::>())] fn test_roundtrip_primitive_types(#[case] values: Buffer) { let primitive = values.clone().into_array().to_primitive(); - let result = RLEArray::encode(&primitive).unwrap(); + let result = RLEData::encode(&primitive).unwrap(); let decoded = result.to_primitive(); let expected = PrimitiveArray::new(values, primitive.validity().clone()); assert_arrays_eq!(decoded, expected); @@ -270,7 +265,7 @@ mod tests { #[case(vec![0f64, -0f64])] fn test_float_zeros(#[case] values: Vec) { let primitive = PrimitiveArray::from_iter(values); - let rle = RLEArray::encode(&primitive).unwrap(); + let rle = RLEData::encode(&primitive).unwrap(); let decoded = rle.to_primitive(); assert_arrays_eq!(primitive, decoded); } diff --git a/encodings/fastlanes/src/rle/array/rle_decompress.rs b/encodings/fastlanes/src/rle/array/rle_decompress.rs index 4bd5ac276ec..e5dada76553 100644 --- a/encodings/fastlanes/src/rle/array/rle_decompress.rs +++ b/encodings/fastlanes/src/rle/array/rle_decompress.rs @@ -19,6 +19,7 @@ use vortex_error::vortex_panic; use crate::FL_CHUNK_SIZE; use crate::RLEArray; +use crate::RLEData; /// Decompresses an RLE array back into a primitive array. #[expect( diff --git a/encodings/fastlanes/src/rle/compute/cast.rs b/encodings/fastlanes/src/rle/compute/cast.rs index fca72d5afce..c051823e020 100644 --- a/encodings/fastlanes/src/rle/compute/cast.rs +++ b/encodings/fastlanes/src/rle/compute/cast.rs @@ -8,9 +8,9 @@ use vortex_array::dtype::DType; use vortex_array::scalar_fn::fns::cast::CastReduce; use vortex_error::VortexResult; +use crate::RLEData; use crate::rle::RLE; use crate::rle::RLEArray; - impl CastReduce for RLE { fn cast(array: &RLEArray, dtype: &DType) -> VortexResult> { // Cast RLE values. @@ -27,7 +27,7 @@ impl CastReduce for RLE { }; Ok(Some(unsafe { - RLEArray::new_unchecked( + RLEData::new_unchecked( casted_values, casted_indices, array.values_idx_offsets().clone(), @@ -63,7 +63,7 @@ mod tests { Buffer::from_iter([10u8, 20, 30, 40, 50]), Validity::from_iter([true, true, true, true, true]), ); - let rle = RLEArray::encode(&primitive).unwrap(); + let rle = RLEData::encode(&primitive).unwrap(); let casted = rle .into_array() @@ -79,7 +79,7 @@ mod tests { Buffer::from_iter([10u8, 20, 30, 40, 50]), Validity::from_iter([true, false, true, true, false]), ); - let rle = RLEArray::encode(&primitive).unwrap(); + let rle = RLEData::encode(&primitive).unwrap(); rle.into_array() .cast(DType::Primitive(PType::U8, Nullability::NonNullable)) .and_then(|a| a.to_canonical().map(|c| c.into_array())) @@ -136,7 +136,7 @@ mod tests { ) )] fn test_cast_rle_conformance(#[case] primitive: PrimitiveArray) { - let rle_array = RLEArray::encode(&primitive).unwrap(); + let rle_array = RLEData::encode(&primitive).unwrap(); test_cast_conformance(&rle_array.into_array()); } } diff --git a/encodings/fastlanes/src/rle/kernel.rs b/encodings/fastlanes/src/rle/kernel.rs index 6d0064b0191..b60cb314344 100644 --- a/encodings/fastlanes/src/rle/kernel.rs +++ b/encodings/fastlanes/src/rle/kernel.rs @@ -14,6 +14,7 @@ use vortex_error::VortexResult; use crate::FL_CHUNK_SIZE; use crate::RLE; use crate::RLEArray; +use crate::RLEData; pub(crate) static PARENT_KERNELS: ParentKernelSet = ParentKernelSet::new(&[ParentKernelSet::lift(&SliceExecuteAdaptor(RLE))]); @@ -47,7 +48,7 @@ impl SliceKernel for RLE { // SAFETY: Slicing preserves all invariants. Ok(Some(unsafe { - RLEArray::new_unchecked( + RLEData::new_unchecked( sliced_values, sliced_indices, sliced_values_idx_offsets, diff --git a/encodings/fastlanes/src/rle/mod.rs b/encodings/fastlanes/src/rle/mod.rs index 2fa51dd5929..1dd0b644156 100644 --- a/encodings/fastlanes/src/rle/mod.rs +++ b/encodings/fastlanes/src/rle/mod.rs @@ -2,10 +2,11 @@ // SPDX-FileCopyrightText: Copyright the Vortex contributors mod array; -pub use array::RLEArray; +pub use array::RLEData; mod compute; mod kernel; mod vtable; pub use vtable::RLE; +pub use vtable::RLEArray; diff --git a/encodings/fastlanes/src/rle/vtable/mod.rs b/encodings/fastlanes/src/rle/vtable/mod.rs index c82c94d9c0a..d93561d6421 100644 --- a/encodings/fastlanes/src/rle/vtable/mod.rs +++ b/encodings/fastlanes/src/rle/vtable/mod.rs @@ -13,12 +13,13 @@ use vortex_array::ExecutionResult; use vortex_array::IntoArray; use vortex_array::Precision; use vortex_array::ProstMetadata; +use vortex_array::arrays::PrimitiveArray; use vortex_array::buffer::BufferHandle; use vortex_array::dtype::DType; use vortex_array::dtype::Nullability; use vortex_array::dtype::PType; use vortex_array::serde::ArrayChildren; -use vortex_array::stats::StatsSetRef; +use vortex_array::stats::ArrayStats; use vortex_array::vtable; use vortex_array::vtable::Array; use vortex_array::vtable::ArrayId; @@ -29,7 +30,7 @@ use vortex_error::vortex_ensure; use vortex_error::vortex_panic; use vortex_session::VortexSession; -use crate::RLEArray; +use crate::RLEData; use crate::rle::array::rle_decompress::rle_decompress; use crate::rle::kernel::PARENT_KERNELS; use crate::rle::vtable::rules::RULES; @@ -38,7 +39,7 @@ mod operations; mod rules; mod validity; -vtable!(RLE); +vtable!(RLE, RLE, RLEData); #[derive(Clone, prost::Message)] pub struct RLEMetadata { @@ -57,14 +58,14 @@ pub struct RLEMetadata { } impl VTable for RLE { - type Array = RLEArray; + type Array = RLEData; type Metadata = ProstMetadata; type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromChildSliceHelper; - fn vtable(_array: &Self::Array) -> &Self { + fn vtable(_array: &RLEData) -> &Self { &RLE } @@ -72,19 +73,19 @@ impl VTable for RLE { Self::ID } - fn len(array: &RLEArray) -> usize { + fn len(array: &RLEData) -> usize { array.len() } - fn dtype(array: &RLEArray) -> &DType { + fn dtype(array: &RLEData) -> &DType { array.dtype() } - fn stats(array: &RLEArray) -> StatsSetRef<'_> { - array.stats_set().to_ref(array.as_ref()) + fn stats(array: &RLEData) -> &ArrayStats { + array.stats_set() } - fn array_hash(array: &RLEArray, state: &mut H, precision: Precision) { + fn array_hash(array: &Array, state: &mut H, precision: Precision) { array.dtype().hash(state); array.values().array_hash(state, precision); array.indices().array_hash(state, precision); @@ -93,7 +94,7 @@ impl VTable for RLE { array.len().hash(state); } - fn array_eq(array: &RLEArray, other: &RLEArray, precision: Precision) -> bool { + fn array_eq(array: &Array, other: &Array, precision: Precision) -> bool { array.dtype() == other.dtype() && array.values().array_eq(other.values(), precision) && array.indices().array_eq(other.indices(), precision) @@ -104,23 +105,23 @@ impl VTable for RLE { && array.len() == other.len() } - fn nbuffers(_array: &RLEArray) -> usize { + fn nbuffers(_array: &Array) -> usize { 0 } - fn buffer(_array: &RLEArray, idx: usize) -> BufferHandle { + fn buffer(_array: &Array, idx: usize) -> BufferHandle { vortex_panic!("RLEArray buffer index {idx} out of bounds") } - fn buffer_name(_array: &RLEArray, _idx: usize) -> Option { + fn buffer_name(_array: &Array, _idx: usize) -> Option { None } - fn nchildren(_array: &RLEArray) -> usize { + fn nchildren(_array: &Array) -> usize { 3 } - fn child(array: &RLEArray, idx: usize) -> ArrayRef { + fn child(array: &Array, idx: usize) -> ArrayRef { match idx { 0 => array.values().clone(), 1 => array.indices().clone(), @@ -129,7 +130,7 @@ impl VTable for RLE { } } - fn child_name(_array: &RLEArray, idx: usize) -> String { + fn child_name(_array: &Array, idx: usize) -> String { match idx { 0 => "values".to_string(), 1 => "indices".to_string(), @@ -146,7 +147,7 @@ impl VTable for RLE { RULES.evaluate(array, parent, child_idx) } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut RLEData, children: Vec) -> VortexResult<()> { // RLEArray children order (from visit_children): // 1. values // 2. indices @@ -165,7 +166,7 @@ impl VTable for RLE { Ok(()) } - fn metadata(array: &RLEArray) -> VortexResult { + fn metadata(array: &Array) -> VortexResult { Ok(ProstMetadata(RLEMetadata { values_len: array.values().len() as u64, indices_len: array.indices().len() as u64, @@ -196,7 +197,7 @@ impl VTable for RLE { metadata: &Self::Metadata, _buffers: &[BufferHandle], children: &dyn ArrayChildren, - ) -> VortexResult { + ) -> VortexResult { let metadata = &metadata.0; let values = children.get( 0, @@ -219,7 +220,7 @@ impl VTable for RLE { usize::try_from(metadata.values_idx_offsets_len)?, )?; - RLEArray::try_new( + RLEData::try_new( values, indices, values_idx_offsets, @@ -249,6 +250,28 @@ pub struct RLE; impl RLE { pub const ID: ArrayId = ArrayId::new_ref("fastlanes.rle"); + + /// Create a new RLE array without validation. + /// + /// # Safety + /// See [`RLEData::new_unchecked`] for preconditions. + pub unsafe fn new_unchecked( + values: ArrayRef, + indices: ArrayRef, + values_idx_offsets: ArrayRef, + dtype: DType, + offset: usize, + length: usize, + ) -> RLEArray { + Array::from_inner(unsafe { + RLEData::new_unchecked(values, indices, values_idx_offsets, dtype, offset, length) + }) + } + + /// Encode a primitive array using FastLanes RLE. + pub fn encode(array: &PrimitiveArray) -> VortexResult { + Ok(Array::from_inner(RLEData::encode(array)?)) + } } #[cfg(test)] diff --git a/encodings/fastlanes/src/rle/vtable/operations.rs b/encodings/fastlanes/src/rle/vtable/operations.rs index 9f00432c727..c26657fef09 100644 --- a/encodings/fastlanes/src/rle/vtable/operations.rs +++ b/encodings/fastlanes/src/rle/vtable/operations.rs @@ -3,16 +3,21 @@ use vortex_array::ExecutionCtx; use vortex_array::scalar::Scalar; +use vortex_array::vtable::Array; use vortex_array::vtable::OperationsVTable; use vortex_error::VortexExpect; use vortex_error::VortexResult; use super::RLE; use crate::FL_CHUNK_SIZE; -use crate::RLEArray; +use crate::RLEData; impl OperationsVTable for RLE { - fn scalar_at(array: &RLEArray, index: usize, _ctx: &mut ExecutionCtx) -> VortexResult { + fn scalar_at( + array: &Array, + index: usize, + _ctx: &mut ExecutionCtx, + ) -> VortexResult { let offset_in_chunk = array.offset(); let chunk_relative_idx = array.indices().scalar_at(offset_in_chunk + index)?; @@ -60,7 +65,7 @@ mod tests { .into_array(); let values_idx_offsets = PrimitiveArray::from_iter([0u64]).into_array(); - RLEArray::try_new( + RLEData::try_new( values, indices.clone(), values_idx_offsets, @@ -95,7 +100,7 @@ mod tests { ) .into_array(); - RLEArray::try_new( + RLEData::try_new( values, indices.clone(), values_idx_offsets, @@ -163,7 +168,7 @@ mod tests { let expected: Vec = (0..3000).map(|i| (i / 50) as u16).collect(); let array = values.into_array(); - let encoded = RLEArray::encode(&array.to_primitive()).unwrap(); + let encoded = RLEData::encode(&array.to_primitive()).unwrap(); // Access scalars from multiple chunks. for &idx in &[1023, 1024, 1025, 2047, 2048, 2049] { @@ -269,7 +274,7 @@ mod tests { let expected: Vec = (0..2100).map(|i| (i / 100) as u32).collect(); let array = values.into_array(); - let encoded = RLEArray::encode(&array.to_primitive()).unwrap(); + let encoded = RLEData::encode(&array.to_primitive()).unwrap(); // Slice across first and second chunk. let slice = encoded.slice(500..1500).unwrap(); diff --git a/encodings/fastlanes/src/rle/vtable/validity.rs b/encodings/fastlanes/src/rle/vtable/validity.rs index a8c2756b41e..f46998774cd 100644 --- a/encodings/fastlanes/src/rle/vtable/validity.rs +++ b/encodings/fastlanes/src/rle/vtable/validity.rs @@ -6,15 +6,15 @@ use vortex_array::vtable::ValidityChild; use vortex_array::vtable::ValidityChildSliceHelper; use super::RLE; -use crate::RLEArray; +use crate::RLEData; impl ValidityChild for RLE { - fn validity_child(array: &RLEArray) -> &ArrayRef { + fn validity_child(array: &RLEData) -> &ArrayRef { array.indices() } } -impl ValidityChildSliceHelper for RLEArray { +impl ValidityChildSliceHelper for RLEData { fn unsliced_child_and_slice(&self) -> (&ArrayRef, usize, usize) { let (start, len) = (self.offset(), self.len()); (self.indices(), start, start + len) diff --git a/encodings/fsst/benches/fsst_compress.rs b/encodings/fsst/benches/fsst_compress.rs index 96854f824a6..a7dc915ee78 100644 --- a/encodings/fsst/benches/fsst_compress.rs +++ b/encodings/fsst/benches/fsst_compress.rs @@ -57,14 +57,18 @@ fn compress_fsst(bencher: Bencher, (string_count, avg_len, unique_chars): (usize let compressor = fsst_train_compressor(&array); bencher .with_inputs(|| (&array, &compressor)) - .bench_refs(|(array, compressor)| fsst_compress(*array, compressor)) + .bench_refs(|(array, compressor)| { + fsst_compress(*array, array.len(), array.dtype(), compressor) + }) } #[divan::bench(args = BENCH_ARGS)] fn decompress_fsst(bencher: Bencher, (string_count, avg_len, unique_chars): (usize, usize, u8)) { let array = generate_test_data(string_count, avg_len, unique_chars); let compressor = fsst_train_compressor(&array); - let encoded = fsst_compress(array, &compressor); + let len = array.len(); + let dtype = array.dtype().clone(); + let encoded = fsst_compress(array, len, &dtype, &compressor); bencher .with_inputs(|| &encoded) @@ -83,7 +87,7 @@ fn train_compressor(bencher: Bencher, (string_count, avg_len, unique_chars): (us fn pushdown_compare(bencher: Bencher, (string_count, avg_len, unique_chars): (usize, usize, u8)) { let array = generate_test_data(string_count, avg_len, unique_chars); let compressor = fsst_train_compressor(&array); - let fsst_array = fsst_compress(&array, &compressor); + let fsst_array = fsst_compress(&array, array.len(), array.dtype(), &compressor); let constant = ConstantArray::new(Scalar::from(&b"const"[..]), array.len()); bencher @@ -112,7 +116,7 @@ fn canonicalize_compare( ) { let array = generate_test_data(string_count, avg_len, unique_chars); let compressor = fsst_train_compressor(&array); - let fsst_array = fsst_compress(&array, &compressor); + let fsst_array = fsst_compress(&array, array.len(), array.dtype(), &compressor); let constant = ConstantArray::new(Scalar::from(&b"const"[..]), array.len()); bencher @@ -215,7 +219,9 @@ fn generate_chunked_test_data( .map(|_| { let array = generate_test_data(string_count, avg_len, unique_chars); let compressor = fsst_train_compressor(&array); - fsst_compress(array, &compressor).into_array() + let len = array.len(); + let dtype = array.dtype().clone(); + fsst_compress(array, len, &dtype, &compressor).into_array() }) .collect::() } diff --git a/encodings/fsst/benches/fsst_url_compare.rs b/encodings/fsst/benches/fsst_url_compare.rs index 1b11e49a5ce..37a1c1a9d56 100644 --- a/encodings/fsst/benches/fsst_url_compare.rs +++ b/encodings/fsst/benches/fsst_url_compare.rs @@ -56,7 +56,7 @@ fn pick_url_with_domain(data: &VarBinArray, domain: &str) -> String { fn eq_pushdown_high_match(bencher: Bencher) { let data = &*URL_DATA; let compressor = fsst_train_compressor(data); - let fsst_array = fsst_compress(data, &compressor); + let fsst_array = fsst_compress(data, data.len(), data.dtype(), &compressor); let match_url = pick_url_with_domain(data, HIGH_MATCH_DOMAIN); let constant = ConstantArray::new(Scalar::from(match_url.as_str()), NUM_URLS); @@ -77,7 +77,7 @@ fn eq_pushdown_high_match(bencher: Bencher) { fn eq_pushdown_low_match(bencher: Bencher) { let data = &*URL_DATA; let compressor = fsst_train_compressor(data); - let fsst_array = fsst_compress(data, &compressor); + let fsst_array = fsst_compress(data, data.len(), data.dtype(), &compressor); let match_url = pick_url_with_domain(data, LOW_MATCH_DOMAIN); let constant = ConstantArray::new(Scalar::from(match_url.as_str()), NUM_URLS); @@ -98,7 +98,7 @@ fn eq_pushdown_low_match(bencher: Bencher) { fn eq_canonicalize_high_match(bencher: Bencher) { let data = &*URL_DATA; let compressor = fsst_train_compressor(data); - let fsst_array = fsst_compress(data, &compressor); + let fsst_array = fsst_compress(data, data.len(), data.dtype(), &compressor); let match_url = pick_url_with_domain(data, HIGH_MATCH_DOMAIN); let constant = ConstantArray::new(Scalar::from(match_url.as_str()), NUM_URLS); @@ -121,7 +121,7 @@ fn eq_canonicalize_high_match(bencher: Bencher) { fn eq_canonicalize_low_match(bencher: Bencher) { let data = &*URL_DATA; let compressor = fsst_train_compressor(data); - let fsst_array = fsst_compress(data, &compressor); + let fsst_array = fsst_compress(data, data.len(), data.dtype(), &compressor); let match_url = pick_url_with_domain(data, LOW_MATCH_DOMAIN); let constant = ConstantArray::new(Scalar::from(match_url.as_str()), NUM_URLS); @@ -148,7 +148,7 @@ fn eq_canonicalize_low_match(bencher: Bencher) { fn like_substr_high_match(bencher: Bencher) { let data = &*URL_DATA; let compressor = fsst_train_compressor(data); - let fsst_array = fsst_compress(data, &compressor); + let fsst_array = fsst_compress(data, data.len(), data.dtype(), &compressor); let pattern = format!("%{HIGH_MATCH_DOMAIN}%"); let expr = like(root(), lit(pattern.as_str())); @@ -169,7 +169,7 @@ fn like_substr_high_match(bencher: Bencher) { fn like_substr_low_match(bencher: Bencher) { let data = &*URL_DATA; let compressor = fsst_train_compressor(data); - let fsst_array = fsst_compress(data, &compressor); + let fsst_array = fsst_compress(data, data.len(), data.dtype(), &compressor); let pattern = format!("%{LOW_MATCH_DOMAIN}%"); let expr = like(root(), lit(pattern.as_str())); diff --git a/encodings/fsst/public-api.lock b/encodings/fsst/public-api.lock index f5d3c61381b..7c6a068fdbe 100644 --- a/encodings/fsst/public-api.lock +++ b/encodings/fsst/public-api.lock @@ -86,7 +86,7 @@ pub fn vortex_fsst::FSST::reduce_parent(array: &vortex_array::vtable::typed::Arr pub fn vortex_fsst::FSST::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_fsst::FSST::stats(array: &vortex_fsst::FSSTArray) -> vortex_array::stats::array::StatsSetRef<'_> +pub fn vortex_fsst::FSST::stats(array: &vortex_fsst::FSSTArray) -> &vortex_array::stats::array::ArrayStats pub fn vortex_fsst::FSST::vtable(_array: &Self::Array) -> &Self diff --git a/encodings/fsst/src/array.rs b/encodings/fsst/src/array.rs index d537201450b..78e8d8edaf4 100644 --- a/encodings/fsst/src/array.rs +++ b/encodings/fsst/src/array.rs @@ -32,7 +32,6 @@ use vortex_array::dtype::Nullability; use vortex_array::dtype::PType; use vortex_array::serde::ArrayChildren; use vortex_array::stats::ArrayStats; -use vortex_array::stats::StatsSetRef; use vortex_array::validity::Validity; use vortex_array::vtable; use vortex_array::vtable::Array; @@ -57,7 +56,7 @@ use crate::canonical::fsst_decode_views; use crate::kernel::PARENT_KERNELS; use crate::rules::RULES; -vtable!(FSST); +vtable!(FSST, FSST, FSSTData); #[derive(Clone, prost::Message)] pub struct FSSTMetadata { @@ -76,7 +75,7 @@ impl FSSTMetadata { } impl VTable for FSST { - type Array = FSSTArray; + type Array = FSSTData; type Metadata = ProstMetadata; type OperationsVTable = Self; @@ -90,27 +89,31 @@ impl VTable for FSST { Self::ID } - fn len(array: &FSSTArray) -> usize { + fn len(array: &FSSTData) -> usize { array.codes().len() } - fn dtype(array: &FSSTArray) -> &DType { + fn dtype(array: &FSSTData) -> &DType { &array.dtype } - fn stats(array: &FSSTArray) -> StatsSetRef<'_> { - array.stats_set.to_ref(array.as_ref()) + fn stats(array: &FSSTData) -> &ArrayStats { + &array.stats_set } - fn array_hash(array: &FSSTArray, state: &mut H, precision: Precision) { + fn array_hash(array: &Array, state: &mut H, precision: Precision) { array.dtype.hash(state); array.symbols.array_hash(state, precision); array.symbol_lengths.array_hash(state, precision); - array.codes.as_ref().array_hash(state, precision); + array + .codes + .clone() + .into_array() + .array_hash(state, precision); array.uncompressed_lengths.array_hash(state, precision); } - fn array_eq(array: &FSSTArray, other: &FSSTArray, precision: Precision) -> bool { + fn array_eq(array: &Array, other: &Array, precision: Precision) -> bool { array.dtype == other.dtype && array.symbols.array_eq(&other.symbols, precision) && array @@ -118,18 +121,19 @@ impl VTable for FSST { .array_eq(&other.symbol_lengths, precision) && array .codes - .as_ref() - .array_eq(other.codes.as_ref(), precision) + .clone() + .into_array() + .array_eq(&other.codes.clone().into_array(), precision) && array .uncompressed_lengths .array_eq(&other.uncompressed_lengths, precision) } - fn nbuffers(_array: &FSSTArray) -> usize { + fn nbuffers(_array: &Array) -> usize { 3 } - fn buffer(array: &FSSTArray, idx: usize) -> BufferHandle { + fn buffer(array: &Array, idx: usize) -> BufferHandle { match idx { 0 => BufferHandle::new_host(array.symbols().clone().into_byte_buffer()), 1 => BufferHandle::new_host(array.symbol_lengths().clone().into_byte_buffer()), @@ -138,7 +142,7 @@ impl VTable for FSST { } } - fn buffer_name(_array: &FSSTArray, idx: usize) -> Option { + fn buffer_name(_array: &Array, idx: usize) -> Option { match idx { 0 => Some("symbols".to_string()), 1 => Some("symbol_lengths".to_string()), @@ -147,11 +151,11 @@ impl VTable for FSST { } } - fn nchildren(array: &FSSTArray) -> usize { + fn nchildren(array: &Array) -> usize { 2 + validity_nchildren(array.codes.validity()) } - fn child(array: &FSSTArray, idx: usize) -> ArrayRef { + fn child(array: &Array, idx: usize) -> ArrayRef { match idx { 0 => array.uncompressed_lengths().clone(), 1 => array.codes.offsets().clone(), @@ -161,7 +165,7 @@ impl VTable for FSST { } } - fn child_name(_array: &FSSTArray, idx: usize) -> String { + fn child_name(_array: &Array, idx: usize) -> String { match idx { 0 => "uncompressed_lengths".to_string(), 1 => "codes_offsets".to_string(), @@ -170,7 +174,7 @@ impl VTable for FSST { } } - fn metadata(array: &FSSTArray) -> VortexResult { + fn metadata(array: &Array) -> VortexResult { Ok(ProstMetadata(FSSTMetadata { uncompressed_lengths_ptype: array.uncompressed_lengths().dtype().as_ptype().into(), codes_offsets_ptype: array.codes.offsets().dtype().as_ptype().into(), @@ -194,7 +198,7 @@ impl VTable for FSST { } fn append_to_builder( - array: &FSSTArray, + array: &Array, builder: &mut dyn ArrayBuilder, ctx: &mut ExecutionCtx, ) -> VortexResult<()> { @@ -223,7 +227,7 @@ impl VTable for FSST { metadata: &Self::Metadata, buffers: &[BufferHandle], children: &dyn ArrayChildren, - ) -> VortexResult { + ) -> VortexResult { let symbols = Buffer::::from_byte_buffer(buffers[0].clone().try_to_host_sync()?); let symbol_lengths = Buffer::::from_byte_buffer(buffers[1].clone().try_to_host_sync()?); @@ -251,7 +255,7 @@ impl VTable for FSST { len, )?; - return FSSTArray::try_new( + return FSSTData::try_new( dtype.clone(), symbols, symbol_lengths, @@ -298,7 +302,7 @@ impl VTable for FSST { codes_validity, )?; - return FSSTArray::try_new( + return FSSTData::try_new( dtype.clone(), symbols, symbol_lengths, @@ -367,7 +371,7 @@ impl VTable for FSST { } #[derive(Clone)] -pub struct FSSTArray { +pub struct FSSTData { dtype: DType, symbols: Buffer, symbol_lengths: Buffer, @@ -382,7 +386,7 @@ pub struct FSSTArray { compressor: Arc Compressor + Send>>>, } -impl Debug for FSSTArray { +impl Debug for FSSTData { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { f.debug_struct("FSSTArray") .field("dtype", &self.dtype) @@ -399,9 +403,26 @@ pub struct FSST; impl FSST { pub const ID: ArrayId = ArrayId::new_ref("vortex.fsst"); + + /// Build an FSST array from a set of `symbols` and `codes`. + pub fn try_new( + dtype: DType, + symbols: Buffer, + symbol_lengths: Buffer, + codes: VarBinArray, + uncompressed_lengths: ArrayRef, + ) -> VortexResult { + Ok(Array::from_inner(FSSTData::try_new( + dtype, + symbols, + symbol_lengths, + codes, + uncompressed_lengths, + )?)) + } } -impl FSSTArray { +impl FSSTData { /// Build an FSST array from a set of `symbols` and `codes`. /// /// Symbols are 8-bytes and can represent short strings, each of which is assigned @@ -477,6 +498,21 @@ impl FSSTArray { } } + /// Returns the number of elements in the array. + pub fn len(&self) -> usize { + self.codes.len() + } + + /// Returns `true` if the array contains no elements. + pub fn is_empty(&self) -> bool { + self.codes.len() == 0 + } + + /// Returns the logical data type of the array. + pub fn dtype(&self) -> &DType { + &self.dtype + } + /// Access the symbol table array pub fn symbols(&self) -> &Buffer { &self.symbols @@ -522,7 +558,7 @@ impl FSSTArray { } impl ValidityChild for FSST { - fn validity_child(array: &FSSTArray) -> &ArrayRef { + fn validity_child(array: &FSSTData) -> &ArrayRef { &array.codes_array } } diff --git a/encodings/fsst/src/canonical.rs b/encodings/fsst/src/canonical.rs index aabd0e14027..b16b08b4e2c 100644 --- a/encodings/fsst/src/canonical.rs +++ b/encodings/fsst/src/canonical.rs @@ -151,7 +151,10 @@ mod tests { .map(|_| { let (array, data) = make_data(); let compressor = fsst_train_compressor(&array); - (fsst_compress(&array, &compressor).into_array(), data) + ( + fsst_compress(&array, array.len(), array.dtype(), &compressor).into_array(), + data, + ) }) .unzip(); diff --git a/encodings/fsst/src/compress.rs b/encodings/fsst/src/compress.rs index 669e488a16c..d3f715fd7bf 100644 --- a/encodings/fsst/src/compress.rs +++ b/encodings/fsst/src/compress.rs @@ -5,7 +5,6 @@ use fsst::Compressor; use fsst::Symbol; -use vortex_array::DynArray; use vortex_array::IntoArray; use vortex_array::accessor::ArrayAccessor; use vortex_array::arrays::varbin::builder::VarBinBuilder; @@ -15,15 +14,15 @@ use vortex_buffer::BufferMut; use vortex_error::VortexExpect; use crate::FSSTArray; - /// Compress a string array using FSST. -pub fn fsst_compress + AsRef>( +use crate::FSSTData; +pub fn fsst_compress>( strings: A, + len: usize, + dtype: &DType, compressor: &Compressor, -) -> FSSTArray { - let len = strings.as_ref().len(); - let dtype = strings.as_ref().dtype().clone(); - strings.with_iterator(|iter| fsst_compress_iter(iter, len, dtype, compressor)) +) -> FSSTData { + strings.with_iterator(|iter| fsst_compress_iter(iter, len, dtype.clone(), compressor)) } /// Train a compressor from an array. @@ -62,7 +61,7 @@ pub fn fsst_compress_iter<'a, I>( len: usize, dtype: DType, compressor: &Compressor, -) -> FSSTArray +) -> FSSTData where I: Iterator>, { @@ -103,7 +102,7 @@ where let uncompressed_lengths = uncompressed_lengths.into_array(); - FSSTArray::try_new(dtype, symbols, symbol_lengths, codes, uncompressed_lengths) + FSSTData::try_new(dtype, symbols, symbol_lengths, codes, uncompressed_lengths) .vortex_expect("building FSSTArray from parts") } diff --git a/encodings/fsst/src/compute/cast.rs b/encodings/fsst/src/compute/cast.rs index e21934665c6..7a080a108e9 100644 --- a/encodings/fsst/src/compute/cast.rs +++ b/encodings/fsst/src/compute/cast.rs @@ -11,7 +11,7 @@ use vortex_error::VortexResult; use crate::FSST; use crate::FSSTArray; - +use crate::FSSTData; impl CastReduce for FSST { fn cast(array: &FSSTArray, dtype: &DType) -> VortexResult> { // FSST is a string compression encoding. @@ -25,7 +25,7 @@ impl CastReduce for FSST { .cast(array.codes().dtype().with_nullability(dtype.nullability()))?; Ok(Some( - FSSTArray::try_new( + FSSTData::try_new( dtype.clone(), array.symbols().clone(), array.symbol_lengths().clone(), @@ -61,7 +61,9 @@ mod tests { ); let compressor = fsst_train_compressor(&strings); - let fsst = fsst_compress(strings, &compressor); + let len = strings.len(); + let dtype = strings.dtype().clone(); + let fsst = fsst_compress(strings, len, &dtype, &compressor); // Cast to nullable let casted = fsst @@ -86,7 +88,7 @@ mod tests { ))] fn test_cast_fsst_conformance(#[case] array: VarBinArray) { let compressor = fsst_train_compressor(&array); - let fsst = fsst_compress(&array, &compressor); + let fsst = fsst_compress(&array, array.len(), array.dtype(), &compressor); test_cast_conformance(&fsst.into_array()); } } diff --git a/encodings/fsst/src/compute/compare.rs b/encodings/fsst/src/compute/compare.rs index e6efbd075ed..a7bdfeeeb4d 100644 --- a/encodings/fsst/src/compute/compare.rs +++ b/encodings/fsst/src/compute/compare.rs @@ -154,7 +154,9 @@ mod tests { DType::Utf8(Nullability::Nullable), ); let compressor = fsst_train_compressor(&lhs); - let lhs = fsst_compress(lhs, &compressor); + let len = lhs.len(); + let dtype = lhs.dtype().clone(); + let lhs = fsst_compress(lhs, len, &dtype, &compressor); let rhs = ConstantArray::new("world", lhs.len()); diff --git a/encodings/fsst/src/compute/filter.rs b/encodings/fsst/src/compute/filter.rs index b06f442addb..bb2df9ed45b 100644 --- a/encodings/fsst/src/compute/filter.rs +++ b/encodings/fsst/src/compute/filter.rs @@ -12,7 +12,7 @@ use vortex_mask::Mask; use crate::FSST; use crate::FSSTArray; - +use crate::FSSTData; impl FilterKernel for FSST { fn filter( array: &FSSTArray, @@ -27,7 +27,7 @@ impl FilterKernel for FSST { .vortex_expect("must be VarBin"); Ok(Some( - FSSTArray::try_new( + FSSTData::try_new( array.dtype().clone(), array.symbols().clone(), array.symbol_lengths().clone(), @@ -62,7 +62,7 @@ mod test { let varbin = builder.finish(DType::Utf8(Nullability::NonNullable)); let compressor = fsst_train_compressor(&varbin); - let array = fsst_compress(&varbin, &compressor); + let array = fsst_compress(&varbin, varbin.len(), varbin.dtype(), &compressor); test_filter_conformance(&array.into_array()); // Test with longer strings that benefit from compression @@ -75,7 +75,7 @@ mod test { let varbin = builder.finish(DType::Utf8(Nullability::NonNullable)); let compressor = fsst_train_compressor(&varbin); - let array = fsst_compress(&varbin, &compressor); + let array = fsst_compress(&varbin, varbin.len(), varbin.dtype(), &compressor); test_filter_conformance(&array.into_array()); // Test with nullable strings @@ -88,7 +88,7 @@ mod test { let varbin = builder.finish(DType::Utf8(Nullability::Nullable)); let compressor = fsst_train_compressor(&varbin); - let array = fsst_compress(&varbin, &compressor); + let array = fsst_compress(&varbin, varbin.len(), varbin.dtype(), &compressor); test_filter_conformance(&array.into_array()); } } diff --git a/encodings/fsst/src/compute/like.rs b/encodings/fsst/src/compute/like.rs index c438a9ab01e..55ce8d11f1c 100644 --- a/encodings/fsst/src/compute/like.rs +++ b/encodings/fsst/src/compute/like.rs @@ -72,7 +72,8 @@ impl LikeKernel for FSST { // directly without cloning the entire FSSTArray into an ArrayRef. let validity = array .codes() - .validity()? + .validity() + .clone() .union_nullability(pattern_scalar.dtype().nullability()); Ok(Some(BoolArray::new(result, validity).into_array())) @@ -111,7 +112,9 @@ mod tests { fn make_fsst(strings: &[Option<&str>], nullability: Nullability) -> FSSTArray { let varbin = VarBinArray::from_iter(strings.iter().copied(), DType::Utf8(nullability)); let compressor = fsst_train_compressor(&varbin); - fsst_compress(varbin, &compressor) + let len = varbin.len(); + let dtype = varbin.dtype().clone(); + fsst_compress(varbin, len, &dtype, &compressor) } fn run_like(array: FSSTArray, pattern: &str, opts: LikeOptions) -> VortexResult { diff --git a/encodings/fsst/src/compute/mod.rs b/encodings/fsst/src/compute/mod.rs index f49c2954a04..02f86024fd5 100644 --- a/encodings/fsst/src/compute/mod.rs +++ b/encodings/fsst/src/compute/mod.rs @@ -1,6 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors +use crate::FSSTData; mod cast; mod compare; mod filter; @@ -28,7 +29,7 @@ impl TakeExecute for FSST { _ctx: &mut ExecutionCtx, ) -> VortexResult> { Ok(Some( - FSSTArray::try_new( + FSSTData::try_new( array .dtype() .clone() @@ -71,7 +72,7 @@ mod tests { fn test_take_null() { let arr = VarBinArray::from_iter([Some("h")], DType::Utf8(Nullability::NonNullable)); let compr = fsst_train_compressor(&arr); - let fsst = fsst_compress(&arr, &compr); + let fsst = fsst_compress(&arr, arr.len(), arr.dtype(), &compr); let idx1: PrimitiveArray = (0..1).collect(); @@ -103,7 +104,7 @@ mod tests { ))] fn test_take_fsst_conformance(#[case] varbin: VarBinArray) { let compressor = fsst_train_compressor(&varbin); - let array = fsst_compress(&varbin, &compressor); + let array = fsst_compress(&varbin, varbin.len(), varbin.dtype(), &compressor); test_take_conformance(&array.into_array()); } @@ -115,7 +116,7 @@ mod tests { DType::Utf8(Nullability::NonNullable), ); let compressor = fsst_train_compressor(&varbin); - fsst_compress(&varbin, &compressor) + fsst_compress(&varbin, varbin.len(), varbin.dtype(), &compressor) })] // Nullable strings #[case::fsst_nullable({ @@ -124,7 +125,9 @@ mod tests { DType::Utf8(Nullability::Nullable), ); let compressor = fsst_train_compressor(&varbin); - fsst_compress(varbin, &compressor) + let len = varbin.len(); + let dtype = varbin.dtype().clone(); + fsst_compress(varbin, len, &dtype, &compressor) })] // Repetitive patterns (good for FSST compression) #[case::fsst_repetitive({ @@ -133,7 +136,7 @@ mod tests { DType::Utf8(Nullability::NonNullable), ); let compressor = fsst_train_compressor(&varbin); - fsst_compress(&varbin, &compressor) + fsst_compress(&varbin, varbin.len(), varbin.dtype(), &compressor) })] // Edge cases #[case::fsst_single({ @@ -142,7 +145,7 @@ mod tests { DType::Utf8(Nullability::NonNullable), ); let compressor = fsst_train_compressor(&varbin); - fsst_compress(&varbin, &compressor) + fsst_compress(&varbin, varbin.len(), varbin.dtype(), &compressor) })] #[case::fsst_empty_strings({ let varbin = VarBinArray::from_iter( @@ -150,7 +153,9 @@ mod tests { DType::Utf8(Nullability::NonNullable), ); let compressor = fsst_train_compressor(&varbin); - fsst_compress(varbin, &compressor) + let len = varbin.len(); + let dtype = varbin.dtype().clone(); + fsst_compress(varbin, len, &dtype, &compressor) })] // Large arrays #[case::fsst_large({ @@ -170,7 +175,9 @@ mod tests { .collect(); let varbin = VarBinArray::from_iter(data, DType::Utf8(Nullability::NonNullable)); let compressor = fsst_train_compressor(&varbin); - fsst_compress(varbin, &compressor) + let len = varbin.len(); + let dtype = varbin.dtype().clone(); + fsst_compress(varbin, len, &dtype, &compressor) })] fn test_fsst_consistency(#[case] array: FSSTArray) { diff --git a/encodings/fsst/src/dfa/tests.rs b/encodings/fsst/src/dfa/tests.rs index d135014c42e..0d61d92090a 100644 --- a/encodings/fsst/src/dfa/tests.rs +++ b/encodings/fsst/src/dfa/tests.rs @@ -227,7 +227,9 @@ fn make_fsst_str(strings: &[Option<&str>]) -> FSSTArray { DType::Utf8(Nullability::NonNullable), ); let compressor = fsst_train_compressor(&varbin); - fsst_compress(varbin, &compressor) + let len = varbin.len(); + let dtype = varbin.dtype().clone(); + fsst_compress(varbin, len, &dtype, &compressor) } fn run_like(array: FSSTArray, pattern_arr: ArrayRef) -> VortexResult { diff --git a/encodings/fsst/src/kernel.rs b/encodings/fsst/src/kernel.rs index 3ec36dd1b32..192e0f22759 100644 --- a/encodings/fsst/src/kernel.rs +++ b/encodings/fsst/src/kernel.rs @@ -57,7 +57,9 @@ mod tests { let input = builder.finish(DType::Utf8(Nullability::NonNullable)); let compressor = fsst_train_compressor(&input); - fsst_compress(input, &compressor).into_array() + let len = input.len(); + let dtype = input.dtype().clone(); + fsst_compress(input, len, &dtype, &compressor).into_array() } #[test] @@ -130,7 +132,8 @@ mod tests { let input = builder.finish(DType::Utf8(Nullability::Nullable)); let compressor = fsst_train_compressor(&input); - let fsst_array: ArrayRef = fsst_compress(input.clone(), &compressor).into_array(); + let fsst_array: ArrayRef = + fsst_compress(input.clone(), input.len(), input.dtype(), &compressor).into_array(); // Filter: only select the last element (index 22) let mut mask = vec![false; 22]; @@ -158,7 +161,8 @@ mod tests { let input = builder.finish(DType::Utf8(Nullability::Nullable)); let compressor = fsst_train_compressor(&input); - let fsst_array: ArrayRef = fsst_compress(input.clone(), &compressor).into_array(); + let fsst_array: ArrayRef = + fsst_compress(input.clone(), input.len(), input.dtype(), &compressor).into_array(); let mask = Mask::from_iter([true, false, true]); diff --git a/encodings/fsst/src/ops.rs b/encodings/fsst/src/ops.rs index ba6c709d65e..6bebf49bc96 100644 --- a/encodings/fsst/src/ops.rs +++ b/encodings/fsst/src/ops.rs @@ -2,19 +2,24 @@ // SPDX-FileCopyrightText: Copyright the Vortex contributors use vortex_array::ExecutionCtx; +use vortex_array::IntoArray; use vortex_array::arrays::varbin::varbin_scalar; use vortex_array::scalar::Scalar; +use vortex_array::vtable::Array; use vortex_array::vtable::OperationsVTable; use vortex_buffer::ByteBuffer; use vortex_error::VortexExpect; use vortex_error::VortexResult; use crate::FSST; -use crate::FSSTArray; impl OperationsVTable for FSST { - fn scalar_at(array: &FSSTArray, index: usize, _ctx: &mut ExecutionCtx) -> VortexResult { - let compressed = array.codes().scalar_at(index)?; + fn scalar_at( + array: &Array, + index: usize, + _ctx: &mut ExecutionCtx, + ) -> VortexResult { + let compressed = array.codes().clone().into_array().scalar_at(index)?; let binary_datum = compressed.as_binary().value().vortex_expect("non-null"); let decoded_buffer = ByteBuffer::from(array.decompressor().decompress(binary_datum)); diff --git a/encodings/fsst/src/slice.rs b/encodings/fsst/src/slice.rs index a010a703250..097a21045e1 100644 --- a/encodings/fsst/src/slice.rs +++ b/encodings/fsst/src/slice.rs @@ -7,22 +7,24 @@ use vortex_array::ArrayRef; use vortex_array::IntoArray; use vortex_array::arrays::VarBin; use vortex_array::arrays::slice::SliceReduce; +use vortex_array::vtable::Array; use vortex_error::VortexResult; use vortex_error::vortex_err; use crate::FSST; use crate::FSSTArray; +use crate::FSSTData; impl SliceReduce for FSST { - fn slice(array: &Self::Array, range: Range) -> VortexResult> { + fn slice(array: &Array, range: Range) -> VortexResult> { // SAFETY: slicing the `codes` leaves the symbol table intact Ok(Some( unsafe { - FSSTArray::new_unchecked( + FSSTData::new_unchecked( array.dtype().clone(), array.symbols().clone(), array.symbol_lengths().clone(), - VarBin::_slice(array.codes().as_::(), range.clone())? + VarBin::_slice(array.codes(), range.clone())? .try_into::() .map_err(|_| vortex_err!("cannot fail conversion"))?, array.uncompressed_lengths().slice(range)?, diff --git a/encodings/fsst/src/test_utils.rs b/encodings/fsst/src/test_utils.rs index 701a41828c5..421a5d4c3f5 100644 --- a/encodings/fsst/src/test_utils.rs +++ b/encodings/fsst/src/test_utils.rs @@ -43,7 +43,9 @@ pub fn gen_fsst_test_data(len: usize, avg_str_len: usize, unique_chars: u8) -> A ); let compressor = fsst_train_compressor(&varbin); - fsst_compress(varbin, &compressor).into_array() + let len = varbin.len(); + let dtype = varbin.dtype().clone(); + fsst_compress(varbin, len, &dtype, &compressor).into_array() } pub fn gen_dict_fsst_test_data( @@ -137,7 +139,9 @@ pub fn generate_url_data_n(n: usize) -> VarBinArray { pub fn make_fsst_urls(n: usize) -> FSSTArray { let varbin = generate_url_data_n(n); let compressor = fsst_train_compressor(&varbin); - fsst_compress(varbin, &compressor) + let len = varbin.len(); + let dtype = varbin.dtype().clone(); + fsst_compress(varbin, len, &dtype, &compressor) } // --------------------------------------------------------------------------- @@ -231,7 +235,9 @@ pub fn make_fsst_clickbench_urls(n: usize) -> FSSTArray { DType::Utf8(Nullability::NonNullable), ); let compressor = fsst_train_compressor(&varbin); - fsst_compress(varbin, &compressor) + let len = varbin.len(); + let dtype = varbin.dtype().clone(); + fsst_compress(varbin, len, &dtype, &compressor) } // --------------------------------------------------------------------------- @@ -297,7 +303,9 @@ pub fn make_fsst_short_urls(n: usize) -> FSSTArray { DType::Utf8(Nullability::NonNullable), ); let compressor = fsst_train_compressor(&varbin); - fsst_compress(varbin, &compressor) + let len = varbin.len(); + let dtype = varbin.dtype().clone(); + fsst_compress(varbin, len, &dtype, &compressor) } // --------------------------------------------------------------------------- @@ -367,7 +375,9 @@ pub fn make_fsst_log_lines(n: usize) -> FSSTArray { DType::Utf8(Nullability::NonNullable), ); let compressor = fsst_train_compressor(&varbin); - fsst_compress(varbin, &compressor) + let len = varbin.len(); + let dtype = varbin.dtype().clone(); + fsst_compress(varbin, len, &dtype, &compressor) } // --------------------------------------------------------------------------- @@ -424,7 +434,9 @@ pub fn make_fsst_json_strings(n: usize) -> FSSTArray { DType::Utf8(Nullability::NonNullable), ); let compressor = fsst_train_compressor(&varbin); - fsst_compress(varbin, &compressor) + let len = varbin.len(); + let dtype = varbin.dtype().clone(); + fsst_compress(varbin, len, &dtype, &compressor) } // --------------------------------------------------------------------------- @@ -494,7 +506,9 @@ pub fn make_fsst_file_paths(n: usize) -> FSSTArray { DType::Utf8(Nullability::NonNullable), ); let compressor = fsst_train_compressor(&varbin); - fsst_compress(varbin, &compressor) + let len = varbin.len(); + let dtype = varbin.dtype().clone(); + fsst_compress(varbin, len, &dtype, &compressor) } // --------------------------------------------------------------------------- @@ -545,7 +559,9 @@ pub fn make_fsst_emails(n: usize) -> FSSTArray { DType::Utf8(Nullability::NonNullable), ); let compressor = fsst_train_compressor(&varbin); - fsst_compress(varbin, &compressor) + let len = varbin.len(); + let dtype = varbin.dtype().clone(); + fsst_compress(varbin, len, &dtype, &compressor) } // --------------------------------------------------------------------------- @@ -582,5 +598,7 @@ pub fn make_fsst_rare_match(n: usize) -> FSSTArray { DType::Utf8(Nullability::NonNullable), ); let compressor = fsst_train_compressor(&varbin); - fsst_compress(varbin, &compressor) + let len = varbin.len(); + let dtype = varbin.dtype().clone(); + fsst_compress(varbin, len, &dtype, &compressor) } diff --git a/encodings/fsst/src/tests.rs b/encodings/fsst/src/tests.rs index e5a7b2f327c..27a734730be 100644 --- a/encodings/fsst/src/tests.rs +++ b/encodings/fsst/src/tests.rs @@ -28,7 +28,9 @@ pub(crate) fn build_fsst_array() -> ArrayRef { let input_array = input_array.finish(DType::Utf8(Nullability::NonNullable)); let compressor = fsst_train_compressor(&input_array); - fsst_compress(input_array, &compressor).into_array() + let len = input_array.len(); + let dtype = input_array.dtype().clone(); + fsst_compress(input_array, len, &dtype, &compressor).into_array() } #[test] diff --git a/encodings/pco/public-api.lock b/encodings/pco/public-api.lock index e2a15ed3df5..857007a044c 100644 --- a/encodings/pco/public-api.lock +++ b/encodings/pco/public-api.lock @@ -66,7 +66,7 @@ pub fn vortex_pco::Pco::reduce_parent(array: &vortex_array::vtable::typed::Array pub fn vortex_pco::Pco::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_pco::Pco::stats(array: &vortex_pco::PcoArray) -> vortex_array::stats::array::StatsSetRef<'_> +pub fn vortex_pco::Pco::stats(array: &vortex_pco::PcoArray) -> &vortex_array::stats::array::ArrayStats pub fn vortex_pco::Pco::vtable(_array: &Self::Array) -> &Self diff --git a/encodings/pco/src/array.rs b/encodings/pco/src/array.rs index a2e7be7b955..cd686d18fef 100644 --- a/encodings/pco/src/array.rs +++ b/encodings/pco/src/array.rs @@ -37,7 +37,6 @@ use vortex_array::dtype::half; use vortex_array::scalar::Scalar; use vortex_array::serde::ArrayChildren; use vortex_array::stats::ArrayStats; -use vortex_array::stats::StatsSetRef; use vortex_array::validity::Validity; use vortex_array::vtable; use vortex_array::vtable::Array; @@ -85,10 +84,10 @@ use crate::PcoPageInfo; const VALUES_PER_CHUNK: usize = pco::DEFAULT_MAX_PAGE_N; -vtable!(Pco); +vtable!(Pco, Pco, PcoData); impl VTable for Pco { - type Array = PcoArray; + type Array = PcoData; type Metadata = ProstMetadata; type OperationsVTable = Self; @@ -102,19 +101,19 @@ impl VTable for Pco { Self::ID } - fn len(array: &PcoArray) -> usize { + fn len(array: &PcoData) -> usize { array.slice_stop - array.slice_start } - fn dtype(array: &PcoArray) -> &DType { + fn dtype(array: &PcoData) -> &DType { &array.dtype } - fn stats(array: &PcoArray) -> StatsSetRef<'_> { - array.stats_set.to_ref(array.as_ref()) + fn stats(array: &PcoData) -> &ArrayStats { + &array.stats_set } - fn array_hash(array: &PcoArray, state: &mut H, precision: Precision) { + fn array_hash(array: &Array, state: &mut H, precision: Precision) { array.dtype.hash(state); array.unsliced_validity.array_hash(state, precision); array.unsliced_n_rows.hash(state); @@ -129,7 +128,7 @@ impl VTable for Pco { } } - fn array_eq(array: &PcoArray, other: &PcoArray, precision: Precision) -> bool { + fn array_eq(array: &Array, other: &Array, precision: Precision) -> bool { if array.dtype != other.dtype || !array .unsliced_validity @@ -155,11 +154,11 @@ impl VTable for Pco { true } - fn nbuffers(array: &PcoArray) -> usize { + fn nbuffers(array: &Array) -> usize { array.chunk_metas.len() + array.pages.len() } - fn buffer(array: &PcoArray, idx: usize) -> BufferHandle { + fn buffer(array: &Array, idx: usize) -> BufferHandle { if idx < array.chunk_metas.len() { BufferHandle::new_host(array.chunk_metas[idx].clone()) } else { @@ -168,7 +167,7 @@ impl VTable for Pco { } } - fn buffer_name(array: &PcoArray, idx: usize) -> Option { + fn buffer_name(array: &Array, idx: usize) -> Option { if idx < array.chunk_metas.len() { Some(format!("chunk_meta_{idx}")) } else { @@ -176,23 +175,23 @@ impl VTable for Pco { } } - fn nchildren(array: &PcoArray) -> usize { + fn nchildren(array: &Array) -> usize { validity_nchildren(&array.unsliced_validity) } - fn child(array: &PcoArray, idx: usize) -> ArrayRef { + fn child(array: &Array, idx: usize) -> ArrayRef { validity_to_child(&array.unsliced_validity, array.unsliced_n_rows) .unwrap_or_else(|| vortex_panic!("PcoArray child index {idx} out of bounds")) } - fn child_name(_array: &PcoArray, idx: usize) -> String { + fn child_name(_array: &Array, idx: usize) -> String { match idx { 0 => "validity".to_string(), _ => vortex_panic!("PcoArray child_name index {idx} out of bounds"), } } - fn metadata(array: &PcoArray) -> VortexResult { + fn metadata(array: &Array) -> VortexResult { Ok(ProstMetadata(array.metadata.clone())) } @@ -216,7 +215,7 @@ impl VTable for Pco { metadata: &Self::Metadata, buffers: &[BufferHandle], children: &dyn ArrayChildren, - ) -> VortexResult { + ) -> VortexResult { let validity = if children.is_empty() { Validity::from(dtype.nullability()) } else if children.len() == 1 { @@ -244,7 +243,7 @@ impl VTable for Pco { .sum::(); vortex_ensure!(pages.len() == expected_n_pages); - Ok(PcoArray::new( + Ok(PcoData::new( chunk_metas, pages, dtype.clone(), @@ -301,7 +300,7 @@ pub(crate) fn number_type_from_dtype(dtype: &DType) -> NumberType { } fn collect_valid(parray: &PrimitiveArray) -> VortexResult { - let mask = parray.validity_mask()?; + let mask = parray.validity_mask(); Ok(parray.clone().into_array().filter(mask)?.to_primitive()) } @@ -319,10 +318,23 @@ pub struct Pco; impl Pco { pub const ID: ArrayId = ArrayId::new_ref("vortex.pco"); + + /// Compress a primitive array using pcodec. + pub fn from_primitive( + parray: &PrimitiveArray, + level: usize, + values_per_page: usize, + ) -> VortexResult { + Ok(Array::from_inner(PcoData::from_primitive( + parray, + level, + values_per_page, + )?)) + } } #[derive(Clone, Debug)] -pub struct PcoArray { +pub struct PcoData { pub(crate) chunk_metas: Vec, pub(crate) pages: Vec, pub(crate) metadata: PcoMetadata, @@ -334,7 +346,7 @@ pub struct PcoArray { slice_stop: usize, } -impl PcoArray { +impl PcoData { pub fn new( chunk_metas: Vec, pages: Vec, @@ -427,7 +439,7 @@ impl PcoArray { header, chunks: chunk_infos, }; - Ok(PcoArray::new( + Ok(PcoData::new( chunk_meta_buffers, page_buffers, parray.dtype().clone(), @@ -542,7 +554,7 @@ impl PcoArray { } pub(crate) fn _slice(&self, start: usize, stop: usize) -> Self { - PcoArray { + PcoData { slice_start: self.slice_start + start, slice_stop: self.slice_start + stop, stats_set: Default::default(), @@ -550,7 +562,18 @@ impl PcoArray { } } - pub(crate) fn dtype(&self) -> &DType { + /// Returns the number of elements in the array. + pub fn len(&self) -> usize { + self.slice_stop - self.slice_start + } + + /// Returns `true` if the array contains no elements. + pub fn is_empty(&self) -> bool { + self.slice_stop == self.slice_start + } + + /// Returns the logical data type of the array. + pub fn dtype(&self) -> &DType { &self.dtype } @@ -567,18 +590,23 @@ impl PcoArray { } } -impl ValiditySliceHelper for PcoArray { +impl ValiditySliceHelper for PcoData { fn unsliced_validity_and_slice(&self) -> (&Validity, usize, usize) { (&self.unsliced_validity, self.slice_start, self.slice_stop) } } impl OperationsVTable for Pco { - fn scalar_at(array: &PcoArray, index: usize, _ctx: &mut ExecutionCtx) -> VortexResult { + fn scalar_at( + array: &Array, + index: usize, + _ctx: &mut ExecutionCtx, + ) -> VortexResult { let mut ctx = LEGACY_SESSION.create_execution_ctx(); array ._slice(index, index + 1) .decompress(&mut ctx)? + .into_array() .scalar_at(0) } } @@ -600,7 +628,7 @@ mod tests { buffer![10u32, 20, 30, 40, 50, 60], Validity::from_iter([false, true, true, true, true, false]), ); - let pco = PcoArray::from_primitive(&values, 0, 128).unwrap(); + let pco = PcoData::from_primitive(&values, 0, 128).unwrap(); assert_arrays_eq!( pco, PrimitiveArray::from_option_iter([ diff --git a/encodings/pco/src/compute/cast.rs b/encodings/pco/src/compute/cast.rs index 86dc4758977..9876bf31450 100644 --- a/encodings/pco/src/compute/cast.rs +++ b/encodings/pco/src/compute/cast.rs @@ -9,10 +9,10 @@ use vortex_error::VortexResult; use crate::Pco; use crate::PcoArray; - +use crate::PcoData; impl CastReduce for Pco { fn cast(array: &PcoArray, dtype: &DType) -> VortexResult> { - if !dtype.is_nullable() || !array.all_valid()? { + if !dtype.is_nullable() || !array.clone().into_array().all_valid()? { // TODO(joe): fixme // We cannot cast to non-nullable since the validity containing nulls is used to decode // the PCO array, this would require rewriting tables. @@ -30,7 +30,7 @@ impl CastReduce for Pco { .cast_nullability(dtype.nullability(), array.len())?; return Ok(Some( - PcoArray::new( + PcoData::new( array.chunk_metas.clone(), array.pages.clone(), dtype.clone(), @@ -67,7 +67,7 @@ mod tests { #[test] fn test_cast_pco_f32_to_f64() { let values = PrimitiveArray::from_iter([1.0f32, 2.0, 3.0, 4.0, 5.0]); - let pco = PcoArray::from_primitive(&values, 0, 128).unwrap(); + let pco = PcoData::from_primitive(&values, 0, 128).unwrap(); let casted = pco .into_array() @@ -88,7 +88,7 @@ mod tests { fn test_cast_pco_nullability_change() { // Test casting from NonNullable to Nullable let values = PrimitiveArray::from_iter([10u32, 20, 30, 40]); - let pco = PcoArray::from_primitive(&values, 0, 128).unwrap(); + let pco = PcoData::from_primitive(&values, 0, 128).unwrap(); let casted = pco .into_array() @@ -106,7 +106,7 @@ mod tests { buffer![10u32, 20, 30, 40, 50, 60], Validity::from_iter([true, true, true, true, true, true]), ); - let pco = PcoArray::from_primitive(&values, 0, 128).unwrap(); + let pco = PcoData::from_primitive(&values, 0, 128).unwrap(); let sliced = pco.slice(1..5).unwrap(); let casted = sliced .cast(DType::Primitive(PType::U32, Nullability::NonNullable)) @@ -129,7 +129,7 @@ mod tests { Some(50), Some(60), ]); - let pco = PcoArray::from_primitive(&values, 0, 128).unwrap(); + let pco = PcoData::from_primitive(&values, 0, 128).unwrap(); let sliced = pco.slice(1..5).unwrap(); let casted = sliced .cast(DType::Primitive(PType::U32, Nullability::NonNullable)) @@ -163,7 +163,7 @@ mod tests { Validity::NonNullable, ))] fn test_cast_pco_conformance(#[case] values: PrimitiveArray) { - let pco = PcoArray::from_primitive(&values, 0, 128).unwrap(); + let pco = PcoData::from_primitive(&values, 0, 128).unwrap(); test_cast_conformance(&pco.into_array()); } } diff --git a/encodings/pco/src/compute/mod.rs b/encodings/pco/src/compute/mod.rs index a5db93b4833..161cdabd453 100644 --- a/encodings/pco/src/compute/mod.rs +++ b/encodings/pco/src/compute/mod.rs @@ -1,6 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors +use crate::PcoData; mod cast; #[cfg(test)] @@ -14,42 +15,42 @@ mod tests { fn pco_f32() -> PcoArray { let values = PrimitiveArray::from_iter([1.23f32, 4.56, 7.89, 10.11, 12.13]); - PcoArray::from_primitive(&values, 0, 128).unwrap() + PcoData::from_primitive(&values, 0, 128).unwrap() } fn pco_f64() -> PcoArray { let values = PrimitiveArray::from_iter([100.1f64, 200.2, 300.3, 400.4, 500.5]); - PcoArray::from_primitive(&values, 0, 128).unwrap() + PcoData::from_primitive(&values, 0, 128).unwrap() } fn pco_i32() -> PcoArray { let values = PrimitiveArray::from_iter([100i32, 200, 300, 400, 500]); - PcoArray::from_primitive(&values, 0, 128).unwrap() + PcoData::from_primitive(&values, 0, 128).unwrap() } fn pco_u64() -> PcoArray { let values = PrimitiveArray::from_iter([1000u64, 2000, 3000, 4000]); - PcoArray::from_primitive(&values, 0, 128).unwrap() + PcoData::from_primitive(&values, 0, 128).unwrap() } fn pco_i16() -> PcoArray { let values = PrimitiveArray::from_iter([10i16, 20, 30, 40, 50]); - PcoArray::from_primitive(&values, 0, 128).unwrap() + PcoData::from_primitive(&values, 0, 128).unwrap() } fn pco_i32_alt() -> PcoArray { let values = PrimitiveArray::from_iter([1i32, 2, 3, 4, 5]); - PcoArray::from_primitive(&values, 0, 128).unwrap() + PcoData::from_primitive(&values, 0, 128).unwrap() } fn pco_single() -> PcoArray { let values = PrimitiveArray::from_iter([42.42f64]); - PcoArray::from_primitive(&values, 0, 128).unwrap() + PcoData::from_primitive(&values, 0, 128).unwrap() } fn pco_large() -> PcoArray { let values = PrimitiveArray::from_iter(0u32..1000); - PcoArray::from_primitive(&values, 3, 128).unwrap() + PcoData::from_primitive(&values, 3, 128).unwrap() } #[rstest] diff --git a/encodings/pco/src/slice.rs b/encodings/pco/src/slice.rs index 66bcaa5cf87..0c7da3ecc62 100644 --- a/encodings/pco/src/slice.rs +++ b/encodings/pco/src/slice.rs @@ -6,12 +6,13 @@ use std::ops::Range; use vortex_array::ArrayRef; use vortex_array::IntoArray; use vortex_array::arrays::slice::SliceReduce; +use vortex_array::vtable::Array; use vortex_error::VortexResult; use crate::Pco; impl SliceReduce for Pco { - fn slice(array: &Self::Array, range: Range) -> VortexResult> { + fn slice(array: &Array, range: Range) -> VortexResult> { Ok(Some(array._slice(range.start, range.end).into_array())) } } diff --git a/encodings/pco/src/test.rs b/encodings/pco/src/test.rs index a73bbc7948f..52e3c9495ce 100644 --- a/encodings/pco/src/test.rs +++ b/encodings/pco/src/test.rs @@ -30,6 +30,8 @@ use vortex_mask::Mask; use vortex_session::VortexSession; use vortex_session::registry::ReadContext; +use crate::PcoData; + static SESSION: LazyLock = LazyLock::new(|| { let session = VortexSession::empty().with::(); session.arrays().register(Pco); @@ -43,7 +45,7 @@ use crate::PcoArray; fn test_compress_decompress() { let data: Vec = (0..200).collect(); let array = PrimitiveArray::from_iter(data.clone()); - let compressed = PcoArray::from_primitive(&array, 3, 0).unwrap(); + let compressed = PcoData::from_primitive(&array, 3, 0).unwrap(); // this data should be compressible assert!(compressed.pages.len() < array.nbytes() as usize); @@ -66,7 +68,7 @@ fn test_compress_decompress() { #[test] fn test_compress_decompress_small() { let array = PrimitiveArray::from_option_iter([None, Some(1)]); - let compressed = PcoArray::from_primitive(&array, 3, 0).unwrap(); + let compressed = PcoData::from_primitive(&array, 3, 0).unwrap(); let expected = array.into_array(); assert_arrays_eq!(compressed, expected); @@ -80,7 +82,7 @@ fn test_compress_decompress_small() { fn test_empty() { let data: Vec = vec![]; let array = PrimitiveArray::from_iter(data.clone()); - let compressed = PcoArray::from_primitive(&array, 3, 100).unwrap(); + let compressed = PcoData::from_primitive(&array, 3, 100).unwrap(); let mut ctx = LEGACY_SESSION.create_execution_ctx(); let primitive = compressed.decompress(&mut ctx).unwrap(); assert_arrays_eq!(primitive, PrimitiveArray::from_iter(data)); @@ -99,7 +101,7 @@ fn test_validity_and_multiple_chunks_and_pages() { let compression_level = 3; let values_per_chunk = 33; let values_per_page = 10; - let compressed = PcoArray::from_primitive_with_values_per_chunk( + let compressed = PcoData::from_primitive_with_values_per_chunk( &array, compression_level, values_per_chunk, @@ -143,7 +145,7 @@ fn test_validity_vtable() { Buffer::from(data), Validity::Array(BoolArray::from_iter(mask_bools.clone()).into_array()), ); - let compressed = PcoArray::from_primitive(&array, 3, 0).unwrap(); + let compressed = PcoData::from_primitive(&array, 3, 0).unwrap(); assert_eq!( compressed.validity_mask().unwrap(), Mask::from_iter(mask_bools) @@ -157,7 +159,7 @@ fn test_validity_vtable() { #[test] fn test_serde() -> VortexResult<()> { let data: PrimitiveArray = (0i32..1_000_000).collect(); - let pco = PcoArray::from_primitive(&data, 3, 100)?.into_array(); + let pco = PcoData::from_primitive(&data, 3, 100)?.into_array(); let context = ArrayContext::empty(); diff --git a/encodings/runend/public-api.lock b/encodings/runend/public-api.lock index 3e7eca7f426..794331812aa 100644 --- a/encodings/runend/public-api.lock +++ b/encodings/runend/public-api.lock @@ -96,7 +96,7 @@ pub fn vortex_runend::RunEnd::reduce_parent(array: &vortex_array::vtable::typed: pub fn vortex_runend::RunEnd::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_runend::RunEnd::stats(array: &vortex_runend::RunEndArray) -> vortex_array::stats::array::StatsSetRef<'_> +pub fn vortex_runend::RunEnd::stats(array: &vortex_runend::RunEndArray) -> &vortex_array::stats::array::ArrayStats pub fn vortex_runend::RunEnd::vtable(_array: &Self::Array) -> &Self diff --git a/encodings/runend/src/arbitrary.rs b/encodings/runend/src/arbitrary.rs index f4a3a83f150..20ef3d45c34 100644 --- a/encodings/runend/src/arbitrary.rs +++ b/encodings/runend/src/arbitrary.rs @@ -15,10 +15,11 @@ use vortex_buffer::Buffer; use vortex_error::VortexExpect; use crate::RunEndArray; +use crate::RunEndData; /// A wrapper type to implement `Arbitrary` for `RunEndArray`. #[derive(Clone, Debug)] -pub struct ArbitraryRunEndArray(pub RunEndArray); +pub struct ArbitraryRunEndArray(pub RunEndData); impl<'a> Arbitrary<'a> for ArbitraryRunEndArray { fn arbitrary(u: &mut Unstructured<'a>) -> Result { @@ -42,7 +43,7 @@ impl ArbitraryRunEndArray { // Empty RunEndArray let ends = PrimitiveArray::from_iter(Vec::::new()).into_array(); let values = ArbitraryArray::arbitrary_with(u, Some(0), dtype)?.0; - let runend_array = RunEndArray::try_new(ends, values) + let runend_array = RunEndData::try_new(ends, values) .vortex_expect("Empty RunEndArray creation should succeed"); return Ok(ArbitraryRunEndArray(runend_array)); } @@ -54,7 +55,7 @@ impl ArbitraryRunEndArray { // Each end must be > previous end, and first end must be >= 1 let ends = random_strictly_sorted_ends(u, num_runs, len)?; - let runend_array = RunEndArray::try_new(ends, values) + let runend_array = RunEndData::try_new(ends, values) .vortex_expect("RunEndArray creation should succeed in arbitrary impl"); Ok(ArbitraryRunEndArray(runend_array)) diff --git a/encodings/runend/src/array.rs b/encodings/runend/src/array.rs index 6402e3b511c..f4c46c20817 100644 --- a/encodings/runend/src/array.rs +++ b/encodings/runend/src/array.rs @@ -27,7 +27,6 @@ use vortex_array::search_sorted::SearchSorted; use vortex_array::search_sorted::SearchSortedSide; use vortex_array::serde::ArrayChildren; use vortex_array::stats::ArrayStats; -use vortex_array::stats::StatsSetRef; use vortex_array::validity::Validity; use vortex_array::vtable; use vortex_array::vtable::Array; @@ -48,7 +47,7 @@ use crate::decompress_bool::runend_decode_bools; use crate::kernel::PARENT_KERNELS; use crate::rules::RULES; -vtable!(RunEnd); +vtable!(RunEnd, RunEnd, RunEndData); #[derive(Clone, prost::Message)] pub struct RunEndMetadata { @@ -61,7 +60,7 @@ pub struct RunEndMetadata { } impl VTable for RunEnd { - type Array = RunEndArray; + type Array = RunEndData; type Metadata = ProstMetadata; type OperationsVTable = Self; @@ -75,49 +74,49 @@ impl VTable for RunEnd { Self::ID } - fn len(array: &RunEndArray) -> usize { + fn len(array: &RunEndData) -> usize { array.length } - fn dtype(array: &RunEndArray) -> &DType { + fn dtype(array: &RunEndData) -> &DType { array.values.dtype() } - fn stats(array: &RunEndArray) -> StatsSetRef<'_> { - array.stats_set.to_ref(array.as_ref()) + fn stats(array: &RunEndData) -> &ArrayStats { + &array.stats_set } - fn array_hash(array: &RunEndArray, state: &mut H, precision: Precision) { + fn array_hash(array: &Array, state: &mut H, precision: Precision) { array.ends.array_hash(state, precision); array.values.array_hash(state, precision); array.offset.hash(state); array.length.hash(state); } - fn array_eq(array: &RunEndArray, other: &RunEndArray, precision: Precision) -> bool { + fn array_eq(array: &Array, other: &Array, precision: Precision) -> bool { array.ends.array_eq(&other.ends, precision) && array.values.array_eq(&other.values, precision) && array.offset == other.offset && array.length == other.length } - fn nbuffers(_array: &RunEndArray) -> usize { + fn nbuffers(_array: &Array) -> usize { 0 } - fn buffer(_array: &RunEndArray, idx: usize) -> BufferHandle { + fn buffer(_array: &Array, idx: usize) -> BufferHandle { vortex_panic!("RunEndArray buffer index {idx} out of bounds") } - fn buffer_name(_array: &RunEndArray, idx: usize) -> Option { + fn buffer_name(_array: &Array, idx: usize) -> Option { vortex_panic!("RunEndArray buffer_name index {idx} out of bounds") } - fn nchildren(_array: &RunEndArray) -> usize { + fn nchildren(_array: &Array) -> usize { 2 } - fn child(array: &RunEndArray, idx: usize) -> ArrayRef { + fn child(array: &Array, idx: usize) -> ArrayRef { match idx { 0 => array.ends().clone(), 1 => array.values().clone(), @@ -125,7 +124,7 @@ impl VTable for RunEnd { } } - fn child_name(_array: &RunEndArray, idx: usize) -> String { + fn child_name(_array: &Array, idx: usize) -> String { match idx { 0 => "ends".to_string(), 1 => "values".to_string(), @@ -133,7 +132,7 @@ impl VTable for RunEnd { } } - fn metadata(array: &RunEndArray) -> VortexResult { + fn metadata(array: &Array) -> VortexResult { Ok(ProstMetadata(RunEndMetadata { ends_ptype: PType::try_from(array.ends().dtype()).vortex_expect("Must be a valid PType") as i32, @@ -163,14 +162,14 @@ impl VTable for RunEnd { metadata: &Self::Metadata, _buffers: &[BufferHandle], children: &dyn ArrayChildren, - ) -> VortexResult { + ) -> VortexResult { let ends_dtype = DType::Primitive(metadata.ends_ptype(), Nullability::NonNullable); let runs = usize::try_from(metadata.num_runs).vortex_expect("Must be a valid usize"); let ends = children.get(0, &ends_dtype, runs)?; let values = children.get(1, dtype, runs)?; - RunEndArray::try_new_offset_length( + RunEndData::try_new_offset_length( ends, values, usize::try_from(metadata.offset).vortex_expect("Offset must be a valid usize"), @@ -215,7 +214,7 @@ impl VTable for RunEnd { } #[derive(Clone, Debug)] -pub struct RunEndArray { +pub struct RunEndData { ends: ArrayRef, values: ArrayRef, offset: usize, @@ -233,9 +232,39 @@ pub struct RunEnd; impl RunEnd { pub const ID: ArrayId = ArrayId::new_ref("vortex.runend"); + + /// Build a new [`RunEndArray`] without validation. + /// + /// # Safety + /// See [`RunEndData::new_unchecked`] for preconditions. + pub unsafe fn new_unchecked( + ends: ArrayRef, + values: ArrayRef, + offset: usize, + length: usize, + ) -> RunEndArray { + Array::from_inner(unsafe { RunEndData::new_unchecked(ends, values, offset, length) }) + } + + /// Build a new [`RunEndArray`] from ends and values. + pub fn try_new(ends: ArrayRef, values: ArrayRef) -> VortexResult { + Ok(Array::from_inner(RunEndData::try_new(ends, values)?)) + } + + /// Build a new [`RunEndArray`] from ends, values, offset, and length. + pub fn try_new_offset_length( + ends: ArrayRef, + values: ArrayRef, + offset: usize, + length: usize, + ) -> VortexResult { + Ok(Array::from_inner(RunEndData::try_new_offset_length( + ends, values, offset, length, + )?)) + } } -impl RunEndArray { +impl RunEndData { fn validate( ends: &ArrayRef, values: &ArrayRef, @@ -311,10 +340,10 @@ impl RunEndArray { } } -impl RunEndArray { +impl RunEndData { /// Build a new `RunEndArray` from an array of run `ends` and an array of `values`. /// - /// Panics if any of the validation conditions described in [`RunEndArray::try_new`] is + /// Panics if any of the validation conditions described in [`RunEndData::try_new`] is /// not satisfied. /// /// # Examples @@ -328,7 +357,7 @@ impl RunEndArray { /// # fn main() -> VortexResult<()> { /// let ends = buffer![2u8, 3u8].into_array(); /// let values = BoolArray::from_iter([false, true]).into_array(); - /// let run_end = RunEndArray::new(ends, values); + /// let run_end = RunEndData::new(ends, values); /// /// // Array encodes /// assert_eq!(run_end.scalar_at(0)?, false.into()); @@ -358,7 +387,7 @@ impl RunEndArray { /// Construct a new sliced `RunEndArray` with the provided offset and length. /// - /// This performs all the same validation as [`RunEndArray::try_new`]. + /// This performs all the same validation as [`RunEndData::try_new`]. pub fn try_new_offset_length( ends: ArrayRef, values: ArrayRef, @@ -380,10 +409,10 @@ impl RunEndArray { /// /// # Safety /// - /// The caller must ensure that all the validation performed in [`RunEndArray::try_new`] is + /// The caller must ensure that all the validation performed in [`RunEndData::try_new`] is /// satisfied before calling this function. /// - /// See [`RunEndArray::try_new`] for the preconditions needed to build a new array. + /// See [`RunEndData::try_new`] for the preconditions needed to build a new array. pub unsafe fn new_unchecked( ends: ArrayRef, values: ArrayRef, @@ -429,6 +458,24 @@ impl RunEndArray { } } + /// Returns the length of the array. + #[inline] + pub fn len(&self) -> usize { + self.length + } + + /// Returns whether the array is empty. + #[inline] + pub fn is_empty(&self) -> bool { + self.length == 0 + } + + /// Returns the logical data type of the array. + #[inline] + pub fn dtype(&self) -> &DType { + self.values.dtype() + } + /// The offset that the `ends` is relative to. /// /// This is generally zero for a "new" array, and non-zero after a slicing operation. @@ -466,12 +513,12 @@ impl RunEndArray { } impl ValidityVTable for RunEnd { - fn validity(array: &RunEndArray) -> VortexResult { + fn validity(array: &Array) -> VortexResult { Ok(match array.values().validity()? { Validity::NonNullable | Validity::AllValid => Validity::AllValid, Validity::AllInvalid => Validity::AllInvalid, Validity::Array(values_validity) => Validity::Array(unsafe { - RunEndArray::new_unchecked( + RunEndData::new_unchecked( array.ends().clone(), values_validity, array.offset(), @@ -524,7 +571,7 @@ mod tests { #[test] fn test_runend_constructor() { - let arr = RunEndArray::new( + let arr = RunEndData::new( buffer![2u32, 5, 10].into_array(), buffer![1i32, 2, 3].into_array(), ); @@ -544,7 +591,7 @@ mod tests { #[test] fn test_runend_utf8() { let values = VarBinViewArray::from_iter_str(["a", "b", "c"]).into_array(); - let arr = RunEndArray::new(buffer![2u32, 5, 10].into_array(), values); + let arr = RunEndData::new(buffer![2u32, 5, 10].into_array(), values); assert_eq!(arr.len(), 10); assert_eq!(arr.dtype(), &DType::Utf8(Nullability::NonNullable)); @@ -561,7 +608,7 @@ mod tests { let dict = DictArray::try_new(dict_codes, dict_values).unwrap(); let arr = - RunEndArray::try_new(buffer![2u32, 5, 10].into_array(), dict.into_array()).unwrap(); + RunEndData::try_new(buffer![2u32, 5, 10].into_array(), dict.into_array()).unwrap(); assert_eq!(arr.len(), 10); let expected = diff --git a/encodings/runend/src/arrow.rs b/encodings/runend/src/arrow.rs index 4b2ddc9a448..26ab1668c68 100644 --- a/encodings/runend/src/arrow.rs +++ b/encodings/runend/src/arrow.rs @@ -16,9 +16,9 @@ use vortex_buffer::Buffer; use vortex_error::VortexResult; use crate::RunEndArray; +use crate::RunEndData; use crate::ops::find_slice_end_index; - -impl FromArrowArray<&RunArray> for RunEndArray +impl FromArrowArray<&RunArray> for RunEndData where R::Native: NativePType, { @@ -31,23 +31,24 @@ where .reinterpret_cast(R::Native::PTYPE.to_unsigned()); let values = ArrayRef::from_arrow(array.values().as_ref(), nullable)?; + let ends_array = ends.into_array(); let (ends_slice, values_slice) = if offset == 0 && len == array.run_ends().max_value() { - (ends.into_array(), values) + (ends_array, values) } else { - let slice_begin = ends + let slice_begin = ends_array .as_primitive_typed() .search_sorted(&PValue::from(offset), SearchSortedSide::Right)? - .to_ends_index(ends.len()); - let slice_end = find_slice_end_index(&ends.clone().into_array(), offset + len)?; + .to_ends_index(ends_array.len()); + let slice_end = find_slice_end_index(&ends_array, offset + len)?; ( - ends.slice(slice_begin..slice_end)?, + ends_array.slice(slice_begin..slice_end)?, values.slice(slice_begin..slice_end)?, ) }; // SAFETY: arrow-rs enforces the RunEndArray invariants, we inherit their guarantees - Ok(unsafe { RunEndArray::new_unchecked(ends_slice, values_slice, offset, len) }) + Ok(unsafe { RunEndData::new_unchecked(ends_slice, values_slice, offset, len) }) } } @@ -94,7 +95,7 @@ mod tests { let arrow_run_array = RunArray::::try_new(&run_ends, &values).unwrap(); // Convert to Vortex - let vortex_array = RunEndArray::from_arrow(&arrow_run_array, false)?; + let vortex_array = RunEndData::from_arrow(&arrow_run_array, false)?; assert_arrays_eq!( vortex_array.as_ref(), @@ -111,7 +112,7 @@ mod tests { let arrow_run_array = RunArray::::try_new(&run_ends, &values).unwrap(); // Convert to Vortex with nullable=true - let vortex_array = RunEndArray::from_arrow(&arrow_run_array, true)?; + let vortex_array = RunEndData::from_arrow(&arrow_run_array, true)?; assert_arrays_eq!( vortex_array.as_ref(), @@ -135,7 +136,7 @@ mod tests { let arrow_run_array = RunArray::::try_new(&run_ends, &values).unwrap(); // Convert to Vortex - let vortex_array = RunEndArray::from_arrow(&arrow_run_array, false)?; + let vortex_array = RunEndData::from_arrow(&arrow_run_array, false)?; assert_arrays_eq!(vortex_array, buffer![1.5f64, 2.5, 2.5, 3.5].into_array()); Ok(()) @@ -155,7 +156,7 @@ mod tests { let sliced_array = arrow_run_array.slice(1, 6); // Convert the sliced array to Vortex - let vortex_array = RunEndArray::from_arrow(&sliced_array, false)?; + let vortex_array = RunEndData::from_arrow(&sliced_array, false)?; assert_arrays_eq!( vortex_array, buffer![100, 200, 200, 200, 300, 300].into_array() @@ -178,7 +179,7 @@ mod tests { let sliced_array = arrow_run_array.slice(4, 6); // Convert to Vortex with nullable=true - let vortex_array = RunEndArray::from_arrow(&sliced_array, true)?; + let vortex_array = RunEndData::from_arrow(&sliced_array, true)?; assert_arrays_eq!( vortex_array, @@ -209,7 +210,7 @@ mod tests { let sliced_array = arrow_run_array.slice(4, 0); // Convert to Vortex with nullable=true - let vortex_array = RunEndArray::from_arrow(&sliced_array, true)?; + let vortex_array = RunEndData::from_arrow(&sliced_array, true)?; // Verify properties assert_eq!(vortex_array.len(), 0); @@ -240,7 +241,7 @@ mod tests { &Int32Array::from(vec![3i32, 5, 8]), &Int32Array::from(vec![10, 20, 30]), )?; - let vortex_array = RunEndArray::from_arrow(&original, false)?; + let vortex_array = RunEndData::from_arrow(&original, false)?; let target = ree_type(DataType::Int32, DataType::Int32); let result = execute(vortex_array.into_array(), &target)?; @@ -274,7 +275,7 @@ mod tests { #[case] expected_values: &[i32], ) -> VortexResult<()> { let array = - RunEndArray::encode(PrimitiveArray::from_iter(input.iter().copied()).into_array())?; + RunEndData::encode(PrimitiveArray::from_iter(input.iter().copied()).into_array())?; let sliced = array.into_array().slice(slice_range.clone())?; let target = ree_type(DataType::Int32, DataType::Int32); let result = execute(sliced, &target)?; diff --git a/encodings/runend/src/compress.rs b/encodings/runend/src/compress.rs index 0a841c28194..8554db36c4f 100644 --- a/encodings/runend/src/compress.rs +++ b/encodings/runend/src/compress.rs @@ -38,7 +38,9 @@ pub fn runend_encode(array: &PrimitiveArray) -> (PrimitiveArray, ArrayRef) { Validity::AllInvalid => { // We can trivially return an all-null REE array let ends = PrimitiveArray::new(buffer![array.len() as u64], Validity::NonNullable); - ends.statistics() + ends.clone() + .into_array() + .statistics() .set(Stat::IsStrictSorted, Precision::Exact(true.into())); return ( ends, @@ -70,12 +72,11 @@ pub fn runend_encode(array: &PrimitiveArray) -> (PrimitiveArray, ArrayRef) { } }; - let ends = ends - .narrow() - .vortex_expect("Ends must succeed downcasting") - .to_primitive(); + let ends = ends.narrow().vortex_expect("Ends must succeed downcasting"); - ends.statistics() + ends.clone() + .into_array() + .statistics() .set(Stat::IsStrictSorted, Precision::Exact(true.into())); (ends, values) @@ -174,7 +175,7 @@ pub fn runend_decode_primitive( offset: usize, length: usize, ) -> VortexResult { - let validity_mask = values.validity_mask()?; + let validity_mask = values.validity_mask(); Ok(match_each_native_ptype!(values.ptype(), |P| { match_each_unsigned_integer_ptype!(ends.ptype(), |E| { runend_decode_typed_primitive( @@ -274,7 +275,7 @@ pub fn runend_decode_varbinview( offset: usize, length: usize, ) -> VortexResult { - let validity_mask = values.validity_mask()?; + let validity_mask = values.validity_mask(); let views = values.views(); let (decoded_views, validity) = match_each_unsigned_integer_ptype!(ends.ptype(), |E| { @@ -287,7 +288,7 @@ pub fn runend_decode_varbinview( ) }); - let parts = values.into_parts(); + let parts = values.into_inner().into_parts(); let view_handle = BufferHandle::new_host(decoded_views.into_byte_buffer()); // SAFETY: we are expanding views from a valid VarBinViewArray with the same diff --git a/encodings/runend/src/compute/cast.rs b/encodings/runend/src/compute/cast.rs index d106c2e86aa..be0a770bc3c 100644 --- a/encodings/runend/src/compute/cast.rs +++ b/encodings/runend/src/compute/cast.rs @@ -10,7 +10,7 @@ use vortex_error::VortexResult; use crate::RunEnd; use crate::RunEndArray; - +use crate::RunEndData; impl CastReduce for RunEnd { fn cast(array: &RunEndArray, dtype: &DType) -> VortexResult> { // Cast the values array to the target type @@ -19,7 +19,7 @@ impl CastReduce for RunEnd { // SAFETY: casting does not affect the ends being valid unsafe { Ok(Some( - RunEndArray::new_unchecked( + RunEndData::new_unchecked( array.ends().clone(), casted_values, array.offset(), @@ -51,7 +51,7 @@ mod tests { #[test] fn test_cast_runend_i32_to_i64() { - let runend = RunEndArray::try_new( + let runend = RunEndData::try_new( buffer![3u64, 5, 8, 10].into_array(), buffer![100i32, 200, 100, 300].into_array(), ) @@ -90,7 +90,7 @@ mod tests { #[test] fn test_cast_runend_nullable() { - let runend = RunEndArray::try_new( + let runend = RunEndData::try_new( buffer![2u64, 4, 7].into_array(), PrimitiveArray::from_option_iter([Some(10i32), None, Some(20)]).into_array(), ) @@ -109,7 +109,7 @@ mod tests { #[test] fn test_cast_runend_with_offset() { // Create a RunEndArray: [100, 100, 100, 200, 200, 300, 300, 300, 300, 300] - let runend = RunEndArray::try_new( + let runend = RunEndData::try_new( buffer![3u64, 5, 10].into_array(), buffer![100i32, 200, 300].into_array(), ) @@ -134,23 +134,23 @@ mod tests { } #[rstest] - #[case(RunEndArray::try_new( + #[case(RunEndData::try_new( buffer![3u64, 5, 8].into_array(), buffer![100i32, 200, 300].into_array() ).unwrap())] - #[case(RunEndArray::try_new( + #[case(RunEndData::try_new( buffer![1u64, 4, 10].into_array(), buffer![1.5f32, 2.5, 3.5].into_array() ).unwrap())] - #[case(RunEndArray::try_new( + #[case(RunEndData::try_new( buffer![2u64, 3, 5].into_array(), PrimitiveArray::from_option_iter([Some(42i32), None, Some(84)]).into_array() ).unwrap())] - #[case(RunEndArray::try_new( + #[case(RunEndData::try_new( buffer![10u64].into_array(), buffer![255u8].into_array() ).unwrap())] - #[case(RunEndArray::try_new( + #[case(RunEndData::try_new( buffer![2u64, 4, 6, 8, 10].into_array(), BoolArray::from_iter(vec![true, false, true, false, true]).into_array() ).unwrap())] diff --git a/encodings/runend/src/compute/compare.rs b/encodings/runend/src/compute/compare.rs index 9601d0502d8..b9092580032 100644 --- a/encodings/runend/src/compute/compare.rs +++ b/encodings/runend/src/compute/compare.rs @@ -16,6 +16,7 @@ use vortex_error::VortexResult; use crate::RunEnd; use crate::RunEndArray; +use crate::RunEndData; use crate::decompress_bool::runend_decode_bools; impl CompareKernel for RunEnd { @@ -58,7 +59,7 @@ mod test { use crate::RunEndArray; fn ree_array() -> RunEndArray { - RunEndArray::encode( + RunEndData::encode( PrimitiveArray::from_iter([1, 1, 1, 4, 4, 4, 2, 2, 5, 5, 5, 5]).into_array(), ) .unwrap() diff --git a/encodings/runend/src/compute/fill_null.rs b/encodings/runend/src/compute/fill_null.rs index 0f0445ba58e..4348c102d36 100644 --- a/encodings/runend/src/compute/fill_null.rs +++ b/encodings/runend/src/compute/fill_null.rs @@ -11,14 +11,15 @@ use vortex_error::VortexResult; use crate::RunEnd; use crate::RunEndArray; use crate::RunEndArrayParts; +use crate::RunEndData; impl FillNullReduce for RunEnd { fn fill_null(array: &RunEndArray, fill_value: &Scalar) -> VortexResult> { - let RunEndArrayParts { values, ends } = array.clone().into_parts(); + let RunEndArrayParts { values, ends } = array.clone().into_inner().into_parts(); let new_values = values.fill_null(fill_value.clone())?; // SAFETY: modifying values only, does not affect ends Ok(Some( - unsafe { RunEndArray::new_unchecked(ends, new_values, array.offset(), array.len()) } + unsafe { RunEndData::new_unchecked(ends, new_values, array.offset(), array.len()) } .into_array(), )) } diff --git a/encodings/runend/src/compute/filter.rs b/encodings/runend/src/compute/filter.rs index cf6f6043de9..77969dcd767 100644 --- a/encodings/runend/src/compute/filter.rs +++ b/encodings/runend/src/compute/filter.rs @@ -21,8 +21,8 @@ use vortex_mask::Mask; use crate::RunEnd; use crate::RunEndArray; +use crate::RunEndData; use crate::compute::take::take_indices_unchecked; - const FILTER_TAKE_THRESHOLD: f64 = 0.1; impl FilterKernel for RunEnd { @@ -59,7 +59,7 @@ impl FilterKernel for RunEnd { // SAFETY: guaranteed by implementation of filter_run_end_primitive unsafe { Ok(Some( - RunEndArray::new_unchecked( + RunEndData::new_unchecked( run_ends.into_array(), values, 0, @@ -124,7 +124,7 @@ mod tests { use crate::RunEndArray; fn ree_array() -> RunEndArray { - RunEndArray::encode( + RunEndData::encode( PrimitiveArray::from_iter([1, 1, 1, 4, 4, 4, 2, 2, 5, 5, 5, 5]).into_array(), ) .unwrap() @@ -137,7 +137,7 @@ mod tests { assert_arrays_eq!( filtered, - RunEndArray::new( + RunEndData::new( PrimitiveArray::from_iter([1u8, 2, 3]).into_array(), PrimitiveArray::from_iter([1i32, 4, 2]).into_array() ) diff --git a/encodings/runend/src/compute/is_sorted.rs b/encodings/runend/src/compute/is_sorted.rs index b0d00bfb146..fdad432d19b 100644 --- a/encodings/runend/src/compute/is_sorted.rs +++ b/encodings/runend/src/compute/is_sorted.rs @@ -39,7 +39,10 @@ impl DynAggregateKernel for RunEndIsSortedKernel { let result = if options.strict { // Strict sort with run-end encoding means we need to canonicalize // since run-end encoding repeats values. - is_strict_sorted(&array.to_canonical()?.into_array(), ctx)? + is_strict_sorted( + &array.clone().into_array().to_canonical()?.into_array(), + ctx, + )? } else { is_sorted(array.values(), ctx)? }; diff --git a/encodings/runend/src/compute/mod.rs b/encodings/runend/src/compute/mod.rs index 0e4f4ce8d1a..becd3c1dfeb 100644 --- a/encodings/runend/src/compute/mod.rs +++ b/encodings/runend/src/compute/mod.rs @@ -1,6 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors +use crate::RunEndData; mod cast; mod compare; mod fill_null; @@ -23,24 +24,24 @@ mod tests { #[rstest] // Simple run-end arrays - #[case::runend_i32(RunEndArray::encode( + #[case::runend_i32(RunEndData::encode( buffer![1i32, 1, 1, 2, 2, 3, 3, 3, 3].into_array() ).unwrap())] - #[case::runend_single_run(RunEndArray::encode( + #[case::runend_single_run(RunEndData::encode( buffer![5i32, 5, 5, 5, 5].into_array() ).unwrap())] - #[case::runend_alternating(RunEndArray::encode( + #[case::runend_alternating(RunEndData::encode( buffer![1i32, 2, 1, 2, 1, 2].into_array() ).unwrap())] // Different types - #[case::runend_u64(RunEndArray::encode( + #[case::runend_u64(RunEndData::encode( buffer![100u64, 100, 200, 200, 200].into_array() ).unwrap())] // Edge cases - #[case::runend_single(RunEndArray::encode( + #[case::runend_single(RunEndData::encode( buffer![42i32].into_array() ).unwrap())] - #[case::runend_large(RunEndArray::encode( + #[case::runend_large(RunEndData::encode( PrimitiveArray::from_iter((0..1000).map(|i| i / 10)).into_array() ).unwrap())] diff --git a/encodings/runend/src/compute/take.rs b/encodings/runend/src/compute/take.rs index e8ad6dfdf3c..c942ee3f8f6 100644 --- a/encodings/runend/src/compute/take.rs +++ b/encodings/runend/src/compute/take.rs @@ -22,6 +22,7 @@ use vortex_error::vortex_bail; use crate::RunEnd; use crate::RunEndArray; +use crate::RunEndData; impl TakeExecute for RunEnd { #[expect( @@ -105,7 +106,7 @@ mod test { use crate::RunEndArray; fn ree_array() -> RunEndArray { - RunEndArray::encode(buffer![1, 1, 1, 4, 4, 4, 2, 2, 5, 5, 5, 5].into_array()).unwrap() + RunEndData::encode(buffer![1, 1, 1, 4, 4, 4, 2, 2, 5, 5, 5, 5].into_array()).unwrap() } #[test] @@ -153,10 +154,10 @@ mod test { #[rstest] #[case(ree_array())] - #[case(RunEndArray::encode( + #[case(RunEndData::encode( buffer![1u8, 1, 2, 2, 2, 3, 3, 3, 3, 4].into_array(), ).unwrap())] - #[case(RunEndArray::encode( + #[case(RunEndData::encode( PrimitiveArray::from_option_iter([ Some(10), Some(10), @@ -168,9 +169,9 @@ mod test { ]) .into_array(), ).unwrap())] - #[case(RunEndArray::encode(buffer![42i32, 42, 42, 42, 42].into_array()) + #[case(RunEndData::encode(buffer![42i32, 42, 42, 42, 42].into_array()) .unwrap())] - #[case(RunEndArray::encode( + #[case(RunEndData::encode( buffer![1i32, 2, 3, 4, 5, 6, 7, 8, 9, 10].into_array(), ).unwrap())] #[case({ @@ -180,7 +181,7 @@ mod test { values.push(i); } } - RunEndArray::encode(PrimitiveArray::from_iter(values).into_array()).unwrap() + RunEndData::encode(PrimitiveArray::from_iter(values).into_array()).unwrap() })] fn test_take_runend_conformance(#[case] array: RunEndArray) { test_take_conformance(&array.into_array()); @@ -189,7 +190,7 @@ mod test { #[rstest] #[case(ree_array().slice(3..6).unwrap())] #[case({ - let array = RunEndArray::encode( + let array = RunEndData::encode( buffer![1i32, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3].into_array(), ) .unwrap(); diff --git a/encodings/runend/src/compute/take_from.rs b/encodings/runend/src/compute/take_from.rs index 12cb415bd12..e01cf26784a 100644 --- a/encodings/runend/src/compute/take_from.rs +++ b/encodings/runend/src/compute/take_from.rs @@ -12,6 +12,7 @@ use vortex_error::VortexResult; use crate::RunEnd; use crate::RunEndArray; +use crate::RunEndData; #[derive(Debug)] pub(crate) struct RunEndTakeFrom; @@ -38,7 +39,7 @@ impl ExecuteParentKernel for RunEndTakeFrom { // Create a new run-end array containing values as values, instead of indices as values. // SAFETY: we are copying ends from an existing valid RunEndArray let ree_array = unsafe { - RunEndArray::new_unchecked( + RunEndData::new_unchecked( array.ends().clone(), dict.values().take(array.values().clone())?, array.offset(), @@ -73,7 +74,7 @@ mod tests { /// Codes: `[0, 0, 0, 1, 1, 0, 0]` /// RunEnd encoded codes: ends=`[3, 5, 7]`, values=`[0, 1, 0]` fn make_dict_with_runend_codes() -> (RunEndArray, DictArray) { - let codes = RunEndArray::encode(buffer![0u32, 0, 0, 1, 1, 0, 0].into_array()).unwrap(); + let codes = RunEndData::encode(buffer![0u32, 0, 0, 1, 1, 0, 0].into_array()).unwrap(); let values = buffer![2i32, 3].into_array(); let dict = DictArray::try_new(codes.clone().into_array(), values).unwrap(); (codes, dict) @@ -98,7 +99,7 @@ mod tests { let (codes, dict) = make_dict_with_runend_codes(); // Slice codes to positions 2..5 → logical codes [0, 1, 1] → values [2, 3, 3] let sliced_codes = unsafe { - RunEndArray::new_unchecked( + RunEndData::new_unchecked( codes.ends().clone(), codes.values().clone(), 2, // offset @@ -121,7 +122,7 @@ mod tests { let (codes, dict) = make_dict_with_runend_codes(); // Slice codes to positions 3..7 → logical codes [1, 1, 0, 0] → values [3, 3, 2, 2] let sliced_codes = unsafe { - RunEndArray::new_unchecked( + RunEndData::new_unchecked( codes.ends().clone(), codes.values().clone(), 3, // offset at exact run boundary @@ -144,7 +145,7 @@ mod tests { let (codes, dict) = make_dict_with_runend_codes(); // Slice to single element at position 4 → code=1 → value=3 let sliced_codes = unsafe { - RunEndArray::new_unchecked( + RunEndData::new_unchecked( codes.ends().slice(1..3)?, codes.values().slice(1..3)?, 4, // offset diff --git a/encodings/runend/src/decompress_bool.rs b/encodings/runend/src/decompress_bool.rs index 407745d9154..13825750f48 100644 --- a/encodings/runend/src/decompress_bool.rs +++ b/encodings/runend/src/decompress_bool.rs @@ -35,7 +35,7 @@ pub fn runend_decode_bools( offset: usize, length: usize, ) -> VortexResult { - let validity = values.validity_mask()?; + let validity = values.validity_mask(); let values_buf = values.to_bit_buffer(); let nullability = values.dtype().nullability(); diff --git a/encodings/runend/src/kernel.rs b/encodings/runend/src/kernel.rs index 42a51da7070..d8f6fdd214b 100644 --- a/encodings/runend/src/kernel.rs +++ b/encodings/runend/src/kernel.rs @@ -18,6 +18,7 @@ use vortex_error::VortexResult; use crate::RunEnd; use crate::RunEndArray; +use crate::RunEndData; use crate::compute::take_from::RunEndTakeFrom; pub(super) const PARENT_KERNELS: ParentKernelSet = ParentKernelSet::new(&[ @@ -63,7 +64,7 @@ fn slice(array: &RunEndArray, range: Range) -> VortexResult { // SAFETY: we maintain the ends invariant in our slice implementation Ok(unsafe { - RunEndArray::new_unchecked( + RunEndData::new_unchecked( array.ends().slice(slice_begin..slice_end)?, array.values().slice(slice_begin..slice_end)?, range.start + array.offset(), diff --git a/encodings/runend/src/ops.rs b/encodings/runend/src/ops.rs index 098f4b35051..f0af4730f0f 100644 --- a/encodings/runend/src/ops.rs +++ b/encodings/runend/src/ops.rs @@ -8,15 +8,16 @@ use vortex_array::scalar::Scalar; use vortex_array::search_sorted::SearchResult; use vortex_array::search_sorted::SearchSorted; use vortex_array::search_sorted::SearchSortedSide; +use vortex_array::vtable::Array; use vortex_array::vtable::OperationsVTable; use vortex_error::VortexResult; use crate::RunEnd; -use crate::RunEndArray; +use crate::RunEndData; impl OperationsVTable for RunEnd { fn scalar_at( - array: &RunEndArray, + array: &Array, index: usize, _ctx: &mut ExecutionCtx, ) -> VortexResult { @@ -63,7 +64,7 @@ mod tests { #[test] fn slice_array() { - let arr = RunEndArray::try_new( + let arr = RunEndData::try_new( buffer![2u32, 5, 10].into_array(), buffer![1i32, 2, 3].into_array(), ) @@ -82,7 +83,7 @@ mod tests { #[test] fn double_slice() { - let arr = RunEndArray::try_new( + let arr = RunEndData::try_new( buffer![2u32, 5, 10].into_array(), buffer![1i32, 2, 3].into_array(), ) @@ -99,7 +100,7 @@ mod tests { #[test] fn slice_end_inclusive() { - let arr = RunEndArray::try_new( + let arr = RunEndData::try_new( buffer![2u32, 5, 10].into_array(), buffer![1i32, 2, 3].into_array(), ) @@ -118,7 +119,7 @@ mod tests { #[test] fn slice_at_end() { - let re_array = RunEndArray::try_new( + let re_array = RunEndData::try_new( buffer![7_u64, 10].into_array(), buffer![2_u64, 3].into_array(), ) @@ -132,7 +133,7 @@ mod tests { #[test] fn slice_single_end() { - let re_array = RunEndArray::try_new( + let re_array = RunEndData::try_new( buffer![7_u64, 10].into_array(), buffer![2_u64, 3].into_array(), ) @@ -148,7 +149,7 @@ mod tests { #[test] fn ree_scalar_at_end() { - let scalar = RunEndArray::encode(buffer![1, 1, 1, 4, 4, 4, 2, 2, 5, 5, 5, 5].into_array()) + let scalar = RunEndData::encode(buffer![1, 1, 1, 4, 4, 4, 2, 2, 5, 5, 5, 5].into_array()) .unwrap() .scalar_at(11) .unwrap(); @@ -160,7 +161,7 @@ mod tests { fn slice_along_run_boundaries() { // Create a runend array with runs: [1, 1, 1] [4, 4, 4] [2, 2] [5, 5, 5, 5] // Run ends at indices: 3, 6, 8, 12 - let arr = RunEndArray::try_new( + let arr = RunEndData::try_new( buffer![3u32, 6, 8, 12].into_array(), buffer![1i32, 4, 2, 5].into_array(), ) diff --git a/encodings/runend/src/rules.rs b/encodings/runend/src/rules.rs index ead3cc5018e..7ef30e573dc 100644 --- a/encodings/runend/src/rules.rs +++ b/encodings/runend/src/rules.rs @@ -16,6 +16,7 @@ use vortex_error::VortexResult; use crate::RunEnd; use crate::RunEndArray; +use crate::RunEndData; pub(super) const RULES: ParentRuleSet = ParentRuleSet::new(&[ // CastReduceAdaptor must come before RunEndScalarFnRule so that cast operations are executed @@ -79,7 +80,7 @@ impl ArrayParentReduceRule for RunEndScalarFnRule { Ok(Some( unsafe { - RunEndArray::new_unchecked( + RunEndData::new_unchecked( run_end.ends().clone(), new_values, run_end.offset(), diff --git a/encodings/sequence/public-api.lock b/encodings/sequence/public-api.lock index 2568daccc35..5e398ee93e3 100644 --- a/encodings/sequence/public-api.lock +++ b/encodings/sequence/public-api.lock @@ -84,7 +84,7 @@ pub fn vortex_sequence::Sequence::reduce_parent(array: &vortex_array::vtable::ty pub fn vortex_sequence::Sequence::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_sequence::Sequence::stats(array: &vortex_sequence::SequenceArray) -> vortex_array::stats::array::StatsSetRef<'_> +pub fn vortex_sequence::Sequence::stats(array: &vortex_sequence::SequenceArray) -> &vortex_array::stats::array::ArrayStats pub fn vortex_sequence::Sequence::vtable(_array: &Self::Array) -> &Self diff --git a/encodings/sequence/src/array.rs b/encodings/sequence/src/array.rs index 1f638eae90b..1f36c2ed233 100644 --- a/encodings/sequence/src/array.rs +++ b/encodings/sequence/src/array.rs @@ -29,7 +29,6 @@ use vortex_array::scalar::ScalarValue; use vortex_array::serde::ArrayChildren; use vortex_array::stats::ArrayStats; use vortex_array::stats::StatsSet; -use vortex_array::stats::StatsSetRef; use vortex_array::validity::Validity; use vortex_array::vtable; use vortex_array::vtable::Array; @@ -49,7 +48,7 @@ use crate::compress::sequence_decompress; use crate::kernel::PARENT_KERNELS; use crate::rules::RULES; -vtable!(Sequence); +vtable!(Sequence, Sequence, SequenceData); #[derive(Debug, Clone, Copy)] pub struct SequenceMetadata { @@ -76,7 +75,7 @@ pub struct SequenceArrayParts { #[derive(Clone, Debug)] /// An array representing the equation `A[i] = base + i * multiplier`. -pub struct SequenceArray { +pub struct SequenceData { base: PValue, multiplier: PValue, dtype: DType, @@ -84,7 +83,7 @@ pub struct SequenceArray { stats_set: ArrayStats, } -impl SequenceArray { +impl SequenceData { pub fn try_new_typed>( base: T, multiplier: T, @@ -173,6 +172,24 @@ impl SequenceArray { } } + /// Returns the length of the array. + #[inline] + pub fn len(&self) -> usize { + self.len + } + + /// Returns whether the array is empty. + #[inline] + pub fn is_empty(&self) -> bool { + self.len == 0 + } + + /// Returns the logical data type of the array. + #[inline] + pub fn dtype(&self) -> &DType { + &self.dtype + } + pub fn ptype(&self) -> PType { self.dtype.as_ptype() } @@ -238,7 +255,7 @@ impl SequenceArray { } impl VTable for Sequence { - type Array = SequenceArray; + type Array = SequenceData; type Metadata = SequenceMetadata; type OperationsVTable = Self; @@ -252,61 +269,57 @@ impl VTable for Sequence { Self::ID } - fn len(array: &SequenceArray) -> usize { + fn len(array: &SequenceData) -> usize { array.len } - fn dtype(array: &SequenceArray) -> &DType { + fn dtype(array: &SequenceData) -> &DType { &array.dtype } - fn stats(array: &SequenceArray) -> StatsSetRef<'_> { - array.stats_set.to_ref(array.as_ref()) + fn stats(array: &SequenceData) -> &ArrayStats { + &array.stats_set } - fn array_hash( - array: &SequenceArray, - state: &mut H, - _precision: Precision, - ) { + fn array_hash(array: &Array, state: &mut H, _precision: Precision) { array.base.hash(state); array.multiplier.hash(state); array.dtype.hash(state); array.len.hash(state); } - fn array_eq(array: &SequenceArray, other: &SequenceArray, _precision: Precision) -> bool { + fn array_eq(array: &Array, other: &Array, _precision: Precision) -> bool { array.base == other.base && array.multiplier == other.multiplier && array.dtype == other.dtype && array.len == other.len } - fn nbuffers(_array: &SequenceArray) -> usize { + fn nbuffers(_array: &Array) -> usize { 0 } - fn buffer(_array: &SequenceArray, idx: usize) -> BufferHandle { + fn buffer(_array: &Array, idx: usize) -> BufferHandle { vortex_panic!("SequenceArray buffer index {idx} out of bounds") } - fn buffer_name(_array: &SequenceArray, idx: usize) -> Option { + fn buffer_name(_array: &Array, idx: usize) -> Option { vortex_panic!("SequenceArray buffer_name index {idx} out of bounds") } - fn nchildren(_array: &SequenceArray) -> usize { + fn nchildren(_array: &Array) -> usize { 0 } - fn child(_array: &SequenceArray, idx: usize) -> ArrayRef { + fn child(_array: &Array, idx: usize) -> ArrayRef { vortex_panic!("SequenceArray child index {idx} out of bounds") } - fn child_name(_array: &SequenceArray, idx: usize) -> String { + fn child_name(_array: &Array, idx: usize) -> String { vortex_panic!("SequenceArray child_name index {idx} out of bounds") } - fn metadata(array: &SequenceArray) -> VortexResult { + fn metadata(array: &Array) -> VortexResult { Ok(SequenceMetadata { base: array.base(), multiplier: array.multiplier(), @@ -368,8 +381,8 @@ impl VTable for Sequence { metadata: &Self::Metadata, _buffers: &[BufferHandle], _children: &dyn ArrayChildren, - ) -> VortexResult { - SequenceArray::try_new( + ) -> VortexResult { + SequenceData::try_new( metadata.base, metadata.multiplier, dtype.as_ptype(), @@ -411,7 +424,7 @@ impl VTable for Sequence { impl OperationsVTable for Sequence { fn scalar_at( - array: &SequenceArray, + array: &Array, index: usize, _ctx: &mut ExecutionCtx, ) -> VortexResult { @@ -423,7 +436,7 @@ impl OperationsVTable for Sequence { } impl ValidityVTable for Sequence { - fn validity(_array: &SequenceArray) -> VortexResult { + fn validity(_array: &Array) -> VortexResult { Ok(Validity::AllValid) } } @@ -433,6 +446,38 @@ pub struct Sequence; impl Sequence { pub const ID: ArrayId = ArrayId::new_ref("vortex.sequence"); + + /// Construct a new [`SequenceArray`] from its components. + pub fn try_new( + base: PValue, + multiplier: PValue, + ptype: PType, + nullability: Nullability, + length: usize, + ) -> VortexResult { + Ok(Array::from_inner(SequenceData::try_new( + base, + multiplier, + ptype, + nullability, + length, + )?)) + } + + /// Construct a new typed [`SequenceArray`] from base/multiplier values. + pub fn try_new_typed>( + base: T, + multiplier: T, + nullability: Nullability, + length: usize, + ) -> VortexResult { + Ok(Array::from_inner(SequenceData::try_new_typed( + base, + multiplier, + nullability, + length, + )?)) + } } #[cfg(test)] @@ -451,7 +496,7 @@ mod tests { #[test] fn test_sequence_canonical() { - let arr = SequenceArray::try_new_typed(2i64, 3, Nullability::NonNullable, 4).unwrap(); + let arr = SequenceData::try_new_typed(2i64, 3, Nullability::NonNullable, 4).unwrap(); let canon = PrimitiveArray::from_iter((0..4).map(|i| 2i64 + i * 3)); @@ -460,7 +505,7 @@ mod tests { #[test] fn test_sequence_slice_canonical() { - let arr = SequenceArray::try_new_typed(2i64, 3, Nullability::NonNullable, 4) + let arr = SequenceData::try_new_typed(2i64, 3, Nullability::NonNullable, 4) .unwrap() .slice(2..3) .unwrap(); @@ -472,7 +517,7 @@ mod tests { #[test] fn test_sequence_scalar_at() { - let scalar = SequenceArray::try_new_typed(2i64, 3, Nullability::NonNullable, 4) + let scalar = SequenceData::try_new_typed(2i64, 3, Nullability::NonNullable, 4) .unwrap() .scalar_at(2) .unwrap(); @@ -485,19 +530,19 @@ mod tests { #[test] fn test_sequence_min_max() { - assert!(SequenceArray::try_new_typed(-127i8, -1i8, Nullability::NonNullable, 2).is_ok()); - assert!(SequenceArray::try_new_typed(126i8, -1i8, Nullability::NonNullable, 2).is_ok()); + assert!(SequenceData::try_new_typed(-127i8, -1i8, Nullability::NonNullable, 2).is_ok()); + assert!(SequenceData::try_new_typed(126i8, -1i8, Nullability::NonNullable, 2).is_ok()); } #[test] fn test_sequence_too_big() { - assert!(SequenceArray::try_new_typed(127i8, 1i8, Nullability::NonNullable, 2).is_err()); - assert!(SequenceArray::try_new_typed(-128i8, -1i8, Nullability::NonNullable, 2).is_err()); + assert!(SequenceData::try_new_typed(127i8, 1i8, Nullability::NonNullable, 2).is_err()); + assert!(SequenceData::try_new_typed(-128i8, -1i8, Nullability::NonNullable, 2).is_err()); } #[test] fn positive_multiplier_is_strict_sorted() -> VortexResult<()> { - let arr = SequenceArray::try_new_typed(0i64, 3, Nullability::NonNullable, 4)?; + let arr = SequenceData::try_new_typed(0i64, 3, Nullability::NonNullable, 4)?; let is_sorted = arr .statistics() @@ -513,7 +558,7 @@ mod tests { #[test] fn zero_multiplier_is_sorted_not_strict() -> VortexResult<()> { - let arr = SequenceArray::try_new_typed(5i64, 0, Nullability::NonNullable, 4)?; + let arr = SequenceData::try_new_typed(5i64, 0, Nullability::NonNullable, 4)?; let is_sorted = arr .statistics() @@ -529,7 +574,7 @@ mod tests { #[test] fn negative_multiplier_not_sorted() -> VortexResult<()> { - let arr = SequenceArray::try_new_typed(10i64, -1, Nullability::NonNullable, 4)?; + let arr = SequenceData::try_new_typed(10i64, -1, Nullability::NonNullable, 4)?; let is_sorted = arr .statistics() @@ -548,7 +593,7 @@ mod tests { #[test] fn test_large_multiplier_sorted() -> VortexResult<()> { let large_multiplier = (i64::MAX as u64) + 1; - let arr = SequenceArray::try_new_typed(0, large_multiplier, Nullability::NonNullable, 2)?; + let arr = SequenceData::try_new_typed(0, large_multiplier, Nullability::NonNullable, 2)?; let is_sorted = arr .statistics() diff --git a/encodings/sequence/src/compress.rs b/encodings/sequence/src/compress.rs index 09ffa47bc55..1696e7f678e 100644 --- a/encodings/sequence/src/compress.rs +++ b/encodings/sequence/src/compress.rs @@ -19,8 +19,8 @@ use vortex_buffer::trusted_len::TrustedLen; use vortex_error::VortexResult; use crate::SequenceArray; - /// An iterator that yields `base, base + step, base + 2*step, ...` via repeated addition. +use crate::SequenceData; struct SequenceIter { acc: T, step: T, @@ -89,7 +89,7 @@ pub fn sequence_encode(primitive_array: &PrimitiveArray) -> VortexResult + CheckedAdd + CheckedSu ) -> VortexResult> { if slice.len() == 1 { // The multiplier here can be any value, zero is chosen - return SequenceArray::try_new_typed(slice[0], P::zero(), nullability, 1) + return SequenceData::try_new_typed(slice[0], P::zero(), nullability, 1) .map(|a| Some(a.into_array())); } let base = slice[0]; @@ -124,7 +124,7 @@ fn encode_primitive_array + CheckedAdd + CheckedSu return Ok(None); } - if SequenceArray::try_last(base.into(), multiplier.into(), P::PTYPE, slice.len()).is_err() { + if SequenceData::try_last(base.into(), multiplier.into(), P::PTYPE, slice.len()).is_err() { // If the last value is out of range, we cannot encode return Ok(None); } @@ -133,7 +133,7 @@ fn encode_primitive_array + CheckedAdd + CheckedSu .windows(2) .all(|w| Some(w[1]) == w[0].checked_add(&multiplier)) .then_some( - SequenceArray::try_new_typed(base, multiplier, nullability, slice.len()) + SequenceData::try_new_typed(base, multiplier, nullability, slice.len()) .map(|a| a.into_array()), ) .transpose() diff --git a/encodings/sequence/src/compute/cast.rs b/encodings/sequence/src/compute/cast.rs index 85a42b74c81..ff602639005 100644 --- a/encodings/sequence/src/compute/cast.rs +++ b/encodings/sequence/src/compute/cast.rs @@ -13,7 +13,7 @@ use vortex_error::vortex_err; use crate::Sequence; use crate::SequenceArray; - +use crate::SequenceData; impl CastReduce for Sequence { fn cast(array: &SequenceArray, dtype: &DType) -> VortexResult> { // SequenceArray represents arithmetic sequences (base + i * multiplier) which @@ -32,7 +32,7 @@ impl CastReduce for Sequence { // For SequenceArray, we can just create a new one with the same parameters // but different nullability return Ok(Some( - SequenceArray::try_new( + SequenceData::try_new( array.base(), array.multiplier(), *target_ptype, @@ -71,7 +71,7 @@ impl CastReduce for Sequence { .ok_or_else(|| vortex_err!("Cast resulted in null multiplier value"))?; return Ok(Some( - SequenceArray::try_new( + SequenceData::try_new( new_base, new_multiplier, *target_ptype, @@ -104,7 +104,7 @@ mod tests { #[test] fn test_cast_sequence_nullability() { let sequence = - SequenceArray::try_new_typed(0u32, 1u32, Nullability::NonNullable, 4).unwrap(); + SequenceData::try_new_typed(0u32, 1u32, Nullability::NonNullable, 4).unwrap(); // Cast to nullable let casted = sequence @@ -120,7 +120,7 @@ mod tests { #[test] fn test_cast_sequence_u32_to_i64() { let sequence = - SequenceArray::try_new_typed(100u32, 10u32, Nullability::NonNullable, 4).unwrap(); + SequenceData::try_new_typed(100u32, 10u32, Nullability::NonNullable, 4).unwrap(); let casted = sequence .into_array() @@ -140,7 +140,7 @@ mod tests { fn test_cast_sequence_i16_to_i32_nullable() { // Test ptype change AND nullability change in one cast let sequence = - SequenceArray::try_new_typed(5i16, 3i16, Nullability::NonNullable, 3).unwrap(); + SequenceData::try_new_typed(5i16, 3i16, Nullability::NonNullable, 3).unwrap(); let casted = sequence .into_array() @@ -162,7 +162,7 @@ mod tests { #[test] fn test_cast_sequence_to_float_delegates_to_canonical() { let sequence = - SequenceArray::try_new_typed(0i32, 1i32, Nullability::NonNullable, 5).unwrap(); + SequenceData::try_new_typed(0i32, 1i32, Nullability::NonNullable, 5).unwrap(); // Cast to float should delegate to canonical (SequenceArray doesn't support float) let casted = sequence @@ -184,15 +184,15 @@ mod tests { } #[rstest] - #[case::i32(SequenceArray::try_new_typed(0i32, 1i32, Nullability::NonNullable, 5).unwrap())] - #[case::u64(SequenceArray::try_new_typed(1000u64, 100u64, Nullability::NonNullable, 4).unwrap())] + #[case::i32(SequenceData::try_new_typed(0i32, 1i32, Nullability::NonNullable, 5).unwrap())] + #[case::u64(SequenceData::try_new_typed(1000u64, 100u64, Nullability::NonNullable, 4).unwrap())] // TODO(DK): SequenceArray does not actually conform. You cannot cast this array to u8 even // though all its values are representable therein. // - // #[case::negative_step(SequenceArray::try_new_typed(100i32, -10i32, Nullability::NonNullable, + // #[case::negative_step(SequenceData::try_new_typed(100i32, -10i32, Nullability::NonNullable, // 5).unwrap())] - #[case::single(SequenceArray::try_new_typed(42i64, 0i64, Nullability::NonNullable, 1).unwrap())] - #[case::constant(SequenceArray::try_new_typed( + #[case::single(SequenceData::try_new_typed(42i64, 0i64, Nullability::NonNullable, 1).unwrap())] + #[case::constant(SequenceData::try_new_typed( 100i32, 0i32, // multiplier of 0 means constant array Nullability::NonNullable, diff --git a/encodings/sequence/src/compute/compare.rs b/encodings/sequence/src/compute/compare.rs index 18ed08daa8a..db92a779ea6 100644 --- a/encodings/sequence/src/compute/compare.rs +++ b/encodings/sequence/src/compute/compare.rs @@ -21,6 +21,7 @@ use vortex_error::vortex_bail; use vortex_error::vortex_err; use crate::SequenceArray; +use crate::SequenceData; use crate::array::Sequence; impl CompareKernel for Sequence { @@ -149,7 +150,7 @@ mod tests { #[test] fn test_compare_match() { - let lhs = SequenceArray::try_new_typed(2i64, 1, NonNullable, 4).unwrap(); + let lhs = SequenceData::try_new_typed(2i64, 1, NonNullable, 4).unwrap(); let rhs = ConstantArray::new(4i64, lhs.len()); let result = lhs .into_array() @@ -161,7 +162,7 @@ mod tests { #[test] fn test_compare_match_scale() { - let lhs = SequenceArray::try_new_typed(2i64, 3, Nullable, 4).unwrap(); + let lhs = SequenceData::try_new_typed(2i64, 3, Nullable, 4).unwrap(); let rhs = ConstantArray::new(8i64, lhs.len()); let result = lhs .into_array() @@ -173,7 +174,7 @@ mod tests { #[test] fn test_compare_no_match() { - let lhs = SequenceArray::try_new_typed(2i64, 1, NonNullable, 4).unwrap(); + let lhs = SequenceData::try_new_typed(2i64, 1, NonNullable, 4).unwrap(); let rhs = ConstantArray::new(1i64, lhs.len()); let result = lhs .into_array() diff --git a/encodings/sequence/src/compute/filter.rs b/encodings/sequence/src/compute/filter.rs index 9b49ce2bdd9..c6d82711eee 100644 --- a/encodings/sequence/src/compute/filter.rs +++ b/encodings/sequence/src/compute/filter.rs @@ -16,6 +16,7 @@ use vortex_mask::Mask; use crate::Sequence; use crate::SequenceArray; +use crate::SequenceData; impl FilterKernel for Sequence { fn filter( @@ -56,18 +57,18 @@ mod tests { use crate::SequenceArray; #[rstest] - #[case(SequenceArray::try_new_typed(0i32, 1, Nullability::NonNullable, 5).unwrap())] - #[case(SequenceArray::try_new_typed(10i32, 2, Nullability::NonNullable, 5).unwrap())] - #[case(SequenceArray::try_new_typed(100i32, -3, Nullability::NonNullable, 5).unwrap())] - #[case(SequenceArray::try_new_typed(0i32, 1, Nullability::NonNullable, 1).unwrap())] - #[case(SequenceArray::try_new_typed(0i32, 1, Nullability::NonNullable, MEDIUM_SIZE).unwrap())] - #[case(SequenceArray::try_new_typed(0i32, 1, Nullability::NonNullable, LARGE_SIZE).unwrap())] - #[case(SequenceArray::try_new_typed(0i64, 1, Nullability::NonNullable, 5).unwrap())] - #[case(SequenceArray::try_new_typed(1000i64, 50, Nullability::NonNullable, 5).unwrap())] - #[case(SequenceArray::try_new_typed(-100i64, 10, Nullability::NonNullable, MEDIUM_SIZE).unwrap())] - #[case(SequenceArray::try_new_typed(0u32, 1, Nullability::NonNullable, 5).unwrap())] - #[case(SequenceArray::try_new_typed(0u32, 5, Nullability::NonNullable, MEDIUM_SIZE).unwrap())] - #[case(SequenceArray::try_new_typed(0u64, 1, Nullability::NonNullable, LARGE_SIZE).unwrap())] + #[case(SequenceData::try_new_typed(0i32, 1, Nullability::NonNullable, 5).unwrap())] + #[case(SequenceData::try_new_typed(10i32, 2, Nullability::NonNullable, 5).unwrap())] + #[case(SequenceData::try_new_typed(100i32, -3, Nullability::NonNullable, 5).unwrap())] + #[case(SequenceData::try_new_typed(0i32, 1, Nullability::NonNullable, 1).unwrap())] + #[case(SequenceData::try_new_typed(0i32, 1, Nullability::NonNullable, MEDIUM_SIZE).unwrap())] + #[case(SequenceData::try_new_typed(0i32, 1, Nullability::NonNullable, LARGE_SIZE).unwrap())] + #[case(SequenceData::try_new_typed(0i64, 1, Nullability::NonNullable, 5).unwrap())] + #[case(SequenceData::try_new_typed(1000i64, 50, Nullability::NonNullable, 5).unwrap())] + #[case(SequenceData::try_new_typed(-100i64, 10, Nullability::NonNullable, MEDIUM_SIZE).unwrap())] + #[case(SequenceData::try_new_typed(0u32, 1, Nullability::NonNullable, 5).unwrap())] + #[case(SequenceData::try_new_typed(0u32, 5, Nullability::NonNullable, MEDIUM_SIZE).unwrap())] + #[case(SequenceData::try_new_typed(0u64, 1, Nullability::NonNullable, LARGE_SIZE).unwrap())] fn test_filter_sequence_conformance(#[case] array: SequenceArray) { test_filter_conformance(&array.into_array()); } diff --git a/encodings/sequence/src/compute/list_contains.rs b/encodings/sequence/src/compute/list_contains.rs index 6b06d55768e..6fa71af52ba 100644 --- a/encodings/sequence/src/compute/list_contains.rs +++ b/encodings/sequence/src/compute/list_contains.rs @@ -6,14 +6,16 @@ use vortex_array::DynArray; use vortex_array::IntoArray; use vortex_array::arrays::BoolArray; use vortex_array::scalar_fn::fns::list_contains::ListContainsElementReduce; +use vortex_array::vtable::Array; use vortex_error::VortexExpect; use vortex_error::VortexResult; +use crate::SequenceData; use crate::array::Sequence; use crate::compute::compare::find_intersection_scalar; impl ListContainsElementReduce for Sequence { - fn list_contains(list: &ArrayRef, element: &Self::Array) -> VortexResult> { + fn list_contains(list: &ArrayRef, element: &Array) -> VortexResult> { let Some(list_scalar) = list.as_constant() else { return Ok(None); }; @@ -74,7 +76,7 @@ mod tests { // [1, 3] in 1 // 2 // 3 - let array = SequenceArray::try_new_typed(1, 1, Nullability::NonNullable, 3).unwrap(); + let array = SequenceData::try_new_typed(1, 1, Nullability::NonNullable, 3).unwrap(); let expr = list_contains(lit(list_scalar.clone()), root()); let result = array.apply(&expr).unwrap(); @@ -86,7 +88,7 @@ mod tests { // [1, 3] in 1 // 3 // 5 - let array = SequenceArray::try_new_typed(1, 2, Nullability::NonNullable, 3).unwrap(); + let array = SequenceData::try_new_typed(1, 2, Nullability::NonNullable, 3).unwrap(); let expr = list_contains(lit(list_scalar), root()); let result = array.apply(&expr).unwrap(); diff --git a/encodings/sequence/src/compute/mod.rs b/encodings/sequence/src/compute/mod.rs index 2cf0ec5cc2e..f37080f1006 100644 --- a/encodings/sequence/src/compute/mod.rs +++ b/encodings/sequence/src/compute/mod.rs @@ -1,6 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors +use crate::SequenceData; mod cast; pub(crate) mod compare; mod filter; @@ -21,13 +22,13 @@ mod tests { #[rstest] // Basic sequence arrays - A[i] = base + i * multiplier - #[case::sequence_i32(SequenceArray::try_new_typed( + #[case::sequence_i32(SequenceData::try_new_typed( 0i32, // base 1i32, // multiplier Nullability::NonNullable, 5 // length ).unwrap())] // Results in [0, 1, 2, 3, 4] - #[case::sequence_i64_step2(SequenceArray::try_new_typed( + #[case::sequence_i64_step2(SequenceData::try_new_typed( 10i64, // base 2i64, // multiplier Nullability::NonNullable, @@ -35,13 +36,13 @@ mod tests { ).unwrap())] // Results in [10, 12, 14, 16, 18] // Different types - #[case::sequence_u32(SequenceArray::try_new_typed( + #[case::sequence_u32(SequenceData::try_new_typed( 100u32, // base 10u32, // multiplier Nullability::NonNullable, 5 // length ).unwrap())] // Results in [100, 110, 120, 130, 140] - #[case::sequence_i16(SequenceArray::try_new_typed( + #[case::sequence_i16(SequenceData::try_new_typed( -10i16, // base 3i16, // multiplier Nullability::NonNullable, @@ -49,19 +50,19 @@ mod tests { ).unwrap())] // Results in [-10, -7, -4, -1, 2] // Edge cases - #[case::sequence_single(SequenceArray::try_new_typed( + #[case::sequence_single(SequenceData::try_new_typed( 42i32, 0i32, // multiplier of 0 means constant array Nullability::NonNullable, 1 ).unwrap())] - #[case::sequence_zero_multiplier(SequenceArray::try_new_typed( + #[case::sequence_zero_multiplier(SequenceData::try_new_typed( 100i32, 0i32, // All values will be 100 Nullability::NonNullable, 5 ).unwrap())] - #[case::sequence_negative_step(SequenceArray::try_new_typed( + #[case::sequence_negative_step(SequenceData::try_new_typed( 100i32, -10i32, // Decreasing sequence Nullability::NonNullable, @@ -69,13 +70,13 @@ mod tests { ).unwrap())] // Results in [100, 90, 80, 70, 60] // Large arrays - #[case::sequence_large(SequenceArray::try_new_typed( + #[case::sequence_large(SequenceData::try_new_typed( 0i64, 1i64, Nullability::NonNullable, 2000 ).unwrap())] // Results in [0, 1, 2, ..., 1999] - #[case::sequence_large_step(SequenceArray::try_new_typed( + #[case::sequence_large_step(SequenceData::try_new_typed( 1000i32, 100i32, Nullability::NonNullable, diff --git a/encodings/sequence/src/compute/slice.rs b/encodings/sequence/src/compute/slice.rs index fe717791ea1..7ed33bd6c38 100644 --- a/encodings/sequence/src/compute/slice.rs +++ b/encodings/sequence/src/compute/slice.rs @@ -6,17 +6,19 @@ use std::ops::Range; use vortex_array::ArrayRef; use vortex_array::IntoArray; use vortex_array::arrays::slice::SliceReduce; +use vortex_array::vtable::Array; use vortex_error::VortexResult; use crate::Sequence; use crate::SequenceArray; +use crate::SequenceData; impl SliceReduce for Sequence { - fn slice(array: &Self::Array, range: Range) -> VortexResult> { + fn slice(array: &Array, range: Range) -> VortexResult> { // SAFETY: this is a slice of an already-validated `SequenceArray`, so this is still valid. Ok(Some( unsafe { - SequenceArray::new_unchecked( + SequenceData::new_unchecked( array.index_value(range.start), array.multiplier(), array.ptype(), diff --git a/encodings/sequence/src/compute/take.rs b/encodings/sequence/src/compute/take.rs index 23b91cabc36..e34d43494da 100644 --- a/encodings/sequence/src/compute/take.rs +++ b/encodings/sequence/src/compute/take.rs @@ -26,6 +26,7 @@ use vortex_mask::Mask; use crate::Sequence; use crate::SequenceArray; +use crate::SequenceData; fn take_inner( mul: S, @@ -113,49 +114,49 @@ mod test { use crate::SequenceArray; #[rstest] - #[case::basic_sequence(SequenceArray::try_new_typed( + #[case::basic_sequence(SequenceData::try_new_typed( 0i32, 1i32, Nullability::NonNullable, 10 ).unwrap())] - #[case::sequence_with_multiplier(SequenceArray::try_new_typed( + #[case::sequence_with_multiplier(SequenceData::try_new_typed( 10i32, 5i32, Nullability::Nullable, 20 ).unwrap())] - #[case::sequence_i64(SequenceArray::try_new_typed( + #[case::sequence_i64(SequenceData::try_new_typed( 100i64, 10i64, Nullability::NonNullable, 50 ).unwrap())] - #[case::sequence_u32(SequenceArray::try_new_typed( + #[case::sequence_u32(SequenceData::try_new_typed( 0u32, 2u32, Nullability::NonNullable, 100 ).unwrap())] - #[case::sequence_negative_step(SequenceArray::try_new_typed( + #[case::sequence_negative_step(SequenceData::try_new_typed( 1000i32, -10i32, Nullability::Nullable, 30 ).unwrap())] - #[case::sequence_constant(SequenceArray::try_new_typed( + #[case::sequence_constant(SequenceData::try_new_typed( 42i32, 0i32, // multiplier of 0 means all values are the same Nullability::Nullable, 15 ).unwrap())] - #[case::sequence_i16(SequenceArray::try_new_typed( + #[case::sequence_i16(SequenceData::try_new_typed( -100i16, 3i16, Nullability::NonNullable, 25 ).unwrap())] - #[case::sequence_large(SequenceArray::try_new_typed( + #[case::sequence_large(SequenceData::try_new_typed( 0i64, 1i64, Nullability::Nullable, @@ -169,7 +170,7 @@ mod test { #[test] #[should_panic(expected = "out of bounds")] fn test_bounds_check() { - let array = SequenceArray::try_new_typed(0i32, 1i32, Nullability::NonNullable, 10).unwrap(); + let array = SequenceData::try_new_typed(0i32, 1i32, Nullability::NonNullable, 10).unwrap(); let indices = PrimitiveArray::from_iter([0i32, 20]); let _array = array .take(indices.into_array()) diff --git a/encodings/sequence/src/lib.rs b/encodings/sequence/src/lib.rs index a6ff277b23d..958bbf6352f 100644 --- a/encodings/sequence/src/lib.rs +++ b/encodings/sequence/src/lib.rs @@ -14,6 +14,7 @@ pub use array::Sequence; /// This can be used for compression, fast comparisons and also for row ids. pub use array::SequenceArray; pub use array::SequenceArrayParts; +pub use array::SequenceData; pub use compress::sequence_encode; use vortex_array::aggregate_fn::AggregateFnVTable; use vortex_array::aggregate_fn::fns::is_sorted::IsSorted; diff --git a/encodings/sparse/public-api.lock b/encodings/sparse/public-api.lock index 084ae72c63e..71ef1f96104 100644 --- a/encodings/sparse/public-api.lock +++ b/encodings/sparse/public-api.lock @@ -100,7 +100,7 @@ pub fn vortex_sparse::Sparse::reduce_parent(array: &vortex_array::vtable::typed: pub fn vortex_sparse::Sparse::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_sparse::Sparse::stats(array: &vortex_sparse::SparseArray) -> vortex_array::stats::array::StatsSetRef<'_> +pub fn vortex_sparse::Sparse::stats(array: &vortex_sparse::SparseArray) -> &vortex_array::stats::array::ArrayStats pub fn vortex_sparse::Sparse::vtable(_array: &Self::Array) -> &Self diff --git a/encodings/sparse/src/canonical.rs b/encodings/sparse/src/canonical.rs index 2e0f51843cd..c63c5ef67cc 100644 --- a/encodings/sparse/src/canonical.rs +++ b/encodings/sparse/src/canonical.rs @@ -55,7 +55,7 @@ use vortex_error::vortex_panic; use crate::ConstantArray; use crate::SparseArray; - +use crate::SparseData; pub(super) fn execute_sparse( array: &SparseArray, ctx: &mut ExecutionCtx, @@ -147,7 +147,7 @@ fn execute_sparse_lists( let n_filled = array.len() - resolved_patches.num_patches(); let total_canonical_values = values.elements().len() + fill_value.len() * n_filled; - let validity = Validity::from_mask(array.validity_mask()?, nullability); + let validity = Validity::from_mask(array.clone().into_array().validity_mask()?, nullability); Ok(match_each_integer_ptype!(indices.ptype(), |I| { match_smallest_offset_type!(total_canonical_values, |O| { @@ -198,6 +198,8 @@ fn execute_sparse_lists_inner( builder .append_value( patch_values + .clone() + .into_array() .scalar_at(patch_idx) .vortex_expect("scalar_at") .as_list(), @@ -232,7 +234,7 @@ fn execute_sparse_fixed_size_list( .execute::(ctx)?; let fill_value = array.fill_scalar().as_list(); - let validity = Validity::from_mask(array.validity_mask()?, nullability); + let validity = Validity::from_mask(array.clone().into_array().validity_mask()?, nullability); Ok(match_each_integer_ptype!(indices.ptype(), |I| { execute_sparse_fixed_size_list_inner::( @@ -439,7 +441,7 @@ fn execute_sparse_struct( .cloned() .zip_eq(fill_values) .map(|(patch_values, fill_value)| unsafe { - SparseArray::new_unchecked( + SparseData::new_unchecked( unresolved_patches .clone() .map_values(|_| Ok(patch_values)) @@ -476,7 +478,7 @@ fn execute_sparse_decimal( } } let filled_array = builder.finish_into_decimal(); - let array = filled_array.patch(patches, ctx)?; + let array = filled_array.into_inner().patch(patches, ctx)?; Ok(array.into_array()) } @@ -489,7 +491,10 @@ fn execute_varbin( let patches = array.resolved_patches()?; let indices = patches.indices().clone().execute::(ctx)?; let values = patches.values().clone().execute::(ctx)?; - let validity = Validity::from_mask(array.validity_mask()?, dtype.nullability()); + let validity = Validity::from_mask( + array.clone().into_array().validity_mask()?, + dtype.nullability(), + ); let len = array.len(); Ok(match_each_integer_ptype!(indices.ptype(), |I| { @@ -581,7 +586,7 @@ mod test { let indices = buffer![0u64, 1, 7].into_array(); let values = BoolArray::from_iter([Some(true), None, Some(false)]).into_array(); let sparse_bools = - SparseArray::try_new(indices, values, 10, Scalar::from(fill_value)).unwrap(); + SparseData::try_new(indices, values, 10, Scalar::from(fill_value)).unwrap(); let actual = sparse_bools.to_bool(); let expected = BoolArray::from_iter([ @@ -608,7 +613,7 @@ mod test { let indices = buffer![0u64, 1, 7].into_array(); let values = PrimitiveArray::from_option_iter([Some(0i32), None, Some(1)]).into_array(); let sparse_ints = - SparseArray::try_new(indices, values, 10, Scalar::from(fill_value)).unwrap(); + SparseData::try_new(indices, values, 10, Scalar::from(fill_value)).unwrap(); assert_eq!(*sparse_ints.dtype(), DType::Primitive(PType::I32, Nullable)); let flat_ints = sparse_ints.to_primitive(); @@ -659,7 +664,7 @@ mod test { vec![Scalar::from(Some(-10i32)), Scalar::from(Some(-1i32))], ); let len = 10; - let sparse_struct = SparseArray::try_new(indices, patch_values, len, fill_scalar).unwrap(); + let sparse_struct = SparseData::try_new(indices, patch_values, len, fill_scalar).unwrap(); let expected_a = PrimitiveArray::from_option_iter((0..len).map(|i| { if i == 0 { @@ -726,7 +731,7 @@ mod test { let fill_scalar = Scalar::null(struct_dtype); let len = 10; - let sparse_struct = SparseArray::try_new(indices, patch_values, len, fill_scalar).unwrap(); + let sparse_struct = SparseData::try_new(indices, patch_values, len, fill_scalar).unwrap(); let expected_a = PrimitiveArray::from_option_iter((0..len).map(|i| { if i == 0 { @@ -777,7 +782,7 @@ mod test { .into_array(); let len = 10; let fill_scalar = Scalar::decimal(DecimalValue::I32(123), decimal_dtype, Nullable); - let sparse_struct = SparseArray::try_new(indices, patch_values, len, fill_scalar).unwrap(); + let sparse_struct = SparseData::try_new(indices, patch_values, len, fill_scalar).unwrap(); let expected = DecimalArray::new( buffer![100i128, 200, 123, 123, 123, 123, 123, 300, 4000, 123], @@ -812,7 +817,7 @@ mod test { ]) .into_array(); - let array = SparseArray::try_new( + let array = SparseData::try_new( buffer![0u16, 3, 4, 5, 7, 9, 10].into_array(), strings, 12, @@ -853,7 +858,7 @@ mod test { ]) .into_array(); - let array = SparseArray::try_new( + let array = SparseData::try_new( buffer![0u16, 3, 4, 5, 7, 9, 10].into_array(), strings, 12, @@ -887,7 +892,7 @@ mod test { VarBinViewArray::from_iter_str(["hello", "goodbye", "hello", "bonjour", "你好"]) .into_array(); - let array = SparseArray::try_new( + let array = SparseData::try_new( buffer![0u16, 3, 4, 5, 8].into_array(), strings, 9, @@ -917,7 +922,7 @@ mod test { ]) .into_array(); - let array = SparseArray::try_new( + let array = SparseData::try_new( buffer![0u16, 3, 4, 5, 7, 9, 10].into_array(), strings, 12, @@ -958,7 +963,7 @@ mod test { ]) .into_array(); - let array = SparseArray::try_new( + let array = SparseData::try_new( buffer![0u16, 3, 4, 5, 7, 9, 10].into_array(), binaries, 12, @@ -1005,7 +1010,7 @@ mod test { let indices = buffer![0u8, 3u8, 4u8, 5u8].into_array(); let fill_value = Scalar::null(lists.dtype().clone()); - let sparse = SparseArray::try_new(indices, lists, 6, fill_value) + let sparse = SparseData::try_new(indices, lists, 6, fill_value) .unwrap() .into_array(); @@ -1059,7 +1064,7 @@ mod test { let indices = buffer![0u8, 3u8, 4u8, 5u8].into_array(); let fill_value = Scalar::null(lists.dtype().clone()); - let sparse = SparseArray::try_new(indices, lists, 6, fill_value) + let sparse = SparseData::try_new(indices, lists, 6, fill_value) .unwrap() .into_array(); @@ -1102,7 +1107,7 @@ mod test { let indices = buffer![0u8, 3u8, 4u8, 5u8].into_array(); let fill_value = Scalar::from(Some(vec![5i32, 6, 7, 8])); - let sparse = SparseArray::try_new(indices, lists, 6, fill_value) + let sparse = SparseData::try_new(indices, lists, 6, fill_value) .unwrap() .into_array(); @@ -1171,7 +1176,7 @@ mod test { ]) .into_array(); - let array = SparseArray::try_new( + let array = SparseData::try_new( buffer![0u16, 3, 4, 5, 7, 9, 10].into_array(), strings, 12, @@ -1213,7 +1218,7 @@ mod test { 3, Nullable, )); - let sparse = SparseArray::try_new(indices, fsl, 5, fill_value) + let sparse = SparseData::try_new(indices, fsl, 5, fill_value) .unwrap() .into_array(); @@ -1251,7 +1256,7 @@ mod test { ], NonNullable, ); - let sparse = SparseArray::try_new(indices, fsl, 6, fill_value) + let sparse = SparseData::try_new(indices, fsl, 6, fill_value) .unwrap() .into_array(); @@ -1289,7 +1294,7 @@ mod test { ], Nullable, ); - let sparse = SparseArray::try_new(indices, fsl, 6, fill_value) + let sparse = SparseData::try_new(indices, fsl, 6, fill_value) .unwrap() .into_array(); @@ -1337,7 +1342,7 @@ mod test { NonNullable, ); - let sparse = SparseArray::try_new(indices, fsl, 100, fill_value) + let sparse = SparseData::try_new(indices, fsl, 100, fill_value) .unwrap() .into_array(); @@ -1394,7 +1399,7 @@ mod test { ], NonNullable, ); - let sparse = SparseArray::try_new(indices, fsl, 1, fill_value) + let sparse = SparseData::try_new(indices, fsl, 1, fill_value) .unwrap() .into_array(); @@ -1420,7 +1425,7 @@ mod test { let indices = buffer![0u8, 1u8, 2u8, 3u8].into_array(); let fill_value = Scalar::from(Some(vec![42i32; 252])); // 252 + 4 elements = 256 > u8::MAX - let sparse = SparseArray::try_new(indices, lists, 5, fill_value) + let sparse = SparseData::try_new(indices, lists, 5, fill_value) .unwrap() .into_array(); @@ -1482,7 +1487,7 @@ mod test { // - Index 7: List 2 [30, 31, 32, 33] // - Index 8-9: null let indices = buffer![1u8, 4, 7].into_array(); - let sparse = SparseArray::try_new( + let sparse = SparseData::try_new( indices, list_view.into_array(), 10, @@ -1568,7 +1573,7 @@ mod test { // Extract only the values we need from the sliced array let values = sliced.slice(0..2).unwrap(); let sparse = - SparseArray::try_new(indices, values, 5, Scalar::null(sliced.dtype().clone())).unwrap(); + SparseData::try_new(indices, values, 5, Scalar::null(sliced.dtype().clone())).unwrap(); let canonical = sparse.to_canonical()?.into_array(); let result_listview = canonical.to_listview(); diff --git a/encodings/sparse/src/compute/cast.rs b/encodings/sparse/src/compute/cast.rs index 1b9b1a1bb61..565a721ab7d 100644 --- a/encodings/sparse/src/compute/cast.rs +++ b/encodings/sparse/src/compute/cast.rs @@ -11,7 +11,7 @@ use vortex_error::VortexResult; use crate::Sparse; use crate::SparseArray; - +use crate::SparseData; impl CastReduce for Sparse { fn cast(array: &SparseArray, dtype: &DType) -> VortexResult> { let casted_patches = array @@ -28,7 +28,7 @@ impl CastReduce for Sparse { }; Ok(Some( - SparseArray::try_new_from_patches(casted_patches, casted_fill)?.into_array(), + SparseData::try_new_from_patches(casted_patches, casted_fill)?.into_array(), )) } } @@ -52,7 +52,7 @@ mod tests { #[test] fn test_cast_sparse_i32_to_i64() { - let sparse = SparseArray::try_new( + let sparse = SparseData::try_new( buffer![2u64, 5, 8].into_array(), buffer![100i32, 200, 300].into_array(), 10, @@ -75,7 +75,7 @@ mod tests { #[test] fn test_cast_sparse_with_null_fill() { - let sparse = SparseArray::try_new( + let sparse = SparseData::try_new( buffer![1u64, 3, 5].into_array(), PrimitiveArray::from_option_iter([Some(42i32), Some(84), Some(126)]).into_array(), 8, @@ -94,25 +94,25 @@ mod tests { } #[rstest] - #[case(SparseArray::try_new( + #[case(SparseData::try_new( buffer![2u64, 5, 8].into_array(), buffer![100i32, 200, 300].into_array(), 10, Scalar::from(0i32) ).unwrap())] - #[case(SparseArray::try_new( + #[case(SparseData::try_new( buffer![0u64, 4, 9].into_array(), buffer![1.5f32, 2.5, 3.5].into_array(), 10, Scalar::from(0.0f32) ).unwrap())] - #[case(SparseArray::try_new( + #[case(SparseData::try_new( buffer![1u64, 3, 7].into_array(), PrimitiveArray::from_option_iter([Some(100i32), None, Some(300)]).into_array(), 10, Scalar::null_native::() ).unwrap())] - #[case(SparseArray::try_new( + #[case(SparseData::try_new( buffer![5u64].into_array(), buffer![42u8].into_array(), 10, @@ -129,7 +129,7 @@ mod tests { // When all positions are patched the null fill is unused, so a cast to // non-nullable is valid. Sparse::cast detects this case, substitutes a // zero fill, and keeps the result in the Sparse encoding. - let sparse = SparseArray::try_new( + let sparse = SparseData::try_new( buffer![0u64, 1, 2, 3, 4].into_array(), buffer![10u64, 20, 30, 40, 50].into_array(), 5, @@ -155,7 +155,7 @@ mod tests { // Regression test for https://github.com/vortex-data/vortex/issues/6932 // fill_null on a sparse array with null fill triggers an internal cast to // non-nullable, which must not panic. - let sparse = SparseArray::try_new( + let sparse = SparseData::try_new( buffer![1u64, 3].into_array(), buffer![10u64, 20].into_array(), 5, diff --git a/encodings/sparse/src/compute/filter.rs b/encodings/sparse/src/compute/filter.rs index 56556d285ed..b9aaf0d459e 100644 --- a/encodings/sparse/src/compute/filter.rs +++ b/encodings/sparse/src/compute/filter.rs @@ -11,7 +11,7 @@ use vortex_mask::Mask; use crate::ConstantArray; use crate::Sparse; use crate::SparseArray; - +use crate::SparseData; impl FilterKernel for Sparse { fn filter( array: &SparseArray, @@ -27,7 +27,7 @@ impl FilterKernel for Sparse { }; Ok(Some( - SparseArray::try_new_from_patches(new_patches, array.fill_scalar().clone())? + SparseData::try_new_from_patches(new_patches, array.fill_scalar().clone())? .into_array(), )) } @@ -56,7 +56,7 @@ mod tests { #[fixture] fn array() -> ArrayRef { - SparseArray::try_new( + SparseData::try_new( buffer![2u64, 9, 15].into_array(), PrimitiveArray::new(buffer![33_i32, 44, 55], Validity::AllValid).into_array(), 20, @@ -76,7 +76,7 @@ mod tests { // Construct expected SparseArray: index 2 was kept, which had value 33. // The new index is 0 (since it's the only element). - let expected = SparseArray::try_new( + let expected = SparseData::try_new( buffer![0u64].into_array(), PrimitiveArray::new(buffer![33_i32], Validity::AllValid).into_array(), 1, @@ -90,7 +90,7 @@ mod tests { #[test] fn true_fill_value() { let mask = Mask::from_iter([false, true, false, true, false, true, true]); - let array = SparseArray::try_new( + let array = SparseData::try_new( buffer![0_u64, 3, 6].into_array(), PrimitiveArray::new(buffer![33_i32, 44, 55], Validity::AllValid).into_array(), 7, @@ -105,7 +105,7 @@ mod tests { // Mask keeps indices 1, 3, 5, 6 -> new indices 0, 1, 2, 3. // Index 3 (value 44) maps to new index 1. // Index 6 (value 55) maps to new index 3. - let expected = SparseArray::try_new( + let expected = SparseData::try_new( buffer![1u64, 3].into_array(), PrimitiveArray::new(buffer![44_i32, 55], Validity::AllValid).into_array(), 4, @@ -120,7 +120,7 @@ mod tests { fn test_filter_sparse_array() { let null_fill_value = Scalar::null(DType::Primitive(PType::I32, Nullability::Nullable)); test_filter_conformance( - &SparseArray::try_new( + &SparseData::try_new( buffer![1u64, 2, 4].into_array(), buffer![100i32, 200, 300] .into_array() @@ -135,7 +135,7 @@ mod tests { let ten_fill_value = Scalar::from(10i32); test_filter_conformance( - &SparseArray::try_new( + &SparseData::try_new( buffer![1u64, 2, 4].into_array(), buffer![100i32, 200, 300].into_array(), 5, diff --git a/encodings/sparse/src/compute/mod.rs b/encodings/sparse/src/compute/mod.rs index 0f0ad4b98c4..735a013301c 100644 --- a/encodings/sparse/src/compute/mod.rs +++ b/encodings/sparse/src/compute/mod.rs @@ -1,6 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors +use crate::SparseData; mod cast; mod filter; mod take; @@ -28,7 +29,7 @@ mod test { #[fixture] fn array() -> ArrayRef { - SparseArray::try_new( + SparseData::try_new( buffer![2u64, 9, 15].into_array(), PrimitiveArray::new(buffer![33_i32, 44, 55], Validity::AllValid).into_array(), 20, @@ -48,7 +49,7 @@ mod test { // Construct expected SparseArray: index 2 was kept, which had value 33. // The new index is 0 (since it's the only element). - let expected = SparseArray::try_new( + let expected = SparseData::try_new( buffer![0u64].into_array(), PrimitiveArray::new(buffer![33_i32], Validity::AllValid).into_array(), 1, @@ -62,7 +63,7 @@ mod test { #[test] fn true_fill_value() { let mask = Mask::from_iter([false, true, false, true, false, true, true]); - let array = SparseArray::try_new( + let array = SparseData::try_new( buffer![0_u64, 3, 6].into_array(), PrimitiveArray::new(buffer![33_i32, 44, 55], Validity::AllValid).into_array(), 7, @@ -77,7 +78,7 @@ mod test { // Mask keeps indices 1, 3, 5, 6 -> new indices 0, 1, 2, 3. // Index 3 (value 44) maps to new index 1. // Index 6 (value 55) maps to new index 3. - let expected = SparseArray::try_new( + let expected = SparseData::try_new( buffer![1u64, 3].into_array(), PrimitiveArray::new(buffer![44_i32, 55], Validity::AllValid).into_array(), 4, @@ -97,7 +98,7 @@ mod test { fn test_mask_sparse_array() { let null_fill_value = Scalar::null(DType::Primitive(PType::I32, Nullability::Nullable)); test_mask_conformance( - &SparseArray::try_new( + &SparseData::try_new( buffer![1u64, 2, 4].into_array(), buffer![100i32, 200, 300] .into_array() @@ -112,7 +113,7 @@ mod test { let ten_fill_value = Scalar::from(10i32); test_mask_conformance( - &SparseArray::try_new( + &SparseData::try_new( buffer![1u64, 2, 4].into_array(), buffer![100i32, 200, 300].into_array(), 5, @@ -142,46 +143,46 @@ mod tests { #[rstest] // Basic sparse arrays - #[case::sparse_i32_null_fill(SparseArray::try_new( + #[case::sparse_i32_null_fill(SparseData::try_new( buffer![2u64, 5, 8].into_array(), PrimitiveArray::from_option_iter([Some(100i32), Some(200), Some(300)]).into_array(), 10, Scalar::null_native::() ).unwrap())] - #[case::sparse_i32_value_fill(SparseArray::try_new( + #[case::sparse_i32_value_fill(SparseData::try_new( buffer![1u64, 3, 7].into_array(), buffer![42i32, 84, 126].into_array(), 10, Scalar::from(0i32) ).unwrap())] // Different types - #[case::sparse_u64(SparseArray::try_new( + #[case::sparse_u64(SparseData::try_new( buffer![0u64, 4, 9].into_array(), buffer![1000u64, 2000, 3000].into_array(), 10, Scalar::from(999u64) ).unwrap())] - #[case::sparse_f32(SparseArray::try_new( + #[case::sparse_f32(SparseData::try_new( buffer![2u64, 6].into_array(), buffer![std::f32::consts::PI, std::f32::consts::E].into_array(), 8, Scalar::from(0.0f32) ).unwrap())] // Edge cases - #[case::sparse_single_patch(SparseArray::try_new( + #[case::sparse_single_patch(SparseData::try_new( buffer![5u64].into_array(), buffer![42i32].into_array(), 10, Scalar::from(-1i32) ).unwrap())] - #[case::sparse_dense_patches(SparseArray::try_new( + #[case::sparse_dense_patches(SparseData::try_new( buffer![0u64, 1, 2, 3, 4].into_array(), PrimitiveArray::from_option_iter([Some(10i32), Some(20), Some(30), Some(40), Some(50)]).into_array(), 5, Scalar::null_native::() ).unwrap())] // Large sparse arrays - #[case::sparse_large(SparseArray::try_new( + #[case::sparse_large(SparseData::try_new( buffer![100u64, 500, 900, 1500, 1999].into_array(), buffer![111i32, 222, 333, 444, 555].into_array(), 2000, @@ -190,7 +191,7 @@ mod tests { // Nullable patches #[case::sparse_nullable_patches({ let null_fill_value = Scalar::null(DType::Primitive(PType::I32, Nullability::Nullable)); - SparseArray::try_new( + SparseData::try_new( buffer![1u64, 4, 7].into_array(), PrimitiveArray::from_option_iter([Some(100i32), None, Some(300)]) .into_array() @@ -206,37 +207,37 @@ mod tests { } #[rstest] - #[case::sparse_i32_basic(SparseArray::try_new( + #[case::sparse_i32_basic(SparseData::try_new( buffer![2u64, 5, 8].into_array(), buffer![100i32, 200, 300].into_array(), 10, Scalar::from(0i32) ).unwrap())] - #[case::sparse_u32_basic(SparseArray::try_new( + #[case::sparse_u32_basic(SparseData::try_new( buffer![1u64, 3, 7].into_array(), buffer![1000u32, 2000, 3000].into_array(), 10, Scalar::from(100u32) ).unwrap())] - #[case::sparse_i64_basic(SparseArray::try_new( + #[case::sparse_i64_basic(SparseData::try_new( buffer![0u64, 4, 9].into_array(), buffer![5000i64, 6000, 7000].into_array(), 10, Scalar::from(1000i64) ).unwrap())] - #[case::sparse_f32_basic(SparseArray::try_new( + #[case::sparse_f32_basic(SparseData::try_new( buffer![2u64, 6].into_array(), buffer![1.5f32, 2.5].into_array(), 8, Scalar::from(0.5f32) ).unwrap())] - #[case::sparse_f64_basic(SparseArray::try_new( + #[case::sparse_f64_basic(SparseData::try_new( buffer![1u64, 5, 9].into_array(), buffer![10.1f64, 20.2, 30.3].into_array(), 10, Scalar::from(5.0f64) ).unwrap())] - #[case::sparse_i32_large(SparseArray::try_new( + #[case::sparse_i32_large(SparseData::try_new( buffer![10u64, 50, 90, 150, 199].into_array(), buffer![111i32, 222, 333, 444, 555].into_array(), 200, diff --git a/encodings/sparse/src/compute/take.rs b/encodings/sparse/src/compute/take.rs index 610cd52d064..3e87f86e85f 100644 --- a/encodings/sparse/src/compute/take.rs +++ b/encodings/sparse/src/compute/take.rs @@ -11,7 +11,7 @@ use vortex_error::VortexResult; use crate::ConstantArray; use crate::Sparse; use crate::SparseArray; - +use crate::SparseData; impl TakeExecute for Sparse { fn take( array: &SparseArray, @@ -41,7 +41,7 @@ impl TakeExecute for Sparse { } Ok(Some( - SparseArray::try_new_from_patches( + SparseData::try_new_from_patches( new_patches, array.fill_scalar().cast( &array @@ -76,7 +76,7 @@ mod test { } fn sparse_array() -> ArrayRef { - SparseArray::try_new( + SparseData::try_new( buffer![0u64, 37, 47, 99].into_array(), PrimitiveArray::new(buffer![1.23f64, 0.47, 9.99, 3.5], Validity::AllValid).into_array(), 100, @@ -129,7 +129,7 @@ mod test { #[test] fn nullable_take() { - let arr = SparseArray::try_new( + let arr = SparseData::try_new( buffer![1u32].into_array(), buffer![10].into_array(), 10, @@ -150,7 +150,7 @@ mod test { #[test] fn nullable_take_with_many_patches() { - let arr = SparseArray::try_new( + let arr = SparseData::try_new( buffer![1u32, 3, 7, 8, 9].into_array(), buffer![10, 8, 3, 2, 1].into_array(), 10, @@ -170,13 +170,13 @@ mod test { } #[rstest] - #[case(SparseArray::try_new( + #[case(SparseData::try_new( buffer![0u64, 37, 47, 99].into_array(), PrimitiveArray::new(buffer![1.23f64, 0.47, 9.99, 3.5], Validity::AllValid).into_array(), 100, Scalar::null_native::(), ).unwrap())] - #[case(SparseArray::try_new( + #[case(SparseData::try_new( buffer![1u32, 3, 7, 8, 9].into_array(), buffer![10, 8, 3, 2, 1].into_array(), 10, @@ -184,14 +184,14 @@ mod test { ).unwrap())] #[case({ let nullable_values = PrimitiveArray::from_option_iter([Some(100i64), None, Some(300)]); - SparseArray::try_new( + SparseData::try_new( buffer![2u64, 4, 6].into_array(), nullable_values.into_array(), 10, Scalar::null_native::(), ).unwrap() })] - #[case(SparseArray::try_new( + #[case(SparseData::try_new( buffer![5u64].into_array(), buffer![999i32].into_array(), 20, diff --git a/encodings/sparse/src/lib.rs b/encodings/sparse/src/lib.rs index b98616a5548..507193e4676 100644 --- a/encodings/sparse/src/lib.rs +++ b/encodings/sparse/src/lib.rs @@ -28,7 +28,6 @@ use vortex_array::scalar::ScalarValue; use vortex_array::scalar_fn::fns::operators::Operator; use vortex_array::serde::ArrayChildren; use vortex_array::stats::ArrayStats; -use vortex_array::stats::StatsSetRef; use vortex_array::validity::Validity; use vortex_array::vtable; use vortex_array::vtable::Array; @@ -60,7 +59,7 @@ mod ops; mod rules; mod slice; -vtable!(Sparse); +vtable!(Sparse, Sparse, SparseData); #[derive(Debug)] pub struct SparseMetadata { @@ -76,7 +75,7 @@ pub struct ProstPatchesMetadata { } impl VTable for Sparse { - type Array = SparseArray; + type Array = SparseData; type Metadata = SparseMetadata; type OperationsVTable = Self; @@ -90,32 +89,32 @@ impl VTable for Sparse { Self::ID } - fn len(array: &SparseArray) -> usize { + fn len(array: &SparseData) -> usize { array.patches.array_len() } - fn dtype(array: &SparseArray) -> &DType { + fn dtype(array: &SparseData) -> &DType { array.fill_scalar().dtype() } - fn stats(array: &SparseArray) -> StatsSetRef<'_> { - array.stats_set.to_ref(array.as_ref()) + fn stats(array: &SparseData) -> &ArrayStats { + &array.stats_set } - fn array_hash(array: &SparseArray, state: &mut H, precision: Precision) { + fn array_hash(array: &Array, state: &mut H, precision: Precision) { array.patches.array_hash(state, precision); array.fill_value.hash(state); } - fn array_eq(array: &SparseArray, other: &SparseArray, precision: Precision) -> bool { + fn array_eq(array: &Array, other: &Array, precision: Precision) -> bool { array.patches.array_eq(&other.patches, precision) && array.fill_value == other.fill_value } - fn nbuffers(_array: &SparseArray) -> usize { + fn nbuffers(_array: &Array) -> usize { 1 } - fn buffer(array: &SparseArray, idx: usize) -> BufferHandle { + fn buffer(array: &Array, idx: usize) -> BufferHandle { match idx { 0 => { let fill_value_buffer = @@ -126,26 +125,26 @@ impl VTable for Sparse { } } - fn buffer_name(_array: &SparseArray, idx: usize) -> Option { + fn buffer_name(_array: &Array, idx: usize) -> Option { match idx { 0 => Some("fill_value".to_string()), _ => vortex_panic!("SparseArray buffer_name index {idx} out of bounds"), } } - fn nchildren(array: &SparseArray) -> usize { + fn nchildren(array: &Array) -> usize { patches_nchildren(array.patches()) } - fn child(array: &SparseArray, idx: usize) -> ArrayRef { + fn child(array: &Array, idx: usize) -> ArrayRef { patches_child(array.patches(), idx) } - fn child_name(_array: &SparseArray, idx: usize) -> String { + fn child_name(_array: &Array, idx: usize) -> String { patches_child_name(idx).to_string() } - fn metadata(array: &SparseArray) -> VortexResult { + fn metadata(array: &Array) -> VortexResult { let patches = array.patches().to_metadata(array.len(), array.dtype())?; Ok(SparseMetadata { @@ -194,7 +193,7 @@ impl VTable for Sparse { metadata: &Self::Metadata, _buffers: &[BufferHandle], children: &dyn ArrayChildren, - ) -> VortexResult { + ) -> VortexResult { vortex_ensure_eq!( children.len(), 2, @@ -209,7 +208,7 @@ impl VTable for Sparse { )?; let patch_values = children.get(1, dtype, metadata.patches.len()?)?; - SparseArray::try_new_from_patches( + SparseData::try_new_from_patches( Patches::new( len, metadata.patches.offset()?, @@ -267,7 +266,7 @@ impl VTable for Sparse { } #[derive(Clone, Debug)] -pub struct SparseArray { +pub struct SparseData { patches: Patches, fill_value: Scalar, stats_set: ArrayStats, @@ -278,9 +277,26 @@ pub struct Sparse; impl Sparse { pub const ID: ArrayId = ArrayId::new_ref("vortex.sparse"); + + /// Construct a new [`SparseArray`] from indices, values, length, and fill value. + pub fn try_new( + indices: ArrayRef, + values: ArrayRef, + len: usize, + fill_value: Scalar, + ) -> VortexResult { + Ok(Array::from_inner(SparseData::try_new( + indices, values, len, fill_value, + )?)) + } + + /// Encode the given array as a [`SparseArray`]. + pub fn encode(array: &ArrayRef, fill_value: Option) -> VortexResult { + SparseData::encode(array, fill_value) + } } -impl SparseArray { +impl SparseData { pub fn try_new( indices: ArrayRef, values: ArrayRef, @@ -345,6 +361,24 @@ impl SparseArray { } } + /// Returns the length of the array. + #[inline] + pub fn len(&self) -> usize { + self.patches.array_len() + } + + /// Returns whether the array is empty. + #[inline] + pub fn is_empty(&self) -> bool { + self.patches.array_len() == 0 + } + + /// Returns the logical data type of the array. + #[inline] + pub fn dtype(&self) -> &DType { + self.fill_scalar().dtype() + } + #[inline] pub fn patches(&self) -> &Patches { &self.patches @@ -417,7 +451,7 @@ impl SparseArray { } }; - return Ok(SparseArray::try_new( + return Ok(SparseData::try_new( non_null_indices, non_null_values, array.len(), @@ -465,13 +499,13 @@ impl SparseArray { Mask::Values(values) => values.indices().iter().map(|v| *v as u64).collect(), }; - SparseArray::try_new(indices.into_array(), non_top_values, array.len(), fill) + SparseData::try_new(indices.into_array(), non_top_values, array.len(), fill) .map(|a| a.into_array()) } } impl ValidityVTable for Sparse { - fn validity(array: &SparseArray) -> VortexResult { + fn validity(array: &Array) -> VortexResult { let patches = unsafe { Patches::new_unchecked( array.patches.array_len(), @@ -488,7 +522,7 @@ impl ValidityVTable for Sparse { }; Ok(Validity::Array( - unsafe { SparseArray::new_unchecked(patches, array.fill_value.is_valid().into()) } + unsafe { SparseData::new_unchecked(patches, array.fill_value.is_valid().into()) } .into_array(), )) } @@ -526,7 +560,7 @@ mod test { let mut values = buffer![100i32, 200, 300].into_array(); values = values.cast(fill_value.dtype().clone()).unwrap(); - SparseArray::try_new(buffer![2u64, 5, 8].into_array(), values, 10, fill_value) + SparseData::try_new(buffer![2u64, 5, 8].into_array(), values, 10, fill_value) .unwrap() .into_array() } @@ -549,7 +583,7 @@ mod test { #[test] pub fn test_scalar_at_again() { - let arr = SparseArray::try_new( + let arr = SparseData::try_new( ConstantArray::new(10u32, 1).into_array(), ConstantArray::new(Scalar::primitive(1234u32, Nullability::Nullable), 1).into_array(), 100, @@ -585,7 +619,7 @@ mod test { #[test] pub fn validity_mask_sliced_nonnull_fill() { - let sliced = SparseArray::try_new( + let sliced = SparseData::try_new( buffer![2u64, 5, 8].into_array(), ConstantArray::new( Scalar::null(DType::Primitive(PType::F32, Nullability::Nullable)), @@ -648,7 +682,7 @@ mod test { let values = buffer![15_u32, 135, 13531, 42].into_array(); let indices = buffer![10_u64, 11, 50, 100].into_array(); - SparseArray::try_new(indices, values, 100, 0_u32.into()).unwrap(); + SparseData::try_new(indices, values, 100, 0_u32.into()).unwrap(); } #[test] @@ -656,7 +690,7 @@ mod test { let values = buffer![15_u32, 135, 13531, 42].into_array(); let indices = buffer![10_u64, 11, 50, 100].into_array(); - SparseArray::try_new(indices, values, 101, 0_u32.into()).unwrap(); + SparseData::try_new(indices, values, 101, 0_u32.into()).unwrap(); } #[test] @@ -667,8 +701,8 @@ mod test { true, true, false, true, false, true, false, true, true, false, true, false, ]), ); - let sparse = SparseArray::encode(&original.clone().into_array(), None) - .vortex_expect("SparseArray::encode should succeed for test data"); + let sparse = SparseData::encode(&original.clone().into_array(), None) + .vortex_expect("SparseData::encode should succeed for test data"); assert_eq!( sparse.validity_mask().unwrap(), Mask::from_iter(vec![ @@ -683,8 +717,7 @@ mod test { let indices = buffer![0u8, 2, 4, 6, 8].into_array(); let values = PrimitiveArray::from_option_iter([Some(0i16), Some(1), None, None, Some(4)]) .into_array(); - let array = - SparseArray::try_new(indices, values, 10, Scalar::null_native::()).unwrap(); + let array = SparseData::try_new(indices, values, 10, Scalar::null_native::()).unwrap(); let actual = array.validity_mask().unwrap(); let expected = Mask::from_iter([ true, false, true, false, false, false, false, false, true, false, diff --git a/encodings/sparse/src/ops.rs b/encodings/sparse/src/ops.rs index 7371298a5f4..fe309cc6dff 100644 --- a/encodings/sparse/src/ops.rs +++ b/encodings/sparse/src/ops.rs @@ -3,15 +3,16 @@ use vortex_array::ExecutionCtx; use vortex_array::scalar::Scalar; +use vortex_array::vtable::Array; use vortex_array::vtable::OperationsVTable; use vortex_error::VortexResult; use crate::Sparse; -use crate::SparseArray; +use crate::SparseData; impl OperationsVTable for Sparse { fn scalar_at( - array: &SparseArray, + array: &Array, index: usize, _ctx: &mut ExecutionCtx, ) -> VortexResult { @@ -37,7 +38,7 @@ mod tests { let values = buffer![0u64].into_array(); let indices = buffer![0u8].into_array(); - let sparse = SparseArray::try_new(indices, values, 1000, 999u64.into()).unwrap(); + let sparse = SparseData::try_new(indices, values, 1000, 999u64.into()).unwrap(); let sliced = sparse.slice(0..1000).unwrap(); let mut expected = vec![999u64; 1000]; expected[0] = 0; diff --git a/encodings/sparse/src/rules.rs b/encodings/sparse/src/rules.rs index 797ccbc20b8..1d4262ad19c 100644 --- a/encodings/sparse/src/rules.rs +++ b/encodings/sparse/src/rules.rs @@ -12,6 +12,7 @@ use vortex_error::VortexResult; use crate::Sparse; use crate::SparseArray; +use crate::SparseData; pub(crate) static RULES: ParentRuleSet = ParentRuleSet::new(&[ ParentRuleSet::lift(&CastReduceAdaptor(Sparse)), @@ -23,7 +24,7 @@ impl NotReduce for Sparse { let inverted_fill = array.fill_scalar().as_bool().invert().into_scalar(); let inverted_patches = array.patches().clone().map_values(|values| values.not())?; Ok(Some( - SparseArray::try_new_from_patches(inverted_patches, inverted_fill)?.into_array(), + SparseData::try_new_from_patches(inverted_patches, inverted_fill)?.into_array(), )) } } diff --git a/encodings/sparse/src/slice.rs b/encodings/sparse/src/slice.rs index e83d9d76a2f..37e65b0390a 100644 --- a/encodings/sparse/src/slice.rs +++ b/encodings/sparse/src/slice.rs @@ -12,6 +12,7 @@ use vortex_error::VortexResult; use crate::ConstantArray; use crate::Sparse; use crate::SparseArray; +use crate::SparseData; impl SliceKernel for Sparse { fn slice( @@ -35,7 +36,7 @@ impl SliceKernel for Sparse { // patches slice will ensure that dtype of patches is unchanged and the indices and // values match Ok(Some( - unsafe { SparseArray::new_unchecked(new_patches, array.fill_scalar().clone()) } + unsafe { SparseData::new_unchecked(new_patches, array.fill_scalar().clone()) } .into_array(), )) } diff --git a/encodings/zigzag/public-api.lock b/encodings/zigzag/public-api.lock index 3a93a0f5f5e..fc75ad9a3f0 100644 --- a/encodings/zigzag/public-api.lock +++ b/encodings/zigzag/public-api.lock @@ -80,7 +80,7 @@ pub fn vortex_zigzag::ZigZag::reduce_parent(array: &vortex_array::vtable::typed: pub fn vortex_zigzag::ZigZag::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_zigzag::ZigZag::stats(array: &vortex_zigzag::ZigZagArray) -> vortex_array::stats::array::StatsSetRef<'_> +pub fn vortex_zigzag::ZigZag::stats(array: &vortex_zigzag::ZigZagArray) -> &vortex_array::stats::array::ArrayStats pub fn vortex_zigzag::ZigZag::vtable(_array: &Self::Array) -> &Self diff --git a/encodings/zigzag/src/array.rs b/encodings/zigzag/src/array.rs index 867596ea818..7ebdd045442 100644 --- a/encodings/zigzag/src/array.rs +++ b/encodings/zigzag/src/array.rs @@ -20,7 +20,6 @@ use vortex_array::match_each_unsigned_integer_ptype; use vortex_array::scalar::Scalar; use vortex_array::serde::ArrayChildren; use vortex_array::stats::ArrayStats; -use vortex_array::stats::StatsSetRef; use vortex_array::vtable; use vortex_array::vtable::Array; use vortex_array::vtable::ArrayId; @@ -41,10 +40,10 @@ use crate::kernel::PARENT_KERNELS; use crate::rules::RULES; use crate::zigzag_decode; -vtable!(ZigZag); +vtable!(ZigZag, ZigZag, ZigZagData); impl VTable for ZigZag { - type Array = ZigZagArray; + type Array = ZigZagData; type Metadata = EmptyMetadata; type OperationsVTable = Self; @@ -58,58 +57,58 @@ impl VTable for ZigZag { Self::ID } - fn len(array: &ZigZagArray) -> usize { + fn len(array: &ZigZagData) -> usize { array.encoded.len() } - fn dtype(array: &ZigZagArray) -> &DType { + fn dtype(array: &ZigZagData) -> &DType { &array.dtype } - fn stats(array: &ZigZagArray) -> StatsSetRef<'_> { - array.stats_set.to_ref(array.as_ref()) + fn stats(array: &ZigZagData) -> &ArrayStats { + &array.stats_set } - fn array_hash(array: &ZigZagArray, state: &mut H, precision: Precision) { + fn array_hash(array: &Array, state: &mut H, precision: Precision) { array.dtype.hash(state); array.encoded.array_hash(state, precision); } - fn array_eq(array: &ZigZagArray, other: &ZigZagArray, precision: Precision) -> bool { + fn array_eq(array: &Array, other: &Array, precision: Precision) -> bool { array.dtype == other.dtype && array.encoded.array_eq(&other.encoded, precision) } - fn nbuffers(_array: &ZigZagArray) -> usize { + fn nbuffers(_array: &Array) -> usize { 0 } - fn buffer(_array: &ZigZagArray, idx: usize) -> BufferHandle { + fn buffer(_array: &Array, idx: usize) -> BufferHandle { vortex_panic!("ZigZagArray buffer index {idx} out of bounds") } - fn buffer_name(_array: &ZigZagArray, idx: usize) -> Option { + fn buffer_name(_array: &Array, idx: usize) -> Option { vortex_panic!("ZigZagArray buffer_name index {idx} out of bounds") } - fn nchildren(_array: &ZigZagArray) -> usize { + fn nchildren(_array: &Array) -> usize { 1 } - fn child(array: &ZigZagArray, idx: usize) -> ArrayRef { + fn child(array: &Array, idx: usize) -> ArrayRef { match idx { 0 => array.encoded().clone(), _ => vortex_panic!("ZigZagArray child index {idx} out of bounds"), } } - fn child_name(_array: &ZigZagArray, idx: usize) -> String { + fn child_name(_array: &Array, idx: usize) -> String { match idx { 0 => "encoded".to_string(), _ => vortex_panic!("ZigZagArray child_name index {idx} out of bounds"), } } - fn metadata(_array: &ZigZagArray) -> VortexResult { + fn metadata(_array: &Array) -> VortexResult { Ok(EmptyMetadata) } @@ -133,7 +132,7 @@ impl VTable for ZigZag { _metadata: &Self::Metadata, _buffers: &[BufferHandle], children: &dyn ArrayChildren, - ) -> VortexResult { + ) -> VortexResult { if children.len() != 1 { vortex_bail!("Expected 1 child, got {}", children.len()); } @@ -142,7 +141,7 @@ impl VTable for ZigZag { let encoded_type = DType::Primitive(ptype.to_unsigned(), dtype.nullability()); let encoded = children.get(0, &encoded_type, len)?; - ZigZagArray::try_new(encoded) + ZigZagData::try_new(encoded) } fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { @@ -180,7 +179,7 @@ impl VTable for ZigZag { } #[derive(Clone, Debug)] -pub struct ZigZagArray { +pub struct ZigZagData { dtype: DType, encoded: ArrayRef, stats_set: ArrayStats, @@ -191,9 +190,14 @@ pub struct ZigZag; impl ZigZag { pub const ID: ArrayId = ArrayId::new_ref("vortex.zigzag"); + + /// Construct a new [`ZigZagArray`] from an encoded unsigned integer array. + pub fn try_new(encoded: ArrayRef) -> VortexResult { + Ok(Array::from_inner(ZigZagData::try_new(encoded)?)) + } } -impl ZigZagArray { +impl ZigZagData { pub fn new(encoded: ArrayRef) -> Self { Self::try_new(encoded).vortex_expect("ZigZagArray new") } @@ -214,6 +218,24 @@ impl ZigZagArray { }) } + /// Returns the length of the array. + #[inline] + pub fn len(&self) -> usize { + self.encoded.len() + } + + /// Returns whether the array is empty. + #[inline] + pub fn is_empty(&self) -> bool { + self.encoded.is_empty() + } + + /// Returns the logical data type of the array. + #[inline] + pub fn dtype(&self) -> &DType { + &self.dtype + } + pub fn ptype(&self) -> PType { self.dtype().as_ptype() } @@ -225,7 +247,7 @@ impl ZigZagArray { impl OperationsVTable for ZigZag { fn scalar_at( - array: &ZigZagArray, + array: &Array, index: usize, _ctx: &mut ExecutionCtx, ) -> VortexResult { @@ -249,7 +271,7 @@ impl OperationsVTable for ZigZag { } impl ValidityChild for ZigZag { - fn validity_child(array: &ZigZagArray) -> &ArrayRef { + fn validity_child(array: &ZigZagData) -> &ArrayRef { array.encoded() } } diff --git a/encodings/zigzag/src/compress.rs b/encodings/zigzag/src/compress.rs index 488c20f8023..fc32b0184b9 100644 --- a/encodings/zigzag/src/compress.rs +++ b/encodings/zigzag/src/compress.rs @@ -14,8 +14,8 @@ use vortex_error::vortex_panic; use zigzag::ZigZag as ExternalZigZag; use crate::ZigZagArray; - -pub fn zigzag_encode(parray: PrimitiveArray) -> VortexResult { +use crate::ZigZagData; +pub fn zigzag_encode(parray: PrimitiveArray) -> VortexResult { let validity = parray.validity().clone(); let encoded = match parray.ptype() { PType::I8 => zigzag_encode_primitive::(parray.into_buffer_mut(), validity), @@ -27,7 +27,7 @@ pub fn zigzag_encode(parray: PrimitiveArray) -> VortexResult { parray.ptype() ), }; - ZigZagArray::try_new(encoded.into_array()) + ZigZagData::try_new(encoded.into_array()) } fn zigzag_encode_primitive( diff --git a/encodings/zigzag/src/compute/cast.rs b/encodings/zigzag/src/compute/cast.rs index 74a8c4a5442..bec3cc12ca5 100644 --- a/encodings/zigzag/src/compute/cast.rs +++ b/encodings/zigzag/src/compute/cast.rs @@ -10,7 +10,7 @@ use vortex_error::VortexResult; use crate::ZigZag; use crate::ZigZagArray; - +use crate::ZigZagData; impl CastReduce for ZigZag { fn cast(array: &ZigZagArray, dtype: &DType) -> VortexResult> { if !dtype.is_signed_int() { @@ -20,7 +20,7 @@ impl CastReduce for ZigZag { let new_encoded_dtype = DType::Primitive(dtype.as_ptype().to_unsigned(), dtype.nullability()); let new_encoded = array.encoded().cast(new_encoded_dtype)?; - Ok(Some(ZigZagArray::try_new(new_encoded)?.into_array())) + Ok(Some(ZigZagData::try_new(new_encoded)?.into_array())) } } diff --git a/encodings/zigzag/src/compute/mod.rs b/encodings/zigzag/src/compute/mod.rs index 86e343208b7..f10e4fb5a13 100644 --- a/encodings/zigzag/src/compute/mod.rs +++ b/encodings/zigzag/src/compute/mod.rs @@ -1,6 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors +use crate::ZigZagData; mod cast; use vortex_array::ArrayRef; @@ -22,7 +23,7 @@ use crate::ZigZagArray; impl FilterReduce for ZigZag { fn filter(array: &ZigZagArray, mask: &Mask) -> VortexResult> { let encoded = array.encoded().filter(mask.clone())?; - Ok(Some(ZigZagArray::try_new(encoded)?.into_array())) + Ok(Some(ZigZagData::try_new(encoded)?.into_array())) } } @@ -33,7 +34,7 @@ impl TakeExecute for ZigZag { _ctx: &mut ExecutionCtx, ) -> VortexResult> { let encoded = array.encoded().take(indices.to_array())?; - Ok(Some(ZigZagArray::try_new(encoded)?.into_array())) + Ok(Some(ZigZagData::try_new(encoded)?.into_array())) } } @@ -44,7 +45,7 @@ impl MaskReduce for ZigZag { EmptyOptions, [array.encoded().clone(), mask.clone()], )?; - Ok(Some(ZigZagArray::try_new(masked_encoded)?.into_array())) + Ok(Some(ZigZagData::try_new(masked_encoded)?.into_array())) } } diff --git a/encodings/zigzag/src/slice.rs b/encodings/zigzag/src/slice.rs index 95f5e272c81..fe5433c7829 100644 --- a/encodings/zigzag/src/slice.rs +++ b/encodings/zigzag/src/slice.rs @@ -6,15 +6,17 @@ use std::ops::Range; use vortex_array::ArrayRef; use vortex_array::IntoArray; use vortex_array::arrays::slice::SliceReduce; +use vortex_array::vtable::Array; use vortex_error::VortexResult; use crate::ZigZag; use crate::ZigZagArray; +use crate::ZigZagData; impl SliceReduce for ZigZag { - fn slice(array: &Self::Array, range: Range) -> VortexResult> { + fn slice(array: &Array, range: Range) -> VortexResult> { Ok(Some( - ZigZagArray::new(array.encoded().slice(range)?).into_array(), + ZigZagData::new(array.encoded().slice(range)?).into_array(), )) } } diff --git a/encodings/zstd/public-api.lock b/encodings/zstd/public-api.lock index 7abfb2c9b6f..eea087896a3 100644 --- a/encodings/zstd/public-api.lock +++ b/encodings/zstd/public-api.lock @@ -66,7 +66,7 @@ pub fn vortex_zstd::Zstd::reduce_parent(array: &vortex_array::vtable::typed::Arr pub fn vortex_zstd::Zstd::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_zstd::Zstd::stats(array: &vortex_zstd::ZstdArray) -> vortex_array::stats::array::StatsSetRef<'_> +pub fn vortex_zstd::Zstd::stats(array: &vortex_zstd::ZstdArray) -> &vortex_array::stats::array::ArrayStats pub fn vortex_zstd::Zstd::vtable(_array: &Self::Array) -> &Self diff --git a/encodings/zstd/src/array.rs b/encodings/zstd/src/array.rs index 1f501856989..81d1ebc8f9d 100644 --- a/encodings/zstd/src/array.rs +++ b/encodings/zstd/src/array.rs @@ -31,7 +31,6 @@ use vortex_array::dtype::DType; use vortex_array::scalar::Scalar; use vortex_array::serde::ArrayChildren; use vortex_array::stats::ArrayStats; -use vortex_array::stats::StatsSetRef; use vortex_array::validity::Validity; use vortex_array::vtable; use vortex_array::vtable::Array; @@ -83,10 +82,10 @@ type ViewLen = u32; // We then insert these values to the correct position using a primitive array // constructor. -vtable!(Zstd); +vtable!(Zstd, Zstd, ZstdData); impl VTable for Zstd { - type Array = ZstdArray; + type Array = ZstdData; type Metadata = ProstMetadata; type OperationsVTable = Self; @@ -100,19 +99,19 @@ impl VTable for Zstd { Self::ID } - fn len(array: &ZstdArray) -> usize { + fn len(array: &ZstdData) -> usize { array.slice_stop - array.slice_start } - fn dtype(array: &ZstdArray) -> &DType { + fn dtype(array: &ZstdData) -> &DType { &array.dtype } - fn stats(array: &ZstdArray) -> StatsSetRef<'_> { - array.stats_set.to_ref(array.as_ref()) + fn stats(array: &ZstdData) -> &ArrayStats { + &array.stats_set } - fn array_hash(array: &ZstdArray, state: &mut H, precision: Precision) { + fn array_hash(array: &Array, state: &mut H, precision: Precision) { match &array.dictionary { Some(dict) => { true.hash(state); @@ -132,7 +131,7 @@ impl VTable for Zstd { array.slice_stop.hash(state); } - fn array_eq(array: &ZstdArray, other: &ZstdArray, precision: Precision) -> bool { + fn array_eq(array: &Array, other: &Array, precision: Precision) -> bool { if !match (&array.dictionary, &other.dictionary) { (Some(d1), Some(d2)) => d1.array_eq(d2, precision), (None, None) => true, @@ -157,11 +156,11 @@ impl VTable for Zstd { && array.slice_stop == other.slice_stop } - fn nbuffers(array: &ZstdArray) -> usize { + fn nbuffers(array: &Array) -> usize { array.dictionary.is_some() as usize + array.frames.len() } - fn buffer(array: &ZstdArray, idx: usize) -> BufferHandle { + fn buffer(array: &Array, idx: usize) -> BufferHandle { if let Some(dict) = &array.dictionary { if idx == 0 { return BufferHandle::new_host(dict.clone()); @@ -172,7 +171,7 @@ impl VTable for Zstd { } } - fn buffer_name(array: &ZstdArray, idx: usize) -> Option { + fn buffer_name(array: &Array, idx: usize) -> Option { if array.dictionary.is_some() { if idx == 0 { Some("dictionary".to_string()) @@ -184,23 +183,23 @@ impl VTable for Zstd { } } - fn nchildren(array: &ZstdArray) -> usize { + fn nchildren(array: &Array) -> usize { validity_nchildren(&array.unsliced_validity) } - fn child(array: &ZstdArray, idx: usize) -> ArrayRef { + fn child(array: &Array, idx: usize) -> ArrayRef { validity_to_child(&array.unsliced_validity, array.unsliced_n_rows) .unwrap_or_else(|| vortex_panic!("ZstdArray child index {idx} out of bounds")) } - fn child_name(_array: &ZstdArray, idx: usize) -> String { + fn child_name(_array: &Array, idx: usize) -> String { match idx { 0 => "validity".to_string(), _ => vortex_panic!("ZstdArray child_name index {idx} out of bounds"), } } - fn metadata(array: &ZstdArray) -> VortexResult { + fn metadata(array: &Array) -> VortexResult { Ok(ProstMetadata(array.metadata.clone())) } @@ -224,7 +223,7 @@ impl VTable for Zstd { metadata: &Self::Metadata, buffers: &[BufferHandle], children: &dyn ArrayChildren, - ) -> VortexResult { + ) -> VortexResult { let validity = if children.is_empty() { Validity::from(dtype.nullability()) } else if children.len() == 1 { @@ -254,7 +253,7 @@ impl VTable for Zstd { ) }; - Ok(ZstdArray::new( + Ok(ZstdData::new( dictionary_buffer, compressed_buffers, dtype.clone(), @@ -301,10 +300,49 @@ pub struct Zstd; impl Zstd { pub const ID: ArrayId = ArrayId::new_ref("vortex.zstd"); + + /// Compress a [`VarBinViewArray`] using Zstd without a dictionary. + pub fn from_var_bin_view_without_dict( + vbv: &VarBinViewArray, + level: i32, + values_per_frame: usize, + ) -> VortexResult { + Ok(Array::from_inner(ZstdData::from_var_bin_view_without_dict( + vbv, + level, + values_per_frame, + )?)) + } + + /// Compress a [`PrimitiveArray`] using Zstd. + pub fn from_primitive( + parray: &PrimitiveArray, + level: i32, + values_per_frame: usize, + ) -> VortexResult { + Ok(Array::from_inner(ZstdData::from_primitive( + parray, + level, + values_per_frame, + )?)) + } + + /// Compress a [`VarBinViewArray`] using Zstd. + pub fn from_var_bin_view( + vbv: &VarBinViewArray, + level: i32, + values_per_frame: usize, + ) -> VortexResult { + Ok(Array::from_inner(ZstdData::from_var_bin_view( + vbv, + level, + values_per_frame, + )?)) + } } #[derive(Clone, Debug)] -pub struct ZstdArray { +pub struct ZstdData { pub(crate) dictionary: Option, pub(crate) frames: Vec, pub(crate) metadata: ZstdMetadata, @@ -352,17 +390,18 @@ fn choose_max_dict_size(uncompressed_size: usize) -> usize { } fn collect_valid_primitive(parray: &PrimitiveArray) -> VortexResult { - let mask = parray.validity_mask()?; + let mask = parray.validity_mask(); Ok(parray.clone().into_array().filter(mask)?.to_primitive()) } fn collect_valid_vbv(vbv: &VarBinViewArray) -> VortexResult<(ByteBuffer, Vec)> { - let mask = vbv.validity_mask()?; + let mask = vbv.validity_mask(); let buffer_and_value_byte_indices = match mask.bit_buffer() { AllOr::None => (Buffer::empty(), Vec::new()), _ => { let mut buffer = BufferMut::with_capacity( - usize::try_from(vbv.nbytes()).vortex_expect("must fit into buffer") + usize::try_from(vbv.clone().into_array().nbytes()) + .vortex_expect("must fit into buffer") + mask.true_count() * size_of::(), ); let mut value_byte_indices = Vec::new(); @@ -433,7 +472,7 @@ pub fn reconstruct_views( (buffers, views.freeze()) } -impl ZstdArray { +impl ZstdData { pub fn new( dictionary: Option, frames: Vec, @@ -599,7 +638,7 @@ impl ZstdArray { frames: frame_metas, }; - Ok(ZstdArray::new( + Ok(ZstdData::new( dictionary, frames, dtype, @@ -690,7 +729,7 @@ impl ZstdArray { .try_into()?, frames: frame_metas, }; - Ok(ZstdArray::new( + Ok(ZstdData::new( dictionary, frames, dtype, @@ -706,12 +745,12 @@ impl ZstdArray { values_per_frame: usize, ) -> VortexResult> { match canonical { - Canonical::Primitive(parray) => Ok(Some(ZstdArray::from_primitive( + Canonical::Primitive(parray) => Ok(Some(ZstdData::from_primitive( parray, level, values_per_frame, )?)), - Canonical::VarBinView(vbv) => Ok(Some(ZstdArray::from_var_bin_view( + Canonical::VarBinView(vbv) => Ok(Some(ZstdData::from_var_bin_view( vbv, level, values_per_frame, @@ -917,12 +956,12 @@ impl ZstdArray { self.slice_stop ); - ZstdArray { + Array::from_inner(ZstdData { slice_start: self.slice_start + start, slice_stop: self.slice_start + stop, stats_set: Default::default(), ..self.clone() - } + }) } /// Consumes the array and returns its parts. @@ -939,7 +978,21 @@ impl ZstdArray { } } - pub(crate) fn dtype(&self) -> &DType { + /// Returns the length of the array. + #[inline] + pub fn len(&self) -> usize { + self.slice_stop - self.slice_start + } + + /// Returns whether the array is empty. + #[inline] + pub fn is_empty(&self) -> bool { + self.slice_stop == self.slice_start + } + + /// Returns the logical data type of the array. + #[inline] + pub fn dtype(&self) -> &DType { &self.dtype } @@ -956,14 +1009,18 @@ impl ZstdArray { } } -impl ValiditySliceHelper for ZstdArray { +impl ValiditySliceHelper for ZstdData { fn unsliced_validity_and_slice(&self) -> (&Validity, usize, usize) { (&self.unsliced_validity, self.slice_start, self.slice_stop) } } impl OperationsVTable for Zstd { - fn scalar_at(array: &ZstdArray, index: usize, _ctx: &mut ExecutionCtx) -> VortexResult { + fn scalar_at( + array: &Array, + index: usize, + _ctx: &mut ExecutionCtx, + ) -> VortexResult { let mut ctx = LEGACY_SESSION.create_execution_ctx(); array ._slice(index, index + 1) diff --git a/encodings/zstd/src/compute/cast.rs b/encodings/zstd/src/compute/cast.rs index f57637df88c..a3b57141595 100644 --- a/encodings/zstd/src/compute/cast.rs +++ b/encodings/zstd/src/compute/cast.rs @@ -7,11 +7,12 @@ use vortex_array::dtype::DType; use vortex_array::dtype::Nullability; use vortex_array::scalar_fn::fns::cast::CastReduce; use vortex_array::validity::Validity; +use vortex_array::vtable::ValiditySliceHelper; use vortex_error::VortexResult; use crate::Zstd; use crate::ZstdArray; - +use crate::ZstdData; impl CastReduce for Zstd { fn cast(array: &ZstdArray, dtype: &DType) -> VortexResult> { if !dtype.eq_ignore_nullability(array.dtype()) { @@ -33,7 +34,7 @@ impl CastReduce for Zstd { (Nullability::NonNullable, Nullability::Nullable) => { // nonnull => null, trivial cast by altering the validity Ok(Some( - ZstdArray::new( + ZstdData::new( array.dictionary.clone(), array.frames.clone(), dtype.clone(), @@ -41,13 +42,14 @@ impl CastReduce for Zstd { array.unsliced_n_rows(), array.unsliced_validity.clone(), ) + .into_array() .slice(array.slice_start()..array.slice_stop())?, )) } (Nullability::Nullable, Nullability::NonNullable) => { // null => non-null works if there are no nulls in the sliced range let has_nulls = !matches!( - array.validity()?, + array.sliced_validity()?, Validity::AllValid | Validity::NonNullable ); @@ -58,7 +60,7 @@ impl CastReduce for Zstd { // If there are no nulls, the cast is trivial Ok(Some( - ZstdArray::new( + ZstdData::new( array.dictionary.clone(), array.frames.clone(), dtype.clone(), @@ -66,6 +68,7 @@ impl CastReduce for Zstd { array.unsliced_n_rows(), array.unsliced_validity.clone(), ) + .into_array() .slice(array.slice_start()..array.slice_stop())?, )) } @@ -93,7 +96,7 @@ mod tests { #[test] fn test_cast_zstd_i32_to_i64() { let values = PrimitiveArray::from_iter([1i32, 2, 3, 4, 5]); - let zstd = ZstdArray::from_primitive(&values, 0, 0).unwrap(); + let zstd = ZstdData::from_primitive(&values, 0, 0).unwrap(); let casted = zstd .into_array() @@ -111,7 +114,7 @@ mod tests { #[test] fn test_cast_zstd_nullability_change() { let values = PrimitiveArray::from_iter([10u32, 20, 30, 40]); - let zstd = ZstdArray::from_primitive(&values, 0, 0).unwrap(); + let zstd = ZstdData::from_primitive(&values, 0, 0).unwrap(); let casted = zstd .into_array() @@ -129,7 +132,7 @@ mod tests { buffer![10u32, 20, 30, 40, 50, 60], Validity::from_iter([true, true, true, true, true, true]), ); - let zstd = ZstdArray::from_primitive(&values, 0, 128).unwrap(); + let zstd = ZstdData::from_primitive(&values, 0, 128).unwrap(); let sliced = zstd.slice(1..5).unwrap(); let casted = sliced .cast(DType::Primitive(PType::U32, Nullability::NonNullable)) @@ -153,7 +156,7 @@ mod tests { Some(50), Some(60), ]); - let zstd = ZstdArray::from_primitive(&values, 0, 128).unwrap(); + let zstd = ZstdData::from_primitive(&values, 0, 128).unwrap(); let sliced = zstd.slice(1..5).unwrap(); let casted = sliced .cast(DType::Primitive(PType::U32, Nullability::NonNullable)) @@ -185,7 +188,7 @@ mod tests { Validity::NonNullable, ))] fn test_cast_zstd_conformance(#[case] values: PrimitiveArray) { - let zstd = ZstdArray::from_primitive(&values, 0, 0).unwrap(); + let zstd = ZstdData::from_primitive(&values, 0, 0).unwrap(); test_cast_conformance(&zstd.into_array()); } } diff --git a/encodings/zstd/src/compute/mod.rs b/encodings/zstd/src/compute/mod.rs index 73e941b82c3..ebb28b36043 100644 --- a/encodings/zstd/src/compute/mod.rs +++ b/encodings/zstd/src/compute/mod.rs @@ -1,6 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors +use crate::ZstdData; mod cast; #[cfg(test)] @@ -15,23 +16,23 @@ mod tests { fn zstd_i32() -> ZstdArray { let values = PrimitiveArray::from_iter([100i32, 200, 300, 400, 500]); - ZstdArray::from_primitive(&values, 0, 0).unwrap() + ZstdData::from_primitive(&values, 0, 0).unwrap() } fn zstd_f64() -> ZstdArray { let values = PrimitiveArray::from_iter([1.1f64, 2.2, 3.3, 4.4, 5.5]); - ZstdArray::from_primitive(&values, 0, 0).unwrap() + ZstdData::from_primitive(&values, 0, 0).unwrap() } fn zstd_u32() -> ZstdArray { let values = PrimitiveArray::from_iter([10u32, 20, 30, 40, 50]); - ZstdArray::from_primitive(&values, 0, 0).unwrap() + ZstdData::from_primitive(&values, 0, 0).unwrap() } fn zstd_nullable_i64() -> ZstdArray { let values = PrimitiveArray::from_option_iter([Some(1000i64), None, Some(3000), Some(4000), None]); - ZstdArray::from_primitive(&values, 0, 0).unwrap() + ZstdData::from_primitive(&values, 0, 0).unwrap() } fn zstd_single() -> ZstdArray { @@ -39,7 +40,7 @@ mod tests { buffer![42i64], vortex_array::validity::Validity::NonNullable, ); - ZstdArray::from_primitive(&values, 0, 0).unwrap() + ZstdData::from_primitive(&values, 0, 0).unwrap() } fn zstd_large() -> ZstdArray { @@ -47,7 +48,7 @@ mod tests { buffer![0u32..1000], vortex_array::validity::Validity::NonNullable, ); - ZstdArray::from_primitive(&values, 3, 0).unwrap() + ZstdData::from_primitive(&values, 3, 0).unwrap() } fn zstd_all_same() -> ZstdArray { @@ -55,12 +56,12 @@ mod tests { buffer![42i32; 100], vortex_array::validity::Validity::NonNullable, ); - ZstdArray::from_primitive(&values, 0, 0).unwrap() + ZstdData::from_primitive(&values, 0, 0).unwrap() } fn zstd_negative() -> ZstdArray { let values = PrimitiveArray::from_iter([-100i32, -50, 0, 50, 100]); - ZstdArray::from_primitive(&values, 0, 0).unwrap() + ZstdData::from_primitive(&values, 0, 0).unwrap() } #[rstest] diff --git a/encodings/zstd/src/slice.rs b/encodings/zstd/src/slice.rs index ddc300f7233..7b5500d924b 100644 --- a/encodings/zstd/src/slice.rs +++ b/encodings/zstd/src/slice.rs @@ -6,13 +6,14 @@ use std::ops::Range; use vortex_array::ArrayRef; use vortex_array::IntoArray; use vortex_array::arrays::slice::SliceReduce; +use vortex_array::vtable::Array; use vortex_error::VortexResult; use crate::Zstd; use crate::ZstdArray; impl SliceReduce for Zstd { - fn slice(array: &Self::Array, range: Range) -> VortexResult> { + fn slice(array: &Array, range: Range) -> VortexResult> { Ok(Some(slice_zstd(array, range))) } } diff --git a/encodings/zstd/src/test.rs b/encodings/zstd/src/test.rs index d17fe512824..ce7d5346ee7 100644 --- a/encodings/zstd/src/test.rs +++ b/encodings/zstd/src/test.rs @@ -20,13 +20,14 @@ use vortex_buffer::Buffer; use vortex_mask::Mask; use crate::ZstdArray; +use crate::ZstdData; #[test] fn test_zstd_compress_decompress() { let data: Vec = (0..200).collect(); let array = PrimitiveArray::from_iter(data.clone()); - let compressed = ZstdArray::from_primitive(&array, 3, 0).unwrap(); + let compressed = ZstdData::from_primitive(&array, 3, 0).unwrap(); // this data should be compressible assert!(compressed.frames.len() < array.nbytes() as usize); assert!(compressed.dictionary.is_none()); @@ -55,7 +56,7 @@ fn test_zstd_empty() { Validity::NonNullable, ); - let compressed = ZstdArray::from_primitive(&array, 3, 100).unwrap(); + let compressed = ZstdData::from_primitive(&array, 3, 100).unwrap(); assert_arrays_eq!(compressed, PrimitiveArray::from_iter(data)); } @@ -71,7 +72,7 @@ fn test_zstd_with_validity_and_multi_frame() { Validity::Array(BoolArray::from_iter(validity).into_array()), ); - let compressed = ZstdArray::from_primitive(&array, 0, 30).unwrap(); + let compressed = ZstdData::from_primitive(&array, 0, 30).unwrap(); assert!(compressed.dictionary.is_none()); assert_nth_scalar!(compressed, 0, None::); assert_nth_scalar!(compressed, 3, 3); @@ -116,7 +117,7 @@ fn test_zstd_with_dict() { Validity::NonNullable, ); - let compressed = ZstdArray::from_primitive(&array, 0, 16).unwrap(); + let compressed = ZstdData::from_primitive(&array, 0, 16).unwrap(); assert!(compressed.dictionary.is_some()); assert_nth_scalar!(compressed, 0, 0); assert_nth_scalar!(compressed, 199, 199); @@ -138,7 +139,7 @@ fn test_validity_vtable() { (0..5).collect::>(), Validity::Array(BoolArray::from_iter(mask_bools.clone()).into_array()), ); - let compressed = ZstdArray::from_primitive(&array, 3, 0).unwrap(); + let compressed = ZstdData::from_primitive(&array, 3, 0).unwrap(); assert_eq!( compressed.validity_mask().unwrap(), Mask::from_iter(mask_bools) @@ -160,7 +161,7 @@ fn test_zstd_var_bin_view() { ]; let array = VarBinViewArray::from_iter(data, DType::Utf8(Nullability::Nullable)); - let compressed = ZstdArray::from_var_bin_view(&array, 0, 3).unwrap(); + let compressed = ZstdData::from_var_bin_view(&array, 0, 3).unwrap(); assert!(compressed.dictionary.is_none()); assert_nth_scalar!(compressed, 0, "foo"); assert_nth_scalar!(compressed, 1, "bar"); @@ -185,7 +186,7 @@ fn test_zstd_decompress_var_bin_view() { ]; let array = VarBinViewArray::from_iter(data, DType::Utf8(Nullability::Nullable)); - let compressed = ZstdArray::from_var_bin_view(&array, 0, 3).unwrap(); + let compressed = ZstdData::from_var_bin_view(&array, 0, 3).unwrap(); assert!(compressed.dictionary.is_none()); assert_nth_scalar!(compressed, 0, "foo"); assert_nth_scalar!(compressed, 1, "bar"); @@ -206,7 +207,7 @@ fn test_zstd_decompress_var_bin_view() { fn test_sliced_array_children() { let data: Vec> = (0..10).map(|v| (v != 5).then_some(v)).collect(); let compressed = - ZstdArray::from_primitive(&PrimitiveArray::from_option_iter(data), 0, 100).unwrap(); + ZstdData::from_primitive(&PrimitiveArray::from_option_iter(data), 0, 100).unwrap(); let sliced = compressed.slice(0..4).unwrap(); sliced.children(); } @@ -219,7 +220,7 @@ fn test_zstd_frame_start_buffer_alignment() { let aligned_buffer = Buffer::copy_from_aligned(&data, Alignment::new(8)); // u8 array now has a 8-byte alignment. let array = PrimitiveArray::new(aligned_buffer, Validity::NonNullable); - let compressed = ZstdArray::from_primitive(&array, 0, 1); + let compressed = ZstdData::from_primitive(&array, 0, 1); assert!(compressed.is_ok()); } diff --git a/encodings/zstd/src/zstd_buffers.rs b/encodings/zstd/src/zstd_buffers.rs index b84f341a3fc..79af2c4c95b 100644 --- a/encodings/zstd/src/zstd_buffers.rs +++ b/encodings/zstd/src/zstd_buffers.rs @@ -11,6 +11,7 @@ use vortex_array::ArrayHash; use vortex_array::ArrayRef; use vortex_array::ExecutionCtx; use vortex_array::ExecutionResult; +use vortex_array::IntoArray; use vortex_array::Precision; use vortex_array::ProstMetadata; use vortex_array::buffer::BufferHandle; @@ -19,7 +20,6 @@ use vortex_array::scalar::Scalar; use vortex_array::serde::ArrayChildren; use vortex_array::session::ArraySessionExt; use vortex_array::stats::ArrayStats; -use vortex_array::stats::StatsSetRef; use vortex_array::vtable; use vortex_array::vtable::Array; use vortex_array::vtable::ArrayId; @@ -34,9 +34,10 @@ use vortex_error::vortex_ensure_eq; use vortex_error::vortex_err; use vortex_session::VortexSession; +use crate::ZstdBuffersData; use crate::ZstdBuffersMetadata; -vtable!(ZstdBuffers); +vtable!(ZstdBuffers, ZstdBuffers, ZstdBuffersData); #[derive(Clone, Debug)] pub struct ZstdBuffers; @@ -51,7 +52,7 @@ impl ZstdBuffers { /// `ZstdBuffersArray` compresses each buffer independently. This enables zero-conversion /// GPU decompression since the original buffer layout is preserved after decompression. #[derive(Clone, Debug)] -pub struct ZstdBuffersArray { +pub struct ZstdBuffersData { inner_encoding_id: ArrayId, inner_metadata: Vec, compressed_buffers: Vec, @@ -122,7 +123,25 @@ impl ZstdBuffersDecodePlan { } } -impl ZstdBuffersArray { +impl ZstdBuffersData { + /// Returns the length of the array. + #[inline] + pub fn len(&self) -> usize { + self.len + } + + /// Returns whether the array is empty. + #[inline] + pub fn is_empty(&self) -> bool { + self.len == 0 + } + + /// Returns the logical data type of the array. + #[inline] + pub fn dtype(&self) -> &DType { + &self.dtype + } + fn validate(&self) -> VortexResult<()> { vortex_ensure_eq!( self.compressed_buffers.len(), @@ -178,9 +197,10 @@ impl ZstdBuffersArray { len: array.len(), stats_set: Default::default(), }; + let compressed_ref = compressed.clone().into_array(); compressed .stats_set - .to_ref(compressed.as_ref()) + .to_ref(&*compressed_ref) .inherit_from(array.statistics()); Ok(compressed) } @@ -325,7 +345,7 @@ fn array_id_from_string(s: &str) -> ArrayId { } impl VTable for ZstdBuffers { - type Array = ZstdBuffersArray; + type Array = ZstdBuffersData; type Metadata = ProstMetadata; type OperationsVTable = Self; @@ -339,23 +359,19 @@ impl VTable for ZstdBuffers { Self::ID } - fn len(array: &ZstdBuffersArray) -> usize { + fn len(array: &ZstdBuffersData) -> usize { array.len } - fn dtype(array: &ZstdBuffersArray) -> &DType { + fn dtype(array: &ZstdBuffersData) -> &DType { &array.dtype } - fn stats(array: &ZstdBuffersArray) -> StatsSetRef<'_> { - array.stats_set.to_ref(array.as_ref()) + fn stats(array: &ZstdBuffersData) -> &ArrayStats { + &array.stats_set } - fn array_hash( - array: &ZstdBuffersArray, - state: &mut H, - precision: Precision, - ) { + fn array_hash(array: &Array, state: &mut H, precision: Precision) { array.inner_encoding_id.hash(state); array.inner_metadata.hash(state); for buf in &array.compressed_buffers { @@ -370,7 +386,7 @@ impl VTable for ZstdBuffers { } } - fn array_eq(array: &ZstdBuffersArray, other: &ZstdBuffersArray, precision: Precision) -> bool { + fn array_eq(array: &Array, other: &Array, precision: Precision) -> bool { array.inner_encoding_id == other.inner_encoding_id && array.inner_metadata == other.inner_metadata && array.compressed_buffers.len() == other.compressed_buffers.len() @@ -391,31 +407,31 @@ impl VTable for ZstdBuffers { .all(|(a, b)| a.array_eq(b, precision)) } - fn nbuffers(array: &ZstdBuffersArray) -> usize { + fn nbuffers(array: &Array) -> usize { array.compressed_buffers.len() } - fn buffer(array: &ZstdBuffersArray, idx: usize) -> BufferHandle { + fn buffer(array: &Array, idx: usize) -> BufferHandle { array.compressed_buffers[idx].clone() } - fn buffer_name(_array: &ZstdBuffersArray, idx: usize) -> Option { + fn buffer_name(_array: &Array, idx: usize) -> Option { Some(format!("compressed_{idx}")) } - fn nchildren(array: &ZstdBuffersArray) -> usize { + fn nchildren(array: &Array) -> usize { array.children.len() } - fn child(array: &ZstdBuffersArray, idx: usize) -> ArrayRef { + fn child(array: &Array, idx: usize) -> ArrayRef { array.children[idx].clone() } - fn child_name(_array: &ZstdBuffersArray, idx: usize) -> String { + fn child_name(_array: &Array, idx: usize) -> String { format!("child_{idx}") } - fn metadata(array: &ZstdBuffersArray) -> VortexResult { + fn metadata(array: &Array) -> VortexResult { Ok(ProstMetadata(ZstdBuffersMetadata { inner_encoding_id: array.inner_encoding_id.to_string(), inner_metadata: array.inner_metadata.clone(), @@ -444,7 +460,7 @@ impl VTable for ZstdBuffers { metadata: &Self::Metadata, buffers: &[BufferHandle], children: &dyn ArrayChildren, - ) -> VortexResult { + ) -> VortexResult { let compressed_buffers: Vec = buffers.to_vec(); let child_arrays: Vec = (0..children.len()) @@ -483,7 +499,7 @@ impl VTable for ZstdBuffers { impl OperationsVTable for ZstdBuffers { fn scalar_at( - array: &ZstdBuffersArray, + array: &Array, index: usize, _ctx: &mut ExecutionCtx, ) -> VortexResult { @@ -496,7 +512,7 @@ impl OperationsVTable for ZstdBuffers { } impl ValidityVTable for ZstdBuffers { - fn validity(array: &ZstdBuffersArray) -> VortexResult { + fn validity(array: &Array) -> VortexResult { if !array.dtype.is_nullable() { return Ok(vortex_array::validity::Validity::NonNullable); } @@ -563,7 +579,7 @@ mod tests { #[case::empty_primitive(make_empty_primitive_array())] #[case::inlined_varbinview(make_inlined_varbinview_array())] fn test_roundtrip(#[case] input: ArrayRef) -> VortexResult<()> { - let compressed = ZstdBuffersArray::compress(&input, 3)?; + let compressed = ZstdBuffersData::compress(&input, 3)?; assert_eq!(compressed.len, input.len()); assert_eq!(&compressed.dtype, input.dtype()); @@ -580,7 +596,7 @@ mod tests { let input = make_primitive_array(); input.statistics().set(Stat::Min, Precision::exact(0i32)); - let compressed = ZstdBuffersArray::compress(&input, 3)?; + let compressed = ZstdBuffersData::compress(&input, 3)?; assert!(compressed.statistics().get(Stat::Min).is_some()); Ok(()) @@ -589,7 +605,7 @@ mod tests { #[test] fn test_validity_delegates_for_nullable_input() -> VortexResult<()> { let input = make_nullable_primitive_array(); - let compressed = ZstdBuffersArray::compress(&input, 3)?.into_array(); + let compressed = ZstdBuffersData::compress(&input, 3)?.into_array(); assert_eq!(compressed.all_valid()?, input.all_valid()?); assert_eq!(compressed.all_invalid()?, input.all_invalid()?); diff --git a/fuzz/fuzz_targets/file_io.rs b/fuzz/fuzz_targets/file_io.rs index a67ceb53fb3..e8013d7e132 100644 --- a/fuzz/fuzz_targets/file_io.rs +++ b/fuzz/fuzz_targets/file_io.rs @@ -113,7 +113,11 @@ fuzz_target!(|fuzz: FuzzFileAction| -> Corpus { .to_bool(); let true_count = bool_result.to_bit_buffer().true_count(); if true_count != expected_array.len() - && (bool_result.all_valid().vortex_expect("all_valid") + && (bool_result + .clone() + .into_array() + .all_valid() + .vortex_expect("all_valid") || expected_array.all_valid().vortex_expect("all_valid")) { vortex_panic!( diff --git a/fuzz/src/array/fill_null.rs b/fuzz/src/array/fill_null.rs index 8dc89c8a682..9facf80ddaa 100644 --- a/fuzz/src/array/fill_null.rs +++ b/fuzz/src/array/fill_null.rs @@ -3,6 +3,7 @@ use vortex_array::ArrayRef; use vortex_array::Canonical; +use vortex_array::DynArray; use vortex_array::IntoArray; use vortex_array::ToCanonical; use vortex_array::arrays::BoolArray; @@ -175,6 +176,7 @@ fn fill_varbinview_array( fill_value: &Scalar, result_nullability: Nullability, ) -> ArrayRef { + let array_ref = array.clone().into_array(); match array.validity() { Validity::NonNullable | Validity::AllValid => array.clone().into_array(), Validity::AllInvalid => ConstantArray::new(fill_value.clone(), array.len()).into_array(), @@ -191,7 +193,7 @@ fn fill_varbinview_array( let strings: Vec = (0..array.len()) .map(|i| { if validity_bits.value(i) { - array + array_ref .scalar_at(i) .vortex_expect("scalar_at") .as_utf8() @@ -225,7 +227,7 @@ fn fill_varbinview_array( let binaries: Vec> = (0..array.len()) .map(|i| { if validity_bits.value(i) { - array + array_ref .scalar_at(i) .vortex_expect("scalar_at") .as_binary() diff --git a/fuzz/src/array/scalar_at.rs b/fuzz/src/array/scalar_at.rs index 8d371445045..50a88989049 100644 --- a/fuzz/src/array/scalar_at.rs +++ b/fuzz/src/array/scalar_at.rs @@ -5,6 +5,7 @@ use std::sync::Arc; use vortex_array::Canonical; use vortex_array::DynArray; +use vortex_array::IntoArray; use vortex_array::arrays::varbin::varbin_scalar; use vortex_array::dtype::DType; use vortex_array::match_each_decimal_value_type; @@ -18,8 +19,9 @@ use vortex_error::VortexResult; /// This implementation manually extracts the scalar value from each canonical type /// without using the scalar_at method, to serve as an independent baseline for testing. pub fn scalar_at_canonical_array(canonical: Canonical, index: usize) -> VortexResult { - if canonical.as_ref().is_invalid(index)? { - return Ok(Scalar::null(canonical.as_ref().dtype().clone())); + let canonical_ref = canonical.clone().into_array(); + if canonical_ref.is_invalid(index)? { + return Ok(Scalar::null(canonical_ref.dtype().clone())); } Ok(match canonical { Canonical::Null(_array) => Scalar::null(DType::Null), diff --git a/fuzz/src/array/search_sorted.rs b/fuzz/src/array/search_sorted.rs index 0bad7191bb8..603a04de240 100644 --- a/fuzz/src/array/search_sorted.rs +++ b/fuzz/src/array/search_sorted.rs @@ -64,7 +64,7 @@ pub fn search_sorted_canonical_array( match array.dtype() { DType::Bool(_) => { let bool_array = array.to_bool(); - let validity = bool_array.validity_mask()?.to_bit_buffer(); + let validity = bool_array.validity_mask().to_bit_buffer(); let opt_values = bool_array .to_bit_buffer() .iter() @@ -76,7 +76,7 @@ pub fn search_sorted_canonical_array( } DType::Primitive(p, _) => { let primitive_array = array.to_primitive(); - let validity = primitive_array.validity_mask()?.to_bit_buffer(); + let validity = primitive_array.validity_mask().to_bit_buffer(); match_each_native_ptype!(p, |P| { let opt_values = primitive_array .as_slice::

() @@ -91,7 +91,7 @@ pub fn search_sorted_canonical_array( } DType::Decimal(d, _) => { let decimal_array = array.to_decimal(); - let validity = decimal_array.validity_mask()?.to_bit_buffer(); + let validity = decimal_array.validity_mask().to_bit_buffer(); match_each_decimal_value_type!(decimal_array.values_type(), |D| { let buf = decimal_array.buffer::(); let opt_values = buf diff --git a/fuzz/src/array/sort.rs b/fuzz/src/array/sort.rs index 6c1da201fca..b2d673ff57a 100644 --- a/fuzz/src/array/sort.rs +++ b/fuzz/src/array/sort.rs @@ -28,7 +28,7 @@ pub fn sort_canonical_array(array: &ArrayRef) -> VortexResult { let mut opt_values = bool_array .to_bit_buffer() .iter() - .zip(bool_array.validity_mask()?.to_bit_buffer().iter()) + .zip(bool_array.validity_mask().to_bit_buffer().iter()) .map(|(b, v)| v.then_some(b)) .collect::>(); opt_values.sort(); @@ -41,7 +41,7 @@ pub fn sort_canonical_array(array: &ArrayRef) -> VortexResult { .as_slice::

() .iter() .copied() - .zip(primitive_array.validity_mask()?.to_bit_buffer().iter()) + .zip(primitive_array.validity_mask().to_bit_buffer().iter()) .map(|(p, v)| v.then_some(p)) .collect::>(); sort_primitive_slice(&mut opt_values); @@ -56,7 +56,7 @@ pub fn sort_canonical_array(array: &ArrayRef) -> VortexResult { .as_slice() .iter() .copied() - .zip(decimal_array.validity_mask()?.to_bit_buffer().iter()) + .zip(decimal_array.validity_mask().to_bit_buffer().iter()) .map(|(p, v)| v.then_some(p)) .collect::>(); opt_values.sort(); diff --git a/fuzz/src/fsst_like.rs b/fuzz/src/fsst_like.rs index f2f0f3bac48..3c7fc966ddd 100644 --- a/fuzz/src/fsst_like.rs +++ b/fuzz/src/fsst_like.rs @@ -111,7 +111,12 @@ pub fn run_fsst_like_fuzz(fuzz: FuzzFsstLike) -> VortexFuzzResult { // Train FSST compressor and compress. let compressor = fsst_train_compressor(&varbin); - let fsst_array: FSSTArray = fsst_compress(varbin.clone(), &compressor); + let fsst_array: FSSTArray = vortex_array::vtable::Array::from_inner(fsst_compress( + varbin.clone(), + varbin.len(), + varbin.dtype(), + &compressor, + )); let opts = LikeOptions { negated, diff --git a/vortex-array/benches/dict_compare.rs b/vortex-array/benches/dict_compare.rs index 0b1945bf370..e8e03859bba 100644 --- a/vortex-array/benches/dict_compare.rs +++ b/vortex-array/benches/dict_compare.rs @@ -6,6 +6,7 @@ use std::str::from_utf8; use vortex_array::Canonical; +use vortex_array::DynArray; use vortex_array::IntoArray; use vortex_array::RecursiveCanonical; use vortex_array::VortexSessionExecute; @@ -123,7 +124,7 @@ fn bench_compare_sliced_dict_primitive( ) { let primitive_arr = gen_primitive_for_dict::(codes_len.max(values_len), values_len); let dict = dict_encode(&primitive_arr.clone().into_array()).unwrap(); - let dict = dict.slice(0..codes_len).unwrap(); + let dict = dict.into_array().slice(0..codes_len).unwrap(); let value = primitive_arr.as_slice::()[0]; let session = VortexSession::empty(); @@ -144,7 +145,7 @@ fn bench_compare_sliced_dict_varbinview( ) { let varbin_arr = VarBinArray::from(gen_varbin_words(codes_len.max(values_len), values_len)); let dict = dict_encode(&varbin_arr.clone().into_array()).unwrap(); - let dict = dict.slice(0..codes_len).unwrap(); + let dict = dict.into_array().slice(0..codes_len).unwrap(); let bytes = varbin_arr.with_iterator(|i| i.next().unwrap().unwrap().to_vec()); let value = from_utf8(bytes.as_slice()).unwrap(); let session = VortexSession::empty(); diff --git a/vortex-array/benches/dict_compress.rs b/vortex-array/benches/dict_compress.rs index b52d66a031c..4a03d6745fc 100644 --- a/vortex-array/benches/dict_compress.rs +++ b/vortex-array/benches/dict_compress.rs @@ -6,6 +6,7 @@ use divan::Bencher; use rand::distr::Distribution; use rand::distr::StandardUniform; +use vortex_array::DynArray; use vortex_array::IntoArray; use vortex_array::arrays::VarBinArray; use vortex_array::arrays::VarBinViewArray; @@ -70,7 +71,9 @@ where StandardUniform: Distribution, { let primitive_arr = gen_primitive_for_dict::(len, unique_values); - let dict = dict_encode(&primitive_arr.into_array()).unwrap(); + let dict = dict_encode(&primitive_arr.into_array()) + .unwrap() + .into_array(); bencher .with_inputs(|| &dict) @@ -80,7 +83,7 @@ where #[divan::bench(args = BENCH_ARGS)] fn decode_varbin(bencher: Bencher, (len, unique_values): (usize, usize)) { let varbin_arr = VarBinArray::from(gen_varbin_words(len, unique_values)); - let dict = dict_encode(&varbin_arr.into_array()).unwrap(); + let dict = dict_encode(&varbin_arr.into_array()).unwrap().into_array(); bencher .with_inputs(|| &dict) @@ -90,7 +93,9 @@ fn decode_varbin(bencher: Bencher, (len, unique_values): (usize, usize)) { #[divan::bench(args = BENCH_ARGS)] fn decode_varbinview(bencher: Bencher, (len, unique_values): (usize, usize)) { let varbinview_arr = VarBinViewArray::from_iter_str(gen_varbin_words(len, unique_values)); - let dict = dict_encode(&varbinview_arr.into_array()).unwrap(); + let dict = dict_encode(&varbinview_arr.into_array()) + .unwrap() + .into_array(); bencher .with_inputs(|| &dict) diff --git a/vortex-array/benches/filter_bool.rs b/vortex-array/benches/filter_bool.rs index 68971772da4..c6d5017ddcd 100644 --- a/vortex-array/benches/filter_bool.rs +++ b/vortex-array/benches/filter_bool.rs @@ -14,6 +14,8 @@ use divan::Bencher; use rand::prelude::*; use rand_distr::Zipf; +use vortex_array::DynArray; +use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; use vortex_array::RecursiveCanonical; use vortex_array::VortexSessionExecute; @@ -147,6 +149,8 @@ fn filter_random_by_mostly_true(bencher: Bencher, n: usize) { }) .bench_refs(|(array, m, ctx)| { array + .clone() + .into_array() .filter(m.clone()) .unwrap() .execute::(ctx) @@ -166,6 +170,8 @@ fn filter_random_by_mostly_false(bencher: Bencher, n: usize) { }) .bench_refs(|(array, m, ctx)| { array + .clone() + .into_array() .filter(m.clone()) .unwrap() .execute::(ctx) @@ -185,6 +191,8 @@ fn filter_random_by_random(bencher: Bencher, n: usize) { }) .bench_refs(|(array, m, ctx)| { array + .clone() + .into_array() .filter(m.clone()) .unwrap() .execute::(ctx) @@ -204,6 +212,8 @@ fn filter_random_by_correlated_runs(bencher: Bencher, n: usize) { }) .bench_refs(|(array, m, ctx)| { array + .clone() + .into_array() .filter(m.clone()) .unwrap() .execute::(ctx) @@ -223,6 +233,8 @@ fn filter_random_by_power_law(bencher: Bencher, n: usize) { }) .bench_refs(|(array, m, ctx)| { array + .clone() + .into_array() .filter(m.clone()) .unwrap() .execute::(ctx) @@ -244,6 +256,8 @@ fn filter_powerlaw_by_mostly_true(bencher: Bencher, n: usize) { }) .bench_refs(|(array, m, ctx)| { array + .clone() + .into_array() .filter(m.clone()) .unwrap() .execute::(ctx) @@ -263,6 +277,8 @@ fn filter_powerlaw_by_mostly_false(bencher: Bencher, n: usize) { }) .bench_refs(|(array, m, ctx)| { array + .clone() + .into_array() .filter(m.clone()) .unwrap() .execute::(ctx) @@ -282,6 +298,8 @@ fn filter_powerlaw_by_random(bencher: Bencher, n: usize) { }) .bench_refs(|(array, m, ctx)| { array + .clone() + .into_array() .filter(m.clone()) .unwrap() .execute::(ctx) @@ -301,6 +319,8 @@ fn filter_powerlaw_by_correlated_runs(bencher: Bencher, n: usize) { }) .bench_refs(|(array, m, ctx)| { array + .clone() + .into_array() .filter(m.clone()) .unwrap() .execute::(ctx) @@ -320,6 +340,8 @@ fn filter_powerlaw_by_power_law(bencher: Bencher, n: usize) { }) .bench_refs(|(array, m, ctx)| { array + .clone() + .into_array() .filter(m.clone()) .unwrap() .execute::(ctx) @@ -345,6 +367,8 @@ fn density_sweep_random(bencher: Bencher, density: f64) { }) .bench_refs(|(array, m, ctx)| { array + .clone() + .into_array() .filter(m.clone()) .unwrap() .execute::(ctx) @@ -365,6 +389,8 @@ fn density_sweep_dense_runs(bencher: Bencher, density: f64) { }) .bench_refs(|(array, m, ctx)| { array + .clone() + .into_array() .filter(m.clone()) .unwrap() .execute::(ctx) @@ -384,6 +410,8 @@ fn density_sweep_single_slice(bencher: Bencher, density: f64) { }) .bench_refs(|(array, m, ctx)| { array + .clone() + .into_array() .filter(m.clone()) .unwrap() .execute::(ctx) @@ -407,6 +435,8 @@ fn filter_all_true(bencher: Bencher, n: usize) { }) .bench_refs(|(array, m, ctx)| { array + .clone() + .into_array() .filter(m.clone()) .unwrap() .execute::(ctx) @@ -428,6 +458,8 @@ fn filter_one_false(bencher: Bencher, n: usize) { }) .bench_refs(|(array, m, ctx)| { array + .clone() + .into_array() .filter(m.clone()) .unwrap() .execute::(ctx) @@ -447,6 +479,8 @@ fn filter_ultra_sparse(bencher: Bencher, n: usize) { }) .bench_refs(|(array, m, ctx)| { array + .clone() + .into_array() .filter(m.clone()) .unwrap() .execute::(ctx) diff --git a/vortex-array/benches/scalar_at_struct.rs b/vortex-array/benches/scalar_at_struct.rs index 3a54dea249e..444f295f7bd 100644 --- a/vortex-array/benches/scalar_at_struct.rs +++ b/vortex-array/benches/scalar_at_struct.rs @@ -8,6 +8,8 @@ use rand::RngExt; use rand::SeedableRng; use rand::distr::Uniform; use rand::rngs::StdRng; +use vortex_array::ArrayRef; +use vortex_array::DynArray; use vortex_array::IntoArray; use vortex_array::arrays::StructArray; use vortex_array::dtype::FieldNames; @@ -39,6 +41,7 @@ fn scalar_at_struct_simple(bencher: Bencher) { Validity::NonNullable, ) .unwrap(); + let struct_array: ArrayRef = struct_array.into_array(); let indices: Vec = (0..NUM_ACCESSES) .map(|_| rng.random_range(0..ARRAY_SIZE)) @@ -72,8 +75,10 @@ fn scalar_at_struct_wide(bencher: Bencher) { "field1", "field2", "field3", "field4", "field5", "field6", "field7", "field8", ]); - let struct_array = - StructArray::try_new(field_names, fields, ARRAY_SIZE, Validity::NonNullable).unwrap(); + let struct_array: ArrayRef = + StructArray::try_new(field_names, fields, ARRAY_SIZE, Validity::NonNullable) + .unwrap() + .into_array(); let indices: Vec = (0..NUM_ACCESSES) .map(|_| rng.random_range(0..ARRAY_SIZE)) diff --git a/vortex-array/benches/take_fsl.rs b/vortex-array/benches/take_fsl.rs index e22a18f5210..94dd34a11b2 100644 --- a/vortex-array/benches/take_fsl.rs +++ b/vortex-array/benches/take_fsl.rs @@ -66,6 +66,8 @@ fn take_fsl_random(bencher: Bencher, num_indices: usize) .with_inputs(|| (&fsl, &indices_array, LEGACY_SESSION.create_execution_ctx())) .bench_refs(|(array, indices, execution_ctx)| { array + .clone() + .into_array() .take(indices.to_array()) .unwrap() .execute::(execution_ctx) @@ -91,6 +93,8 @@ fn take_fsl_nullable_random(bencher: Bencher, num_indice .with_inputs(|| (&fsl, &indices_array, LEGACY_SESSION.create_execution_ctx())) .bench_refs(|(array, indices, execution_ctx)| { array + .clone() + .into_array() .take(indices.to_array()) .unwrap() .execute::(execution_ctx) diff --git a/vortex-array/benches/take_primitive.rs b/vortex-array/benches/take_primitive.rs index f5f3ce16c75..826d3e0b7da 100644 --- a/vortex-array/benches/take_primitive.rs +++ b/vortex-array/benches/take_primitive.rs @@ -12,7 +12,9 @@ use divan::Bencher; use rand::distr::Uniform; use rand::prelude::*; use rand_distr::Zipf; +use vortex_array::DynArray; use vortex_array::IntoArray; +use vortex_array::ToCanonical; use vortex_array::arrays::DictArray; use vortex_array::arrays::PrimitiveArray; @@ -40,7 +42,7 @@ fn dict_canonicalize_uniform(bencher: Bencher, num_indi bencher .with_inputs(|| &dict) - .bench_refs(|dict| dict.to_canonical()); + .bench_refs(|dict| dict.clone().into_array().to_canonical()); } #[divan::bench(args = NUM_INDICES, consts = VECTOR_SIZE, sample_count = 100_000)] @@ -59,5 +61,5 @@ fn dict_canonicalize_zipfian(bencher: Bencher, num_indi bencher .with_inputs(|| &dict) - .bench_refs(|dict| dict.to_canonical()); + .bench_refs(|dict| dict.clone().into_array().to_canonical()); } diff --git a/vortex-array/benches/take_struct.rs b/vortex-array/benches/take_struct.rs index 96acd2e01ef..1e37d8dbe98 100644 --- a/vortex-array/benches/take_struct.rs +++ b/vortex-array/benches/take_struct.rs @@ -42,7 +42,8 @@ fn take_struct_simple(bencher: Bencher) { ARRAY_SIZE, Validity::NonNullable, ) - .unwrap(); + .unwrap() + .into_array(); let indices: Buffer = (0..TAKE_SIZE) .map(|_| rng.random_range(0..ARRAY_SIZE) as u64) @@ -59,7 +60,7 @@ fn take_struct_simple(bencher: Bencher) { }) .bench_refs(|(array, indices, ctx)| { array - .take(indices.to_array()) + .take((*indices).clone()) .unwrap() .execute::(ctx) }); @@ -83,8 +84,9 @@ fn take_struct_wide(bencher: Bencher, width: usize) { "field1", "field2", "field3", "field4", "field5", "field6", "field7", "field8", ]); - let struct_array = - StructArray::try_new(field_names, fields, ARRAY_SIZE, Validity::NonNullable).unwrap(); + let struct_array = StructArray::try_new(field_names, fields, ARRAY_SIZE, Validity::NonNullable) + .unwrap() + .into_array(); let indices: Buffer = (0..TAKE_SIZE) .map(|_| rng.random_range(0..ARRAY_SIZE) as u64) @@ -101,7 +103,7 @@ fn take_struct_wide(bencher: Bencher, width: usize) { }) .bench_refs(|(array, indices, ctx)| { array - .take(indices.clone()) + .take((*indices).clone()) .unwrap() .execute::(ctx) }); @@ -124,7 +126,8 @@ fn take_struct_sequential_indices(bencher: Bencher) { ARRAY_SIZE, Validity::NonNullable, ) - .unwrap(); + .unwrap() + .into_array(); // Sequential indices for better cache performance let indices: Buffer = (0..TAKE_SIZE as u64).collect(); @@ -140,7 +143,7 @@ fn take_struct_sequential_indices(bencher: Bencher) { }) .bench_refs(|(array, indices, ctx)| { array - .take(indices.to_array()) + .take((*indices).clone()) .unwrap() .execute::(ctx) }); diff --git a/vortex-array/benches/varbinview_compact.rs b/vortex-array/benches/varbinview_compact.rs index 489be8d852d..87aaeac5aab 100644 --- a/vortex-array/benches/varbinview_compact.rs +++ b/vortex-array/benches/varbinview_compact.rs @@ -6,6 +6,7 @@ use rand::RngExt; use rand::SeedableRng; use rand::rngs::StdRng; use vortex_array::ArrayRef; +use vortex_array::DynArray; use vortex_array::IntoArray; use vortex_array::ToCanonical; use vortex_array::arrays::VarBinViewArray; @@ -42,6 +43,7 @@ fn compact_impl(bencher: Bencher, (output_size, utilization_pct): (usize, usize) let base_array = build_varbinview_fixture(base_size); let indices = random_indices(output_size, base_size); let taken = base_array + .into_array() .take(indices) .vortex_expect("operation should succeed in benchmark"); let array = taken.to_varbinview(); @@ -57,7 +59,7 @@ fn compact_sliced_impl(bencher: Bencher, (output_size, utilization_pct): (usize, let base_size = (output_size * 100) / utilization_pct; let base_array = build_varbinview_fixture(base_size); let sliced = base_array - .as_ref() + .into_array() .slice(0..output_size) .vortex_expect("slice should succeed"); let array = sliced.to_varbinview(); diff --git a/vortex-array/public-api.lock b/vortex-array/public-api.lock index 821ef35e111..0d1d9deb357 100644 --- a/vortex-array/public-api.lock +++ b/vortex-array/public-api.lock @@ -940,7 +940,7 @@ pub fn vortex_array::arrays::Bool::reduce_parent(array: &vortex_array::vtable::A pub fn vortex_array::arrays::Bool::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Bool::stats(array: &vortex_array::arrays::BoolArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Bool::stats(array: &vortex_array::arrays::BoolArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Bool::vtable(_array: &Self::Array) -> &Self @@ -1154,7 +1154,7 @@ pub fn vortex_array::arrays::Chunked::reduce_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Chunked::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Chunked::stats(array: &vortex_array::arrays::ChunkedArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Chunked::stats(array: &vortex_array::arrays::ChunkedArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Chunked::vtable(_array: &Self::Array) -> &Self @@ -1326,7 +1326,7 @@ pub fn vortex_array::arrays::Constant::reduce_parent(array: &vortex_array::vtabl pub fn vortex_array::arrays::Constant::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Constant::stats(array: &vortex_array::arrays::ConstantArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Constant::stats(array: &vortex_array::arrays::ConstantArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Constant::vtable(_array: &Self::Array) -> &Self @@ -1538,7 +1538,7 @@ pub fn vortex_array::arrays::Decimal::reduce_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Decimal::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Decimal::stats(array: &vortex_array::arrays::DecimalArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Decimal::stats(array: &vortex_array::arrays::DecimalArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Decimal::vtable(_array: &Self::Array) -> &Self @@ -1752,7 +1752,7 @@ pub fn vortex_array::arrays::dict::Dict::reduce_parent(array: &vortex_array::vta pub fn vortex_array::arrays::dict::Dict::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::dict::Dict::stats(array: &vortex_array::arrays::dict::DictArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::dict::Dict::stats(array: &vortex_array::arrays::dict::DictArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::dict::Dict::vtable(_array: &Self::Array) -> &Self @@ -1862,7 +1862,7 @@ pub fn vortex_array::arrays::dict::Dict::reduce_parent(array: &vortex_array::vta pub fn vortex_array::arrays::dict::Dict::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::dict::Dict::stats(array: &vortex_array::arrays::dict::DictArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::dict::Dict::stats(array: &vortex_array::arrays::dict::DictArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::dict::Dict::vtable(_array: &Self::Array) -> &Self @@ -2164,7 +2164,7 @@ pub fn vortex_array::arrays::Extension::reduce_parent(array: &vortex_array::vtab pub fn vortex_array::arrays::Extension::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Extension::stats(array: &vortex_array::arrays::ExtensionArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Extension::stats(array: &vortex_array::arrays::ExtensionArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Extension::vtable(_array: &Self::Array) -> &Self @@ -2306,7 +2306,7 @@ pub fn vortex_array::arrays::Filter::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::Filter::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Filter::stats(array: &vortex_array::arrays::FilterArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Filter::stats(array: &vortex_array::arrays::FilterArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Filter::vtable(_array: &Self::Array) -> &Self @@ -2528,7 +2528,7 @@ pub fn vortex_array::arrays::FixedSizeList::reduce_parent(array: &vortex_array:: pub fn vortex_array::arrays::FixedSizeList::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::FixedSizeList::stats(array: &vortex_array::arrays::FixedSizeListArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::FixedSizeList::stats(array: &vortex_array::arrays::FixedSizeListArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::FixedSizeList::vtable(_array: &Self::Array) -> &Self @@ -2682,7 +2682,7 @@ pub fn vortex_array::arrays::List::reduce_parent(array: &vortex_array::vtable::A pub fn vortex_array::arrays::List::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::List::stats(array: &vortex_array::arrays::ListArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::List::stats(array: &vortex_array::arrays::ListArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::List::vtable(_array: &Self::Array) -> &Self @@ -2856,7 +2856,7 @@ pub fn vortex_array::arrays::ListView::reduce_parent(array: &vortex_array::vtabl pub fn vortex_array::arrays::ListView::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::ListView::stats(array: &vortex_array::arrays::ListViewArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::ListView::stats(array: &vortex_array::arrays::ListViewArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::ListView::vtable(_array: &Self::Array) -> &Self @@ -3040,7 +3040,7 @@ pub fn vortex_array::arrays::Masked::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::Masked::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Masked::stats(array: &vortex_array::arrays::MaskedArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Masked::stats(array: &vortex_array::arrays::MaskedArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Masked::vtable(_array: &Self::Array) -> &Self @@ -3184,7 +3184,7 @@ pub fn vortex_array::arrays::null::Null::reduce_parent(array: &vortex_array::vta pub fn vortex_array::arrays::null::Null::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::null::Null::stats(array: &vortex_array::arrays::null::NullArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::null::Null::stats(array: &vortex_array::arrays::null::NullArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::null::Null::vtable(_array: &Self::Array) -> &Self @@ -3400,7 +3400,7 @@ pub fn vortex_array::arrays::Primitive::reduce_parent(array: &vortex_array::vtab pub fn vortex_array::arrays::Primitive::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Primitive::stats(array: &vortex_array::arrays::PrimitiveArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Primitive::stats(array: &vortex_array::arrays::PrimitiveArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Primitive::vtable(_array: &Self::Array) -> &Self @@ -3706,7 +3706,7 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::reduce_parent(array: &vo pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::stats(array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::stats(array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::vtable(array: &Self::Array) -> &Self @@ -3794,7 +3794,7 @@ pub fn vortex_array::arrays::Shared::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::Shared::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Shared::stats(array: &vortex_array::arrays::SharedArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Shared::stats(array: &vortex_array::arrays::SharedArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Shared::vtable(_array: &Self::Array) -> &Self @@ -3918,7 +3918,7 @@ pub fn vortex_array::arrays::slice::Slice::reduce_parent(array: &vortex_array::v pub fn vortex_array::arrays::slice::Slice::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::slice::Slice::stats(array: &vortex_array::arrays::slice::SliceArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::slice::Slice::stats(array: &vortex_array::arrays::slice::SliceArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::slice::Slice::vtable(_array: &Self::Array) -> &Self @@ -4178,7 +4178,7 @@ pub fn vortex_array::arrays::Struct::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::Struct::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Struct::stats(array: &vortex_array::arrays::StructArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Struct::stats(array: &vortex_array::arrays::StructArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Struct::vtable(_array: &Self::Array) -> &Self @@ -4400,7 +4400,7 @@ pub fn vortex_array::arrays::VarBin::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::VarBin::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::VarBin::stats(array: &vortex_array::arrays::VarBinArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::VarBin::stats(array: &vortex_array::arrays::VarBinArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::VarBin::vtable(_array: &Self::Array) -> &Self @@ -4808,7 +4808,7 @@ pub fn vortex_array::arrays::VarBinView::reduce_parent(array: &vortex_array::vta pub fn vortex_array::arrays::VarBinView::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::VarBinView::stats(array: &vortex_array::arrays::VarBinViewArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::VarBinView::stats(array: &vortex_array::arrays::VarBinViewArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::VarBinView::vtable(_array: &Self::Array) -> &Self @@ -5004,7 +5004,7 @@ pub fn vortex_array::arrays::Variant::reduce_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Variant::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Variant::stats(array: &Self::Array) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Variant::stats(array: &Self::Array) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Variant::vtable(_array: &Self::Array) -> &Self @@ -5150,7 +5150,7 @@ pub fn vortex_array::arrays::Bool::reduce_parent(array: &vortex_array::vtable::A pub fn vortex_array::arrays::Bool::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Bool::stats(array: &vortex_array::arrays::BoolArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Bool::stats(array: &vortex_array::arrays::BoolArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Bool::vtable(_array: &Self::Array) -> &Self @@ -5336,7 +5336,7 @@ pub fn vortex_array::arrays::Chunked::reduce_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Chunked::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Chunked::stats(array: &vortex_array::arrays::ChunkedArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Chunked::stats(array: &vortex_array::arrays::ChunkedArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Chunked::vtable(_array: &Self::Array) -> &Self @@ -5506,7 +5506,7 @@ pub fn vortex_array::arrays::Constant::reduce_parent(array: &vortex_array::vtabl pub fn vortex_array::arrays::Constant::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Constant::stats(array: &vortex_array::arrays::ConstantArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Constant::stats(array: &vortex_array::arrays::ConstantArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Constant::vtable(_array: &Self::Array) -> &Self @@ -5654,7 +5654,7 @@ pub fn vortex_array::arrays::Decimal::reduce_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Decimal::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Decimal::stats(array: &vortex_array::arrays::DecimalArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Decimal::stats(array: &vortex_array::arrays::DecimalArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Decimal::vtable(_array: &Self::Array) -> &Self @@ -5836,7 +5836,7 @@ pub fn vortex_array::arrays::dict::Dict::reduce_parent(array: &vortex_array::vta pub fn vortex_array::arrays::dict::Dict::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::dict::Dict::stats(array: &vortex_array::arrays::dict::DictArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::dict::Dict::stats(array: &vortex_array::arrays::dict::DictArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::dict::Dict::vtable(_array: &Self::Array) -> &Self @@ -5996,7 +5996,7 @@ pub fn vortex_array::arrays::Extension::reduce_parent(array: &vortex_array::vtab pub fn vortex_array::arrays::Extension::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Extension::stats(array: &vortex_array::arrays::ExtensionArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Extension::stats(array: &vortex_array::arrays::ExtensionArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Extension::vtable(_array: &Self::Array) -> &Self @@ -6136,7 +6136,7 @@ pub fn vortex_array::arrays::Filter::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::Filter::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Filter::stats(array: &vortex_array::arrays::FilterArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Filter::stats(array: &vortex_array::arrays::FilterArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Filter::vtable(_array: &Self::Array) -> &Self @@ -6274,7 +6274,7 @@ pub fn vortex_array::arrays::FixedSizeList::reduce_parent(array: &vortex_array:: pub fn vortex_array::arrays::FixedSizeList::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::FixedSizeList::stats(array: &vortex_array::arrays::FixedSizeListArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::FixedSizeList::stats(array: &vortex_array::arrays::FixedSizeListArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::FixedSizeList::vtable(_array: &Self::Array) -> &Self @@ -6426,7 +6426,7 @@ pub fn vortex_array::arrays::List::reduce_parent(array: &vortex_array::vtable::A pub fn vortex_array::arrays::List::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::List::stats(array: &vortex_array::arrays::ListArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::List::stats(array: &vortex_array::arrays::ListArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::List::vtable(_array: &Self::Array) -> &Self @@ -6578,7 +6578,7 @@ pub fn vortex_array::arrays::ListView::reduce_parent(array: &vortex_array::vtabl pub fn vortex_array::arrays::ListView::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::ListView::stats(array: &vortex_array::arrays::ListViewArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::ListView::stats(array: &vortex_array::arrays::ListViewArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::ListView::vtable(_array: &Self::Array) -> &Self @@ -6742,7 +6742,7 @@ pub fn vortex_array::arrays::Masked::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::Masked::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Masked::stats(array: &vortex_array::arrays::MaskedArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Masked::stats(array: &vortex_array::arrays::MaskedArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Masked::vtable(_array: &Self::Array) -> &Self @@ -6882,7 +6882,7 @@ pub fn vortex_array::arrays::null::Null::reduce_parent(array: &vortex_array::vta pub fn vortex_array::arrays::null::Null::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::null::Null::stats(array: &vortex_array::arrays::null::NullArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::null::Null::stats(array: &vortex_array::arrays::null::NullArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::null::Null::vtable(_array: &Self::Array) -> &Self @@ -7030,7 +7030,7 @@ pub fn vortex_array::arrays::Primitive::reduce_parent(array: &vortex_array::vtab pub fn vortex_array::arrays::Primitive::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Primitive::stats(array: &vortex_array::arrays::PrimitiveArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Primitive::stats(array: &vortex_array::arrays::PrimitiveArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Primitive::vtable(_array: &Self::Array) -> &Self @@ -7262,7 +7262,7 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::reduce_parent(array: &vo pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::stats(array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::stats(array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::vtable(array: &Self::Array) -> &Self @@ -7340,7 +7340,7 @@ pub fn vortex_array::arrays::Shared::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::Shared::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Shared::stats(array: &vortex_array::arrays::SharedArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Shared::stats(array: &vortex_array::arrays::SharedArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Shared::vtable(_array: &Self::Array) -> &Self @@ -7462,7 +7462,7 @@ pub fn vortex_array::arrays::slice::Slice::reduce_parent(array: &vortex_array::v pub fn vortex_array::arrays::slice::Slice::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::slice::Slice::stats(array: &vortex_array::arrays::slice::SliceArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::slice::Slice::stats(array: &vortex_array::arrays::slice::SliceArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::slice::Slice::vtable(_array: &Self::Array) -> &Self @@ -7604,7 +7604,7 @@ pub fn vortex_array::arrays::Struct::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::Struct::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Struct::stats(array: &vortex_array::arrays::StructArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Struct::stats(array: &vortex_array::arrays::StructArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Struct::vtable(_array: &Self::Array) -> &Self @@ -7850,7 +7850,7 @@ pub fn vortex_array::arrays::VarBin::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::VarBin::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::VarBin::stats(array: &vortex_array::arrays::VarBinArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::VarBin::stats(array: &vortex_array::arrays::VarBinArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::VarBin::vtable(_array: &Self::Array) -> &Self @@ -8072,7 +8072,7 @@ pub fn vortex_array::arrays::VarBinView::reduce_parent(array: &vortex_array::vta pub fn vortex_array::arrays::VarBinView::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::VarBinView::stats(array: &vortex_array::arrays::VarBinViewArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::VarBinView::stats(array: &vortex_array::arrays::VarBinViewArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::VarBinView::vtable(_array: &Self::Array) -> &Self @@ -8256,7 +8256,7 @@ pub fn vortex_array::arrays::Variant::reduce_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Variant::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Variant::stats(array: &Self::Array) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Variant::stats(array: &Self::Array) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Variant::vtable(_array: &Self::Array) -> &Self @@ -20830,7 +20830,7 @@ pub fn vortex_array::vtable::ArrayVTable::reduce_parent(array: &vortex_array::vt pub fn vortex_array::vtable::ArrayVTable::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::vtable::ArrayVTable::stats(array: &Self::Array) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::vtable::ArrayVTable::stats(array: &Self::Array) -> &vortex_array::stats::ArrayStats pub fn vortex_array::vtable::ArrayVTable::vtable(array: &Self::Array) -> &Self @@ -20886,7 +20886,7 @@ pub fn vortex_array::arrays::Bool::reduce_parent(array: &vortex_array::vtable::A pub fn vortex_array::arrays::Bool::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Bool::stats(array: &vortex_array::arrays::BoolArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Bool::stats(array: &vortex_array::arrays::BoolArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Bool::vtable(_array: &Self::Array) -> &Self @@ -20942,7 +20942,7 @@ pub fn vortex_array::arrays::Chunked::reduce_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Chunked::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Chunked::stats(array: &vortex_array::arrays::ChunkedArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Chunked::stats(array: &vortex_array::arrays::ChunkedArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Chunked::vtable(_array: &Self::Array) -> &Self @@ -20998,7 +20998,7 @@ pub fn vortex_array::arrays::Constant::reduce_parent(array: &vortex_array::vtabl pub fn vortex_array::arrays::Constant::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Constant::stats(array: &vortex_array::arrays::ConstantArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Constant::stats(array: &vortex_array::arrays::ConstantArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Constant::vtable(_array: &Self::Array) -> &Self @@ -21054,7 +21054,7 @@ pub fn vortex_array::arrays::Decimal::reduce_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Decimal::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Decimal::stats(array: &vortex_array::arrays::DecimalArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Decimal::stats(array: &vortex_array::arrays::DecimalArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Decimal::vtable(_array: &Self::Array) -> &Self @@ -21110,7 +21110,7 @@ pub fn vortex_array::arrays::Extension::reduce_parent(array: &vortex_array::vtab pub fn vortex_array::arrays::Extension::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Extension::stats(array: &vortex_array::arrays::ExtensionArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Extension::stats(array: &vortex_array::arrays::ExtensionArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Extension::vtable(_array: &Self::Array) -> &Self @@ -21166,7 +21166,7 @@ pub fn vortex_array::arrays::Filter::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::Filter::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Filter::stats(array: &vortex_array::arrays::FilterArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Filter::stats(array: &vortex_array::arrays::FilterArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Filter::vtable(_array: &Self::Array) -> &Self @@ -21222,7 +21222,7 @@ pub fn vortex_array::arrays::FixedSizeList::reduce_parent(array: &vortex_array:: pub fn vortex_array::arrays::FixedSizeList::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::FixedSizeList::stats(array: &vortex_array::arrays::FixedSizeListArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::FixedSizeList::stats(array: &vortex_array::arrays::FixedSizeListArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::FixedSizeList::vtable(_array: &Self::Array) -> &Self @@ -21278,7 +21278,7 @@ pub fn vortex_array::arrays::List::reduce_parent(array: &vortex_array::vtable::A pub fn vortex_array::arrays::List::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::List::stats(array: &vortex_array::arrays::ListArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::List::stats(array: &vortex_array::arrays::ListArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::List::vtable(_array: &Self::Array) -> &Self @@ -21334,7 +21334,7 @@ pub fn vortex_array::arrays::ListView::reduce_parent(array: &vortex_array::vtabl pub fn vortex_array::arrays::ListView::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::ListView::stats(array: &vortex_array::arrays::ListViewArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::ListView::stats(array: &vortex_array::arrays::ListViewArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::ListView::vtable(_array: &Self::Array) -> &Self @@ -21390,7 +21390,7 @@ pub fn vortex_array::arrays::Masked::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::Masked::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Masked::stats(array: &vortex_array::arrays::MaskedArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Masked::stats(array: &vortex_array::arrays::MaskedArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Masked::vtable(_array: &Self::Array) -> &Self @@ -21446,7 +21446,7 @@ pub fn vortex_array::arrays::Primitive::reduce_parent(array: &vortex_array::vtab pub fn vortex_array::arrays::Primitive::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Primitive::stats(array: &vortex_array::arrays::PrimitiveArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Primitive::stats(array: &vortex_array::arrays::PrimitiveArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Primitive::vtable(_array: &Self::Array) -> &Self @@ -21502,7 +21502,7 @@ pub fn vortex_array::arrays::Shared::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::Shared::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Shared::stats(array: &vortex_array::arrays::SharedArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Shared::stats(array: &vortex_array::arrays::SharedArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Shared::vtable(_array: &Self::Array) -> &Self @@ -21558,7 +21558,7 @@ pub fn vortex_array::arrays::Struct::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::Struct::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Struct::stats(array: &vortex_array::arrays::StructArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Struct::stats(array: &vortex_array::arrays::StructArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Struct::vtable(_array: &Self::Array) -> &Self @@ -21614,7 +21614,7 @@ pub fn vortex_array::arrays::VarBin::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::VarBin::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::VarBin::stats(array: &vortex_array::arrays::VarBinArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::VarBin::stats(array: &vortex_array::arrays::VarBinArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::VarBin::vtable(_array: &Self::Array) -> &Self @@ -21670,7 +21670,7 @@ pub fn vortex_array::arrays::VarBinView::reduce_parent(array: &vortex_array::vta pub fn vortex_array::arrays::VarBinView::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::VarBinView::stats(array: &vortex_array::arrays::VarBinViewArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::VarBinView::stats(array: &vortex_array::arrays::VarBinViewArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::VarBinView::vtable(_array: &Self::Array) -> &Self @@ -21726,7 +21726,7 @@ pub fn vortex_array::arrays::Variant::reduce_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Variant::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Variant::stats(array: &Self::Array) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Variant::stats(array: &Self::Array) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Variant::vtable(_array: &Self::Array) -> &Self @@ -21782,7 +21782,7 @@ pub fn vortex_array::arrays::dict::Dict::reduce_parent(array: &vortex_array::vta pub fn vortex_array::arrays::dict::Dict::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::dict::Dict::stats(array: &vortex_array::arrays::dict::DictArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::dict::Dict::stats(array: &vortex_array::arrays::dict::DictArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::dict::Dict::vtable(_array: &Self::Array) -> &Self @@ -21838,7 +21838,7 @@ pub fn vortex_array::arrays::null::Null::reduce_parent(array: &vortex_array::vta pub fn vortex_array::arrays::null::Null::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::null::Null::stats(array: &vortex_array::arrays::null::NullArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::null::Null::stats(array: &vortex_array::arrays::null::NullArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::null::Null::vtable(_array: &Self::Array) -> &Self @@ -21894,7 +21894,7 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::reduce_parent(array: &vo pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::stats(array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::stats(array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::vtable(array: &Self::Array) -> &Self @@ -21950,7 +21950,7 @@ pub fn vortex_array::arrays::slice::Slice::reduce_parent(array: &vortex_array::v pub fn vortex_array::arrays::slice::Slice::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::slice::Slice::stats(array: &vortex_array::arrays::slice::SliceArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::slice::Slice::stats(array: &vortex_array::arrays::slice::SliceArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::slice::Slice::vtable(_array: &Self::Array) -> &Self @@ -22126,7 +22126,7 @@ pub fn vortex_array::vtable::VTable::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::vtable::VTable::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::vtable::VTable::stats(array: &Self::Array) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::vtable::VTable::stats(array: &Self::Array) -> &vortex_array::stats::ArrayStats pub fn vortex_array::vtable::VTable::vtable(array: &Self::Array) -> &Self @@ -22182,7 +22182,7 @@ pub fn vortex_array::arrays::Bool::reduce_parent(array: &vortex_array::vtable::A pub fn vortex_array::arrays::Bool::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Bool::stats(array: &vortex_array::arrays::BoolArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Bool::stats(array: &vortex_array::arrays::BoolArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Bool::vtable(_array: &Self::Array) -> &Self @@ -22238,7 +22238,7 @@ pub fn vortex_array::arrays::Chunked::reduce_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Chunked::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Chunked::stats(array: &vortex_array::arrays::ChunkedArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Chunked::stats(array: &vortex_array::arrays::ChunkedArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Chunked::vtable(_array: &Self::Array) -> &Self @@ -22294,7 +22294,7 @@ pub fn vortex_array::arrays::Constant::reduce_parent(array: &vortex_array::vtabl pub fn vortex_array::arrays::Constant::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Constant::stats(array: &vortex_array::arrays::ConstantArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Constant::stats(array: &vortex_array::arrays::ConstantArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Constant::vtable(_array: &Self::Array) -> &Self @@ -22350,7 +22350,7 @@ pub fn vortex_array::arrays::Decimal::reduce_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Decimal::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Decimal::stats(array: &vortex_array::arrays::DecimalArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Decimal::stats(array: &vortex_array::arrays::DecimalArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Decimal::vtable(_array: &Self::Array) -> &Self @@ -22406,7 +22406,7 @@ pub fn vortex_array::arrays::Extension::reduce_parent(array: &vortex_array::vtab pub fn vortex_array::arrays::Extension::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Extension::stats(array: &vortex_array::arrays::ExtensionArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Extension::stats(array: &vortex_array::arrays::ExtensionArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Extension::vtable(_array: &Self::Array) -> &Self @@ -22462,7 +22462,7 @@ pub fn vortex_array::arrays::Filter::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::Filter::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Filter::stats(array: &vortex_array::arrays::FilterArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Filter::stats(array: &vortex_array::arrays::FilterArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Filter::vtable(_array: &Self::Array) -> &Self @@ -22518,7 +22518,7 @@ pub fn vortex_array::arrays::FixedSizeList::reduce_parent(array: &vortex_array:: pub fn vortex_array::arrays::FixedSizeList::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::FixedSizeList::stats(array: &vortex_array::arrays::FixedSizeListArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::FixedSizeList::stats(array: &vortex_array::arrays::FixedSizeListArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::FixedSizeList::vtable(_array: &Self::Array) -> &Self @@ -22574,7 +22574,7 @@ pub fn vortex_array::arrays::List::reduce_parent(array: &vortex_array::vtable::A pub fn vortex_array::arrays::List::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::List::stats(array: &vortex_array::arrays::ListArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::List::stats(array: &vortex_array::arrays::ListArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::List::vtable(_array: &Self::Array) -> &Self @@ -22630,7 +22630,7 @@ pub fn vortex_array::arrays::ListView::reduce_parent(array: &vortex_array::vtabl pub fn vortex_array::arrays::ListView::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::ListView::stats(array: &vortex_array::arrays::ListViewArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::ListView::stats(array: &vortex_array::arrays::ListViewArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::ListView::vtable(_array: &Self::Array) -> &Self @@ -22686,7 +22686,7 @@ pub fn vortex_array::arrays::Masked::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::Masked::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Masked::stats(array: &vortex_array::arrays::MaskedArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Masked::stats(array: &vortex_array::arrays::MaskedArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Masked::vtable(_array: &Self::Array) -> &Self @@ -22742,7 +22742,7 @@ pub fn vortex_array::arrays::Primitive::reduce_parent(array: &vortex_array::vtab pub fn vortex_array::arrays::Primitive::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Primitive::stats(array: &vortex_array::arrays::PrimitiveArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Primitive::stats(array: &vortex_array::arrays::PrimitiveArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Primitive::vtable(_array: &Self::Array) -> &Self @@ -22798,7 +22798,7 @@ pub fn vortex_array::arrays::Shared::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::Shared::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Shared::stats(array: &vortex_array::arrays::SharedArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Shared::stats(array: &vortex_array::arrays::SharedArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Shared::vtable(_array: &Self::Array) -> &Self @@ -22854,7 +22854,7 @@ pub fn vortex_array::arrays::Struct::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::Struct::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Struct::stats(array: &vortex_array::arrays::StructArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Struct::stats(array: &vortex_array::arrays::StructArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Struct::vtable(_array: &Self::Array) -> &Self @@ -22910,7 +22910,7 @@ pub fn vortex_array::arrays::VarBin::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::VarBin::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::VarBin::stats(array: &vortex_array::arrays::VarBinArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::VarBin::stats(array: &vortex_array::arrays::VarBinArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::VarBin::vtable(_array: &Self::Array) -> &Self @@ -22966,7 +22966,7 @@ pub fn vortex_array::arrays::VarBinView::reduce_parent(array: &vortex_array::vta pub fn vortex_array::arrays::VarBinView::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::VarBinView::stats(array: &vortex_array::arrays::VarBinViewArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::VarBinView::stats(array: &vortex_array::arrays::VarBinViewArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::VarBinView::vtable(_array: &Self::Array) -> &Self @@ -23022,7 +23022,7 @@ pub fn vortex_array::arrays::Variant::reduce_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Variant::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Variant::stats(array: &Self::Array) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::Variant::stats(array: &Self::Array) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Variant::vtable(_array: &Self::Array) -> &Self @@ -23078,7 +23078,7 @@ pub fn vortex_array::arrays::dict::Dict::reduce_parent(array: &vortex_array::vta pub fn vortex_array::arrays::dict::Dict::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::dict::Dict::stats(array: &vortex_array::arrays::dict::DictArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::dict::Dict::stats(array: &vortex_array::arrays::dict::DictArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::dict::Dict::vtable(_array: &Self::Array) -> &Self @@ -23134,7 +23134,7 @@ pub fn vortex_array::arrays::null::Null::reduce_parent(array: &vortex_array::vta pub fn vortex_array::arrays::null::Null::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::null::Null::stats(array: &vortex_array::arrays::null::NullArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::null::Null::stats(array: &vortex_array::arrays::null::NullArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::null::Null::vtable(_array: &Self::Array) -> &Self @@ -23190,7 +23190,7 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::reduce_parent(array: &vo pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::stats(array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::stats(array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::vtable(array: &Self::Array) -> &Self @@ -23246,7 +23246,7 @@ pub fn vortex_array::arrays::slice::Slice::reduce_parent(array: &vortex_array::v pub fn vortex_array::arrays::slice::Slice::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::slice::Slice::stats(array: &vortex_array::arrays::slice::SliceArray) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::arrays::slice::Slice::stats(array: &vortex_array::arrays::slice::SliceArray) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::slice::Slice::vtable(_array: &Self::Array) -> &Self @@ -23636,12 +23636,6 @@ pub fn vortex_array::AnyColumnar::try_match<'a>(array: &'a dyn vortex_array::Dyn #[repr(transparent)] pub struct vortex_array::ArrayAdapter(_) -impl vortex_array::ArrayAdapter - -pub fn vortex_array::ArrayAdapter::as_inner(&self) -> &::Array - -pub fn vortex_array::ArrayAdapter::into_inner(self) -> ::Array - impl core::fmt::Debug for vortex_array::ArrayAdapter pub fn vortex_array::ArrayAdapter::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result diff --git a/vortex-array/src/aggregate_fn/accumulator_grouped.rs b/vortex-array/src/aggregate_fn/accumulator_grouped.rs index a4d9c38b60e..a84db76a8b9 100644 --- a/vortex-array/src/aggregate_fn/accumulator_grouped.rs +++ b/vortex-array/src/aggregate_fn/accumulator_grouped.rs @@ -33,7 +33,6 @@ use crate::dtype::DType; use crate::dtype::IntegerPType; use crate::executor::MAX_ITERATIONS; use crate::match_each_integer_ptype; -use crate::vtable::ValidityHelper; /// Reference-counted type-erased grouped accumulator. pub type GroupedAccumulatorRef = Box; diff --git a/vortex-array/src/aggregate_fn/fns/is_sorted/bool.rs b/vortex-array/src/aggregate_fn/fns/is_sorted/bool.rs index ab515e713d9..87a1009ea79 100644 --- a/vortex-array/src/aggregate_fn/fns/is_sorted/bool.rs +++ b/vortex-array/src/aggregate_fn/fns/is_sorted/bool.rs @@ -8,7 +8,7 @@ use super::IsSortedIteratorExt; use crate::arrays::BoolArray; pub(super) fn check_bool_sorted(array: &BoolArray, strict: bool) -> VortexResult { - match array.validity_mask()? { + match array.validity_mask() { Mask::AllFalse(_) => Ok(!strict), Mask::AllTrue(_) => { let values = array.to_bit_buffer(); diff --git a/vortex-array/src/aggregate_fn/fns/is_sorted/decimal.rs b/vortex-array/src/aggregate_fn/fns/is_sorted/decimal.rs index e56858fd015..ae7a119a091 100644 --- a/vortex-array/src/aggregate_fn/fns/is_sorted/decimal.rs +++ b/vortex-array/src/aggregate_fn/fns/is_sorted/decimal.rs @@ -20,7 +20,7 @@ fn compute_is_sorted(array: &DecimalArray, strict: bool) - where dyn Iterator: IsSortedIteratorExt, { - match array.validity_mask()? { + match array.validity_mask() { Mask::AllFalse(_) => Ok(!strict), Mask::AllTrue(_) => { let buf = array.buffer::(); diff --git a/vortex-array/src/aggregate_fn/fns/is_sorted/primitive.rs b/vortex-array/src/aggregate_fn/fns/is_sorted/primitive.rs index 21c80e7bd45..b441f331eab 100644 --- a/vortex-array/src/aggregate_fn/fns/is_sorted/primitive.rs +++ b/vortex-array/src/aggregate_fn/fns/is_sorted/primitive.rs @@ -16,7 +16,7 @@ pub(super) fn check_primitive_sorted(array: &PrimitiveArray, strict: bool) -> Vo } fn compute_is_sorted(array: &PrimitiveArray, strict: bool) -> VortexResult { - match array.validity_mask()? { + match array.validity_mask() { Mask::AllFalse(_) => Ok(!strict), Mask::AllTrue(_) => { let slice = array.as_slice::(); diff --git a/vortex-array/src/aggregate_fn/fns/min_max/bool.rs b/vortex-array/src/aggregate_fn/fns/min_max/bool.rs index 6a118788d4e..4e04d77df00 100644 --- a/vortex-array/src/aggregate_fn/fns/min_max/bool.rs +++ b/vortex-array/src/aggregate_fn/fns/min_max/bool.rs @@ -17,7 +17,7 @@ pub(super) fn accumulate_bool(partial: &mut MinMaxPartial, array: &BoolArray) -> return Ok(()); } - let mask = array.validity_mask()?; + let mask = array.validity_mask(); let true_non_null = match &mask { Mask::AllTrue(_) => array.to_bit_buffer(), Mask::AllFalse(_) => return Ok(()), diff --git a/vortex-array/src/aggregate_fn/fns/min_max/decimal.rs b/vortex-array/src/aggregate_fn/fns/min_max/decimal.rs index 93400f37275..c7650a3acc9 100644 --- a/vortex-array/src/aggregate_fn/fns/min_max/decimal.rs +++ b/vortex-array/src/aggregate_fn/fns/min_max/decimal.rs @@ -30,7 +30,7 @@ fn compute_min_max_with_validity(array: &DecimalArray) -> VortexResult

(), self.validity_mask()?); + let (top, count) = typed_top_value(self.as_slice::

(), self.validity_mask()); Ok(Some((top.into(), count))) }) } diff --git a/vortex-array/src/arrays/primitive/compute/between.rs b/vortex-array/src/arrays/primitive/compute/between.rs index a0ae640766d..f3985c9ace2 100644 --- a/vortex-array/src/arrays/primitive/compute/between.rs +++ b/vortex-array/src/arrays/primitive/compute/between.rs @@ -9,18 +9,17 @@ use crate::ExecutionCtx; use crate::IntoArray; use crate::arrays::BoolArray; use crate::arrays::Primitive; -use crate::arrays::PrimitiveArray; use crate::dtype::NativePType; use crate::dtype::Nullability; use crate::match_each_native_ptype; use crate::scalar_fn::fns::between::BetweenKernel; use crate::scalar_fn::fns::between::BetweenOptions; use crate::scalar_fn::fns::between::StrictComparison; -use crate::vtable::ValidityHelper; +use crate::vtable::Array; impl BetweenKernel for Primitive { fn between( - arr: &PrimitiveArray, + arr: &Array, lower: &ArrayRef, upper: &ArrayRef, options: &BetweenOptions, @@ -49,7 +48,7 @@ impl BetweenKernel for Primitive { } fn between_impl( - arr: &PrimitiveArray, + arr: &Array, lower: T, upper: T, nullability: Nullability, @@ -93,7 +92,7 @@ fn between_impl( } fn between_impl_( - arr: &PrimitiveArray, + arr: &Array, lower: T, lower_fn: impl Fn(T, T) -> bool, upper: T, diff --git a/vortex-array/src/arrays/primitive/compute/cast.rs b/vortex-array/src/arrays/primitive/compute/cast.rs index 17d6c20d7df..8599b5b07b9 100644 --- a/vortex-array/src/arrays/primitive/compute/cast.rs +++ b/vortex-array/src/arrays/primitive/compute/cast.rs @@ -21,11 +21,11 @@ use crate::dtype::Nullability; use crate::dtype::PType; use crate::match_each_native_ptype; use crate::scalar_fn::fns::cast::CastKernel; -use crate::vtable::ValidityHelper; +use crate::vtable::Array; impl CastKernel for Primitive { fn cast( - array: &PrimitiveArray, + array: &Array, dtype: &DType, ctx: &mut ExecutionCtx, ) -> VortexResult> { @@ -79,7 +79,7 @@ impl CastKernel for Primitive { })); } - let mask = array.validity_mask()?; + let mask = array.validity_mask(); // Otherwise, we need to cast the values one-by-one. Ok(Some(match_each_native_ptype!(new_ptype, |T| { @@ -92,7 +92,7 @@ impl CastKernel for Primitive { } /// Returns `true` if all valid values in `array` are representable as `target_ptype`. -fn values_fit_in(array: &PrimitiveArray, target_ptype: PType, ctx: &mut ExecutionCtx) -> bool { +fn values_fit_in(array: &Array, target_ptype: PType, ctx: &mut ExecutionCtx) -> bool { let target_dtype = DType::Primitive(target_ptype, Nullability::NonNullable); aggregate_fn::fns::min_max::min_max(&array.clone().into_array(), ctx) .ok() diff --git a/vortex-array/src/arrays/primitive/compute/fill_null.rs b/vortex-array/src/arrays/primitive/compute/fill_null.rs index 8889c82c483..651e3a20462 100644 --- a/vortex-array/src/arrays/primitive/compute/fill_null.rs +++ b/vortex-array/src/arrays/primitive/compute/fill_null.rs @@ -16,11 +16,11 @@ use crate::match_each_native_ptype; use crate::scalar::Scalar; use crate::scalar_fn::fns::fill_null::FillNullKernel; use crate::validity::Validity; -use crate::vtable::ValidityHelper; +use crate::vtable::Array; impl FillNullKernel for Primitive { fn fill_null( - array: &PrimitiveArray, + array: &Array, fill_value: &Scalar, ctx: &mut ExecutionCtx, ) -> VortexResult> { diff --git a/vortex-array/src/arrays/primitive/compute/mask.rs b/vortex-array/src/arrays/primitive/compute/mask.rs index c8dcffe62ba..6e656162346 100644 --- a/vortex-array/src/arrays/primitive/compute/mask.rs +++ b/vortex-array/src/arrays/primitive/compute/mask.rs @@ -9,10 +9,10 @@ use crate::arrays::Primitive; use crate::arrays::PrimitiveArray; use crate::scalar_fn::fns::mask::MaskReduce; use crate::validity::Validity; -use crate::vtable::ValidityHelper; +use crate::vtable::Array; impl MaskReduce for Primitive { - fn mask(array: &PrimitiveArray, mask: &ArrayRef) -> VortexResult> { + fn mask(array: &Array, mask: &ArrayRef) -> VortexResult> { // SAFETY: validity and data buffer still have same length Ok(Some(unsafe { PrimitiveArray::new_unchecked_from_handle( diff --git a/vortex-array/src/arrays/primitive/compute/rules.rs b/vortex-array/src/arrays/primitive/compute/rules.rs index df6eb35d888..9f6587d8fb1 100644 --- a/vortex-array/src/arrays/primitive/compute/rules.rs +++ b/vortex-array/src/arrays/primitive/compute/rules.rs @@ -13,7 +13,7 @@ use crate::arrays::slice::SliceReduceAdaptor; use crate::optimizer::rules::ArrayParentReduceRule; use crate::optimizer::rules::ParentRuleSet; use crate::scalar_fn::fns::mask::MaskReduceAdaptor; -use crate::vtable::ValidityHelper; +use crate::vtable::Array; pub(crate) const RULES: ParentRuleSet = ParentRuleSet::new(&[ ParentRuleSet::lift(&PrimitiveMaskedValidityRule), @@ -33,7 +33,7 @@ impl ArrayParentReduceRule for PrimitiveMaskedValidityRule { fn reduce_parent( &self, - array: &PrimitiveArray, + array: &Array, parent: &MaskedArray, _child_idx: usize, ) -> VortexResult> { diff --git a/vortex-array/src/arrays/primitive/compute/slice.rs b/vortex-array/src/arrays/primitive/compute/slice.rs index 2844163e557..f3c1334caca 100644 --- a/vortex-array/src/arrays/primitive/compute/slice.rs +++ b/vortex-array/src/arrays/primitive/compute/slice.rs @@ -12,10 +12,10 @@ use crate::arrays::PrimitiveArray; use crate::arrays::slice::SliceReduce; use crate::dtype::NativePType; use crate::match_each_native_ptype; -use crate::vtable::ValidityHelper; +use crate::vtable::Array; impl SliceReduce for Primitive { - fn slice(array: &Self::Array, range: Range) -> VortexResult> { + fn slice(array: &Array, range: Range) -> VortexResult> { let result = match_each_native_ptype!(array.ptype(), |T| { PrimitiveArray::from_buffer_handle( array.buffer_handle().slice_typed::(range.clone()), diff --git a/vortex-array/src/arrays/primitive/compute/take/mod.rs b/vortex-array/src/arrays/primitive/compute/take/mod.rs index 7eb0cc0161d..a577788ca5b 100644 --- a/vortex-array/src/arrays/primitive/compute/take/mod.rs +++ b/vortex-array/src/arrays/primitive/compute/take/mod.rs @@ -28,7 +28,7 @@ use crate::executor::ExecutionCtx; use crate::match_each_integer_ptype; use crate::match_each_native_ptype; use crate::validity::Validity; -use crate::vtable::ValidityHelper; +use crate::vtable::Array; // Kernel selection happens on the first call to `take` and uses a combination of compile-time // and runtime feature detection to infer the best kernel for the platform. @@ -55,8 +55,8 @@ static PRIMITIVE_TAKE_KERNEL: LazyLock<&'static dyn TakeImpl> = LazyLock::new(|| trait TakeImpl: Send + Sync { fn take( &self, - array: &PrimitiveArray, - indices: &PrimitiveArray, + array: &Array, + indices: &Array, validity: Validity, ) -> VortexResult; } @@ -67,8 +67,8 @@ struct TakeKernelScalar; impl TakeImpl for TakeKernelScalar { fn take( &self, - array: &PrimitiveArray, - indices: &PrimitiveArray, + array: &Array, + indices: &Array, validity: Validity, ) -> VortexResult { match_each_native_ptype!(array.ptype(), |T| { @@ -82,7 +82,7 @@ impl TakeImpl for TakeKernelScalar { impl TakeExecute for Primitive { fn take( - array: &PrimitiveArray, + array: &Array, indices: &ArrayRef, ctx: &mut ExecutionCtx, ) -> VortexResult> { diff --git a/vortex-array/src/arrays/primitive/mod.rs b/vortex-array/src/arrays/primitive/mod.rs index 14092475a18..522a03afc86 100644 --- a/vortex-array/src/arrays/primitive/mod.rs +++ b/vortex-array/src/arrays/primitive/mod.rs @@ -2,10 +2,11 @@ // SPDX-FileCopyrightText: Copyright the Vortex contributors mod array; -pub use array::PrimitiveArray; pub use array::PrimitiveArrayParts; +pub use array::PrimitiveData; pub use array::chunk_range; pub use array::patch_chunk; +pub use vtable::PrimitiveArray; pub(crate) mod compute; diff --git a/vortex-array/src/arrays/primitive/vtable/mod.rs b/vortex-array/src/arrays/primitive/vtable/mod.rs index 98de20652a3..540a2b46558 100644 --- a/vortex-array/src/arrays/primitive/vtable/mod.rs +++ b/vortex-array/src/arrays/primitive/vtable/mod.rs @@ -14,7 +14,7 @@ use crate::ArrayRef; use crate::EmptyMetadata; use crate::ExecutionCtx; use crate::ExecutionResult; -use crate::arrays::PrimitiveArray; +use crate::arrays::PrimitiveData; use crate::buffer::BufferHandle; use crate::dtype::DType; use crate::dtype::PType; @@ -40,13 +40,13 @@ use crate::Precision; use crate::arrays::primitive::compute::rules::RULES; use crate::hash::ArrayEq; use crate::hash::ArrayHash; -use crate::stats::StatsSetRef; +use crate::stats::ArrayStats; use crate::vtable::ArrayId; -vtable!(Primitive); +vtable!(Primitive, Primitive, PrimitiveData); impl VTable for Primitive { - type Array = PrimitiveArray; + type Array = PrimitiveData; type Metadata = EmptyMetadata; type OperationsVTable = Self; @@ -60,53 +60,53 @@ impl VTable for Primitive { Self::ID } - fn len(array: &PrimitiveArray) -> usize { + fn len(array: &PrimitiveData) -> usize { array.buffer_handle().len() / array.ptype().byte_width() } - fn dtype(array: &PrimitiveArray) -> &DType { + fn dtype(array: &PrimitiveData) -> &DType { &array.dtype } - fn stats(array: &PrimitiveArray) -> StatsSetRef<'_> { - array.stats_set.to_ref(array.as_ref()) + fn stats(array: &PrimitiveData) -> &ArrayStats { + &array.stats_set } - fn array_hash(array: &PrimitiveArray, state: &mut H, precision: Precision) { + fn array_hash(array: &Array, state: &mut H, precision: Precision) { array.dtype.hash(state); array.buffer.array_hash(state, precision); array.validity.array_hash(state, precision); } - fn array_eq(array: &PrimitiveArray, other: &PrimitiveArray, precision: Precision) -> bool { + fn array_eq(array: &Array, other: &Array, precision: Precision) -> bool { array.dtype == other.dtype && array.buffer.array_eq(&other.buffer, precision) && array.validity.array_eq(&other.validity, precision) } - fn nbuffers(_array: &PrimitiveArray) -> usize { + fn nbuffers(_array: &Array) -> usize { 1 } - fn buffer(array: &PrimitiveArray, idx: usize) -> BufferHandle { + fn buffer(array: &Array, idx: usize) -> BufferHandle { match idx { 0 => array.buffer_handle().clone(), _ => vortex_panic!("PrimitiveArray buffer index {idx} out of bounds"), } } - fn buffer_name(_array: &PrimitiveArray, idx: usize) -> Option { + fn buffer_name(_array: &Array, idx: usize) -> Option { match idx { 0 => Some("values".to_string()), _ => None, } } - fn nchildren(array: &PrimitiveArray) -> usize { + fn nchildren(array: &Array) -> usize { validity_nchildren(&array.validity) } - fn child(array: &PrimitiveArray, idx: usize) -> ArrayRef { + fn child(array: &Array, idx: usize) -> ArrayRef { match idx { 0 => validity_to_child(&array.validity, array.len()) .vortex_expect("PrimitiveArray child index out of bounds"), @@ -114,11 +114,11 @@ impl VTable for Primitive { } } - fn child_name(_array: &PrimitiveArray, _idx: usize) -> String { + fn child_name(_array: &Array, _idx: usize) -> String { "validity".to_string() } - fn metadata(_array: &PrimitiveArray) -> VortexResult { + fn metadata(_array: &Array) -> VortexResult { Ok(EmptyMetadata) } @@ -142,7 +142,7 @@ impl VTable for Primitive { _metadata: &Self::Metadata, buffers: &[BufferHandle], children: &dyn ArrayChildren, - ) -> VortexResult { + ) -> VortexResult { if buffers.len() != 1 { vortex_bail!("Expected 1 buffer, got {}", buffers.len()); } @@ -183,7 +183,7 @@ impl VTable for Primitive { // SAFETY: checked ahead of time unsafe { - Ok(PrimitiveArray::new_unchecked_from_handle( + Ok(PrimitiveData::new_unchecked_from_handle( buffer, ptype, validity, )) } @@ -197,7 +197,7 @@ impl VTable for Primitive { ); array.validity = if children.is_empty() { - Validity::from(array.dtype().nullability()) + Validity::from(array.dtype.nullability()) } else { Validity::Array(children.into_iter().next().vortex_expect("checked")) }; diff --git a/vortex-array/src/arrays/primitive/vtable/operations.rs b/vortex-array/src/arrays/primitive/vtable/operations.rs index 89e6ce7acf9..6f92c289a5c 100644 --- a/vortex-array/src/arrays/primitive/vtable/operations.rs +++ b/vortex-array/src/arrays/primitive/vtable/operations.rs @@ -5,14 +5,14 @@ use vortex_error::VortexResult; use crate::ExecutionCtx; use crate::arrays::Primitive; -use crate::arrays::primitive::vtable::PrimitiveArray; use crate::match_each_native_ptype; use crate::scalar::Scalar; +use crate::vtable::Array; use crate::vtable::OperationsVTable; impl OperationsVTable for Primitive { fn scalar_at( - array: &PrimitiveArray, + array: &Array, index: usize, _ctx: &mut ExecutionCtx, ) -> VortexResult { diff --git a/vortex-array/src/arrays/primitive/vtable/validity.rs b/vortex-array/src/arrays/primitive/vtable/validity.rs index 8c1c3df5b27..f26b6ab3cf0 100644 --- a/vortex-array/src/arrays/primitive/vtable/validity.rs +++ b/vortex-array/src/arrays/primitive/vtable/validity.rs @@ -1,11 +1,11 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors -use crate::arrays::primitive::vtable::PrimitiveArray; +use crate::arrays::PrimitiveData; use crate::validity::Validity; use crate::vtable::ValidityHelper; -impl ValidityHelper for PrimitiveArray { +impl ValidityHelper for PrimitiveData { fn validity(&self) -> &Validity { &self.validity } diff --git a/vortex-array/src/arrays/scalar_fn/array.rs b/vortex-array/src/arrays/scalar_fn/array.rs index d027a74d6ec..3de685d94f0 100644 --- a/vortex-array/src/arrays/scalar_fn/array.rs +++ b/vortex-array/src/arrays/scalar_fn/array.rs @@ -10,9 +10,10 @@ use crate::arrays::ScalarFnVTable; use crate::dtype::DType; use crate::scalar_fn::ScalarFnRef; use crate::stats::ArrayStats; +use crate::vtable::Array; #[derive(Clone, Debug)] -pub struct ScalarFnArray { +pub struct ScalarFnData { pub(super) vtable: ScalarFnVTable, pub(super) dtype: DType, pub(super) len: usize, @@ -20,7 +21,7 @@ pub struct ScalarFnArray { pub(super) stats: ArrayStats, } -impl ScalarFnArray { +impl ScalarFnData { /// Create a new ScalarFnArray from a scalar function and its children. pub fn try_new( scalar_fn: ScalarFnRef, @@ -44,6 +45,21 @@ impl ScalarFnArray { }) } + /// Returns the dtype of the array. + pub fn dtype(&self) -> &DType { + &self.dtype + } + + /// Returns the length of the array. + pub fn len(&self) -> usize { + self.len + } + + /// Returns `true` if the array is empty. + pub fn is_empty(&self) -> bool { + self.len() == 0 + } + /// Get the scalar function bound to this array. #[allow(clippy::same_name_method)] #[inline(always)] @@ -56,3 +72,29 @@ impl ScalarFnArray { &self.children } } + +impl Array { + /// Get the scalar function bound to this array. + #[allow(clippy::same_name_method)] + #[inline(always)] + pub fn scalar_fn(&self) -> &ScalarFnRef { + self.inner().scalar_fn() + } + + /// Get the children arrays of this scalar function array. + #[allow(clippy::same_name_method)] + pub fn children(&self) -> &[ArrayRef] { + self.inner().children() + } + + /// Create a new ScalarFnArray from a scalar function and its children. + pub fn try_new( + scalar_fn: ScalarFnRef, + children: Vec, + len: usize, + ) -> VortexResult { + Ok(Array::from_inner(ScalarFnData::try_new( + scalar_fn, children, len, + )?)) + } +} diff --git a/vortex-array/src/arrays/scalar_fn/mod.rs b/vortex-array/src/arrays/scalar_fn/mod.rs index 4e8e31222c7..d19d1157d0b 100644 --- a/vortex-array/src/arrays/scalar_fn/mod.rs +++ b/vortex-array/src/arrays/scalar_fn/mod.rs @@ -6,5 +6,5 @@ mod metadata; mod rules; mod vtable; -pub use array::*; +pub use array::ScalarFnData; pub use vtable::*; diff --git a/vortex-array/src/arrays/scalar_fn/rules.rs b/vortex-array/src/arrays/scalar_fn/rules.rs index d0b9dd74183..e033d34ffec 100644 --- a/vortex-array/src/arrays/scalar_fn/rules.rs +++ b/vortex-array/src/arrays/scalar_fn/rules.rs @@ -17,6 +17,7 @@ use crate::arrays::ConstantArray; use crate::arrays::Filter; use crate::arrays::FilterArray; use crate::arrays::ScalarFnArray; +use crate::arrays::ScalarFnData; use crate::arrays::ScalarFnVTable; use crate::arrays::Slice; use crate::arrays::SliceArray; @@ -32,6 +33,7 @@ use crate::scalar_fn::ReduceNodeRef; use crate::scalar_fn::ScalarFnRef; use crate::scalar_fn::fns::pack::Pack; use crate::validity::Validity; +use crate::vtable::Array; pub(super) const RULES: ReduceRuleSet = ReduceRuleSet::new(&[ &ScalarFnPackToStructRule, @@ -48,7 +50,7 @@ pub(super) const PARENT_RULES: ParentRuleSet = ParentRuleSet::ne #[derive(Debug)] struct ScalarFnPackToStructRule; impl ArrayReduceRule for ScalarFnPackToStructRule { - fn reduce(&self, array: &ScalarFnArray) -> VortexResult> { + fn reduce(&self, array: &Array) -> VortexResult> { let Some(pack_options) = array.scalar_fn().as_opt::() else { return Ok(None); }; @@ -73,14 +75,14 @@ impl ArrayReduceRule for ScalarFnPackToStructRule { #[derive(Debug)] struct ScalarFnConstantRule; impl ArrayReduceRule for ScalarFnConstantRule { - fn reduce(&self, array: &ScalarFnArray) -> VortexResult> { + fn reduce(&self, array: &Array) -> VortexResult> { if !array.children.iter().all(|c| c.is::()) { return Ok(None); } if array.is_empty() { Ok(Some(Canonical::empty(array.dtype()).into_array())) } else { - let result = array.scalar_at(0)?; + let result = array.clone().into_array().scalar_at(0)?; Ok(Some(ConstantArray::new(result, array.len).into_array())) } } @@ -93,7 +95,7 @@ impl ArrayParentReduceRule for ScalarFnSliceReduceRule { fn reduce_parent( &self, - array: &ScalarFnArray, + array: &Array, parent: &SliceArray, _child_idx: usize, ) -> VortexResult> { @@ -106,14 +108,7 @@ impl ArrayParentReduceRule for ScalarFnSliceReduceRule { .collect::>()?; Ok(Some( - ScalarFnArray { - vtable: array.vtable.clone(), - dtype: array.dtype.clone(), - len: range.len(), - children, - stats: Default::default(), - } - .into_array(), + ScalarFnData::try_new(array.scalar_fn().clone(), children, range.len())?.into_array(), )) } } @@ -121,7 +116,7 @@ impl ArrayParentReduceRule for ScalarFnSliceReduceRule { #[derive(Debug)] struct ScalarFnAbstractReduceRule; impl ArrayReduceRule for ScalarFnAbstractReduceRule { - fn reduce(&self, array: &ScalarFnArray) -> VortexResult> { + fn reduce(&self, array: &Array) -> VortexResult> { if let Some(reduced) = array .scalar_fn() .reduce(array, &ArrayReduceCtx { len: array.len })? @@ -138,7 +133,7 @@ impl ArrayReduceRule for ScalarFnAbstractReduceRule { } } -impl ReduceNode for ScalarFnArray { +impl ReduceNode for ScalarFnData { fn as_any(&self) -> &dyn Any { self } @@ -149,7 +144,7 @@ impl ReduceNode for ScalarFnArray { #[allow(clippy::same_name_method)] fn scalar_fn(&self) -> Option<&ScalarFnRef> { - Some(ScalarFnArray::scalar_fn(self)) + Some(ScalarFnData::scalar_fn(self)) } fn child(&self, idx: usize) -> ReduceNodeRef { @@ -220,7 +215,7 @@ impl ArrayParentReduceRule for ScalarFnUnaryFilterPushDownRule { fn reduce_parent( &self, - child: &ScalarFnArray, + child: &Array, parent: &FilterArray, _child_idx: usize, ) -> VortexResult> { diff --git a/vortex-array/src/arrays/scalar_fn/vtable/mod.rs b/vortex-array/src/arrays/scalar_fn/vtable/mod.rs index 059f247306a..3fb756810de 100644 --- a/vortex-array/src/arrays/scalar_fn/vtable/mod.rs +++ b/vortex-array/src/arrays/scalar_fn/vtable/mod.rs @@ -23,7 +23,7 @@ use crate::ArrayRef; use crate::DynArray; use crate::IntoArray; use crate::Precision; -use crate::arrays::scalar_fn::array::ScalarFnArray; +use crate::arrays::scalar_fn::array::ScalarFnData; use crate::arrays::scalar_fn::metadata::ScalarFnMetadata; use crate::arrays::scalar_fn::rules::PARENT_RULES; use crate::arrays::scalar_fn::rules::RULES; @@ -42,13 +42,13 @@ use crate::scalar_fn::ScalarFnRef; use crate::scalar_fn::ScalarFnVTableExt; use crate::scalar_fn::VecExecutionArgs; use crate::serde::ArrayChildren; -use crate::stats::StatsSetRef; +use crate::stats::ArrayStats; use crate::vtable; use crate::vtable::Array; use crate::vtable::ArrayId; use crate::vtable::VTable; -vtable!(ScalarFn, ScalarFnVTable); +vtable!(ScalarFn, ScalarFnVTable, ScalarFnData); #[derive(Clone, Debug)] pub struct ScalarFnVTable { @@ -56,12 +56,12 @@ pub struct ScalarFnVTable { } impl VTable for ScalarFnVTable { - type Array = ScalarFnArray; + type Array = ScalarFnData; type Metadata = ScalarFnMetadata; type OperationsVTable = Self; type ValidityVTable = Self; - fn vtable(array: &Self::Array) -> &Self { + fn vtable(array: &ScalarFnData) -> &Self { &array.vtable } @@ -69,19 +69,19 @@ impl VTable for ScalarFnVTable { self.scalar_fn.id() } - fn len(array: &ScalarFnArray) -> usize { + fn len(array: &ScalarFnData) -> usize { array.len } - fn dtype(array: &ScalarFnArray) -> &DType { + fn dtype(array: &ScalarFnData) -> &DType { &array.dtype } - fn stats(array: &ScalarFnArray) -> StatsSetRef<'_> { - array.stats.to_ref(array.as_ref()) + fn stats(array: &ScalarFnData) -> &ArrayStats { + &array.stats } - fn array_hash(array: &ScalarFnArray, state: &mut H, precision: Precision) { + fn array_hash(array: &Array, state: &mut H, precision: Precision) { array.len.hash(state); array.dtype.hash(state); array.scalar_fn().hash(state); @@ -90,7 +90,7 @@ impl VTable for ScalarFnVTable { } } - fn array_eq(array: &ScalarFnArray, other: &ScalarFnArray, precision: Precision) -> bool { + fn array_eq(array: &Array, other: &Array, precision: Precision) -> bool { if array.len != other.len { return false; } @@ -108,27 +108,27 @@ impl VTable for ScalarFnVTable { true } - fn nbuffers(_array: &ScalarFnArray) -> usize { + fn nbuffers(_array: &Array) -> usize { 0 } - fn buffer(_array: &ScalarFnArray, idx: usize) -> BufferHandle { + fn buffer(_array: &Array, idx: usize) -> BufferHandle { vortex_panic!("ScalarFnArray buffer index {idx} out of bounds") } - fn buffer_name(_array: &ScalarFnArray, idx: usize) -> Option { + fn buffer_name(_array: &Array, idx: usize) -> Option { vortex_panic!("ScalarFnArray buffer_name index {idx} out of bounds") } - fn nchildren(array: &ScalarFnArray) -> usize { + fn nchildren(array: &Array) -> usize { array.children.len() } - fn child(array: &ScalarFnArray, idx: usize) -> ArrayRef { + fn child(array: &Array, idx: usize) -> ArrayRef { array.children[idx].clone() } - fn child_name(array: &ScalarFnArray, idx: usize) -> String { + fn child_name(array: &Array, idx: usize) -> String { array .scalar_fn() .signature() @@ -137,7 +137,7 @@ impl VTable for ScalarFnVTable { .to_string() } - fn metadata(array: &Self::Array) -> VortexResult { + fn metadata(array: &Array) -> VortexResult { let child_dtypes = array.children().iter().map(|c| c.dtype().clone()).collect(); Ok(ScalarFnMetadata { scalar_fn: array.scalar_fn().clone(), @@ -183,7 +183,7 @@ impl VTable for ScalarFnVTable { ); } - Ok(ScalarFnArray { + Ok(ScalarFnData { vtable: ScalarFnVTable { scalar_fn: metadata.scalar_fn.clone(), }, @@ -246,7 +246,7 @@ pub trait ScalarFnArrayExt: scalar_fn::ScalarFnVTable { let child_dtypes = children.iter().map(|c| c.dtype().clone()).collect_vec(); let dtype = scalar_fn.return_dtype(&child_dtypes)?; - Ok(ScalarFnArray { + Ok(ScalarFnData { vtable: ScalarFnVTable { scalar_fn }, dtype, len, diff --git a/vortex-array/src/arrays/scalar_fn/vtable/operations.rs b/vortex-array/src/arrays/scalar_fn/vtable/operations.rs index 3b05537e015..c3995baf77b 100644 --- a/vortex-array/src/arrays/scalar_fn/vtable/operations.rs +++ b/vortex-array/src/arrays/scalar_fn/vtable/operations.rs @@ -9,16 +9,16 @@ use crate::IntoArray; use crate::LEGACY_SESSION; use crate::VortexSessionExecute; use crate::arrays::ConstantArray; -use crate::arrays::scalar_fn::array::ScalarFnArray; use crate::arrays::scalar_fn::vtable::ScalarFnVTable; use crate::columnar::Columnar; use crate::scalar::Scalar; use crate::scalar_fn::VecExecutionArgs; +use crate::vtable::Array; use crate::vtable::OperationsVTable; impl OperationsVTable for ScalarFnVTable { fn scalar_at( - array: &ScalarFnArray, + array: &Array, index: usize, _ctx: &mut ExecutionCtx, ) -> VortexResult { @@ -38,7 +38,7 @@ impl OperationsVTable for ScalarFnVTable { "Scalar function {} returned non-constant array from execution over all scalar inputs", array.scalar_fn(), ); - arr.as_ref().scalar_at(0)? + arr.to_array_ref().scalar_at(0)? } Columnar::Constant(constant) => constant.scalar().clone(), }; diff --git a/vortex-array/src/arrays/scalar_fn/vtable/validity.rs b/vortex-array/src/arrays/scalar_fn/vtable/validity.rs index fc4a3b5a6c1..a5a4e3e2c0c 100644 --- a/vortex-array/src/arrays/scalar_fn/vtable/validity.rs +++ b/vortex-array/src/arrays/scalar_fn/vtable/validity.rs @@ -7,7 +7,6 @@ use crate::ArrayRef; use crate::IntoArray; use crate::LEGACY_SESSION; use crate::VortexSessionExecute; -use crate::arrays::scalar_fn::array::ScalarFnArray; use crate::arrays::scalar_fn::vtable::ArrayExpr; use crate::arrays::scalar_fn::vtable::FakeEq; use crate::arrays::scalar_fn::vtable::ScalarFnVTable; @@ -18,6 +17,7 @@ use crate::scalar_fn::VecExecutionArgs; use crate::scalar_fn::fns::literal::Literal; use crate::scalar_fn::fns::root::Root; use crate::validity::Validity; +use crate::vtable::Array; use crate::vtable::ValidityVTable; /// Execute an expression tree recursively. @@ -50,7 +50,7 @@ fn execute_expr(expr: &Expression, row_count: usize) -> VortexResult { } impl ValidityVTable for ScalarFnVTable { - fn validity(array: &ScalarFnArray) -> VortexResult { + fn validity(array: &Array) -> VortexResult { let inputs: Vec<_> = array .children .iter() diff --git a/vortex-array/src/arrays/shared/array.rs b/vortex-array/src/arrays/shared/array.rs index c69ae39395d..af9661c6dd7 100644 --- a/vortex-array/src/arrays/shared/array.rs +++ b/vortex-array/src/arrays/shared/array.rs @@ -12,15 +12,17 @@ use vortex_error::VortexResult; use crate::ArrayRef; use crate::Canonical; use crate::IntoArray; +use crate::arrays::Shared; use crate::dtype::DType; use crate::stats::ArrayStats; +use crate::vtable::Array; /// A lazily-executing array wrapper with a one-way transition from source to cached form. /// /// Before materialization, operations delegate to the source array. /// After materialization (via `get_or_compute`), operations delegate to the cached result. #[derive(Debug, Clone)] -pub struct SharedArray { +pub struct SharedData { source: ArrayRef, cached: Arc>>, async_compute_lock: Arc>, @@ -28,7 +30,7 @@ pub struct SharedArray { pub(super) stats: ArrayStats, } -impl SharedArray { +impl SharedData { pub fn new(source: ArrayRef) -> Self { Self { dtype: source.dtype().clone(), @@ -91,6 +93,30 @@ impl SharedArray { result.clone().map_err(Into::into) } + /// Returns the length of this array. + pub fn len(&self) -> usize { + self.current_array_ref().len() + } + + /// Returns the [`DType`] of this array. + pub fn dtype(&self) -> &DType { + &self.dtype + } + + /// Returns `true` if this array is empty. + pub fn is_empty(&self) -> bool { + self.len() == 0 + } +} + +impl Array { + /// Creates a new `SharedArray`. + pub fn new(source: ArrayRef) -> Self { + Array::from_inner(SharedData::new(source)) + } +} + +impl SharedData { pub(super) fn set_source(&mut self, source: ArrayRef) { self.dtype = source.dtype().clone(); self.source = source; diff --git a/vortex-array/src/arrays/shared/mod.rs b/vortex-array/src/arrays/shared/mod.rs index 3fb9ed7f77e..34108bcd619 100644 --- a/vortex-array/src/arrays/shared/mod.rs +++ b/vortex-array/src/arrays/shared/mod.rs @@ -4,8 +4,9 @@ mod array; mod vtable; -pub use array::SharedArray; +pub use array::SharedData; pub use vtable::Shared; +pub use vtable::SharedArray; #[cfg(test)] mod tests; diff --git a/vortex-array/src/arrays/shared/vtable.rs b/vortex-array/src/arrays/shared/vtable.rs index 1c4c45e52b3..70cc21461a9 100644 --- a/vortex-array/src/arrays/shared/vtable.rs +++ b/vortex-array/src/arrays/shared/vtable.rs @@ -15,13 +15,13 @@ use crate::EmptyMetadata; use crate::ExecutionCtx; use crate::ExecutionResult; use crate::Precision; -use crate::arrays::SharedArray; +use crate::arrays::shared::SharedData; use crate::buffer::BufferHandle; use crate::dtype::DType; use crate::hash::ArrayEq; use crate::hash::ArrayHash; use crate::scalar::Scalar; -use crate::stats::StatsSetRef; +use crate::stats::ArrayStats; use crate::validity::Validity; use crate::vtable; use crate::vtable::Array; @@ -30,7 +30,7 @@ use crate::vtable::OperationsVTable; use crate::vtable::VTable; use crate::vtable::ValidityVTable; -vtable!(Shared); +vtable!(Shared, Shared, SharedData); // TODO(ngates): consider hooking Shared into the iterative execution model. Cache either the // most executed, or after each iteration, and return a shared cache for each execution. @@ -42,11 +42,11 @@ impl Shared { } impl VTable for Shared { - type Array = SharedArray; + type Array = SharedData; type Metadata = EmptyMetadata; type OperationsVTable = Self; type ValidityVTable = Self; - fn vtable(_array: &Self::Array) -> &Self { + fn vtable(_array: &SharedData) -> &Self { &Shared } @@ -54,61 +54,61 @@ impl VTable for Shared { Self::ID } - fn len(array: &SharedArray) -> usize { + fn len(array: &SharedData) -> usize { array.current_array_ref().len() } - fn dtype(array: &SharedArray) -> &DType { + fn dtype(array: &SharedData) -> &DType { &array.dtype } - fn stats(array: &SharedArray) -> StatsSetRef<'_> { - array.stats.to_ref(array.as_ref()) + fn stats(array: &SharedData) -> &ArrayStats { + &array.stats } - fn array_hash(array: &SharedArray, state: &mut H, precision: Precision) { + fn array_hash(array: &Array, state: &mut H, precision: Precision) { let current = array.current_array_ref(); current.array_hash(state, precision); array.dtype.hash(state); } - fn array_eq(array: &SharedArray, other: &SharedArray, precision: Precision) -> bool { + fn array_eq(array: &Array, other: &Array, precision: Precision) -> bool { let current = array.current_array_ref(); let other_current = other.current_array_ref(); current.array_eq(other_current, precision) && array.dtype == other.dtype } - fn nbuffers(_array: &Self::Array) -> usize { + fn nbuffers(_array: &Array) -> usize { 0 } - fn buffer(_array: &Self::Array, _idx: usize) -> BufferHandle { + fn buffer(_array: &Array, _idx: usize) -> BufferHandle { vortex_panic!("SharedArray has no buffers") } - fn buffer_name(_array: &Self::Array, _idx: usize) -> Option { + fn buffer_name(_array: &Array, _idx: usize) -> Option { None } - fn nchildren(_array: &Self::Array) -> usize { + fn nchildren(_array: &Array) -> usize { 1 } - fn child(array: &Self::Array, idx: usize) -> ArrayRef { + fn child(array: &Array, idx: usize) -> ArrayRef { match idx { 0 => array.current_array_ref().clone(), _ => vortex_panic!("SharedArray child index {idx} out of bounds"), } } - fn child_name(_array: &Self::Array, idx: usize) -> String { + fn child_name(_array: &Array, idx: usize) -> String { match idx { 0 => "source".to_string(), _ => vortex_panic!("SharedArray child_name index {idx} out of bounds"), } } - fn metadata(_array: &Self::Array) -> VortexResult { + fn metadata(_array: &Array) -> VortexResult { Ok(EmptyMetadata) } @@ -132,9 +132,9 @@ impl VTable for Shared { _metadata: &Self::Metadata, _buffers: &[BufferHandle], children: &dyn crate::serde::ArrayChildren, - ) -> VortexResult { + ) -> VortexResult { let child = children.get(0, dtype, len)?; - Ok(SharedArray::new(child)) + Ok(SharedData::new(child)) } fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { @@ -159,7 +159,7 @@ impl VTable for Shared { } impl OperationsVTable for Shared { fn scalar_at( - array: &SharedArray, + array: &Array, index: usize, _ctx: &mut ExecutionCtx, ) -> VortexResult { @@ -168,7 +168,7 @@ impl OperationsVTable for Shared { } impl ValidityVTable for Shared { - fn validity(array: &SharedArray) -> VortexResult { + fn validity(array: &Array) -> VortexResult { array.current_array_ref().validity() } } diff --git a/vortex-array/src/arrays/slice/array.rs b/vortex-array/src/arrays/slice/array.rs index 8a0dbbb642c..35a0e6d5ced 100644 --- a/vortex-array/src/arrays/slice/array.rs +++ b/vortex-array/src/arrays/slice/array.rs @@ -8,10 +8,13 @@ use vortex_error::VortexResult; use vortex_error::vortex_panic; use crate::ArrayRef; +use crate::arrays::Slice; +use crate::dtype::DType; use crate::stats::ArrayStats; +use crate::vtable::Array; #[derive(Clone, Debug)] -pub struct SliceArray { +pub struct SliceData { pub(super) child: ArrayRef, pub(super) range: Range, pub(super) stats: ArrayStats, @@ -22,7 +25,7 @@ pub struct SliceArrayParts { pub range: Range, } -impl SliceArray { +impl SliceData { pub fn try_new(child: ArrayRef, range: Range) -> VortexResult { if range.end > child.len() { vortex_panic!( @@ -42,6 +45,21 @@ impl SliceArray { Self::try_new(child, range).vortex_expect("failed") } + /// Returns the length of this array. + pub fn len(&self) -> usize { + self.range.len() + } + + /// Returns the [`DType`] of this array. + pub fn dtype(&self) -> &DType { + self.child.dtype() + } + + /// Returns `true` if this array is empty. + pub fn is_empty(&self) -> bool { + self.len() == 0 + } + /// The range used to slice the child array. pub fn slice_range(&self) -> &Range { &self.range @@ -51,7 +69,21 @@ impl SliceArray { pub fn child(&self) -> &ArrayRef { &self.child } +} + +impl Array { + /// Constructs a new `SliceArray`. + pub fn try_new(child: ArrayRef, range: Range) -> VortexResult { + Ok(Array::from_inner(SliceData::try_new(child, range)?)) + } + + /// Constructs a new `SliceArray`. + pub fn new(child: ArrayRef, range: Range) -> Self { + Array::from_inner(SliceData::new(child, range)) + } +} +impl SliceData { /// Consume the slice array and return its components. pub fn into_parts(self) -> SliceArrayParts { SliceArrayParts { diff --git a/vortex-array/src/arrays/slice/mod.rs b/vortex-array/src/arrays/slice/mod.rs index c9ad498ebe0..4502c51b038 100644 --- a/vortex-array/src/arrays/slice/mod.rs +++ b/vortex-array/src/arrays/slice/mod.rs @@ -15,7 +15,8 @@ mod vtable; use std::ops::Range; -pub use array::*; +pub use array::SliceArrayParts; +pub use array::SliceData; use vortex_error::VortexResult; pub use vtable::*; @@ -26,6 +27,7 @@ use crate::IntoArray; use crate::kernel::ExecuteParentKernel; use crate::matcher::Matcher; use crate::optimizer::rules::ArrayParentReduceRule; +use crate::vtable::Array; use crate::vtable::VTable; pub trait SliceReduce: VTable { @@ -40,7 +42,7 @@ pub trait SliceReduce: VTable { /// The range is guaranteed to be within bounds of the array (i.e., `range.end <= array.len()`). /// /// Additionally, the range is guaranteed to be non-empty (i.e., `range.start < range.end`). - fn slice(array: &Self::Array, range: Range) -> VortexResult>; + fn slice(array: &Array, range: Range) -> VortexResult>; } pub trait SliceKernel: VTable { @@ -55,18 +57,18 @@ pub trait SliceKernel: VTable { /// /// Additionally, the range is guaranteed to be non-empty (i.e., `range.start < range.end`). fn slice( - array: &Self::Array, + array: &Array, range: Range, ctx: &mut ExecutionCtx, ) -> VortexResult>; } -fn precondition(array: &V::Array, range: &Range) -> Option { - if range.start == 0 && range.end == array.len() { - return Some(array.to_array()); +fn precondition(array: &Array, range: &Range) -> Option { + if range.start == 0 && range.end == V::len(array) { + return Some(array.clone().into_array()); }; if range.start == range.end { - return Some(Canonical::empty(array.dtype()).into_array()); + return Some(Canonical::empty(V::dtype(array)).into_array()); } None } @@ -83,7 +85,7 @@ where fn reduce_parent( &self, - array: &V::Array, + array: &Array, parent: ::Match<'_>, child_idx: usize, ) -> VortexResult> { @@ -107,7 +109,7 @@ where fn execute_parent( &self, - array: &V::Array, + array: &Array, parent: ::Match<'_>, child_idx: usize, ctx: &mut ExecutionCtx, diff --git a/vortex-array/src/arrays/slice/slice_.rs b/vortex-array/src/arrays/slice/slice_.rs index 6c1f10628be..468b92e6e0f 100644 --- a/vortex-array/src/arrays/slice/slice_.rs +++ b/vortex-array/src/arrays/slice/slice_.rs @@ -10,9 +10,10 @@ use crate::IntoArray; use crate::arrays::Slice; use crate::arrays::SliceArray; use crate::arrays::slice::SliceReduce; +use crate::vtable::Array; impl SliceReduce for Slice { - fn slice(array: &Self::Array, range: Range) -> VortexResult> { + fn slice(array: &Array, range: Range) -> VortexResult> { let inner_range = array.slice_range(); let combined_start = inner_range.start + range.start; diff --git a/vortex-array/src/arrays/slice/vtable.rs b/vortex-array/src/arrays/slice/vtable.rs index 13652915f6e..5c3989128be 100644 --- a/vortex-array/src/arrays/slice/vtable.rs +++ b/vortex-array/src/arrays/slice/vtable.rs @@ -21,8 +21,9 @@ use crate::ArrayHash; use crate::ArrayRef; use crate::Canonical; use crate::DynArray; +use crate::IntoArray; use crate::Precision; -use crate::arrays::slice::array::SliceArray; +use crate::arrays::slice::array::SliceData; use crate::arrays::slice::rules::PARENT_RULES; use crate::buffer::BufferHandle; use crate::dtype::DType; @@ -30,7 +31,7 @@ use crate::executor::ExecutionCtx; use crate::executor::ExecutionResult; use crate::scalar::Scalar; use crate::serde::ArrayChildren; -use crate::stats::StatsSetRef; +use crate::stats::ArrayStats; use crate::validity::Validity; use crate::vtable; use crate::vtable::Array; @@ -39,7 +40,7 @@ use crate::vtable::OperationsVTable; use crate::vtable::VTable; use crate::vtable::ValidityVTable; -vtable!(Slice); +vtable!(Slice, Slice, SliceData); #[derive(Clone, Debug)] pub struct Slice; @@ -49,11 +50,11 @@ impl Slice { } impl VTable for Slice { - type Array = SliceArray; + type Array = SliceData; type Metadata = SliceMetadata; type OperationsVTable = Self; type ValidityVTable = Self; - fn vtable(_array: &Self::Array) -> &Self { + fn vtable(_array: &SliceData) -> &Self { &Slice } @@ -61,59 +62,59 @@ impl VTable for Slice { Slice::ID } - fn len(array: &SliceArray) -> usize { + fn len(array: &SliceData) -> usize { array.range.len() } - fn dtype(array: &SliceArray) -> &DType { + fn dtype(array: &SliceData) -> &DType { array.child.dtype() } - fn stats(array: &SliceArray) -> StatsSetRef<'_> { - array.stats.to_ref(array.as_ref()) + fn stats(array: &SliceData) -> &ArrayStats { + &array.stats } - fn array_hash(array: &SliceArray, state: &mut H, precision: Precision) { + fn array_hash(array: &Array, state: &mut H, precision: Precision) { array.child.array_hash(state, precision); array.range.start.hash(state); array.range.end.hash(state); } - fn array_eq(array: &SliceArray, other: &SliceArray, precision: Precision) -> bool { + fn array_eq(array: &Array, other: &Array, precision: Precision) -> bool { array.child.array_eq(&other.child, precision) && array.range == other.range } - fn nbuffers(_array: &Self::Array) -> usize { + fn nbuffers(_array: &Array) -> usize { 0 } - fn buffer(_array: &Self::Array, _idx: usize) -> BufferHandle { + fn buffer(_array: &Array, _idx: usize) -> BufferHandle { vortex_panic!("SliceArray has no buffers") } - fn buffer_name(_array: &Self::Array, _idx: usize) -> Option { + fn buffer_name(_array: &Array, _idx: usize) -> Option { None } - fn nchildren(_array: &Self::Array) -> usize { + fn nchildren(_array: &Array) -> usize { 1 } - fn child(array: &Self::Array, idx: usize) -> ArrayRef { + fn child(array: &Array, idx: usize) -> ArrayRef { match idx { 0 => array.child.clone(), _ => vortex_panic!("SliceArray child index {idx} out of bounds"), } } - fn child_name(_array: &Self::Array, idx: usize) -> String { + fn child_name(_array: &Array, idx: usize) -> String { match idx { 0 => "child".to_string(), _ => vortex_panic!("SliceArray child_name index {idx} out of bounds"), } } - fn metadata(array: &Self::Array) -> VortexResult { + fn metadata(array: &Array) -> VortexResult { Ok(SliceMetadata(array.range.clone())) } @@ -141,7 +142,7 @@ impl VTable for Slice { ) -> VortexResult { assert_eq!(len, metadata.0.len()); let child = children.get(0, dtype, metadata.0.end)?; - Ok(SliceArray { + Ok(SliceData { child, range: metadata.0.clone(), stats: Default::default(), @@ -175,7 +176,7 @@ impl VTable for Slice { // TODO(ngates): we should inline canonical slice logic here. Canonical::from(canonical) - .as_ref() + .into_array() .slice(array.range.clone()) .map(ExecutionResult::done) } @@ -190,7 +191,7 @@ impl VTable for Slice { } impl OperationsVTable for Slice { fn scalar_at( - array: &SliceArray, + array: &Array, index: usize, _ctx: &mut ExecutionCtx, ) -> VortexResult { @@ -199,7 +200,7 @@ impl OperationsVTable for Slice { } impl ValidityVTable for Slice { - fn validity(array: &SliceArray) -> VortexResult { + fn validity(array: &Array) -> VortexResult { array.child.validity()?.slice(array.range.clone()) } } diff --git a/vortex-array/src/arrays/struct_/array.rs b/vortex-array/src/arrays/struct_/array.rs index a351cc84a5d..6de577aaa29 100644 --- a/vortex-array/src/arrays/struct_/array.rs +++ b/vortex-array/src/arrays/struct_/array.rs @@ -9,17 +9,19 @@ use vortex_error::VortexExpect; use vortex_error::VortexResult; use vortex_error::vortex_bail; use vortex_error::vortex_err; +use vortex_mask::Mask; use crate::ArrayRef; use crate::DynArray; use crate::IntoArray; +use crate::arrays::Struct; use crate::dtype::DType; use crate::dtype::FieldName; use crate::dtype::FieldNames; use crate::dtype::StructFields; use crate::stats::ArrayStats; use crate::validity::Validity; -use crate::vtable::ValidityHelper; +use crate::vtable::Array; /// A struct array that stores multiple named fields as columns, similar to a database row. /// @@ -140,7 +142,7 @@ use crate::vtable::ValidityHelper; /// assert_eq!(id_field.len(), 3); /// ``` #[derive(Clone, Debug)] -pub struct StructArray { +pub struct StructData { pub(super) len: usize, pub(super) dtype: DType, pub(super) fields: Arc<[ArrayRef]>, @@ -154,7 +156,33 @@ pub struct StructArrayParts { pub validity: Validity, } -impl StructArray { +impl StructData { + /// Returns the length of this array. + pub fn len(&self) -> usize { + self.len + } + + /// Returns the [`DType`] of this array. + pub fn dtype(&self) -> &DType { + &self.dtype + } + + /// Returns `true` if this array is empty. + pub fn is_empty(&self) -> bool { + self.len() == 0 + } + + /// Returns the [`Validity`] of this array. + #[allow(clippy::same_name_method)] + pub fn validity(&self) -> &Validity { + &self.validity + } + + /// Returns the validity as a [`Mask`]. + pub fn validity_mask(&self) -> Mask { + self.validity.to_mask(self.len()) + } + /// Return the struct fields without the validity of the struct applied pub fn unmasked_fields(&self) -> &Arc<[ArrayRef]> { &self.fields @@ -419,7 +447,7 @@ impl StructArray { children.push(fields[idx].clone()); } - StructArray::try_new( + StructData::try_new( FieldNames::from(names.as_slice()), children, self.len(), @@ -455,8 +483,83 @@ impl StructArray { } None } +} + +impl Array { + /// Creates a new [`StructArray`]. + pub fn new( + names: FieldNames, + fields: impl Into>, + length: usize, + validity: Validity, + ) -> Self { + Array::from_inner(StructData::new(names, fields, length, validity)) + } + + /// Constructs a new `StructArray`. + pub fn try_new( + names: FieldNames, + fields: impl Into>, + length: usize, + validity: Validity, + ) -> VortexResult { + Ok(Array::from_inner(StructData::try_new( + names, fields, length, validity, + )?)) + } + + /// Creates a new [`StructArray`] without validation. + /// + /// # Safety + /// + /// See [`StructData::new_unchecked`]. + pub unsafe fn new_unchecked( + fields: impl Into>, + dtype: StructFields, + length: usize, + validity: Validity, + ) -> Self { + Array::from_inner(unsafe { StructData::new_unchecked(fields, dtype, length, validity) }) + } + + /// Constructs a new `StructArray` with an explicit dtype. + pub fn try_new_with_dtype( + fields: impl Into>, + dtype: StructFields, + length: usize, + validity: Validity, + ) -> VortexResult { + Ok(Array::from_inner(StructData::try_new_with_dtype( + fields, dtype, length, validity, + )?)) + } + + /// Construct a [`StructArray`] from named fields. + pub fn from_fields>(items: &[(N, ArrayRef)]) -> VortexResult { + Ok(Array::from_inner(StructData::from_fields(items)?)) + } + + /// Decompose this struct array into its constituent parts. + pub fn into_parts(self) -> StructArrayParts { + self.into_inner().into_parts() + } + + /// Create a [`StructArray`] from an iterator of (name, array) pairs with validity. + pub fn try_from_iter_with_validity< + N: AsRef, + A: IntoArray, + T: IntoIterator, + >( + iter: T, + validity: Validity, + ) -> VortexResult { + Ok(Array::from_inner(StructData::try_from_iter_with_validity( + iter, validity, + )?)) + } +} - /// Create a new StructArray by appending a new column onto the existing array. +impl StructData { pub fn with_column(&self, name: impl Into, array: ArrayRef) -> VortexResult { let name = name.into(); let struct_dtype = self.struct_fields().clone(); diff --git a/vortex-array/src/arrays/struct_/compute/cast.rs b/vortex-array/src/arrays/struct_/compute/cast.rs index 291830556c9..786e6febaf3 100644 --- a/vortex-array/src/arrays/struct_/compute/cast.rs +++ b/vortex-array/src/arrays/struct_/compute/cast.rs @@ -15,11 +15,11 @@ use crate::builtins::ArrayBuiltins; use crate::dtype::DType; use crate::scalar::Scalar; use crate::scalar_fn::fns::cast::CastKernel; -use crate::vtable::ValidityHelper; +use crate::vtable::Array; impl CastKernel for Struct { fn cast( - array: &StructArray, + array: &Array, dtype: &DType, _ctx: &mut ExecutionCtx, ) -> VortexResult> { diff --git a/vortex-array/src/arrays/struct_/compute/mask.rs b/vortex-array/src/arrays/struct_/compute/mask.rs index c10e1974f0c..c020d2e91fd 100644 --- a/vortex-array/src/arrays/struct_/compute/mask.rs +++ b/vortex-array/src/arrays/struct_/compute/mask.rs @@ -9,10 +9,10 @@ use crate::arrays::Struct; use crate::arrays::StructArray; use crate::scalar_fn::fns::mask::MaskReduce; use crate::validity::Validity; -use crate::vtable::ValidityHelper; +use crate::vtable::Array; impl MaskReduce for Struct { - fn mask(array: &StructArray, mask: &ArrayRef) -> VortexResult> { + fn mask(array: &Array, mask: &ArrayRef) -> VortexResult> { StructArray::try_new_with_dtype( array.unmasked_fields().clone(), array.struct_fields().clone(), diff --git a/vortex-array/src/arrays/struct_/compute/rules.rs b/vortex-array/src/arrays/struct_/compute/rules.rs index 910d5ebe481..5aa540785a9 100644 --- a/vortex-array/src/arrays/struct_/compute/rules.rs +++ b/vortex-array/src/arrays/struct_/compute/rules.rs @@ -24,7 +24,7 @@ use crate::scalar_fn::fns::get_item::GetItem; use crate::scalar_fn::fns::mask::Mask; use crate::scalar_fn::fns::mask::MaskReduceAdaptor; use crate::validity::Validity; -use crate::vtable::ValidityHelper; +use crate::vtable::Array; pub(crate) const PARENT_RULES: ParentRuleSet = ParentRuleSet::new(&[ ParentRuleSet::lift(&StructCastPushDownRule), @@ -47,7 +47,7 @@ impl ArrayParentReduceRule for StructCastPushDownRule { fn reduce_parent( &self, - array: &StructArray, + array: &Array, parent: ScalarFnArrayView, _child_idx: usize, ) -> VortexResult> { @@ -103,7 +103,7 @@ impl ArrayParentReduceRule for StructGetItemRule { fn reduce_parent( &self, - child: &StructArray, + child: &Array, parent: ScalarFnArrayView<'_, GetItem>, _child_idx: usize, ) -> VortexResult> { diff --git a/vortex-array/src/arrays/struct_/compute/slice.rs b/vortex-array/src/arrays/struct_/compute/slice.rs index beb38e8c74c..174523b1dcb 100644 --- a/vortex-array/src/arrays/struct_/compute/slice.rs +++ b/vortex-array/src/arrays/struct_/compute/slice.rs @@ -11,10 +11,10 @@ use crate::IntoArray; use crate::arrays::Struct; use crate::arrays::StructArray; use crate::arrays::slice::SliceReduce; -use crate::vtable::ValidityHelper; +use crate::vtable::Array; impl SliceReduce for Struct { - fn slice(array: &Self::Array, range: Range) -> VortexResult> { + fn slice(array: &Array, range: Range) -> VortexResult> { let fields: Vec<_> = array .unmasked_fields() .iter() diff --git a/vortex-array/src/arrays/struct_/compute/take.rs b/vortex-array/src/arrays/struct_/compute/take.rs index 6694d64e6e6..b8a070257af 100644 --- a/vortex-array/src/arrays/struct_/compute/take.rs +++ b/vortex-array/src/arrays/struct_/compute/take.rs @@ -12,10 +12,10 @@ use crate::arrays::dict::TakeReduce; use crate::builtins::ArrayBuiltins; use crate::scalar::Scalar; use crate::validity::Validity; -use crate::vtable::ValidityHelper; +use crate::vtable::Array; impl TakeReduce for Struct { - fn take(array: &StructArray, indices: &ArrayRef) -> VortexResult> { + fn take(array: &Array, indices: &ArrayRef) -> VortexResult> { // If the struct array is empty then the indices must be all null, otherwise it will access // an out of bounds element. if array.is_empty() { diff --git a/vortex-array/src/arrays/struct_/compute/zip.rs b/vortex-array/src/arrays/struct_/compute/zip.rs index 425d07a28a3..36d119fe894 100644 --- a/vortex-array/src/arrays/struct_/compute/zip.rs +++ b/vortex-array/src/arrays/struct_/compute/zip.rs @@ -15,11 +15,11 @@ use crate::arrays::StructArray; use crate::builtins::ArrayBuiltins; use crate::scalar_fn::fns::zip::ZipKernel; use crate::validity::Validity; -use crate::vtable::ValidityHelper; +use crate::vtable::Array; impl ZipKernel for Struct { fn zip( - if_true: &StructArray, + if_true: &Array, if_false: &ArrayRef, mask: &ArrayRef, ctx: &mut ExecutionCtx, diff --git a/vortex-array/src/arrays/struct_/mod.rs b/vortex-array/src/arrays/struct_/mod.rs index 727df32c4a2..b867f903901 100644 --- a/vortex-array/src/arrays/struct_/mod.rs +++ b/vortex-array/src/arrays/struct_/mod.rs @@ -2,8 +2,9 @@ // SPDX-FileCopyrightText: Copyright the Vortex contributors mod array; -pub use array::StructArray; pub use array::StructArrayParts; +pub use array::StructData; +pub use vtable::StructArray; pub(crate) mod compute; mod vtable; diff --git a/vortex-array/src/arrays/struct_/vtable/mod.rs b/vortex-array/src/arrays/struct_/vtable/mod.rs index acaac4e764e..f4bacdd3314 100644 --- a/vortex-array/src/arrays/struct_/vtable/mod.rs +++ b/vortex-array/src/arrays/struct_/vtable/mod.rs @@ -16,7 +16,7 @@ use crate::ArrayRef; use crate::EmptyMetadata; use crate::ExecutionCtx; use crate::ExecutionResult; -use crate::arrays::StructArray; +use crate::arrays::StructData; use crate::arrays::struct_::compute::rules::PARENT_RULES; use crate::buffer::BufferHandle; use crate::dtype::DType; @@ -36,13 +36,13 @@ use std::hash::Hash; use crate::Precision; use crate::hash::ArrayEq; use crate::hash::ArrayHash; -use crate::stats::StatsSetRef; +use crate::stats::ArrayStats; use crate::vtable::ArrayId; -vtable!(Struct); +vtable!(Struct, Struct, StructData); impl VTable for Struct { - type Array = StructArray; + type Array = StructData; type Metadata = EmptyMetadata; type OperationsVTable = Self; @@ -55,19 +55,19 @@ impl VTable for Struct { Self::ID } - fn len(array: &StructArray) -> usize { + fn len(array: &StructData) -> usize { array.len } - fn dtype(array: &StructArray) -> &DType { + fn dtype(array: &StructData) -> &DType { &array.dtype } - fn stats(array: &StructArray) -> StatsSetRef<'_> { - array.stats_set.to_ref(array.as_ref()) + fn stats(array: &StructData) -> &ArrayStats { + &array.stats_set } - fn array_hash(array: &StructArray, state: &mut H, precision: Precision) { + fn array_hash(array: &Array, state: &mut H, precision: Precision) { array.len.hash(state); array.dtype.hash(state); for field in array.fields.iter() { @@ -76,7 +76,7 @@ impl VTable for Struct { array.validity.array_hash(state, precision); } - fn array_eq(array: &StructArray, other: &StructArray, precision: Precision) -> bool { + fn array_eq(array: &Array, other: &Array, precision: Precision) -> bool { array.len == other.len && array.dtype == other.dtype && array.fields.len() == other.fields.len() @@ -88,23 +88,23 @@ impl VTable for Struct { && array.validity.array_eq(&other.validity, precision) } - fn nbuffers(_array: &StructArray) -> usize { + fn nbuffers(_array: &Array) -> usize { 0 } - fn buffer(_array: &StructArray, idx: usize) -> BufferHandle { + fn buffer(_array: &Array, idx: usize) -> BufferHandle { vortex_panic!("StructArray buffer index {idx} out of bounds") } - fn buffer_name(_array: &StructArray, idx: usize) -> Option { + fn buffer_name(_array: &Array, idx: usize) -> Option { vortex_panic!("StructArray buffer_name index {idx} out of bounds") } - fn nchildren(array: &StructArray) -> usize { + fn nchildren(array: &Array) -> usize { validity_nchildren(&array.validity) + array.unmasked_fields().len() } - fn child(array: &StructArray, idx: usize) -> ArrayRef { + fn child(array: &Array, idx: usize) -> ArrayRef { let vc = validity_nchildren(&array.validity); if idx < vc { validity_to_child(&array.validity, array.len()) @@ -114,7 +114,7 @@ impl VTable for Struct { } } - fn child_name(array: &StructArray, idx: usize) -> String { + fn child_name(array: &Array, idx: usize) -> String { let vc = validity_nchildren(&array.validity); if idx < vc { "validity".to_string() @@ -123,7 +123,7 @@ impl VTable for Struct { } } - fn metadata(_array: &StructArray) -> VortexResult { + fn metadata(_array: &Array) -> VortexResult { Ok(EmptyMetadata) } @@ -147,7 +147,7 @@ impl VTable for Struct { _metadata: &Self::Metadata, _buffers: &[BufferHandle], children: &dyn ArrayChildren, - ) -> VortexResult { + ) -> VortexResult { let DType::Struct(struct_dtype, nullability) = dtype else { vortex_bail!("Expected struct dtype, found {:?}", dtype) }; @@ -176,7 +176,7 @@ impl VTable for Struct { }) .try_collect()?; - StructArray::try_new_with_dtype(children, struct_dtype.clone(), len, validity) + StructData::try_new_with_dtype(children, struct_dtype.clone(), len, validity) } fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { diff --git a/vortex-array/src/arrays/struct_/vtable/operations.rs b/vortex-array/src/arrays/struct_/vtable/operations.rs index a1b8549b838..5ad8d29d1da 100644 --- a/vortex-array/src/arrays/struct_/vtable/operations.rs +++ b/vortex-array/src/arrays/struct_/vtable/operations.rs @@ -6,13 +6,13 @@ use vortex_error::VortexResult; use crate::DynArray; use crate::ExecutionCtx; use crate::arrays::Struct; -use crate::arrays::StructArray; use crate::scalar::Scalar; +use crate::vtable::Array; use crate::vtable::OperationsVTable; impl OperationsVTable for Struct { fn scalar_at( - array: &StructArray, + array: &Array, index: usize, _ctx: &mut ExecutionCtx, ) -> VortexResult { diff --git a/vortex-array/src/arrays/struct_/vtable/validity.rs b/vortex-array/src/arrays/struct_/vtable/validity.rs index 90dff1e618d..7a02d8057b7 100644 --- a/vortex-array/src/arrays/struct_/vtable/validity.rs +++ b/vortex-array/src/arrays/struct_/vtable/validity.rs @@ -1,11 +1,11 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors -use crate::arrays::StructArray; +use crate::arrays::StructData; use crate::validity::Validity; use crate::vtable::ValidityHelper; -impl ValidityHelper for StructArray { +impl ValidityHelper for StructData { fn validity(&self) -> &Validity { &self.validity } diff --git a/vortex-array/src/arrays/varbin/accessor.rs b/vortex-array/src/arrays/varbin/accessor.rs index dea926defe2..990c264e4f3 100644 --- a/vortex-array/src/arrays/varbin/accessor.rs +++ b/vortex-array/src/arrays/varbin/accessor.rs @@ -8,7 +8,6 @@ use crate::accessor::ArrayAccessor; use crate::arrays::VarBinArray; use crate::match_each_integer_ptype; use crate::validity::Validity; -use crate::vtable::ValidityHelper; impl ArrayAccessor<[u8]> for VarBinArray { fn with_iterator(&self, f: F) -> R diff --git a/vortex-array/src/arrays/varbin/array.rs b/vortex-array/src/arrays/varbin/array.rs index 5c08545d6ba..7fe4e473645 100644 --- a/vortex-array/src/arrays/varbin/array.rs +++ b/vortex-array/src/arrays/varbin/array.rs @@ -7,10 +7,12 @@ use vortex_error::VortexExpect; use vortex_error::VortexResult; use vortex_error::vortex_ensure; use vortex_error::vortex_err; +use vortex_mask::Mask; use crate::ArrayRef; use crate::DynArray; use crate::ToCanonical; +use crate::arrays::VarBin; use crate::arrays::varbin::builder::VarBinBuilder; use crate::buffer::BufferHandle; use crate::dtype::DType; @@ -19,9 +21,10 @@ use crate::dtype::Nullability; use crate::match_each_integer_ptype; use crate::stats::ArrayStats; use crate::validity::Validity; +use crate::vtable::Array; #[derive(Clone, Debug)] -pub struct VarBinArray { +pub struct VarBinData { pub(super) dtype: DType, pub(super) bytes: BufferHandle, pub(super) offsets: ArrayRef, @@ -29,7 +32,7 @@ pub struct VarBinArray { pub(super) stats_set: ArrayStats, } -impl VarBinArray { +impl VarBinData { /// Creates a new [`VarBinArray`]. /// /// # Panics @@ -257,6 +260,32 @@ impl VarBinArray { Ok(()) } + /// Returns the length of this array. + pub fn len(&self) -> usize { + self.offsets().len().saturating_sub(1) + } + + /// Returns the [`DType`] of this array. + pub fn dtype(&self) -> &DType { + &self.dtype + } + + /// Returns `true` if this array is empty. + pub fn is_empty(&self) -> bool { + self.len() == 0 + } + + /// Returns the [`Validity`] of this array. + #[allow(clippy::same_name_method)] + pub fn validity(&self) -> &Validity { + &self.validity + } + + /// Returns the validity as a [`Mask`]. + pub fn validity_mask(&self) -> Mask { + self.validity.to_mask(self.len()) + } + #[inline] pub fn offsets(&self) -> &ArrayRef { &self.offsets @@ -307,7 +336,7 @@ impl VarBinArray { for v in vec { builder.append_value(v.as_ref()); } - builder.finish(dtype) + builder.finish(dtype).into_inner() } #[expect( @@ -323,7 +352,7 @@ impl VarBinArray { for v in iter { builder.append(v.as_ref().map(|o| o.as_ref())); } - builder.finish(dtype) + builder.finish(dtype).into_inner() } pub fn from_iter_nonnull, I: IntoIterator>( @@ -335,9 +364,56 @@ impl VarBinArray { for v in iter { builder.append_value(v); } - builder.finish(dtype) + builder.finish(dtype).into_inner() + } +} + +/// Forwarding constructors for `VarBinArray` (= `Array`). +impl Array { + pub fn from_vec>(vec: Vec, dtype: DType) -> Self { + Array::from_inner(VarBinData::from_vec(vec, dtype)) + } + + #[expect( + clippy::same_name_method, + reason = "intentionally named from_iter like Iterator::from_iter" + )] + pub fn from_iter, I: IntoIterator>>( + iter: I, + dtype: DType, + ) -> Self { + Array::from_inner(VarBinData::from_iter(iter, dtype)) } + pub fn from_iter_nonnull, I: IntoIterator>( + iter: I, + dtype: DType, + ) -> Self { + Array::from_inner(VarBinData::from_iter_nonnull(iter, dtype)) + } + + /// Create from a vector of string slices. + pub fn from_strs(value: Vec<&str>) -> Self { + Self::from_vec(value, DType::Utf8(Nullability::NonNullable)) + } + + /// Create from a vector of optional string slices. + pub fn from_nullable_strs(value: Vec>) -> Self { + Self::from_iter(value, DType::Utf8(Nullability::Nullable)) + } + + /// Create from a vector of byte slices. + pub fn from_bytes(value: Vec<&[u8]>) -> Self { + Self::from_vec(value, DType::Binary(Nullability::NonNullable)) + } + + /// Create from a vector of optional byte slices. + pub fn from_nullable_bytes(value: Vec>) -> Self { + Self::from_iter(value, DType::Binary(Nullability::Nullable)) + } +} + +impl VarBinData { /// Get value offset at a given index /// /// Note: There's 1 more offsets than the elements in the array, thus last offset is at array length index @@ -375,73 +451,117 @@ impl VarBinArray { } } -impl From> for VarBinArray { +impl Array { + /// Creates a new [`VarBinArray`] without validation. + /// + /// # Safety + /// + /// See [`VarBinData::new_unchecked`]. + pub unsafe fn new_unchecked( + offsets: ArrayRef, + bytes: ByteBuffer, + dtype: DType, + validity: Validity, + ) -> Self { + Array::from_inner(unsafe { VarBinData::new_unchecked(offsets, bytes, dtype, validity) }) + } + + /// Creates a new [`VarBinArray`] without validation from a [`BufferHandle`]. + /// + /// # Safety + /// + /// See [`VarBinData::new_unchecked_from_handle`]. + pub unsafe fn new_unchecked_from_handle( + offsets: ArrayRef, + bytes: BufferHandle, + dtype: DType, + validity: Validity, + ) -> Self { + Array::from_inner(unsafe { + VarBinData::new_unchecked_from_handle(offsets, bytes, dtype, validity) + }) + } + + /// Constructs a new `VarBinArray`. + pub fn try_new( + offsets: ArrayRef, + bytes: ByteBuffer, + dtype: DType, + validity: Validity, + ) -> VortexResult { + Ok(Array::from_inner(VarBinData::try_new( + offsets, bytes, dtype, validity, + )?)) + } +} + +impl From> for VarBinData { fn from(value: Vec<&[u8]>) -> Self { Self::from_vec(value, DType::Binary(Nullability::NonNullable)) } } -impl From>> for VarBinArray { +impl From>> for VarBinData { fn from(value: Vec>) -> Self { Self::from_vec(value, DType::Binary(Nullability::NonNullable)) } } -impl From> for VarBinArray { +impl From> for VarBinData { fn from(value: Vec) -> Self { Self::from_vec(value, DType::Utf8(Nullability::NonNullable)) } } -impl From> for VarBinArray { +impl From> for VarBinData { fn from(value: Vec<&str>) -> Self { Self::from_vec(value, DType::Utf8(Nullability::NonNullable)) } } -impl From>> for VarBinArray { +impl From>> for VarBinData { fn from(value: Vec>) -> Self { Self::from_iter(value, DType::Binary(Nullability::Nullable)) } } -impl From>>> for VarBinArray { +impl From>>> for VarBinData { fn from(value: Vec>>) -> Self { Self::from_iter(value, DType::Binary(Nullability::Nullable)) } } -impl From>> for VarBinArray { +impl From>> for VarBinData { fn from(value: Vec>) -> Self { Self::from_iter(value, DType::Utf8(Nullability::Nullable)) } } -impl From>> for VarBinArray { +impl From>> for VarBinData { fn from(value: Vec>) -> Self { Self::from_iter(value, DType::Utf8(Nullability::Nullable)) } } -impl<'a> FromIterator> for VarBinArray { +impl<'a> FromIterator> for VarBinData { fn from_iter>>(iter: T) -> Self { Self::from_iter(iter, DType::Binary(Nullability::Nullable)) } } -impl FromIterator>> for VarBinArray { +impl FromIterator>> for VarBinData { fn from_iter>>>(iter: T) -> Self { Self::from_iter(iter, DType::Binary(Nullability::Nullable)) } } -impl FromIterator> for VarBinArray { +impl FromIterator> for VarBinData { fn from_iter>>(iter: T) -> Self { Self::from_iter(iter, DType::Utf8(Nullability::Nullable)) } } -impl<'a> FromIterator> for VarBinArray { +impl<'a> FromIterator> for VarBinData { fn from_iter>>(iter: T) -> Self { Self::from_iter(iter, DType::Utf8(Nullability::Nullable)) } diff --git a/vortex-array/src/arrays/varbin/builder.rs b/vortex-array/src/arrays/varbin/builder.rs index 8dd5066a889..69054712a0b 100644 --- a/vortex-array/src/arrays/varbin/builder.rs +++ b/vortex-array/src/arrays/varbin/builder.rs @@ -6,7 +6,9 @@ use vortex_buffer::BitBufferMut; use vortex_buffer::BufferMut; use vortex_error::vortex_panic; +use crate::DynArray; use crate::IntoArray; +use crate::arrays::Primitive; use crate::arrays::PrimitiveArray; use crate::arrays::VarBinArray; use crate::dtype::DType; @@ -14,6 +16,7 @@ use crate::dtype::IntegerPType; use crate::expr::stats::Precision; use crate::expr::stats::Stat; use crate::validity::Validity; +use crate::vtable::VTable; pub struct VarBinBuilder { offsets: BufferMut, @@ -100,12 +103,15 @@ impl VarBinBuilder { // this stat eagerly. This avoids an O(n) recomputation when the array is // deserialized and VarBinArray::validate checks sortedness. debug_assert!( - offsets.statistics().compute_is_sorted().unwrap_or(false), + offsets + .clone() + .into_array() + .statistics() + .compute_is_sorted() + .unwrap_or(false), "VarBinBuilder offsets must be sorted" ); - offsets - .statistics() - .set(Stat::IsSorted, Precision::Exact(true.into())); + Primitive::stats(&offsets).set(Stat::IsSorted, Precision::Exact(true.into())); // SAFETY: The builder maintains all invariants: // - Offsets are monotonically increasing starting from 0 (guaranteed by builder logic). diff --git a/vortex-array/src/arrays/varbin/compute/cast.rs b/vortex-array/src/arrays/varbin/compute/cast.rs index 4d1f46084ac..05af7ac5d35 100644 --- a/vortex-array/src/arrays/varbin/compute/cast.rs +++ b/vortex-array/src/arrays/varbin/compute/cast.rs @@ -9,10 +9,10 @@ use crate::arrays::VarBin; use crate::arrays::VarBinArray; use crate::dtype::DType; use crate::scalar_fn::fns::cast::CastReduce; -use crate::vtable::ValidityHelper; +use crate::vtable::Array; impl CastReduce for VarBin { - fn cast(array: &VarBinArray, dtype: &DType) -> VortexResult> { + fn cast(array: &Array, dtype: &DType) -> VortexResult> { if !array.dtype().eq_ignore_nullability(dtype) { return Ok(None); } diff --git a/vortex-array/src/arrays/varbin/compute/compare.rs b/vortex-array/src/arrays/varbin/compute/compare.rs index 07af710f762..2b67bd29d1a 100644 --- a/vortex-array/src/arrays/varbin/compute/compare.rs +++ b/vortex-array/src/arrays/varbin/compute/compare.rs @@ -17,7 +17,6 @@ use crate::IntoArray; use crate::arrays::BoolArray; use crate::arrays::PrimitiveArray; use crate::arrays::VarBin; -use crate::arrays::VarBinArray; use crate::arrays::VarBinViewArray; use crate::arrow::Datum; use crate::arrow::from_arrow_array_with_len; @@ -28,12 +27,12 @@ use crate::match_each_integer_ptype; use crate::scalar_fn::fns::binary::CompareKernel; use crate::scalar_fn::fns::operators::CompareOperator; use crate::scalar_fn::fns::operators::Operator; -use crate::vtable::ValidityHelper; +use crate::vtable::Array; // This implementation exists so we can have custom translation of RHS to arrow that's not the same as IntoCanonical impl CompareKernel for VarBin { fn compare( - lhs: &VarBinArray, + lhs: &Array, rhs: &ArrayRef, operator: CompareOperator, ctx: &mut ExecutionCtx, diff --git a/vortex-array/src/arrays/varbin/compute/filter.rs b/vortex-array/src/arrays/varbin/compute/filter.rs index ba41c60f273..09dae40b4bf 100644 --- a/vortex-array/src/arrays/varbin/compute/filter.rs +++ b/vortex-array/src/arrays/varbin/compute/filter.rs @@ -23,11 +23,11 @@ use crate::dtype::DType; use crate::dtype::IntegerPType; use crate::match_each_integer_ptype; use crate::validity::Validity; -use crate::vtable::ValidityHelper; +use crate::vtable::Array; impl FilterKernel for VarBin { fn filter( - array: &VarBinArray, + array: &Array, mask: &Mask, ctx: &mut ExecutionCtx, ) -> VortexResult> { @@ -36,7 +36,7 @@ impl FilterKernel for VarBin { } fn filter_select_var_bin( - arr: &VarBinArray, + arr: &Array, mask: &Mask, ctx: &mut ExecutionCtx, ) -> VortexResult { @@ -55,7 +55,7 @@ fn filter_select_var_bin( } fn filter_select_var_bin_by_slice( - values: &VarBinArray, + values: &Array, mask_slices: &[(usize, usize)], selection_count: usize, ctx: &mut ExecutionCtx, @@ -67,7 +67,7 @@ fn filter_select_var_bin_by_slice( offsets.as_slice::(), values.bytes().as_slice(), mask_slices, - values.validity_mask()?, + values.validity_mask(), selection_count, ) }) @@ -154,7 +154,7 @@ fn update_non_nullable_slice( } fn filter_select_var_bin_by_index( - values: &VarBinArray, + values: &Array, mask_indices: &[usize], selection_count: usize, ctx: &mut ExecutionCtx, diff --git a/vortex-array/src/arrays/varbin/compute/mask.rs b/vortex-array/src/arrays/varbin/compute/mask.rs index 3169adaf0ff..60d80400766 100644 --- a/vortex-array/src/arrays/varbin/compute/mask.rs +++ b/vortex-array/src/arrays/varbin/compute/mask.rs @@ -9,10 +9,10 @@ use crate::arrays::VarBin; use crate::arrays::VarBinArray; use crate::scalar_fn::fns::mask::MaskReduce; use crate::validity::Validity; -use crate::vtable::ValidityHelper; +use crate::vtable::Array; impl MaskReduce for VarBin { - fn mask(array: &VarBinArray, mask: &ArrayRef) -> VortexResult> { + fn mask(array: &Array, mask: &ArrayRef) -> VortexResult> { Ok(Some( VarBinArray::try_new( array.offsets().clone(), diff --git a/vortex-array/src/arrays/varbin/compute/slice.rs b/vortex-array/src/arrays/varbin/compute/slice.rs index 5c14088c324..6e65e09bbaa 100644 --- a/vortex-array/src/arrays/varbin/compute/slice.rs +++ b/vortex-array/src/arrays/varbin/compute/slice.rs @@ -10,21 +10,22 @@ use crate::IntoArray; use crate::arrays::VarBin; use crate::arrays::VarBinArray; use crate::arrays::slice::SliceReduce; +use crate::vtable::Array; impl SliceReduce for VarBin { - fn slice(array: &Self::Array, range: Range) -> VortexResult> { + fn slice(array: &Array, range: Range) -> VortexResult> { VarBin::_slice(array, range).map(Some) } } impl VarBin { - pub fn _slice(array: &VarBinArray, range: Range) -> VortexResult { + pub fn _slice(array: &Array, range: Range) -> VortexResult { Ok(unsafe { VarBinArray::new_unchecked_from_handle( array.offsets().slice(range.start..range.end + 1)?, array.bytes_handle().clone(), array.dtype().clone(), - array.validity()?.slice(range)?, + array.validity().slice(range)?, ) .into_array() }) diff --git a/vortex-array/src/arrays/varbin/compute/take.rs b/vortex-array/src/arrays/varbin/compute/take.rs index 48ebf506d02..8fd91af909f 100644 --- a/vortex-array/src/arrays/varbin/compute/take.rs +++ b/vortex-array/src/arrays/varbin/compute/take.rs @@ -20,10 +20,11 @@ use crate::dtype::IntegerPType; use crate::executor::ExecutionCtx; use crate::match_each_integer_ptype; use crate::validity::Validity; +use crate::vtable::Array; impl TakeExecute for VarBin { fn take( - array: &VarBinArray, + array: &Array, indices: &ArrayRef, ctx: &mut ExecutionCtx, ) -> VortexResult> { @@ -35,8 +36,8 @@ impl TakeExecute for VarBin { .dtype() .clone() .union_nullability(indices.dtype().nullability()); - let array_validity = array.validity_mask()?; - let indices_validity = indices.validity_mask()?; + let array_validity = array.validity_mask(); + let indices_validity = indices.validity_mask(); let array = match_each_integer_ptype!(indices.ptype(), |I| { // On take, offsets get widened to either 32- or 64-bit based on the original type, diff --git a/vortex-array/src/arrays/varbin/mod.rs b/vortex-array/src/arrays/varbin/mod.rs index 6cdfb228a6d..dc3fa89f746 100644 --- a/vortex-array/src/arrays/varbin/mod.rs +++ b/vortex-array/src/arrays/varbin/mod.rs @@ -2,7 +2,8 @@ // SPDX-FileCopyrightText: Copyright the Vortex contributors mod array; -pub use array::VarBinArray; +pub use array::VarBinData; +pub use vtable::VarBinArray; pub(crate) mod compute; diff --git a/vortex-array/src/arrays/varbin/vtable/canonical.rs b/vortex-array/src/arrays/varbin/vtable/canonical.rs index 17dae4a4fbe..6347bd59479 100644 --- a/vortex-array/src/arrays/varbin/vtable/canonical.rs +++ b/vortex-array/src/arrays/varbin/vtable/canonical.rs @@ -22,7 +22,7 @@ pub(crate) fn varbin_to_canonical( array: &VarBinArray, ctx: &mut ExecutionCtx, ) -> VortexResult { - let (dtype, bytes, offsets, validity) = array.clone().into_parts(); + let (dtype, bytes, offsets, validity) = array.clone().into_inner().into_parts(); let offsets = offsets.execute::(ctx)?; diff --git a/vortex-array/src/arrays/varbin/vtable/mod.rs b/vortex-array/src/arrays/varbin/vtable/mod.rs index 4980994dbfb..104a27c0bd9 100644 --- a/vortex-array/src/arrays/varbin/vtable/mod.rs +++ b/vortex-array/src/arrays/varbin/vtable/mod.rs @@ -16,7 +16,7 @@ use crate::ExecutionResult; use crate::IntoArray; use crate::ProstMetadata; use crate::SerializeMetadata; -use crate::arrays::VarBinArray; +use crate::arrays::varbin::VarBinData; use crate::buffer::BufferHandle; use crate::dtype::DType; use crate::dtype::Nullability; @@ -44,9 +44,9 @@ use crate::Precision; use crate::arrays::varbin::compute::rules::PARENT_RULES; use crate::hash::ArrayEq; use crate::hash::ArrayHash; -use crate::stats::StatsSetRef; +use crate::stats::ArrayStats; -vtable!(VarBin); +vtable!(VarBin, VarBin, VarBinData); #[derive(Clone, prost::Message)] pub struct VarBinMetadata { @@ -55,12 +55,12 @@ pub struct VarBinMetadata { } impl VTable for VarBin { - type Array = VarBinArray; + type Array = VarBinData; type Metadata = ProstMetadata; type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromValidityHelper; - fn vtable(_array: &Self::Array) -> &Self { + fn vtable(_array: &VarBinData) -> &Self { &VarBin } @@ -68,55 +68,55 @@ impl VTable for VarBin { Self::ID } - fn len(array: &VarBinArray) -> usize { + fn len(array: &VarBinData) -> usize { array.offsets().len().saturating_sub(1) } - fn dtype(array: &VarBinArray) -> &DType { + fn dtype(array: &VarBinData) -> &DType { &array.dtype } - fn stats(array: &VarBinArray) -> StatsSetRef<'_> { - array.stats_set.to_ref(array.as_ref()) + fn stats(array: &VarBinData) -> &ArrayStats { + &array.stats_set } - fn array_hash(array: &VarBinArray, state: &mut H, precision: Precision) { + fn array_hash(array: &Array, state: &mut H, precision: Precision) { array.dtype.hash(state); array.bytes().array_hash(state, precision); array.offsets().array_hash(state, precision); array.validity.array_hash(state, precision); } - fn array_eq(array: &VarBinArray, other: &VarBinArray, precision: Precision) -> bool { + fn array_eq(array: &Array, other: &Array, precision: Precision) -> bool { array.dtype == other.dtype && array.bytes().array_eq(other.bytes(), precision) && array.offsets().array_eq(other.offsets(), precision) && array.validity.array_eq(&other.validity, precision) } - fn nbuffers(_array: &VarBinArray) -> usize { + fn nbuffers(_array: &Array) -> usize { 1 } - fn buffer(array: &VarBinArray, idx: usize) -> BufferHandle { + fn buffer(array: &Array, idx: usize) -> BufferHandle { match idx { 0 => array.bytes_handle().clone(), _ => vortex_panic!("VarBinArray buffer index {idx} out of bounds"), } } - fn buffer_name(_array: &VarBinArray, idx: usize) -> Option { + fn buffer_name(_array: &Array, idx: usize) -> Option { match idx { 0 => Some("bytes".to_string()), _ => vortex_panic!("VarBinArray buffer_name index {idx} out of bounds"), } } - fn nchildren(array: &VarBinArray) -> usize { + fn nchildren(array: &Array) -> usize { 1 + validity_nchildren(&array.validity) } - fn child(array: &VarBinArray, idx: usize) -> ArrayRef { + fn child(array: &Array, idx: usize) -> ArrayRef { match idx { 0 => array.offsets().clone(), 1 => validity_to_child(&array.validity, array.len()) @@ -125,7 +125,7 @@ impl VTable for VarBin { } } - fn child_name(_array: &VarBinArray, idx: usize) -> String { + fn child_name(_array: &Array, idx: usize) -> String { match idx { 0 => "offsets".to_string(), 1 => "validity".to_string(), @@ -133,7 +133,7 @@ impl VTable for VarBin { } } - fn metadata(array: &VarBinArray) -> VortexResult { + fn metadata(array: &Array) -> VortexResult { Ok(ProstMetadata(VarBinMetadata { offsets_ptype: PType::try_from(array.offsets().dtype()) .vortex_expect("Must be a valid PType") as i32, @@ -162,7 +162,7 @@ impl VTable for VarBin { metadata: &Self::Metadata, buffers: &[BufferHandle], children: &dyn ArrayChildren, - ) -> VortexResult { + ) -> VortexResult { let validity = if children.len() == 1 { Validity::from(dtype.nullability()) } else if children.len() == 2 { @@ -183,7 +183,7 @@ impl VTable for VarBin { } let bytes = buffers[0].clone().try_to_host_sync()?; - VarBinArray::try_new(offsets, bytes, dtype.clone(), validity) + VarBinData::try_new(offsets, bytes, dtype.clone(), validity) } fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { diff --git a/vortex-array/src/arrays/varbin/vtable/operations.rs b/vortex-array/src/arrays/varbin/vtable/operations.rs index caf484be143..f18ac59f9de 100644 --- a/vortex-array/src/arrays/varbin/vtable/operations.rs +++ b/vortex-array/src/arrays/varbin/vtable/operations.rs @@ -5,14 +5,14 @@ use vortex_error::VortexResult; use crate::ExecutionCtx; use crate::arrays::VarBin; -use crate::arrays::VarBinArray; use crate::arrays::varbin::varbin_scalar; use crate::scalar::Scalar; +use crate::vtable::Array; use crate::vtable::OperationsVTable; impl OperationsVTable for VarBin { fn scalar_at( - array: &VarBinArray, + array: &Array, index: usize, _ctx: &mut ExecutionCtx, ) -> VortexResult { diff --git a/vortex-array/src/arrays/varbin/vtable/validity.rs b/vortex-array/src/arrays/varbin/vtable/validity.rs index f436968206c..6c4b9e92c39 100644 --- a/vortex-array/src/arrays/varbin/vtable/validity.rs +++ b/vortex-array/src/arrays/varbin/vtable/validity.rs @@ -1,11 +1,11 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors -use crate::arrays::VarBinArray; +use crate::arrays::varbin::VarBinData; use crate::validity::Validity; use crate::vtable::ValidityHelper; -impl ValidityHelper for VarBinArray { +impl ValidityHelper for VarBinData { fn validity(&self) -> &Validity { &self.validity } diff --git a/vortex-array/src/arrays/varbinview/accessor.rs b/vortex-array/src/arrays/varbinview/accessor.rs index d494c4711a7..912d7ee8de3 100644 --- a/vortex-array/src/arrays/varbinview/accessor.rs +++ b/vortex-array/src/arrays/varbinview/accessor.rs @@ -7,7 +7,6 @@ use crate::ToCanonical; use crate::accessor::ArrayAccessor; use crate::arrays::VarBinViewArray; use crate::validity::Validity; -use crate::vtable::ValidityHelper; impl ArrayAccessor<[u8]> for VarBinViewArray { fn with_iterator FnOnce(&mut dyn Iterator>) -> R, R>( diff --git a/vortex-array/src/arrays/varbinview/array.rs b/vortex-array/src/arrays/varbinview/array.rs index 0c1276c928f..936fd04c240 100644 --- a/vortex-array/src/arrays/varbinview/array.rs +++ b/vortex-array/src/arrays/varbinview/array.rs @@ -1,6 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors +use std::mem::size_of; use std::sync::Arc; use vortex_buffer::Alignment; @@ -12,7 +13,9 @@ use vortex_error::vortex_bail; use vortex_error::vortex_ensure; use vortex_error::vortex_err; use vortex_error::vortex_panic; +use vortex_mask::Mask; +use crate::arrays::VarBinView; use crate::arrays::varbinview::BinaryView; use crate::buffer::BufferHandle; use crate::builders::ArrayBuilder; @@ -21,6 +24,7 @@ use crate::dtype::DType; use crate::dtype::Nullability; use crate::stats::ArrayStats; use crate::validity::Validity; +use crate::vtable::Array; /// A variable-length binary view array that stores strings and binary data efficiently. /// @@ -82,7 +86,7 @@ use crate::validity::Validity; /// assert_eq!(second.as_slice(), b"this string is outlined"); // Long string /// ``` #[derive(Clone, Debug)] -pub struct VarBinViewArray { +pub struct VarBinViewData { pub(super) dtype: DType, pub(super) buffers: Arc<[BufferHandle]>, pub(super) views: BufferHandle, @@ -97,7 +101,7 @@ pub struct VarBinViewArrayParts { pub validity: Validity, } -impl VarBinViewArray { +impl VarBinViewData { /// Creates a new [`VarBinViewArray`]. /// /// # Panics @@ -309,7 +313,7 @@ impl VarBinViewArray { let end_offset = start_offset.saturating_add(view.size as usize); let buf = buffers.get(buf_index).ok_or_else(|| - vortex_err!(InvalidArgument: "view at index {idx} references invalid buffer: {buf_index} out of bounds for VarBinViewArray with {} buffers", + vortex_err!(InvalidArgument: "view at index {idx} references invalid buffer: {buf_index} out of bounds for VarBinViewData with {} buffers", buffers.len()))?; vortex_ensure!( @@ -342,6 +346,32 @@ impl VarBinViewArray { Ok(()) } + /// Returns the length of this array. + pub fn len(&self) -> usize { + self.views.len() / size_of::() + } + + /// Returns the [`DType`] of this array. + pub fn dtype(&self) -> &DType { + &self.dtype + } + + /// Returns `true` if this array is empty. + pub fn is_empty(&self) -> bool { + self.len() == 0 + } + + /// Returns the [`Validity`] of this array. + #[allow(clippy::same_name_method)] + pub fn validity(&self) -> &Validity { + &self.validity + } + + /// Returns the validity as a [`Mask`]. + pub fn validity_mask(&self) -> Mask { + self.validity.to_mask(self.len()) + } + /// Splits the array into owned parts pub fn into_parts(self) -> VarBinViewArrayParts { VarBinViewArrayParts { @@ -440,7 +470,7 @@ impl VarBinViewArray { } } - builder.finish_into_varbinview() + builder.finish_into_varbinview().into_inner() } pub fn from_iter_str, I: IntoIterator>(iter: I) -> Self { @@ -454,7 +484,7 @@ impl VarBinViewArray { builder.append_value(item.as_ref()); } - builder.finish_into_varbinview() + builder.finish_into_varbinview().into_inner() } pub fn from_iter_nullable_str, I: IntoIterator>>( @@ -473,7 +503,7 @@ impl VarBinViewArray { } } - builder.finish_into_varbinview() + builder.finish_into_varbinview().into_inner() } pub fn from_iter_bin, I: IntoIterator>(iter: I) -> Self { @@ -487,7 +517,7 @@ impl VarBinViewArray { builder.append_value(item.as_ref()); } - builder.finish_into_varbinview() + builder.finish_into_varbinview().into_inner() } pub fn from_iter_nullable_bin, I: IntoIterator>>( @@ -506,29 +536,99 @@ impl VarBinViewArray { } } - builder.finish_into_varbinview() + builder.finish_into_varbinview().into_inner() + } +} + +impl Array { + /// Construct a [`VarBinViewArray`] from an iterator of optional byte slices. + pub fn from_iter, I: IntoIterator>>( + iter: I, + dtype: DType, + ) -> Self { + Array::from_inner(VarBinViewData::from_iter(iter, dtype)) + } + + pub fn from_iter_str, I: IntoIterator>(iter: I) -> Self { + Array::from_inner(VarBinViewData::from_iter_str(iter)) + } + + pub fn from_iter_nullable_str, I: IntoIterator>>( + iter: I, + ) -> Self { + Array::from_inner(VarBinViewData::from_iter_nullable_str(iter)) + } + + pub fn from_iter_bin, I: IntoIterator>(iter: I) -> Self { + Array::from_inner(VarBinViewData::from_iter_bin(iter)) + } + + pub fn from_iter_nullable_bin, I: IntoIterator>>( + iter: I, + ) -> Self { + Array::from_inner(VarBinViewData::from_iter_nullable_bin(iter)) + } + + /// Creates a new [`VarBinViewArray`] without validation. + /// + /// # Safety + /// + /// See [`VarBinViewData::new_unchecked`]. + pub unsafe fn new_unchecked( + views: Buffer, + buffers: Arc<[ByteBuffer]>, + dtype: DType, + validity: Validity, + ) -> Self { + Array::from_inner(unsafe { VarBinViewData::new_unchecked(views, buffers, dtype, validity) }) + } + + /// Creates a new [`VarBinViewArray`] with device or host memory. + pub fn new_handle( + views: BufferHandle, + buffers: Arc<[BufferHandle]>, + dtype: DType, + validity: Validity, + ) -> Self { + Array::from_inner(VarBinViewData::new_handle(views, buffers, dtype, validity)) + } + + /// Construct a new array from `BufferHandle`s without validation. + /// + /// # Safety + /// + /// See [`VarBinViewData::new_handle_unchecked`]. + pub unsafe fn new_handle_unchecked( + views: BufferHandle, + buffers: Arc<[BufferHandle]>, + dtype: DType, + validity: Validity, + ) -> Self { + Array::from_inner(unsafe { + VarBinViewData::new_handle_unchecked(views, buffers, dtype, validity) + }) } } -impl<'a> FromIterator> for VarBinViewArray { +impl<'a> FromIterator> for VarBinViewData { fn from_iter>>(iter: T) -> Self { Self::from_iter_nullable_bin(iter) } } -impl FromIterator>> for VarBinViewArray { +impl FromIterator>> for VarBinViewData { fn from_iter>>>(iter: T) -> Self { Self::from_iter_nullable_bin(iter) } } -impl FromIterator> for VarBinViewArray { +impl FromIterator> for VarBinViewData { fn from_iter>>(iter: T) -> Self { Self::from_iter_nullable_str(iter) } } -impl<'a> FromIterator> for VarBinViewArray { +impl<'a> FromIterator> for VarBinViewData { fn from_iter>>(iter: T) -> Self { Self::from_iter_nullable_str(iter) } diff --git a/vortex-array/src/arrays/varbinview/compact.rs b/vortex-array/src/arrays/varbinview/compact.rs index e446f6ae789..f48925eb77a 100644 --- a/vortex-array/src/arrays/varbinview/compact.rs +++ b/vortex-array/src/arrays/varbinview/compact.rs @@ -63,7 +63,7 @@ impl VarBinViewArray { where F: FnMut(&Ref), { - match self.validity_mask()? { + match self.validity_mask() { Mask::AllTrue(_) => { for &view in self.views().iter() { if !view.is_inlined() { diff --git a/vortex-array/src/arrays/varbinview/compute/cast.rs b/vortex-array/src/arrays/varbinview/compute/cast.rs index 5486e576740..ae6dc87911d 100644 --- a/vortex-array/src/arrays/varbinview/compute/cast.rs +++ b/vortex-array/src/arrays/varbinview/compute/cast.rs @@ -9,10 +9,10 @@ use crate::arrays::VarBinView; use crate::arrays::VarBinViewArray; use crate::dtype::DType; use crate::scalar_fn::fns::cast::CastReduce; -use crate::vtable::ValidityHelper; +use crate::vtable::Array; impl CastReduce for VarBinView { - fn cast(array: &VarBinViewArray, dtype: &DType) -> VortexResult> { + fn cast(array: &Array, dtype: &DType) -> VortexResult> { if !array.dtype().eq_ignore_nullability(dtype) { return Ok(None); } diff --git a/vortex-array/src/arrays/varbinview/compute/mask.rs b/vortex-array/src/arrays/varbinview/compute/mask.rs index dae65ab40bd..5b24733ab6d 100644 --- a/vortex-array/src/arrays/varbinview/compute/mask.rs +++ b/vortex-array/src/arrays/varbinview/compute/mask.rs @@ -9,10 +9,10 @@ use crate::arrays::VarBinView; use crate::arrays::VarBinViewArray; use crate::scalar_fn::fns::mask::MaskReduce; use crate::validity::Validity; -use crate::vtable::ValidityHelper; +use crate::vtable::Array; impl MaskReduce for VarBinView { - fn mask(array: &VarBinViewArray, mask: &ArrayRef) -> VortexResult> { + fn mask(array: &Array, mask: &ArrayRef) -> VortexResult> { // SAFETY: masking the validity does not affect the invariants unsafe { Ok(Some( diff --git a/vortex-array/src/arrays/varbinview/compute/slice.rs b/vortex-array/src/arrays/varbinview/compute/slice.rs index 02582841601..71e69c6c849 100644 --- a/vortex-array/src/arrays/varbinview/compute/slice.rs +++ b/vortex-array/src/arrays/varbinview/compute/slice.rs @@ -12,9 +12,10 @@ use crate::arrays::VarBinView; use crate::arrays::VarBinViewArray; use crate::arrays::slice::SliceReduce; use crate::arrays::varbinview::BinaryView; +use crate::vtable::Array; impl SliceReduce for VarBinView { - fn slice(array: &Self::Array, range: Range) -> VortexResult> { + fn slice(array: &Array, range: Range) -> VortexResult> { Ok(Some( VarBinViewArray::new_handle( array @@ -22,7 +23,7 @@ impl SliceReduce for VarBinView { .slice_typed::(range.clone()), Arc::clone(array.buffers()), array.dtype().clone(), - array.validity()?.slice(range)?, + array.validity().slice(range)?, ) .into_array(), )) diff --git a/vortex-array/src/arrays/varbinview/compute/take.rs b/vortex-array/src/arrays/varbinview/compute/take.rs index b3620aaaaf0..a1a091df541 100644 --- a/vortex-array/src/arrays/varbinview/compute/take.rs +++ b/vortex-array/src/arrays/varbinview/compute/take.rs @@ -19,19 +19,19 @@ use crate::arrays::varbinview::BinaryView; use crate::buffer::BufferHandle; use crate::executor::ExecutionCtx; use crate::match_each_integer_ptype; -use crate::vtable::ValidityHelper; +use crate::vtable::Array; impl TakeExecute for VarBinView { /// Take involves creating a new array that references the old array, just with the given set of views. fn take( - array: &VarBinViewArray, + array: &Array, indices: &ArrayRef, ctx: &mut ExecutionCtx, ) -> VortexResult> { let validity = array.validity().take(indices)?; let indices = indices.to_array().execute::(ctx)?; - let indices_mask = indices.validity_mask()?; + let indices_mask = indices.validity_mask(); let views_buffer = match_each_integer_ptype!(indices.ptype(), |I| { take_views(array.views(), indices.as_slice::(), &indices_mask) }); diff --git a/vortex-array/src/arrays/varbinview/compute/zip.rs b/vortex-array/src/arrays/varbinview/compute/zip.rs index b4211c726a2..00c702ae1ae 100644 --- a/vortex-array/src/arrays/varbinview/compute/zip.rs +++ b/vortex-array/src/arrays/varbinview/compute/zip.rs @@ -18,12 +18,13 @@ use crate::arrays::varbinview::BinaryView; use crate::builders::DeduplicatedBuffers; use crate::builders::LazyBitBufferBuilder; use crate::scalar_fn::fns::zip::ZipKernel; +use crate::vtable::Array; // A dedicated VarBinView zip kernel that builds the result directly by adjusting views and validity, // instead of routing through the generic builder (which would redo buffer lookups per mask slice). impl ZipKernel for VarBinView { fn zip( - if_true: &VarBinViewArray, + if_true: &Array, if_false: &ArrayRef, mask: &ArrayRef, ctx: &mut ExecutionCtx, @@ -52,8 +53,8 @@ impl ZipKernel for VarBinView { let mut views_builder = BufferMut::::with_capacity(len); let mut validity_builder = LazyBitBufferBuilder::new(len); - let true_validity = if_true.validity_mask()?; - let false_validity = if_false.validity_mask()?; + let true_validity = if_true.validity_mask(); + let false_validity = if_false.validity_mask(); let mask = mask.try_to_mask_fill_null_false(ctx)?; match mask.slices() { @@ -127,7 +128,7 @@ impl ZipKernel for VarBinView { } fn push_range( - array: &VarBinViewArray, + array: &Array, buffer_lookup: &[u32], validity: &Mask, range: Range, diff --git a/vortex-array/src/arrays/varbinview/mod.rs b/vortex-array/src/arrays/varbinview/mod.rs index b0520591e0c..d29fd5bf3e5 100644 --- a/vortex-array/src/arrays/varbinview/mod.rs +++ b/vortex-array/src/arrays/varbinview/mod.rs @@ -2,8 +2,9 @@ // SPDX-FileCopyrightText: Copyright the Vortex contributors mod array; -pub use array::VarBinViewArray; pub use array::VarBinViewArrayParts; +pub use array::VarBinViewData; +pub use vtable::VarBinViewArray; mod accessor; pub(crate) mod compact; diff --git a/vortex-array/src/arrays/varbinview/vtable/mod.rs b/vortex-array/src/arrays/varbinview/vtable/mod.rs index 212c1c2bb6c..4bae782d11c 100644 --- a/vortex-array/src/arrays/varbinview/vtable/mod.rs +++ b/vortex-array/src/arrays/varbinview/vtable/mod.rs @@ -19,15 +19,15 @@ use crate::EmptyMetadata; use crate::ExecutionCtx; use crate::ExecutionResult; use crate::Precision; -use crate::arrays::VarBinViewArray; use crate::arrays::varbinview::BinaryView; +use crate::arrays::varbinview::VarBinViewData; use crate::arrays::varbinview::compute::rules::PARENT_RULES; use crate::buffer::BufferHandle; use crate::dtype::DType; use crate::hash::ArrayEq; use crate::hash::ArrayHash; use crate::serde::ArrayChildren; -use crate::stats::StatsSetRef; +use crate::stats::ArrayStats; use crate::validity::Validity; use crate::vtable; use crate::vtable::Array; @@ -39,7 +39,7 @@ use crate::vtable::validity_to_child; mod kernel; mod operations; mod validity; -vtable!(VarBinView); +vtable!(VarBinView, VarBinView, VarBinViewData); #[derive(Clone, Debug)] pub struct VarBinView; @@ -49,12 +49,12 @@ impl VarBinView { } impl VTable for VarBinView { - type Array = VarBinViewArray; + type Array = VarBinViewData; type Metadata = EmptyMetadata; type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromValidityHelper; - fn vtable(_array: &Self::Array) -> &Self { + fn vtable(_array: &VarBinViewData) -> &Self { &VarBinView } @@ -62,23 +62,19 @@ impl VTable for VarBinView { Self::ID } - fn len(array: &VarBinViewArray) -> usize { + fn len(array: &VarBinViewData) -> usize { array.views_handle().len() / size_of::() } - fn dtype(array: &VarBinViewArray) -> &DType { + fn dtype(array: &VarBinViewData) -> &DType { &array.dtype } - fn stats(array: &VarBinViewArray) -> StatsSetRef<'_> { - array.stats_set.to_ref(array.as_ref()) + fn stats(array: &VarBinViewData) -> &ArrayStats { + &array.stats_set } - fn array_hash( - array: &VarBinViewArray, - state: &mut H, - precision: Precision, - ) { + fn array_hash(array: &Array, state: &mut H, precision: Precision) { array.dtype.hash(state); for buffer in array.buffers.iter() { buffer.array_hash(state, precision); @@ -87,7 +83,7 @@ impl VTable for VarBinView { array.validity.array_hash(state, precision); } - fn array_eq(array: &VarBinViewArray, other: &VarBinViewArray, precision: Precision) -> bool { + fn array_eq(array: &Array, other: &Array, precision: Precision) -> bool { array.dtype == other.dtype && array.buffers.len() == other.buffers.len() && array @@ -99,11 +95,11 @@ impl VTable for VarBinView { && array.validity.array_eq(&other.validity, precision) } - fn nbuffers(array: &VarBinViewArray) -> usize { + fn nbuffers(array: &Array) -> usize { array.buffers().len() + 1 } - fn buffer(array: &VarBinViewArray, idx: usize) -> BufferHandle { + fn buffer(array: &Array, idx: usize) -> BufferHandle { let ndata = array.buffers().len(); if idx < ndata { array.buffers()[idx].clone() @@ -114,7 +110,7 @@ impl VTable for VarBinView { } } - fn buffer_name(array: &VarBinViewArray, idx: usize) -> Option { + fn buffer_name(array: &Array, idx: usize) -> Option { let ndata = array.buffers().len(); if idx < ndata { Some(format!("buffer_{idx}")) @@ -125,11 +121,11 @@ impl VTable for VarBinView { } } - fn nchildren(array: &VarBinViewArray) -> usize { + fn nchildren(array: &Array) -> usize { validity_nchildren(&array.validity) } - fn child(array: &VarBinViewArray, idx: usize) -> ArrayRef { + fn child(array: &Array, idx: usize) -> ArrayRef { match idx { 0 => validity_to_child(&array.validity, array.len()) .vortex_expect("VarBinViewArray validity child out of bounds"), @@ -137,14 +133,14 @@ impl VTable for VarBinView { } } - fn child_name(_array: &VarBinViewArray, idx: usize) -> String { + fn child_name(_array: &Array, idx: usize) -> String { match idx { 0 => "validity".to_string(), _ => vortex_panic!("VarBinViewArray child_name index {idx} out of bounds"), } } - fn metadata(_array: &VarBinViewArray) -> VortexResult { + fn metadata(_array: &Array) -> VortexResult { Ok(EmptyMetadata) } @@ -168,7 +164,7 @@ impl VTable for VarBinView { _metadata: &Self::Metadata, buffers: &[BufferHandle], children: &dyn ArrayChildren, - ) -> VortexResult { + ) -> VortexResult { let Some((views_handle, data_handles)) = buffers.split_last() else { vortex_bail!("Expected at least 1 buffer, got 0"); }; @@ -196,7 +192,7 @@ impl VTable for VarBinView { // If any buffer is on device, skip host validation and use try_new_handle. if buffers.iter().any(|b| b.is_on_device()) { - return VarBinViewArray::try_new_handle( + return VarBinViewData::try_new_handle( views_handle.clone(), Arc::from(data_handles.to_vec()), dtype.clone(), @@ -210,7 +206,7 @@ impl VTable for VarBinView { .collect::>(); let views = Buffer::::from_byte_buffer(views_handle.clone().as_host().clone()); - VarBinViewArray::try_new(views, Arc::from(data_buffers), dtype.clone(), validity) + VarBinViewData::try_new(views, Arc::from(data_buffers), dtype.clone(), validity) } fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { diff --git a/vortex-array/src/arrays/varbinview/vtable/operations.rs b/vortex-array/src/arrays/varbinview/vtable/operations.rs index 095015c449a..eb18be44489 100644 --- a/vortex-array/src/arrays/varbinview/vtable/operations.rs +++ b/vortex-array/src/arrays/varbinview/vtable/operations.rs @@ -5,14 +5,14 @@ use vortex_error::VortexResult; use crate::ExecutionCtx; use crate::arrays::VarBinView; -use crate::arrays::VarBinViewArray; use crate::arrays::varbin::varbin_scalar; use crate::scalar::Scalar; +use crate::vtable::Array; use crate::vtable::OperationsVTable; impl OperationsVTable for VarBinView { fn scalar_at( - array: &VarBinViewArray, + array: &Array, index: usize, _ctx: &mut ExecutionCtx, ) -> VortexResult { diff --git a/vortex-array/src/arrays/varbinview/vtable/validity.rs b/vortex-array/src/arrays/varbinview/vtable/validity.rs index bc8410ba5c0..85b42dc9ff2 100644 --- a/vortex-array/src/arrays/varbinview/vtable/validity.rs +++ b/vortex-array/src/arrays/varbinview/vtable/validity.rs @@ -1,11 +1,11 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors -use crate::arrays::VarBinViewArray; +use crate::arrays::varbinview::VarBinViewData; use crate::validity::Validity; use crate::vtable::ValidityHelper; -impl ValidityHelper for VarBinViewArray { +impl ValidityHelper for VarBinViewData { fn validity(&self) -> &Validity { &self.validity } diff --git a/vortex-array/src/arrays/variant/mod.rs b/vortex-array/src/arrays/variant/mod.rs index eae22a0eff4..37dde56ab22 100644 --- a/vortex-array/src/arrays/variant/mod.rs +++ b/vortex-array/src/arrays/variant/mod.rs @@ -4,7 +4,11 @@ mod vtable; pub use self::vtable::Variant; +pub use self::vtable::VariantArray; use crate::ArrayRef; +use crate::dtype::DType; +use crate::stats::ArrayStats; +use crate::vtable::Array; /// The canonical in-memory representation of variant (semi-structured) data. /// @@ -15,14 +19,31 @@ use crate::ArrayRef; /// always the child's dtype. The child's validity determines which rows are /// null. #[derive(Clone, Debug)] -pub struct VariantArray { +pub struct VariantData { child: ArrayRef, + pub(crate) stats_set: ArrayStats, } -impl VariantArray { +impl VariantData { /// Creates a new VariantArray. Nullability comes from the child's dtype. pub fn new(child: ArrayRef) -> Self { - Self { child } + let stats_set = child.statistics().to_array_stats(); + Self { child, stats_set } + } + + /// Returns the length of this array. + pub fn len(&self) -> usize { + self.child.len() + } + + /// Returns the [`DType`] of this array. + pub fn dtype(&self) -> &DType { + self.child.dtype() + } + + /// Returns `true` if this array is empty. + pub fn is_empty(&self) -> bool { + self.len() == 0 } /// Returns a reference to the underlying child array. @@ -30,3 +51,10 @@ impl VariantArray { &self.child } } + +impl Array { + /// Creates a new `VariantArray`. + pub fn new(child: ArrayRef) -> Self { + Array::from_inner(VariantData::new(child)) + } +} diff --git a/vortex-array/src/arrays/variant/vtable/mod.rs b/vortex-array/src/arrays/variant/vtable/mod.rs index dbe780b681c..475fe5b2f91 100644 --- a/vortex-array/src/arrays/variant/vtable/mod.rs +++ b/vortex-array/src/arrays/variant/vtable/mod.rs @@ -19,17 +19,17 @@ use crate::EmptyMetadata; use crate::ExecutionCtx; use crate::ExecutionResult; use crate::Precision; -use crate::arrays::VariantArray; +use crate::arrays::variant::VariantData; use crate::buffer::BufferHandle; use crate::dtype::DType; use crate::serde::ArrayChildren; -use crate::stats::StatsSetRef; +use crate::stats::ArrayStats; use crate::vtable; use crate::vtable::Array; use crate::vtable::ArrayId; use crate::vtable::VTable; -vtable!(Variant); +vtable!(Variant, Variant, VariantData); #[derive(Clone, Debug)] pub struct Variant; @@ -39,7 +39,7 @@ impl Variant { } impl VTable for Variant { - type Array = VariantArray; + type Array = VariantData; type Metadata = EmptyMetadata; @@ -63,49 +63,49 @@ impl VTable for Variant { array.child.dtype() } - fn stats(array: &Self::Array) -> StatsSetRef<'_> { - array.child.statistics() + fn stats(array: &Self::Array) -> &ArrayStats { + &array.stats_set } - fn array_hash(array: &Self::Array, state: &mut H, precision: Precision) { + fn array_hash(array: &Array, state: &mut H, precision: Precision) { array.child.array_hash(state, precision); } - fn array_eq(array: &Self::Array, other: &Self::Array, precision: Precision) -> bool { + fn array_eq(array: &Array, other: &Array, precision: Precision) -> bool { array.child.array_eq(&other.child, precision) } - fn nbuffers(_array: &Self::Array) -> usize { + fn nbuffers(_array: &Array) -> usize { 0 } - fn buffer(_array: &Self::Array, idx: usize) -> BufferHandle { + fn buffer(_array: &Array, idx: usize) -> BufferHandle { vortex_panic!("VariantArray buffer index {idx} out of bounds") } - fn buffer_name(_array: &Self::Array, _idx: usize) -> Option { + fn buffer_name(_array: &Array, _idx: usize) -> Option { None } - fn nchildren(_array: &Self::Array) -> usize { + fn nchildren(_array: &Array) -> usize { 1 } - fn child(array: &Self::Array, idx: usize) -> ArrayRef { + fn child(array: &Array, idx: usize) -> ArrayRef { match idx { 0 => array.child.clone(), _ => vortex_panic!("VariantArray child index {idx} out of bounds"), } } - fn child_name(_array: &Self::Array, idx: usize) -> String { + fn child_name(_array: &Array, idx: usize) -> String { match idx { 0 => "child".to_string(), _ => vortex_panic!("VariantArray child_name index {idx} out of bounds"), } } - fn metadata(_array: &Self::Array) -> VortexResult { + fn metadata(_array: &Array) -> VortexResult { Ok(EmptyMetadata) } @@ -138,7 +138,7 @@ impl VTable for Variant { ); // The child carries the nullability for the whole VariantArray. let child = children.get(0, dtype, len)?; - Ok(VariantArray::new(child)) + Ok(VariantData::new(child)) } fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { diff --git a/vortex-array/src/arrays/variant/vtable/operations.rs b/vortex-array/src/arrays/variant/vtable/operations.rs index e2e29921a52..7e79473de0a 100644 --- a/vortex-array/src/arrays/variant/vtable/operations.rs +++ b/vortex-array/src/arrays/variant/vtable/operations.rs @@ -6,11 +6,12 @@ use vortex_error::VortexResult; use crate::ExecutionCtx; use crate::arrays::Variant; use crate::scalar::Scalar; +use crate::vtable::Array; use crate::vtable::OperationsVTable; impl OperationsVTable for Variant { fn scalar_at( - array: &::Array, + array: &Array, index: usize, _ctx: &mut ExecutionCtx, ) -> VortexResult { diff --git a/vortex-array/src/arrays/variant/vtable/validity.rs b/vortex-array/src/arrays/variant/vtable/validity.rs index 8e1b1d804ad..3c3450164aa 100644 --- a/vortex-array/src/arrays/variant/vtable/validity.rs +++ b/vortex-array/src/arrays/variant/vtable/validity.rs @@ -5,11 +5,11 @@ use vortex_error::VortexResult; use crate::arrays::Variant; use crate::validity::Validity; -use crate::vtable::VTable; +use crate::vtable::Array; use crate::vtable::ValidityVTable; impl ValidityVTable for Variant { - fn validity(array: &::Array) -> VortexResult { + fn validity(array: &Array) -> VortexResult { array.child().validity() } } diff --git a/vortex-array/src/arrow/executor/bool.rs b/vortex-array/src/arrow/executor/bool.rs index e47f85bf0bf..a6e6a5576bd 100644 --- a/vortex-array/src/arrow/executor/bool.rs +++ b/vortex-array/src/arrow/executor/bool.rs @@ -16,7 +16,7 @@ use crate::arrow::null_buffer::to_null_buffer; pub fn canonical_bool_to_arrow(array: &BoolArray) -> VortexResult { Ok(Arc::new(ArrowBooleanArray::new( array.to_bit_buffer().into(), - to_null_buffer(array.validity_mask()?), + to_null_buffer(array.validity_mask()), ))) } diff --git a/vortex-array/src/arrow/executor/byte.rs b/vortex-array/src/arrow/executor/byte.rs index 4fbf13b1544..e00650f69a8 100644 --- a/vortex-array/src/arrow/executor/byte.rs +++ b/vortex-array/src/arrow/executor/byte.rs @@ -23,7 +23,6 @@ use crate::builtins::ArrayBuiltins; use crate::dtype::DType; use crate::dtype::NativePType; use crate::dtype::Nullability; -use crate::vtable::ValidityHelper; /// Convert a Vortex array into an Arrow GenericBinaryArray. pub(super) fn to_arrow_byte_array( diff --git a/vortex-array/src/arrow/executor/byte_view.rs b/vortex-array/src/arrow/executor/byte_view.rs index 0e6b4923325..2839384e706 100644 --- a/vortex-array/src/arrow/executor/byte_view.rs +++ b/vortex-array/src/arrow/executor/byte_view.rs @@ -18,7 +18,6 @@ use crate::builtins::ArrayBuiltins; use crate::dtype::DType; use crate::dtype::Nullability; use crate::dtype::arrow::FromArrowType; -use crate::vtable::ValidityHelper; /// Convert a canonical VarBinViewArray directly to Arrow. pub fn canonical_varbinview_to_arrow( @@ -31,7 +30,7 @@ pub fn canonical_varbinview_to_arrow( .iter() .map(|buffer| buffer.as_host().clone().into_arrow_buffer()) .collect(); - let nulls = to_null_buffer(array.validity_mask()?); + let nulls = to_null_buffer(array.validity_mask()); // SAFETY: our own VarBinView array is considered safe. Ok(Arc::new(unsafe { diff --git a/vortex-array/src/arrow/executor/decimal.rs b/vortex-array/src/arrow/executor/decimal.rs index 234b253f903..52e37544db2 100644 --- a/vortex-array/src/arrow/executor/decimal.rs +++ b/vortex-array/src/arrow/executor/decimal.rs @@ -41,7 +41,7 @@ pub(super) fn to_arrow_decimal( } fn to_arrow_decimal32(array: DecimalArray) -> VortexResult { - let null_buffer = to_null_buffer(array.validity_mask()?); + let null_buffer = to_null_buffer(array.validity_mask()); let buffer: Buffer = match array.values_type() { DecimalType::I8 => { Buffer::from_trusted_len_iter(array.buffer::().into_iter().map(|x| x.as_())) @@ -85,7 +85,7 @@ fn to_arrow_decimal32(array: DecimalArray) -> VortexResult { } fn to_arrow_decimal64(array: DecimalArray) -> VortexResult { - let null_buffer = to_null_buffer(array.validity_mask()?); + let null_buffer = to_null_buffer(array.validity_mask()); let buffer: Buffer = match array.values_type() { DecimalType::I8 => { Buffer::from_trusted_len_iter(array.buffer::().into_iter().map(|x| x.as_())) @@ -124,7 +124,7 @@ fn to_arrow_decimal64(array: DecimalArray) -> VortexResult { } fn to_arrow_decimal128(array: DecimalArray) -> VortexResult { - let null_buffer = to_null_buffer(array.validity_mask()?); + let null_buffer = to_null_buffer(array.validity_mask()); let buffer: Buffer = match array.values_type() { DecimalType::I8 => { Buffer::from_trusted_len_iter(array.buffer::().into_iter().map(|x| x.as_())) @@ -158,7 +158,7 @@ fn to_arrow_decimal128(array: DecimalArray) -> VortexResult { } fn to_arrow_decimal256(array: DecimalArray) -> VortexResult { - let null_buffer = to_null_buffer(array.validity_mask()?); + let null_buffer = to_null_buffer(array.validity_mask()); let buffer: Buffer = match array.values_type() { DecimalType::I8 => { Buffer::from_trusted_len_iter(array.buffer::().into_iter().map(|x| x.as_())) diff --git a/vortex-array/src/arrow/executor/dictionary.rs b/vortex-array/src/arrow/executor/dictionary.rs index 3fbe5eea340..99078cd83e2 100644 --- a/vortex-array/src/arrow/executor/dictionary.rs +++ b/vortex-array/src/arrow/executor/dictionary.rs @@ -78,7 +78,7 @@ fn dict_to_dict( values_type: &DataType, ctx: &mut ExecutionCtx, ) -> VortexResult { - let DictArrayParts { codes, values, .. } = array.into_parts(); + let DictArrayParts { codes, values, .. } = array.into_inner().into_parts(); let codes = codes.execute_arrow(Some(codes_type), ctx)?; let values = values.execute_arrow(Some(values_type), ctx)?; make_dict_array(codes_type, codes, values) diff --git a/vortex-array/src/arrow/executor/fixed_size_list.rs b/vortex-array/src/arrow/executor/fixed_size_list.rs index 26f4d96ff6b..6764377bccd 100644 --- a/vortex-array/src/arrow/executor/fixed_size_list.rs +++ b/vortex-array/src/arrow/executor/fixed_size_list.rs @@ -13,7 +13,6 @@ use crate::arrays::FixedSizeList; use crate::arrays::FixedSizeListArray; use crate::arrow::ArrowArrayExecutor; use crate::arrow::executor::validity::to_arrow_null_buffer; -use crate::vtable::ValidityHelper; pub(super) fn to_arrow_fixed_list( array: ArrayRef, diff --git a/vortex-array/src/arrow/executor/list.rs b/vortex-array/src/arrow/executor/list.rs index dc2d9bd0e25..16908c5508d 100644 --- a/vortex-array/src/arrow/executor/list.rs +++ b/vortex-array/src/arrow/executor/list.rs @@ -30,7 +30,6 @@ use crate::builtins::ArrayBuiltins; use crate::dtype::DType; use crate::dtype::NativePType; use crate::dtype::Nullability; -use crate::vtable::ValidityHelper; /// Convert a Vortex VarBinArray into an Arrow [`GenericListArray`](arrow_array:array::GenericListArray). pub(super) fn to_arrow_list( @@ -141,7 +140,7 @@ fn list_view_zctl( sizes, validity, .. - } = array.into_parts(); + } = array.into_inner().into_parts(); // For ZCTL, we know that we only care about the final size. assert!(!sizes.is_empty()); diff --git a/vortex-array/src/arrow/executor/list_view.rs b/vortex-array/src/arrow/executor/list_view.rs index ad822f6db5e..3ea1480ce95 100644 --- a/vortex-array/src/arrow/executor/list_view.rs +++ b/vortex-array/src/arrow/executor/list_view.rs @@ -49,7 +49,7 @@ fn list_view_to_list_view( sizes, validity, .. - } = array.into_parts(); + } = array.into_inner().into_parts(); let elements = elements.execute_arrow(Some(elements_field.data_type()), ctx)?; vortex_ensure!( diff --git a/vortex-array/src/arrow/executor/primitive.rs b/vortex-array/src/arrow/executor/primitive.rs index 7910ed5fa31..b19f1f66168 100644 --- a/vortex-array/src/arrow/executor/primitive.rs +++ b/vortex-array/src/arrow/executor/primitive.rs @@ -24,7 +24,7 @@ pub fn canonical_primitive_to_arrow( where T::Native: NativePType, { - let validity = array.validity_mask()?; + let validity = array.validity_mask(); let null_buffer = to_null_buffer(validity); let buffer = array.into_buffer::().into_arrow_scalar_buffer(); Ok(Arc::new(ArrowPrimitiveArray::::new(buffer, null_buffer))) diff --git a/vortex-array/src/arrow/executor/temporal.rs b/vortex-array/src/arrow/executor/temporal.rs index a9316f9568e..9f966265ec7 100644 --- a/vortex-array/src/arrow/executor/temporal.rs +++ b/vortex-array/src/arrow/executor/temporal.rs @@ -157,7 +157,7 @@ where primitive.ptype() ); - let validity = primitive.validity_mask()?; + let validity = primitive.validity_mask(); let buffer = primitive.to_buffer::(); let values = buffer.into_arrow_scalar_buffer(); diff --git a/vortex-array/src/arrow/record_batch.rs b/vortex-array/src/arrow/record_batch.rs index b5a1f1c23ef..cf9f37de60f 100644 --- a/vortex-array/src/arrow/record_batch.rs +++ b/vortex-array/src/arrow/record_batch.rs @@ -27,7 +27,7 @@ impl TryFrom<&dyn DynArray> for RecordBatch { }; vortex_ensure!( - struct_array.all_valid()?, + struct_array.clone().into_array().all_valid()?, "RecordBatch can only be constructed from StructArray with no nulls" ); diff --git a/vortex-array/src/builders/bool.rs b/vortex-array/src/builders/bool.rs index 7e4b979fcda..3675ec3b046 100644 --- a/vortex-array/src/builders/bool.rs +++ b/vortex-array/src/builders/bool.rs @@ -5,7 +5,6 @@ use std::any::Any; use std::mem; use vortex_buffer::BitBufferMut; -use vortex_error::VortexExpect; use vortex_error::VortexResult; use vortex_error::vortex_ensure; use vortex_mask::Mask; @@ -115,11 +114,7 @@ impl ArrayBuilder for BoolBuilder { let bool_array = array.to_bool(); self.inner.append_buffer(&bool_array.to_bit_buffer()); - self.nulls.append_validity_mask( - bool_array - .validity_mask() - .vortex_expect("validity_mask in extend_from_array_unchecked"), - ); + self.nulls.append_validity_mask(bool_array.validity_mask()); } fn reserve_exact(&mut self, additional: usize) { diff --git a/vortex-array/src/builders/decimal.rs b/vortex-array/src/builders/decimal.rs index d4f64e8b7ce..509af272229 100644 --- a/vortex-array/src/builders/decimal.rs +++ b/vortex-array/src/builders/decimal.rs @@ -202,11 +202,8 @@ impl ArrayBuilder for DecimalBuilder { .extend(decimal_array.buffer::().iter().copied()); }); - self.nulls.append_validity_mask( - decimal_array - .validity_mask() - .vortex_expect("validity_mask in extend_from_array_unchecked"), - ); + self.nulls + .append_validity_mask(decimal_array.validity_mask()); } fn reserve_exact(&mut self, additional: usize) { diff --git a/vortex-array/src/builders/list.rs b/vortex-array/src/builders/list.rs index 37c44b3cada..72d285b62ec 100644 --- a/vortex-array/src/builders/list.rs +++ b/vortex-array/src/builders/list.rs @@ -301,7 +301,7 @@ impl ArrayBuilder for ListBuilder { } fn finish_into_canonical(&mut self) -> Canonical { - Canonical::List(self.finish_into_list().to_listview()) + Canonical::List(self.finish_into_list().into_array().to_listview()) } } diff --git a/vortex-array/src/builders/listview.rs b/vortex-array/src/builders/listview.rs index c8e4044c915..80a3d3ec815 100644 --- a/vortex-array/src/builders/listview.rs +++ b/vortex-array/src/builders/listview.rs @@ -301,6 +301,8 @@ impl ArrayBuilder for ListViewBuilder { if !listview.is_zero_copy_to_list() { for i in 0..listview.len() { let list = listview + .clone() + .into_array() .scalar_at(i) .vortex_expect("scalar_at failed in extend_from_array_unchecked"); diff --git a/vortex-array/src/builders/primitive.rs b/vortex-array/src/builders/primitive.rs index 4070a22e70d..b6aa3a7dc75 100644 --- a/vortex-array/src/builders/primitive.rs +++ b/vortex-array/src/builders/primitive.rs @@ -5,7 +5,6 @@ use std::any::Any; use std::mem::MaybeUninit; use vortex_buffer::BufferMut; -use vortex_error::VortexExpect; use vortex_error::VortexResult; use vortex_error::vortex_ensure; use vortex_mask::Mask; @@ -180,11 +179,7 @@ impl ArrayBuilder for PrimitiveBuilder { ); self.values.extend_from_slice(array.as_slice::()); - self.nulls.append_validity_mask( - array - .validity_mask() - .vortex_expect("validity_mask in extend_from_array_unchecked"), - ); + self.nulls.append_validity_mask(array.validity_mask()); } fn reserve_exact(&mut self, additional: usize) { diff --git a/vortex-array/src/builders/struct_.rs b/vortex-array/src/builders/struct_.rs index 825070b327c..1eb536926d0 100644 --- a/vortex-array/src/builders/struct_.rs +++ b/vortex-array/src/builders/struct_.rs @@ -175,11 +175,7 @@ impl ArrayBuilder for StructBuilder { builder.extend_from_array(a); } - self.nulls.append_validity_mask( - array - .validity_mask() - .vortex_expect("validity_mask in extend_from_array_unchecked"), - ); + self.nulls.append_validity_mask(array.validity_mask()); } fn reserve_exact(&mut self, capacity: usize) { diff --git a/vortex-array/src/builders/varbinview.rs b/vortex-array/src/builders/varbinview.rs index 80c19abd820..ab65abdf7d2 100644 --- a/vortex-array/src/builders/varbinview.rs +++ b/vortex-array/src/builders/varbinview.rs @@ -289,11 +289,7 @@ impl ArrayBuilder for VarBinViewBuilder { let array = array.to_varbinview(); self.flush_in_progress(); - self.push_only_validity_mask( - array - .validity_mask() - .vortex_expect("validity_mask in extend_from_array_unchecked"), - ); + self.push_only_validity_mask(array.validity_mask()); let view_adjustment = self.completed @@ -309,10 +305,7 @@ impl ArrayBuilder for VarBinViewBuilder { .iter() .map(|view| adjustment.adjust_view(view)), ), - ViewAdjustment::Rewriting(adjustment) => match array - .validity_mask() - .vortex_expect("validity_mask in extend_from_array_unchecked") - { + ViewAdjustment::Rewriting(adjustment) => match array.validity_mask() { Mask::AllTrue(_) => { for (idx, &view) in array.views().iter().enumerate() { let new_view = self.push_view(view, &adjustment, &array, idx); diff --git a/vortex-array/src/canonical.rs b/vortex-array/src/canonical.rs index ee80f0ccfef..e3af42ec4e2 100644 --- a/vortex-array/src/canonical.rs +++ b/vortex-array/src/canonical.rs @@ -410,9 +410,10 @@ impl Canonical { } } -impl AsRef for Canonical { - fn as_ref(&self) -> &(dyn DynArray + 'static) { - match_each_canonical!(self, |arr| arr.as_ref()) +impl Canonical { + /// Convert to a type-erased [`ArrayRef`]. + pub fn to_array_ref(&self) -> ArrayRef { + self.clone().into_array() } } @@ -565,7 +566,7 @@ impl Executable for CanonicalValidity { ptype, buffer, validity, - } = p.into_parts(); + } = p.into_inner().into_parts(); Ok(CanonicalValidity(Canonical::Primitive(unsafe { PrimitiveArray::new_unchecked_from_handle(buffer, ptype, validity.execute(ctx)?) }))) @@ -576,7 +577,7 @@ impl Executable for CanonicalValidity { values, values_type, validity, - } = d.into_parts(); + } = d.into_inner().into_parts(); Ok(CanonicalValidity(Canonical::Decimal(unsafe { DecimalArray::new_unchecked_handle( values, @@ -592,7 +593,7 @@ impl Executable for CanonicalValidity { buffers, views, validity, - } = vbv.into_parts(); + } = vbv.into_inner().into_parts(); Ok(CanonicalValidity(Canonical::VarBinView(unsafe { VarBinViewArray::new_handle_unchecked( views, @@ -610,7 +611,7 @@ impl Executable for CanonicalValidity { sizes, validity, .. - } = l.into_parts(); + } = l.into_inner().into_parts(); Ok(CanonicalValidity(Canonical::List(unsafe { ListViewArray::new_unchecked(elements, offsets, sizes, validity.execute(ctx)?) .with_zero_copy_to_list(zctl) @@ -619,7 +620,7 @@ impl Executable for CanonicalValidity { Canonical::FixedSizeList(fsl) => { let list_size = fsl.list_size(); let len = fsl.len(); - let (elements, validity, _) = fsl.into_parts(); + let (elements, validity, _) = fsl.into_inner().into_parts(); Ok(CanonicalValidity(Canonical::FixedSizeList( FixedSizeListArray::new(elements, list_size, validity.execute(ctx)?, len), ))) @@ -685,7 +686,7 @@ impl Executable for RecursiveCanonical { ptype, buffer, validity, - } = p.into_parts(); + } = p.into_inner().into_parts(); Ok(RecursiveCanonical(Canonical::Primitive(unsafe { PrimitiveArray::new_unchecked_from_handle(buffer, ptype, validity.execute(ctx)?) }))) @@ -696,7 +697,7 @@ impl Executable for RecursiveCanonical { values, values_type, validity, - } = d.into_parts(); + } = d.into_inner().into_parts(); Ok(RecursiveCanonical(Canonical::Decimal(unsafe { DecimalArray::new_unchecked_handle( values, @@ -712,7 +713,7 @@ impl Executable for RecursiveCanonical { buffers, views, validity, - } = vbv.into_parts(); + } = vbv.into_inner().into_parts(); Ok(RecursiveCanonical(Canonical::VarBinView(unsafe { VarBinViewArray::new_handle_unchecked( views, @@ -730,7 +731,7 @@ impl Executable for RecursiveCanonical { sizes, validity, .. - } = l.into_parts(); + } = l.into_inner().into_parts(); Ok(RecursiveCanonical(Canonical::List(unsafe { ListViewArray::new_unchecked( elements.execute::(ctx)?.0.into_array(), @@ -744,7 +745,7 @@ impl Executable for RecursiveCanonical { Canonical::FixedSizeList(fsl) => { let list_size = fsl.list_size(); let len = fsl.len(); - let (elements, validity, _) = fsl.into_parts(); + let (elements, validity, _) = fsl.into_inner().into_parts(); Ok(RecursiveCanonical(Canonical::FixedSizeList( FixedSizeListArray::new( elements.execute::(ctx)?.0.into_array(), @@ -808,7 +809,7 @@ impl Executable for Buffer { fn execute(array: ArrayRef, ctx: &mut ExecutionCtx) -> VortexResult { let array = PrimitiveArray::execute(array, ctx)?; vortex_ensure!( - array.all_valid()?, + matches!(array.validity(), Validity::NonNullable | Validity::AllValid), "Cannot execute to native buffer: array is not all-valid." ); Ok(array.into_buffer()) @@ -969,19 +970,20 @@ impl From> for Canonical { } } -impl AsRef for CanonicalView<'_> { - fn as_ref(&self) -> &dyn DynArray { +impl CanonicalView<'_> { + /// Convert to a type-erased [`ArrayRef`]. + pub fn to_array_ref(&self) -> ArrayRef { match self { - CanonicalView::Null(a) => a.as_ref(), - CanonicalView::Bool(a) => a.as_ref(), - CanonicalView::Primitive(a) => a.as_ref(), - CanonicalView::Decimal(a) => a.as_ref(), - CanonicalView::VarBinView(a) => a.as_ref(), - CanonicalView::List(a) => a.as_ref(), - CanonicalView::FixedSizeList(a) => a.as_ref(), - CanonicalView::Struct(a) => a.as_ref(), - CanonicalView::Extension(a) => a.as_ref(), - CanonicalView::Variant(a) => a.as_ref(), + CanonicalView::Null(a) => (*a).clone().into_array(), + CanonicalView::Bool(a) => (*a).clone().into_array(), + CanonicalView::Primitive(a) => (*a).clone().into_array(), + CanonicalView::Decimal(a) => (*a).clone().into_array(), + CanonicalView::VarBinView(a) => (*a).clone().into_array(), + CanonicalView::List(a) => (*a).clone().into_array(), + CanonicalView::FixedSizeList(a) => (*a).clone().into_array(), + CanonicalView::Struct(a) => (*a).clone().into_array(), + CanonicalView::Extension(a) => (*a).clone().into_array(), + CanonicalView::Variant(a) => (*a).clone().into_array(), } } } diff --git a/vortex-array/src/columnar.rs b/vortex-array/src/columnar.rs index 8734a446bd3..d6c4cbe64d1 100644 --- a/vortex-array/src/columnar.rs +++ b/vortex-array/src/columnar.rs @@ -89,11 +89,12 @@ pub enum ColumnarView<'a> { Constant(&'a ConstantArray), } -impl<'a> AsRef for ColumnarView<'a> { - fn as_ref(&self) -> &dyn DynArray { +impl ColumnarView<'_> { + /// Convert to a type-erased [`ArrayRef`]. + pub fn to_array_ref(&self) -> ArrayRef { match self { - ColumnarView::Canonical(canonical) => canonical.as_ref(), - ColumnarView::Constant(constant) => constant.as_ref(), + ColumnarView::Canonical(canonical) => canonical.to_array_ref(), + ColumnarView::Constant(constant) => (*constant).clone().into_array(), } } } diff --git a/vortex-array/src/compute/conformance/consistency.rs b/vortex-array/src/compute/conformance/consistency.rs index e6055da5e2c..71fbb48f2e0 100644 --- a/vortex-array/src/compute/conformance/consistency.rs +++ b/vortex-array/src/compute/conformance/consistency.rs @@ -1033,7 +1033,7 @@ fn test_slice_aggregate_consistency(array: &ArrayRef) { .vortex_expect("slice should succeed in conformance test"); let canonical = array.to_canonical().vortex_expect("to_canonical failed"); let canonical_sliced = canonical - .as_ref() + .to_array_ref() .slice(start..end) .vortex_expect("slice should succeed in conformance test"); @@ -1281,7 +1281,7 @@ fn test_cast_slice_consistency(array: &ArrayRef) { // Get the corresponding value from the canonical array (adjusted for slice offset) let canonical_val = canonical - .as_ref() + .to_array_ref() .scalar_at(start + i) .vortex_expect("scalar_at should succeed in conformance test"); diff --git a/vortex-array/src/kernel.rs b/vortex-array/src/kernel.rs index e87c9f1811f..b8f65850bb0 100644 --- a/vortex-array/src/kernel.rs +++ b/vortex-array/src/kernel.rs @@ -22,6 +22,7 @@ use vortex_error::VortexResult; use crate::ArrayRef; use crate::ExecutionCtx; use crate::matcher::Matcher; +use crate::vtable::Array; use crate::vtable::VTable; /// A collection of [`ExecuteParentKernel`]s registered for a specific child encoding. @@ -58,7 +59,7 @@ impl ParentKernelSet { /// Evaluate the parent kernels on the given child and parent arrays. pub fn execute( &self, - child: &V::Array, + child: &Array, parent: &ArrayRef, child_idx: usize, ctx: &mut ExecutionCtx, @@ -92,7 +93,7 @@ pub trait ExecuteParentKernel: Debug + Send + Sync + 'static { /// Attempt to execute the parent array fused with the child array. fn execute_parent( &self, - array: &V::Array, + array: &Array, parent: ::Match<'_>, child_idx: usize, ctx: &mut ExecutionCtx, @@ -108,7 +109,7 @@ pub trait DynParentKernel: Send + Sync { /// Attempt to execute the parent array fused with the child array. fn execute_parent( &self, - child: &V::Array, + child: &Array, parent: &ArrayRef, child_idx: usize, ctx: &mut ExecutionCtx, @@ -138,7 +139,7 @@ impl> DynParentKernel for ParentKernelAd fn execute_parent( &self, - child: &V::Array, + child: &Array, parent: &ArrayRef, child_idx: usize, ctx: &mut ExecutionCtx, diff --git a/vortex-array/src/mask.rs b/vortex-array/src/mask.rs index 33d02311262..87de2067267 100644 --- a/vortex-array/src/mask.rs +++ b/vortex-array/src/mask.rs @@ -35,7 +35,7 @@ impl Executable for Mask { } Columnar::Canonical(a) => { let bool = a.into_array().execute::(ctx)?; - let mask = bool.validity_mask()?; + let mask = bool.validity_mask(); let bits = bool.into_bit_buffer(); // To handle nullable boolean arrays, we treat nulls as false in the mask. // TODO(ngates): is this correct? Feels like we should just force the caller to diff --git a/vortex-array/src/optimizer/rules.rs b/vortex-array/src/optimizer/rules.rs index 138f07a29c0..671896b5edc 100644 --- a/vortex-array/src/optimizer/rules.rs +++ b/vortex-array/src/optimizer/rules.rs @@ -26,6 +26,7 @@ use vortex_error::VortexResult; use crate::array::ArrayRef; use crate::matcher::Matcher; +use crate::vtable::Array; use crate::vtable::VTable; /// A metadata-only rewrite rule that transforms an array based on its own structure (Layer 1). @@ -39,7 +40,7 @@ pub trait ArrayReduceRule: Debug + Send + Sync + 'static { /// - `Ok(Some(new_array))` if the rule applied successfully /// - `Ok(None)` if the rule doesn't apply /// - `Err(e)` if an error occurred - fn reduce(&self, array: &V::Array) -> VortexResult>; + fn reduce(&self, array: &Array) -> VortexResult>; } /// A metadata-only rewrite rule where a child encoding rewrites its parent (Layer 2). @@ -59,7 +60,7 @@ pub trait ArrayParentReduceRule: Debug + Send + Sync + 'static { /// - `Err(e)` if an error occurred fn reduce_parent( &self, - array: &V::Array, + array: &Array, parent: ::Match<'_>, child_idx: usize, ) -> VortexResult>; @@ -72,7 +73,7 @@ pub trait DynArrayParentReduceRule: Debug + Send + Sync { fn reduce_parent( &self, - array: &V::Array, + array: &Array, parent: &ArrayRef, child_idx: usize, ) -> VortexResult>; @@ -103,7 +104,7 @@ impl> DynArrayParentReduceRule fn reduce_parent( &self, - child: &V::Array, + child: &Array, parent: &ArrayRef, child_idx: usize, ) -> VortexResult> { @@ -129,7 +130,7 @@ impl ReduceRuleSet { } /// Evaluate the reduction rules on the given array. - pub fn evaluate(&self, array: &V::Array) -> VortexResult> { + pub fn evaluate(&self, array: &Array) -> VortexResult> { for rule in self.rules.iter() { if let Some(reduced) = rule.reduce(array)? { return Ok(Some(reduced)); @@ -169,7 +170,7 @@ impl ParentRuleSet { /// Evaluate the parent reduction rules on the given child and parent arrays. pub fn evaluate( &self, - child: &V::Array, + child: &Array, parent: &ArrayRef, child_idx: usize, ) -> VortexResult> { diff --git a/vortex-array/src/patches.rs b/vortex-array/src/patches.rs index e57ec9c64ec..7dff4934f06 100644 --- a/vortex-array/src/patches.rs +++ b/vortex-array/src/patches.rs @@ -45,7 +45,6 @@ use crate::search_sorted::SearchResult; use crate::search_sorted::SearchSorted; use crate::search_sorted::SearchSortedSide; use crate::validity::Validity; -use crate::vtable::ValidityHelper; /// One patch index offset is stored for each chunk. /// This allows for constant time patch index lookups. @@ -769,7 +768,7 @@ impl Patches { take_indices_with_search_fn( patch_indices_slice, take_slice, - take_indices.validity_mask()?, + take_indices.validity_mask(), include_nulls, |take_idx| { self.search_index_chunked_batch( @@ -784,7 +783,7 @@ impl Patches { take_indices_with_search_fn( patch_indices_slice, take_slice, - take_indices.validity_mask()?, + take_indices.validity_mask(), include_nulls, |take_idx| { let Some(offset) = ::from(self.offset) else { diff --git a/vortex-array/src/scalar_fn/fns/between/kernel.rs b/vortex-array/src/scalar_fn/fns/between/kernel.rs index 00d4cb4e85d..0f3d7840a97 100644 --- a/vortex-array/src/scalar_fn/fns/between/kernel.rs +++ b/vortex-array/src/scalar_fn/fns/between/kernel.rs @@ -15,6 +15,7 @@ use crate::arrays::scalar_fn::ExactScalarFn; use crate::arrays::scalar_fn::ScalarFnArrayView; use crate::kernel::ExecuteParentKernel; use crate::optimizer::rules::ArrayParentReduceRule; +use crate::vtable::Array; use crate::vtable::VTable; /// Reduce rule for between: restructure the array without reading buffers. @@ -22,7 +23,7 @@ use crate::vtable::VTable; /// Returns `Ok(None)` if the rule doesn't apply or buffer access is needed. pub trait BetweenReduce: VTable { fn between( - array: &Self::Array, + array: &Array, lower: &ArrayRef, upper: &ArrayRef, options: &BetweenOptions, @@ -34,7 +35,7 @@ pub trait BetweenReduce: VTable { /// Returns `Ok(None)` if this kernel cannot handle the given inputs. pub trait BetweenKernel: VTable { fn between( - array: &Self::Array, + array: &Array, lower: &ArrayRef, upper: &ArrayRef, options: &BetweenOptions, @@ -54,7 +55,7 @@ where fn reduce_parent( &self, - array: &V::Array, + array: &Array, parent: ScalarFnArrayView<'_, Between>, child_idx: usize, ) -> VortexResult> { @@ -88,7 +89,7 @@ where fn execute_parent( &self, - array: &V::Array, + array: &Array, parent: ScalarFnArrayView<'_, Between>, child_idx: usize, ctx: &mut ExecutionCtx, diff --git a/vortex-array/src/scalar_fn/fns/binary/compare.rs b/vortex-array/src/scalar_fn/fns/binary/compare.rs index 7c31ee6aab2..019c482227c 100644 --- a/vortex-array/src/scalar_fn/fns/binary/compare.rs +++ b/vortex-array/src/scalar_fn/fns/binary/compare.rs @@ -29,6 +29,7 @@ use crate::kernel::ExecuteParentKernel; use crate::scalar::Scalar; use crate::scalar_fn::fns::binary::Binary; use crate::scalar_fn::fns::operators::CompareOperator; +use crate::vtable::Array; use crate::vtable::VTable; /// Trait for encoding-specific comparison kernels that operate in encoded space. @@ -38,7 +39,7 @@ use crate::vtable::VTable; /// the left-hand side, swapping the operator when necessary. pub trait CompareKernel: VTable { fn compare( - lhs: &Self::Array, + lhs: &Array, rhs: &ArrayRef, operator: CompareOperator, ctx: &mut ExecutionCtx, @@ -61,7 +62,7 @@ where fn execute_parent( &self, - array: &V::Array, + array: &Array, parent: ScalarFnArrayView<'_, Binary>, child_idx: usize, ctx: &mut ExecutionCtx, @@ -85,8 +86,8 @@ where _ => return Ok(None), }; - let len = array.len(); - let nullable = array.dtype().is_nullable() || other.dtype().is_nullable(); + let len = V::len(array); + let nullable = V::dtype(array).is_nullable() || other.dtype().is_nullable(); // Empty array → empty bool result if len == 0 { diff --git a/vortex-array/src/scalar_fn/fns/cast/kernel.rs b/vortex-array/src/scalar_fn/fns/cast/kernel.rs index 74b98ca4725..09f7ed3506c 100644 --- a/vortex-array/src/scalar_fn/fns/cast/kernel.rs +++ b/vortex-array/src/scalar_fn/fns/cast/kernel.rs @@ -13,6 +13,7 @@ use crate::kernel::ExecuteParentKernel; use crate::matcher::Matcher; use crate::optimizer::rules::ArrayParentReduceRule; use crate::scalar_fn::fns::cast::Cast; +use crate::vtable::Array; use crate::vtable::VTable; /// Reduce rule for cast: restructure the array without reading buffers. @@ -23,7 +24,7 @@ use crate::vtable::VTable; /// /// Returns `Ok(None)` if the rule doesn't apply to this array/dtype combination. pub trait CastReduce: VTable { - fn cast(array: &Self::Array, dtype: &DType) -> VortexResult>; + fn cast(array: &Array, dtype: &DType) -> VortexResult>; } /// Execute kernel for cast: perform the actual value conversion, potentially reading buffers. @@ -34,7 +35,7 @@ pub trait CastReduce: VTable { /// Returns `Ok(None)` if this kernel cannot handle the given dtype conversion. pub trait CastKernel: VTable { fn cast( - array: &Self::Array, + array: &Array, dtype: &DType, ctx: &mut ExecutionCtx, ) -> VortexResult>; @@ -52,12 +53,12 @@ where fn reduce_parent( &self, - array: &V::Array, + array: &Array, parent: ScalarFnArrayView<'_, Cast>, _child_idx: usize, ) -> VortexResult> { let dtype = parent.options; - if array.dtype() == dtype { + if V::dtype(array) == dtype { return Ok(Some(array.clone().into_array())); } ::cast(array, dtype) @@ -76,13 +77,13 @@ where fn execute_parent( &self, - array: &V::Array, + array: &Array, parent: ::Match<'_>, _child_idx: usize, ctx: &mut ExecutionCtx, ) -> VortexResult> { let dtype = parent.options; - if array.dtype() == dtype { + if V::dtype(array) == dtype { return Ok(Some(array.clone().into_array())); } ::cast(array, dtype, ctx) diff --git a/vortex-array/src/scalar_fn/fns/cast/mod.rs b/vortex-array/src/scalar_fn/fns/cast/mod.rs index fa4124bf5a0..3e8abbbb34e 100644 --- a/vortex-array/src/scalar_fn/fns/cast/mod.rs +++ b/vortex-array/src/scalar_fn/fns/cast/mod.rs @@ -119,8 +119,8 @@ impl ScalarFnVTable for Cast { Some(result) => Ok(result), None => vortex_bail!( "No CastKernel to cast canonical array {} from {} to {}", - canonical.as_ref().encoding_id(), - canonical.as_ref().dtype(), + canonical.to_array_ref().encoding_id(), + canonical.to_array_ref().dtype(), target_dtype, ), } diff --git a/vortex-array/src/scalar_fn/fns/fill_null/kernel.rs b/vortex-array/src/scalar_fn/fns/fill_null/kernel.rs index 44f83f5417b..3e56e42a007 100644 --- a/vortex-array/src/scalar_fn/fns/fill_null/kernel.rs +++ b/vortex-array/src/scalar_fn/fns/fill_null/kernel.rs @@ -17,6 +17,7 @@ use crate::kernel::ExecuteParentKernel; use crate::optimizer::rules::ArrayParentReduceRule; use crate::scalar::Scalar; use crate::scalar_fn::fns::fill_null::FillNull as FillNullExpr; +use crate::vtable::Array; use crate::vtable::VTable; /// Fill nulls in an array with a scalar value without reading buffers. @@ -30,7 +31,7 @@ use crate::vtable::VTable; /// The fill value is guaranteed to be non-null. The array is guaranteed to have mixed /// validity (neither all-valid nor all-invalid). pub trait FillNullReduce: VTable { - fn fill_null(array: &Self::Array, fill_value: &Scalar) -> VortexResult>; + fn fill_null(array: &Array, fill_value: &Scalar) -> VortexResult>; } /// Fill nulls in an array with a scalar value, potentially reading buffers. @@ -44,7 +45,7 @@ pub trait FillNullReduce: VTable { /// validity (neither all-valid nor all-invalid). pub trait FillNullKernel: VTable { fn fill_null( - array: &Self::Array, + array: &Array, fill_value: &Scalar, ctx: &mut ExecutionCtx, ) -> VortexResult>; @@ -104,7 +105,7 @@ where fn reduce_parent( &self, - array: &V::Array, + array: &Array, parent: ScalarFnArrayView<'_, FillNullExpr>, child_idx: usize, ) -> VortexResult> { @@ -118,7 +119,7 @@ where let fill_value = scalar_fn_array.children()[1] .as_constant() .vortex_expect("fill_null fill_value must be constant"); - let arr = array.to_array(); + let arr = array.clone().into_array(); if let Some(result) = precondition(&arr, &fill_value)? { return Ok(Some(result)); } @@ -138,7 +139,7 @@ where fn execute_parent( &self, - array: &V::Array, + array: &Array, parent: ScalarFnArrayView<'_, FillNullExpr>, child_idx: usize, ctx: &mut ExecutionCtx, @@ -153,7 +154,7 @@ where let fill_value = scalar_fn_array.children()[1] .as_constant() .vortex_expect("fill_null fill_value must be constant"); - let arr = array.to_array(); + let arr = array.clone().into_array(); if let Some(result) = precondition(&arr, &fill_value)? { return Ok(Some(result)); } diff --git a/vortex-array/src/scalar_fn/fns/fill_null/mod.rs b/vortex-array/src/scalar_fn/fns/fill_null/mod.rs index 5958524998b..656029bf82d 100644 --- a/vortex-array/src/scalar_fn/fns/fill_null/mod.rs +++ b/vortex-array/src/scalar_fn/fns/fill_null/mod.rs @@ -162,7 +162,7 @@ fn fill_null_canonical( fill_value: &Scalar, ctx: &mut ExecutionCtx, ) -> VortexResult { - let arr = canonical.as_ref().to_array(); + let arr = canonical.to_array_ref(); if let Some(result) = precondition(&arr, fill_value)? { // The result of precondition may return another ScalarFn, in which case we should // apply it immediately. @@ -181,7 +181,7 @@ fn fill_null_canonical( .ok_or_else(|| vortex_err!("FillNullKernel for DecimalArray returned None")), other => vortex_bail!( "No FillNullKernel for canonical array {}", - other.as_ref().encoding_id() + other.to_array_ref().encoding_id() ), } } diff --git a/vortex-array/src/scalar_fn/fns/get_item.rs b/vortex-array/src/scalar_fn/fns/get_item.rs index 1e0469bae27..cc87765e3a2 100644 --- a/vortex-array/src/scalar_fn/fns/get_item.rs +++ b/vortex-array/src/scalar_fn/fns/get_item.rs @@ -116,7 +116,7 @@ impl ScalarFnVTable for GetItem { match input.dtype().nullability() { Nullability::NonNullable => Ok(field), - Nullability::Nullable => field.mask(input.validity()?.to_array(input.len())), + Nullability::Nullable => field.mask(input.validity().to_array(input.len())), } } diff --git a/vortex-array/src/scalar_fn/fns/like/kernel.rs b/vortex-array/src/scalar_fn/fns/like/kernel.rs index 839ffa734e9..1a2344a3f9e 100644 --- a/vortex-array/src/scalar_fn/fns/like/kernel.rs +++ b/vortex-array/src/scalar_fn/fns/like/kernel.rs @@ -13,6 +13,7 @@ use crate::kernel::ExecuteParentKernel; use crate::optimizer::rules::ArrayParentReduceRule; use crate::scalar_fn::fns::like::Like as LikeExpr; use crate::scalar_fn::fns::like::LikeOptions; +use crate::vtable::Array; use crate::vtable::VTable; /// Like pattern matching on an array without reading buffers. @@ -25,7 +26,7 @@ use crate::vtable::VTable; /// the parent `ScalarFnArray`. pub trait LikeReduce: VTable { fn like( - array: &Self::Array, + array: &Array, pattern: &ArrayRef, options: LikeOptions, ) -> VortexResult>; @@ -40,7 +41,7 @@ pub trait LikeReduce: VTable { /// the parent `ScalarFnArray`. pub trait LikeKernel: VTable { fn like( - array: &Self::Array, + array: &Array, pattern: &ArrayRef, options: LikeOptions, ctx: &mut ExecutionCtx, @@ -59,7 +60,7 @@ where fn reduce_parent( &self, - array: &V::Array, + array: &Array, parent: ScalarFnArrayView<'_, LikeExpr>, child_idx: usize, ) -> VortexResult> { @@ -88,7 +89,7 @@ where fn execute_parent( &self, - array: &V::Array, + array: &Array, parent: ScalarFnArrayView<'_, LikeExpr>, child_idx: usize, ctx: &mut ExecutionCtx, diff --git a/vortex-array/src/scalar_fn/fns/list_contains/kernel.rs b/vortex-array/src/scalar_fn/fns/list_contains/kernel.rs index 13be6bfc26a..532d078dcf3 100644 --- a/vortex-array/src/scalar_fn/fns/list_contains/kernel.rs +++ b/vortex-array/src/scalar_fn/fns/list_contains/kernel.rs @@ -12,6 +12,7 @@ use crate::arrays::scalar_fn::ScalarFnArrayView; use crate::kernel::ExecuteParentKernel; use crate::optimizer::rules::ArrayParentReduceRule; use crate::scalar_fn::fns::list_contains::ListContains as ListContainsExpr; +use crate::vtable::Array; use crate::vtable::VTable; /// Check list-contains without reading buffers (metadata-only). @@ -25,7 +26,7 @@ use crate::vtable::VTable; /// /// Return `None` if the operation cannot be resolved from metadata alone. pub trait ListContainsElementReduce: VTable { - fn list_contains(list: &ArrayRef, element: &Self::Array) -> VortexResult>; + fn list_contains(list: &ArrayRef, element: &Array) -> VortexResult>; } /// Check list-contains, potentially reading buffers. @@ -36,7 +37,7 @@ pub trait ListContainsElementReduce: VTable { pub trait ListContainsElementKernel: VTable { fn list_contains( list: &ArrayRef, - element: &Self::Array, + element: &Array, ctx: &mut ExecutionCtx, ) -> VortexResult>; } @@ -53,7 +54,7 @@ where fn reduce_parent( &self, - array: &V::Array, + array: &Array, parent: ScalarFnArrayView<'_, ListContainsExpr>, child_idx: usize, ) -> VortexResult> { @@ -81,7 +82,7 @@ where fn execute_parent( &self, - array: &V::Array, + array: &Array, parent: ScalarFnArrayView<'_, ListContainsExpr>, child_idx: usize, ctx: &mut ExecutionCtx, diff --git a/vortex-array/src/scalar_fn/fns/list_contains/mod.rs b/vortex-array/src/scalar_fn/fns/list_contains/mod.rs index dd0b2d46918..d88885f3033 100644 --- a/vortex-array/src/scalar_fn/fns/list_contains/mod.rs +++ b/vortex-array/src/scalar_fn/fns/list_contains/mod.rs @@ -51,7 +51,6 @@ use crate::scalar_fn::fns::binary::Binary; use crate::scalar_fn::fns::literal::Literal; use crate::scalar_fn::fns::operators::Operator; use crate::validity::Validity; -use crate::vtable::ValidityHelper; #[derive(Clone)] pub struct ListContains; @@ -300,7 +299,7 @@ fn list_contains_scalar( let matches = matching_elements.execute::(ctx)?; // Fast path: no elements match. - if let Some(pred) = matches.as_constant() { + if let Some(pred) = matches.clone().into_array().as_constant() { return match pred.as_bool().value() { // All comparisons are invalid (result in `null`), and search is not null because // we already checked for null above. diff --git a/vortex-array/src/scalar_fn/fns/mask/kernel.rs b/vortex-array/src/scalar_fn/fns/mask/kernel.rs index 7c8da9303da..707a4ae4bb8 100644 --- a/vortex-array/src/scalar_fn/fns/mask/kernel.rs +++ b/vortex-array/src/scalar_fn/fns/mask/kernel.rs @@ -12,6 +12,7 @@ use crate::arrays::scalar_fn::ScalarFnArrayView; use crate::kernel::ExecuteParentKernel; use crate::optimizer::rules::ArrayParentReduceRule; use crate::scalar_fn::fns::mask::Mask as MaskExpr; +use crate::vtable::Array; use crate::vtable::VTable; /// Mask an array without reading buffers. @@ -27,7 +28,7 @@ use crate::vtable::VTable; /// The mask is guaranteed to have the same length as the array. Trivial cases /// (`AllValid`, `AllInvalid`, `NonNullable`) are handled by the caller before dispatch. pub trait MaskReduce: VTable { - fn mask(array: &Self::Array, mask: &ArrayRef) -> VortexResult>; + fn mask(array: &Array, mask: &ArrayRef) -> VortexResult>; } /// Mask an array, potentially reading buffers. @@ -43,7 +44,7 @@ pub trait MaskReduce: VTable { /// (`AllValid`, `AllInvalid`, `NonNullable`) are handled by the caller before dispatch. pub trait MaskKernel: VTable { fn mask( - array: &Self::Array, + array: &Array, mask: &ArrayRef, ctx: &mut ExecutionCtx, ) -> VortexResult>; @@ -61,7 +62,7 @@ where fn reduce_parent( &self, - array: &V::Array, + array: &Array, parent: ScalarFnArrayView<'_, MaskExpr>, child_idx: usize, ) -> VortexResult> { @@ -93,7 +94,7 @@ where fn execute_parent( &self, - array: &V::Array, + array: &Array, parent: ScalarFnArrayView<'_, MaskExpr>, child_idx: usize, ctx: &mut ExecutionCtx, diff --git a/vortex-array/src/scalar_fn/fns/not/kernel.rs b/vortex-array/src/scalar_fn/fns/not/kernel.rs index 1546fb43992..24c4ad40944 100644 --- a/vortex-array/src/scalar_fn/fns/not/kernel.rs +++ b/vortex-array/src/scalar_fn/fns/not/kernel.rs @@ -10,6 +10,7 @@ use crate::arrays::scalar_fn::ScalarFnArrayView; use crate::kernel::ExecuteParentKernel; use crate::optimizer::rules::ArrayParentReduceRule; use crate::scalar_fn::fns::not::Not as NotExpr; +use crate::vtable::Array; use crate::vtable::VTable; /// Invert a boolean array without reading buffers. @@ -18,7 +19,7 @@ use crate::vtable::VTable; /// and structure without needing to read or execute on the underlying buffers. /// Implementations should return `None` if the operation requires buffer access. pub trait NotReduce: VTable { - fn invert(array: &Self::Array) -> VortexResult>; + fn invert(array: &Array) -> VortexResult>; } /// Invert a boolean array, potentially reading buffers. @@ -26,7 +27,7 @@ pub trait NotReduce: VTable { /// Unlike [`NotReduce`], this trait is for invert implementations that may need /// to read and execute on the underlying buffers to produce the result. pub trait NotKernel: VTable { - fn invert(array: &Self::Array, ctx: &mut ExecutionCtx) -> VortexResult>; + fn invert(array: &Array, ctx: &mut ExecutionCtx) -> VortexResult>; } /// Adaptor that wraps a [`NotReduce`] impl as an [`ArrayParentReduceRule`]. @@ -41,7 +42,7 @@ where fn reduce_parent( &self, - array: &V::Array, + array: &Array, _parent: ScalarFnArrayView<'_, NotExpr>, _child_idx: usize, ) -> VortexResult> { @@ -61,7 +62,7 @@ where fn execute_parent( &self, - array: &V::Array, + array: &Array, _parent: ScalarFnArrayView<'_, NotExpr>, _child_idx: usize, ctx: &mut ExecutionCtx, diff --git a/vortex-array/src/scalar_fn/fns/not/mod.rs b/vortex-array/src/scalar_fn/fns/not/mod.rs index bdeae78cc66..15d841e76a3 100644 --- a/vortex-array/src/scalar_fn/fns/not/mod.rs +++ b/vortex-array/src/scalar_fn/fns/not/mod.rs @@ -103,7 +103,7 @@ impl ScalarFnVTable for Not { // For boolean array if let Some(bool) = child.as_opt::() { - return Ok(BoolArray::new(!bool.to_bit_buffer(), bool.validity()?).into_array()); + return Ok(BoolArray::new(!bool.to_bit_buffer(), bool.validity().clone()).into_array()); } // Otherwise, execute and try again diff --git a/vortex-array/src/scalar_fn/fns/zip/kernel.rs b/vortex-array/src/scalar_fn/fns/zip/kernel.rs index 2ee5b0bf5eb..e2f661743d4 100644 --- a/vortex-array/src/scalar_fn/fns/zip/kernel.rs +++ b/vortex-array/src/scalar_fn/fns/zip/kernel.rs @@ -12,6 +12,7 @@ use crate::arrays::scalar_fn::ScalarFnArrayView; use crate::kernel::ExecuteParentKernel; use crate::optimizer::rules::ArrayParentReduceRule; use crate::scalar_fn::fns::zip::Zip as ZipExpr; +use crate::vtable::Array; use crate::vtable::VTable; /// Zip two arrays using a mask without reading buffers. @@ -24,7 +25,7 @@ use crate::vtable::VTable; /// the parent `ScalarFnArray`. pub trait ZipReduce: VTable { fn zip( - array: &Self::Array, + array: &Array, if_false: &ArrayRef, mask: &ArrayRef, ) -> VortexResult>; @@ -39,7 +40,7 @@ pub trait ZipReduce: VTable { /// the parent `ScalarFnArray`. pub trait ZipKernel: VTable { fn zip( - array: &Self::Array, + array: &Array, if_false: &ArrayRef, mask: &ArrayRef, ctx: &mut ExecutionCtx, @@ -58,7 +59,7 @@ where fn reduce_parent( &self, - array: &V::Array, + array: &Array, parent: ScalarFnArrayView<'_, ZipExpr>, child_idx: usize, ) -> VortexResult> { @@ -87,7 +88,7 @@ where fn execute_parent( &self, - array: &V::Array, + array: &Array, parent: ScalarFnArrayView<'_, ZipExpr>, child_idx: usize, ctx: &mut ExecutionCtx, diff --git a/vortex-array/src/test_harness.rs b/vortex-array/src/test_harness.rs index 348f79829fd..bdb3b2b189e 100644 --- a/vortex-array/src/test_harness.rs +++ b/vortex-array/src/test_harness.rs @@ -32,7 +32,7 @@ where /// Outputs the indices of the true values in a BoolArray pub fn to_int_indices(indices_bits: BoolArray) -> VortexResult> { let buffer = indices_bits.to_bit_buffer(); - let mask = indices_bits.validity_mask()?; + let mask = indices_bits.validity_mask(); Ok(buffer .iter() .enumerate() diff --git a/vortex-array/src/validity.rs b/vortex-array/src/validity.rs index c25a7d6eb6b..5fdf69e902d 100644 --- a/vortex-array/src/validity.rs +++ b/vortex-array/src/validity.rs @@ -21,6 +21,7 @@ use crate::Canonical; use crate::DynArray; use crate::ExecutionCtx; use crate::IntoArray; +use crate::ToCanonical; use crate::arrays::BoolArray; use crate::arrays::ConstantArray; use crate::arrays::scalar_fn::ScalarFnArrayExt; @@ -204,6 +205,17 @@ impl Validity { } } + /// Converts this validity into a [`Mask`] of the given length. + /// + /// Valid elements are `true` and invalid elements are `false`. + pub fn to_mask(&self, length: usize) -> Mask { + match self { + Self::NonNullable | Self::AllValid => Mask::new_true(length), + Self::AllInvalid => Mask::new_false(length), + Self::Array(a) => ToCanonical::to_bool(a.as_ref()).to_mask(), + } + } + pub fn execute_mask(&self, length: usize, ctx: &mut ExecutionCtx) -> VortexResult { match self { Self::NonNullable | Self::AllValid => Ok(Mask::AllTrue(length)), diff --git a/vortex-array/src/vtable/dyn_.rs b/vortex-array/src/vtable/dyn_.rs index 0c8f081a041..91e178e271a 100644 --- a/vortex-array/src/vtable/dyn_.rs +++ b/vortex-array/src/vtable/dyn_.rs @@ -101,7 +101,7 @@ impl DynVTable for V { // Wrap in Array for safe downcasting. // SAFETY: We just validated that V::len(&inner) == len and V::dtype(&inner) == dtype. let array = unsafe { - Array::new_unchecked( + Array::from_parts_unchecked( self.clone(), dtype.clone(), len, diff --git a/vortex-array/src/vtable/mod.rs b/vortex-array/src/vtable/mod.rs index e37da0c75cf..cc254ed8253 100644 --- a/vortex-array/src/vtable/mod.rs +++ b/vortex-array/src/vtable/mod.rs @@ -10,7 +10,6 @@ mod validity; use std::fmt::Debug; use std::hash::Hasher; -use std::ops::Deref; use std::sync::Arc; pub use dyn_::*; @@ -35,7 +34,7 @@ use crate::dtype::DType; use crate::executor::ExecutionCtx; use crate::patches::Patches; use crate::serde::ArrayChildren; -use crate::stats::StatsSetRef; +use crate::stats::ArrayStats; use crate::validity::Validity; /// The array [`VTable`] encapsulates logic for an Array type within Vortex. @@ -52,7 +51,7 @@ use crate::validity::Validity; /// out of bounds). Post-conditions are validated after invocation of the vtable function and will /// panic if violated. pub trait VTable: 'static + Clone + Sized + Send + Sync + Debug { - type Array: 'static + Send + Sync + Clone + Debug + Deref + IntoArray; + type Array: 'static + Send + Sync + Clone + Debug + IntoArray; type Metadata: Debug; type OperationsVTable: OperationsVTable; @@ -73,43 +72,43 @@ pub trait VTable: 'static + Clone + Sized + Send + Sync + Debug { fn dtype(array: &Self::Array) -> &DType; /// Returns the stats set for the array. - fn stats(array: &Self::Array) -> StatsSetRef<'_>; + fn stats(array: &Self::Array) -> &ArrayStats; /// Hashes the array contents. - fn array_hash(array: &Self::Array, state: &mut H, precision: Precision); + fn array_hash(array: &Array, state: &mut H, precision: Precision); /// Compares two arrays of the same type for equality. - fn array_eq(array: &Self::Array, other: &Self::Array, precision: Precision) -> bool; + fn array_eq(array: &Array, other: &Array, precision: Precision) -> bool; /// Returns the number of buffers in the array. - fn nbuffers(array: &Self::Array) -> usize; + fn nbuffers(array: &Array) -> usize; /// Returns the buffer at the given index. /// /// # Panics /// Panics if `idx >= nbuffers(array)`. - fn buffer(array: &Self::Array, idx: usize) -> BufferHandle; + fn buffer(array: &Array, idx: usize) -> BufferHandle; /// Returns the name of the buffer at the given index, or `None` if unnamed. - fn buffer_name(array: &Self::Array, idx: usize) -> Option; + fn buffer_name(array: &Array, idx: usize) -> Option; /// Returns the number of children in the array. - fn nchildren(array: &Self::Array) -> usize; + fn nchildren(array: &Array) -> usize; /// Returns the child at the given index. /// /// # Panics /// Panics if `idx >= nchildren(array)`. - fn child(array: &Self::Array, idx: usize) -> ArrayRef; + fn child(array: &Array, idx: usize) -> ArrayRef; /// Returns the name of the child at the given index. /// /// # Panics /// Panics if `idx >= nchildren(array)`. - fn child_name(array: &Self::Array, idx: usize) -> String; + fn child_name(array: &Array, idx: usize) -> String; /// Exports metadata for an array. - fn metadata(array: &Self::Array) -> VortexResult; + fn metadata(array: &Array) -> VortexResult; /// Serialize metadata into a byte buffer for IPC or file storage. /// Return `None` if the array cannot be serialized. @@ -126,7 +125,7 @@ pub trait VTable: 'static + Clone + Sized + Send + Sync + Debug { /// Writes the array into a canonical builder. fn append_to_builder( - array: &Self::Array, + array: &Array, builder: &mut dyn ArrayBuilder, ctx: &mut ExecutionCtx, ) -> VortexResult<()> { @@ -235,44 +234,24 @@ pub fn patches_child_name(idx: usize) -> &'static str { } } -/// vtable! macro — generates IntoArray, From, Deref, AsRef for inner array types. +/// vtable! macro — generates IntoArray, From, and type alias for array types. /// -/// During the migration, IntoArray creates [`Array`] (the new typed wrapper) while -/// Deref/AsRef go through AlsoArrayAdapter for backward-compatible DynArray access. +/// Three forms: +/// - `vtable!(Foo)` — short for `vtable!(Foo, Foo)` (legacy form) +/// - `vtable!(Foo, FooVT)` — legacy form where `FooArray` is the inner struct name +/// - `vtable!(Foo, FooVT, FooData)` — new form where `FooData` is the inner struct, +/// and `FooArray` is generated as a type alias for `Array` #[macro_export] macro_rules! vtable { ($V:ident) => { $crate::vtable!($V, $V); }; + // Legacy form: FooArray is the inner struct name, no type alias generated. ($Base:ident, $VT:ident) => { $crate::aliases::paste::paste! { - impl AsRef for [<$Base Array>] { - fn as_ref(&self) -> &dyn $crate::DynArray { - // We can unsafe cast ourselves to an ArrayAdapter. - unsafe { &*(self as *const [<$Base Array>] as *const $crate::ArrayAdapter<$VT>) } - } - } - - impl std::ops::Deref for [<$Base Array>] { - type Target = dyn $crate::DynArray; - - fn deref(&self) -> &Self::Target { - // We can unsafe cast ourselves to an ArrayAdapter. - unsafe { &*(self as *const [<$Base Array>] as *const $crate::ArrayAdapter<$VT>) } - } - } - impl $crate::IntoArray for [<$Base Array>] { fn into_array(self) -> $crate::ArrayRef { - use $crate::vtable::VTable; - let vtable = $VT::vtable(&self).clone(); - let dtype = $VT::dtype(&self).clone(); - let len = $VT::len(&self); - let stats = $VT::stats(&self).to_array_stats(); - // SAFETY: dtype and len are extracted from `self` via VTable methods. - std::sync::Arc::new(unsafe { - $crate::vtable::Array::new_unchecked(vtable, dtype, len, self, stats) - }) + std::sync::Arc::new($crate::vtable::Array::<$VT>::from_inner(self)) } } @@ -292,4 +271,24 @@ macro_rules! vtable { } } }; + // New form: Data is the inner struct, FooArray is a type alias for Array. + ($Base:ident, $VT:ident, $Data:ident) => { + $crate::aliases::paste::paste! { + /// Type alias: `FooArray = Array`. + pub type [<$Base Array>] = $crate::vtable::Array<$VT>; + + impl $crate::IntoArray for $Data { + fn into_array(self) -> $crate::ArrayRef { + std::sync::Arc::new($crate::vtable::Array::<$VT>::from_inner(self)) + } + } + + impl From<$Data> for $crate::ArrayRef { + fn from(value: $Data) -> $crate::ArrayRef { + use $crate::IntoArray; + value.into_array() + } + } + } + }; } diff --git a/vortex-array/src/vtable/operations.rs b/vortex-array/src/vtable/operations.rs index bdda1b3675a..04594f2ab00 100644 --- a/vortex-array/src/vtable/operations.rs +++ b/vortex-array/src/vtable/operations.rs @@ -6,6 +6,7 @@ use vortex_error::vortex_bail; use crate::ExecutionCtx; use crate::scalar::Scalar; +use crate::vtable::Array; use crate::vtable::NotSupported; use crate::vtable::VTable; @@ -16,11 +17,11 @@ pub trait OperationsVTable { /// /// Bounds-checking has already been performed by the time this function is called, /// and the index is guaranteed to be non-null. - fn scalar_at(array: &V::Array, index: usize, ctx: &mut ExecutionCtx) -> VortexResult; + fn scalar_at(array: &Array, index: usize, ctx: &mut ExecutionCtx) -> VortexResult; } impl OperationsVTable for NotSupported { - fn scalar_at(array: &V::Array, _index: usize, _ctx: &mut ExecutionCtx) -> VortexResult { + fn scalar_at(array: &Array, _index: usize, _ctx: &mut ExecutionCtx) -> VortexResult { vortex_bail!( "Legacy scalar_at operation is not supported for {} arrays", array.encoding_id() diff --git a/vortex-array/src/vtable/typed.rs b/vortex-array/src/vtable/typed.rs index 4bba86291bb..e1e07ba4ad8 100644 --- a/vortex-array/src/vtable/typed.rs +++ b/vortex-array/src/vtable/typed.rs @@ -6,8 +6,11 @@ use std::fmt::Debug; use std::fmt::Formatter; use std::ops::Deref; +use std::ops::DerefMut; use std::sync::Arc; +use vortex_error::VortexResult; + use crate::ArrayRef; use crate::IntoArray; use crate::dtype::DType; @@ -34,12 +37,24 @@ pub struct Array { #[allow(clippy::same_name_method)] impl Array { + /// Create a new typed array from inner encoding-specific data. + /// + /// Extracts dtype, len, vtable, and stats from the inner array via [`VTable`] methods. + pub fn from_inner(array: V::Array) -> Self { + let vtable = V::vtable(&array).clone(); + let dtype = V::dtype(&array).clone(); + let len = V::len(&array); + let stats = V::stats(&array).clone(); + // SAFETY: dtype and len are extracted from `array` via VTable methods. + unsafe { Self::from_parts_unchecked(vtable, dtype, len, array, stats) } + } + /// Create a new typed array without validating that the inner array's dtype/len match. /// /// # Safety /// /// The caller must ensure that `V::dtype(&array) == &dtype` and `V::len(&array) == len`. - pub unsafe fn new_unchecked( + pub unsafe fn from_parts_unchecked( vtable: V, dtype: DType, len: usize, @@ -106,6 +121,87 @@ impl Array { } } +impl Array +where + V::Array: crate::vtable::ValidityHelper, +{ + /// Returns a reference to the validity of this array. + /// + /// This inherent method shadows `DynArray::validity()` to provide direct access + /// to the concrete validity without going through `VortexResult`. + #[allow(clippy::same_name_method)] + pub fn validity(&self) -> &crate::validity::Validity { + crate::vtable::ValidityHelper::validity(&self.array) + } + + /// Returns the validity mask for this array. + /// + /// This inherent method shadows `DynArray::validity_mask()` to provide direct access + /// to the concrete validity mask without going through `VortexResult`. + #[allow(clippy::same_name_method)] + pub fn validity_mask(&self) -> vortex_mask::Mask { + self.validity().to_mask(self.len) + } +} + +/// Public API methods on `Array` — these shadow the `DynArray` trait methods +/// so callers don't need to import `DynArray`. +impl Array { + /// Performs a constant-time slice of the array. + #[allow(clippy::same_name_method)] + pub fn slice(&self, range: std::ops::Range) -> VortexResult { + ::slice(self, range) + } + + /// Fetch the scalar at the given index. + #[allow(clippy::same_name_method)] + pub fn scalar_at(&self, index: usize) -> VortexResult { + ::scalar_at(self, index) + } + + /// Wraps the array in a FilterArray such that it is logically filtered by the given mask. + #[allow(clippy::same_name_method)] + pub fn filter(&self, mask: vortex_mask::Mask) -> VortexResult { + ::filter(self, mask) + } + + /// Wraps the array in a DictArray such that it is logically taken by the given indices. + #[allow(clippy::same_name_method)] + pub fn take(&self, indices: ArrayRef) -> VortexResult { + ::take(self, indices) + } + + /// Returns whether the item at `index` is valid. + #[allow(clippy::same_name_method)] + pub fn is_valid(&self, index: usize) -> VortexResult { + ::is_valid(self, index) + } + + /// Returns whether the item at `index` is invalid. + #[allow(clippy::same_name_method)] + pub fn is_invalid(&self, index: usize) -> VortexResult { + ::is_invalid(self, index) + } + + /// Returns whether all items in the array are valid. + #[allow(clippy::same_name_method)] + pub fn all_valid(&self) -> VortexResult { + ::all_valid(self) + } + + /// Returns whether all items in the array are invalid. + #[allow(clippy::same_name_method)] + pub fn all_invalid(&self) -> VortexResult { + ::all_invalid(self) + } + + /// Returns the canonical representation of the array. + #[allow(clippy::same_name_method)] + pub fn to_canonical(&self) -> VortexResult { + ::to_canonical(self) + } +} + impl Deref for Array { type Target = V::Array; @@ -114,6 +210,12 @@ impl Deref for Array { } } +impl DerefMut for Array { + fn deref_mut(&mut self) -> &mut V::Array { + &mut self.array + } +} + impl Clone for Array { fn clone(&self) -> Self { Self { diff --git a/vortex-array/src/vtable/validity.rs b/vortex-array/src/vtable/validity.rs index ed2929e958e..1b3be6044b6 100644 --- a/vortex-array/src/vtable/validity.rs +++ b/vortex-array/src/vtable/validity.rs @@ -6,6 +6,7 @@ use vortex_error::VortexResult; use crate::ArrayRef; use crate::DynArray; use crate::validity::Validity; +use crate::vtable::Array; use crate::vtable::VTable; pub trait ValidityVTable { @@ -14,7 +15,7 @@ pub trait ValidityVTable { /// ## Pre-conditions /// /// - The array DType is nullable. - fn validity(array: &V::Array) -> VortexResult; + fn validity(array: &Array) -> VortexResult; } /// An implementation of the [`ValidityVTable`] for arrays that hold validity as a child array. @@ -29,8 +30,8 @@ impl ValidityVTable for ValidityVTableFromValidityHelper where V::Array: ValidityHelper, { - fn validity(array: &V::Array) -> VortexResult { - Ok(array.validity().clone()) + fn validity(array: &Array) -> VortexResult { + Ok(array.inner().validity().clone()) } } @@ -51,8 +52,8 @@ impl ValidityVTable for ValidityVTableFromValiditySliceHelper where V::Array: ValiditySliceHelper, { - fn validity(array: &V::Array) -> VortexResult { - array.sliced_validity() + fn validity(array: &Array) -> VortexResult { + array.inner().sliced_validity() } } @@ -68,8 +69,8 @@ impl ValidityVTable for ValidityVTableFromChild where V: ValidityChild, { - fn validity(array: &V::Array) -> VortexResult { - V::validity_child(array).validity() + fn validity(array: &Array) -> VortexResult { + V::validity_child(array.inner()).validity() } } @@ -90,7 +91,7 @@ impl ValidityVTable for ValidityVTableFromChildSliceHelper where V::Array: ValidityChildSliceHelper, { - fn validity(array: &V::Array) -> VortexResult { - array.sliced_child_array()?.validity() + fn validity(array: &Array) -> VortexResult { + array.inner().sliced_child_array()?.validity() } } diff --git a/vortex-bench/src/conversions.rs b/vortex-bench/src/conversions.rs index 1ab3c1e7f20..3f21ab30ba0 100644 --- a/vortex-bench/src/conversions.rs +++ b/vortex-bench/src/conversions.rs @@ -19,6 +19,7 @@ use tracing::info; use tracing::trace; use vortex::VortexSessionDefault; use vortex::array::ArrayRef; +use vortex::array::IntoArray; use vortex::array::VortexSessionExecute; use vortex::array::arrays::ChunkedArray; use vortex::array::arrow::FromArrowArray; @@ -214,7 +215,7 @@ pub async fn write_parquet_as_vortex( let data = parquet_to_vortex_chunks(parquet_path).await?; let write_options = compaction.apply_options(SESSION.write_options()); write_options - .write(&mut output_file, data.to_array_stream()) + .write(&mut output_file, data.into_array().to_array_stream()) .await?; output_file.flush().await?; Ok(()) diff --git a/vortex-bench/src/datasets/taxi_data.rs b/vortex-bench/src/datasets/taxi_data.rs index 133f7c55586..cc3c6f61b81 100644 --- a/vortex-bench/src/datasets/taxi_data.rs +++ b/vortex-bench/src/datasets/taxi_data.rs @@ -8,6 +8,7 @@ use async_trait::async_trait; use tokio::fs::File as TokioFile; use tokio::io::AsyncWriteExt; use vortex::array::ArrayRef; +use vortex::array::IntoArray; use vortex::array::stream::ArrayStreamExt; use vortex::file::OpenOptionsSessionExt; use vortex::file::WriteOptionsSessionExt; @@ -93,7 +94,7 @@ pub async fn taxi_data_vortex() -> Result { SESSION .write_options() - .write(&mut output_file, data.to_array_stream()) + .write(&mut output_file, data.into_array().to_array_stream()) .await?; output_file.flush().await?; Ok(buf) @@ -112,7 +113,7 @@ pub async fn taxi_data_vortex_compact() -> Result { let data = parquet_to_vortex_chunks(taxi_data_parquet().await?).await?; write_options - .write(&mut output_file, data.to_array_stream()) + .write(&mut output_file, data.into_array().to_array_stream()) .await?; output_file.flush().await?; diff --git a/vortex-bench/src/downloadable_dataset.rs b/vortex-bench/src/downloadable_dataset.rs index 7aa140ec1b2..78ab162d688 100644 --- a/vortex-bench/src/downloadable_dataset.rs +++ b/vortex-bench/src/downloadable_dataset.rs @@ -4,6 +4,7 @@ use async_trait::async_trait; use tokio::fs::File; use vortex::array::ArrayRef; +use vortex::array::IntoArray; use vortex::array::stream::ArrayStreamExt; use vortex::file::OpenOptionsSessionExt; use vortex::file::WriteOptionsSessionExt; @@ -69,7 +70,7 @@ impl Dataset for DownloadableDataset { &mut File::create(path) .await .map_err(|e| anyhow::anyhow!("Failed to create file: {}", e))?, - data.to_array_stream(), + data.into_array().to_array_stream(), ) .await .map_err(|e| anyhow::anyhow!("Failed to write vortex file: {}", e))?; diff --git a/vortex-bench/src/public_bi.rs b/vortex-bench/src/public_bi.rs index 0539266ed0d..3602cd2cd33 100644 --- a/vortex-bench/src/public_bi.rs +++ b/vortex-bench/src/public_bi.rs @@ -26,6 +26,7 @@ use tracing::info; use tracing::trace; use url::Url; use vortex::array::ArrayRef; +use vortex::array::IntoArray; use vortex::array::stream::ArrayStreamExt; use vortex::error::VortexResult; use vortex::error::vortex_err; @@ -371,7 +372,7 @@ impl PBIData { &mut File::create(output_path) .await .map_err(|e| anyhow::anyhow!("Failed to create file: {}", e))?, - data.to_array_stream(), + data.into_array().to_array_stream(), ) .await .map_err(|e| anyhow::anyhow!("Failed to write vortex file: {}", e))?; diff --git a/vortex-btrblocks/src/canonical_compressor.rs b/vortex-btrblocks/src/canonical_compressor.rs index 46252060a1f..ab679ca2854 100644 --- a/vortex-btrblocks/src/canonical_compressor.rs +++ b/vortex-btrblocks/src/canonical_compressor.rs @@ -23,7 +23,6 @@ use vortex_array::arrays::listview::list_from_list_view; use vortex_array::dtype::DType; use vortex_array::dtype::Nullability; use vortex_array::extension::datetime::TemporalMetadata; -use vortex_array::vtable::ValidityHelper; use vortex_error::VortexResult; use vortex_error::vortex_bail; @@ -282,7 +281,7 @@ impl CanonicalCompressor for BtrBlocksCompressor { let mut ctx = LEGACY_SESSION.create_execution_ctx(); if is_constant(&ext_array.clone().into_array(), &mut ctx)? { return Ok(ConstantArray::new( - temporal_array.as_ref().scalar_at(0)?, + temporal_array.clone().into_array().scalar_at(0)?, ext_array.len(), ) .into_array()); diff --git a/vortex-btrblocks/src/compressor/decimal.rs b/vortex-btrblocks/src/compressor/decimal.rs index bf738a72839..fafe58200d4 100644 --- a/vortex-btrblocks/src/compressor/decimal.rs +++ b/vortex-btrblocks/src/compressor/decimal.rs @@ -8,8 +8,7 @@ use vortex_array::arrays::DecimalArray; use vortex_array::arrays::PrimitiveArray; use vortex_array::arrays::decimal::narrowed_decimal; use vortex_array::dtype::DecimalType; -use vortex_array::vtable::ValidityHelper; -use vortex_decimal_byte_parts::DecimalBytePartsArray; +use vortex_decimal_byte_parts::DecimalByteParts; use vortex_error::VortexResult; use crate::BtrBlocksCompressor; @@ -39,5 +38,5 @@ pub fn compress_decimal( Excludes::none(), )?; - DecimalBytePartsArray::try_new(compressed, decimal.decimal_dtype()).map(|d| d.into_array()) + DecimalByteParts::try_new(compressed, decimal.decimal_dtype()).map(|d| d.into_array()) } diff --git a/vortex-btrblocks/src/compressor/float/dictionary.rs b/vortex-btrblocks/src/compressor/float/dictionary.rs index 33c024af4b3..1d3a61d8bff 100644 --- a/vortex-btrblocks/src/compressor/float/dictionary.rs +++ b/vortex-btrblocks/src/compressor/float/dictionary.rs @@ -10,7 +10,6 @@ use vortex_array::arrays::DictArray; use vortex_array::arrays::PrimitiveArray; use vortex_array::dtype::half::f16; use vortex_array::validity::Validity; -use vortex_array::vtable::ValidityHelper; use vortex_buffer::Buffer; use super::stats::ErasedDistinctValues; diff --git a/vortex-btrblocks/src/compressor/float/mod.rs b/vortex-btrblocks/src/compressor/float/mod.rs index 57bb4dc65f3..d6d93a48f23 100644 --- a/vortex-btrblocks/src/compressor/float/mod.rs +++ b/vortex-btrblocks/src/compressor/float/mod.rs @@ -9,11 +9,11 @@ use std::hash::Hasher; use enum_iterator::Sequence; use vortex_alp::ALP; -use vortex_alp::ALPArray; use vortex_alp::RDEncoder; use vortex_alp::alp_encode; use vortex_array::ArrayRef; use vortex_array::Canonical; +use vortex_array::DynArray; use vortex_array::IntoArray; use vortex_array::ToCanonical; use vortex_array::arrays::ConstantArray; @@ -24,11 +24,9 @@ use vortex_array::arrays::dict::DictArrayParts; use vortex_array::dtype::PType; use vortex_array::scalar::Scalar; use vortex_array::vtable::VTable; -use vortex_array::vtable::ValidityHelper; use vortex_error::VortexResult; use vortex_error::vortex_panic; use vortex_sparse::Sparse; -use vortex_sparse::SparseArray; use self::dictionary::dictionary_encode; pub use self::stats::FloatStats; @@ -262,14 +260,15 @@ impl Scheme for ConstantScheme { _ctx: CompressorContext, _excludes: &[FloatCode], ) -> VortexResult { + let source_ref = stats.source().clone().into_array(); let scalar_idx = - (0..stats.source().len()).position(|idx| stats.source().is_valid(idx).unwrap_or(false)); + (0..stats.source().len()).position(|idx| source_ref.is_valid(idx).unwrap_or(false)); match scalar_idx { Some(idx) => { - let scalar = stats.source().scalar_at(idx)?; + let scalar = source_ref.scalar_at(idx)?; let const_arr = ConstantArray::new(scalar, stats.src.len()).into_array(); - if !stats.source().all_valid()? { + if !source_ref.all_valid()? { Ok(MaskedArray::try_new(const_arr, stats.src.validity().clone())?.into_array()) } else { Ok(const_arr) @@ -320,9 +319,8 @@ impl Scheme for ALPScheme { ctx: CompressorContext, excludes: &[FloatCode], ) -> VortexResult { - let alp_encoded = alp_encode(&stats.source().to_primitive(), None)?; - let alp = alp_encoded.as_::(); - let alp_ints = alp.encoded().to_primitive(); + let alp_encoded = alp_encode(&stats.source().clone().into_array().to_primitive(), None)?; + let alp_ints = alp_encoded.encoded().to_primitive(); // Compress the ALP ints. // Patches are not compressed. They should be infrequent, and if they are not then we want @@ -341,9 +339,9 @@ impl Scheme for ALPScheme { Excludes::int_only(&int_excludes), )?; - let patches = alp.patches().map(compress_patches).transpose()?; + let patches = alp_encoded.patches().map(compress_patches).transpose()?; - Ok(ALPArray::new(compressed_alp_ints, alp.exponents(), patches).into_array()) + Ok(ALP::new(compressed_alp_ints, alp_encoded.exponents(), patches).into_array()) } } @@ -376,13 +374,13 @@ impl Scheme for ALPRDScheme { _ctx: CompressorContext, _excludes: &[FloatCode], ) -> VortexResult { - let encoder = match stats.source().ptype() { - PType::F32 => RDEncoder::new(stats.source().as_slice::()), - PType::F64 => RDEncoder::new(stats.source().as_slice::()), + let encoder = match stats.src.ptype() { + PType::F32 => RDEncoder::new(stats.src.as_slice::()), + PType::F64 => RDEncoder::new(stats.src.as_slice::()), ptype => vortex_panic!("cannot ALPRD compress ptype {ptype}"), }; - let mut alp_rd = encoder.encode(stats.source()); + let mut alp_rd = encoder.encode(&stats.src); let patches = alp_rd .left_parts_patches() @@ -431,7 +429,7 @@ impl Scheme for DictScheme { ) -> VortexResult { let dict = dictionary_encode(stats); let has_all_values_referenced = dict.has_all_values_referenced(); - let DictArrayParts { codes, values, .. } = dict.into_parts(); + let DictArrayParts { codes, values, .. } = dict.into_inner().into_parts(); let compressed_codes = compressor.compress_canonical( Canonical::Primitive(codes.to_primitive()), @@ -501,7 +499,7 @@ impl Scheme for NullDominated { assert!(ctx.allowed_cascading > 0); // We pass None as we only run this pathway for NULL-dominated float arrays - let sparse_encoded = SparseArray::encode(&stats.src.clone().into_array(), None)?; + let sparse_encoded = Sparse::encode(&stats.src.clone().into_array(), None)?; if let Some(sparse) = sparse_encoded.as_opt::() { // Compress the values @@ -511,12 +509,12 @@ impl Scheme for NullDominated { let indices = sparse.patches().indices().to_primitive().narrow()?; let compressed_indices = compressor.compress_canonical( - Canonical::Primitive(indices.to_primitive()), + Canonical::Primitive(indices), ctx.descend(), Excludes::int_only(&new_excludes), )?; - SparseArray::try_new( + Sparse::try_new( compressed_indices, sparse.patches().values().clone(), sparse.len(), @@ -545,12 +543,10 @@ impl Scheme for PcoScheme { _ctx: CompressorContext, _excludes: &[FloatCode], ) -> VortexResult { - Ok(vortex_pco::PcoArray::from_primitive( - stats.source(), - pco::DEFAULT_COMPRESSION_LEVEL, - 8192, - )? - .into_array()) + Ok( + vortex_pco::Pco::from_primitive(&stats.src, pco::DEFAULT_COMPRESSION_LEVEL, 8192)? + .into_array(), + ) } } diff --git a/vortex-btrblocks/src/compressor/float/stats.rs b/vortex-btrblocks/src/compressor/float/stats.rs index 818ba40d2cf..a073603fea8 100644 --- a/vortex-btrblocks/src/compressor/float/stats.rs +++ b/vortex-btrblocks/src/compressor/float/stats.rs @@ -6,11 +6,13 @@ use std::hash::Hash; use itertools::Itertools; use num_traits::Float; use rustc_hash::FxBuildHasher; +use vortex_array::DynArray; use vortex_array::IntoArray; use vortex_array::ToCanonical; use vortex_array::arrays::Primitive; use vortex_array::arrays::PrimitiveArray; use vortex_array::arrays::primitive::NativeValue; +use vortex_array::arrays::primitive::PrimitiveData; use vortex_array::dtype::NativePType; use vortex_array::dtype::PType; use vortex_array::dtype::half::f16; @@ -83,12 +85,13 @@ impl FloatStats { impl CompressorStats for FloatStats { type ArrayVTable = Primitive; - fn generate_opts(input: &PrimitiveArray, opts: GenerateStatsOptions) -> Self { - Self::generate_opts_fallible(input, opts) + fn generate_opts(input: &PrimitiveData, opts: GenerateStatsOptions) -> Self { + let array = PrimitiveArray::from_inner(input.clone()); + Self::generate_opts_fallible(&array, opts) .vortex_expect("FloatStats::generate_opts should not fail") } - fn source(&self) -> &PrimitiveArray { + fn source(&self) -> &PrimitiveData { &self.src } @@ -135,7 +138,7 @@ where } .into(), }); - } else if array.all_invalid()? { + } else if array.clone().into_array().all_invalid()? { return Ok(FloatStats { src: array.clone(), null_count: u32::try_from(array.len())?, @@ -150,6 +153,8 @@ where } let null_count = array + .clone() + .into_array() .statistics() .compute_null_count() .ok_or_else(|| vortex_err!("Failed to compute null_count"))?; @@ -163,7 +168,7 @@ where HashSet::with_hasher(FxBuildHasher) }; - let validity = array.validity_mask()?; + let validity = array.validity_mask(); let mut runs = 1; let head_idx = validity diff --git a/vortex-btrblocks/src/compressor/integer/dictionary.rs b/vortex-btrblocks/src/compressor/integer/dictionary.rs index 70a29aaeedd..97263db9aba 100644 --- a/vortex-btrblocks/src/compressor/integer/dictionary.rs +++ b/vortex-btrblocks/src/compressor/integer/dictionary.rs @@ -9,7 +9,6 @@ use vortex_array::IntoArray; use vortex_array::arrays::DictArray; use vortex_array::arrays::PrimitiveArray; use vortex_array::validity::Validity; -use vortex_array::vtable::ValidityHelper; use vortex_buffer::Buffer; use super::IntegerStats; diff --git a/vortex-btrblocks/src/compressor/integer/mod.rs b/vortex-btrblocks/src/compressor/integer/mod.rs index 58ee4f62e76..2c77b83f7b5 100644 --- a/vortex-btrblocks/src/compressor/integer/mod.rs +++ b/vortex-btrblocks/src/compressor/integer/mod.rs @@ -11,6 +11,7 @@ use enum_iterator::Sequence; pub use stats::IntegerStats; use vortex_array::ArrayRef; use vortex_array::Canonical; +use vortex_array::DynArray; use vortex_array::IntoArray; use vortex_array::ToCanonical; use vortex_array::arrays::ConstantArray; @@ -20,21 +21,19 @@ use vortex_array::arrays::Primitive; use vortex_array::arrays::PrimitiveArray; use vortex_array::scalar::Scalar; use vortex_array::vtable::VTable; -use vortex_array::vtable::ValidityHelper; use vortex_error::VortexExpect; use vortex_error::VortexResult; use vortex_error::vortex_bail; use vortex_error::vortex_err; -use vortex_fastlanes::FoRArray; +use vortex_fastlanes::FoR; use vortex_fastlanes::bitpack_compress::bit_width_histogram; use vortex_fastlanes::bitpack_compress::bitpack_encode; use vortex_fastlanes::bitpack_compress::find_best_bit_width; -use vortex_runend::RunEndArray; +use vortex_runend::RunEnd; use vortex_runend::compress::runend_encode; use vortex_sequence::sequence_encode; use vortex_sparse::Sparse; -use vortex_sparse::SparseArray; -use vortex_zigzag::ZigZagArray; +use vortex_zigzag::ZigZag; use vortex_zigzag::zigzag_encode; use self::dictionary::dictionary_encode; @@ -294,14 +293,15 @@ impl Scheme for ConstantScheme { _ctx: CompressorContext, _excludes: &[IntCode], ) -> VortexResult { + let source_ref = stats.source().clone().into_array(); let scalar_idx = - (0..stats.source().len()).position(|idx| stats.source().is_valid(idx).unwrap_or(false)); + (0..stats.source().len()).position(|idx| source_ref.is_valid(idx).unwrap_or(false)); match scalar_idx { Some(idx) => { - let scalar = stats.source().scalar_at(idx)?; + let scalar = source_ref.scalar_at(idx)?; let const_arr = ConstantArray::new(scalar, stats.src.len()).into_array(); - if !stats.source().all_valid()? { + if !source_ref.all_valid()? { Ok(MaskedArray::try_new(const_arr, stats.src.validity().clone())?.into_array()) } else { Ok(const_arr) @@ -384,7 +384,7 @@ impl Scheme for FORScheme { ctx: CompressorContext, excludes: &[IntCode], ) -> VortexResult { - let for_array = FoRArray::encode(stats.src.clone())?; + let for_array = FoR::encode(stats.src.clone())?; let biased = for_array.encoded().to_primitive(); let biased_stats = IntegerStats::generate_opts( &biased, @@ -404,11 +404,12 @@ impl Scheme for FORScheme { let compressed = BitPackingScheme.compress(compressor, &biased_stats, leaf_ctx, excludes)?; - let for_compressed = FoRArray::try_new(compressed, for_array.reference_scalar().clone())?; + let for_compressed = FoR::try_new(compressed, for_array.reference_scalar().clone())?; for_compressed - .as_ref() + .clone() + .into_array() .statistics() - .inherit_from(for_array.as_ref().statistics()); + .inherit_from(for_array.into_array().statistics()); Ok(for_compressed.into_array()) } } @@ -476,7 +477,7 @@ impl Scheme for ZigZagScheme { tracing::debug!("zigzag output: {}", compressed.encoding_id()); - Ok(ZigZagArray::try_new(compressed)?.into_array()) + Ok(ZigZag::try_new(compressed)?.into_array()) } } @@ -515,13 +516,13 @@ impl Scheme for BitPackingScheme { _ctx: CompressorContext, _excludes: &[IntCode], ) -> VortexResult { - let histogram = bit_width_histogram(stats.source())?; - let bw = find_best_bit_width(stats.source().ptype(), &histogram)?; + let histogram = bit_width_histogram(&stats.src)?; + let bw = find_best_bit_width(stats.src.ptype(), &histogram)?; // If best bw is determined to be the current bit-width, return the original array. - if bw as usize == stats.source().ptype().bit_width() { - return Ok(stats.source().clone().into_array()); + if bw as usize == stats.src.ptype().bit_width() { + return Ok(stats.src.clone().into_array()); } - let mut packed = bitpack_encode(stats.source(), bw, Some(&histogram))?; + let mut packed = bitpack_encode(&stats.src, bw, Some(&histogram))?; let patches = packed.patches().map(compress_patches).transpose()?; packed.replace_patches(patches); @@ -600,7 +601,7 @@ impl Scheme for SparseScheme { .into_array()); } - let sparse_encoded = SparseArray::encode( + let sparse_encoded = Sparse::encode( &stats.src.clone().into_array(), Some(Scalar::primitive_value( top_pvalue, @@ -628,7 +629,7 @@ impl Scheme for SparseScheme { Excludes::int_only(&new_excludes), )?; - SparseArray::try_new( + Sparse::try_new( compressed_indices, compressed_values, sparse.len(), @@ -769,7 +770,7 @@ impl Scheme for RunEndScheme { new_excludes.extend_from_slice(excludes); let compressed_ends = compressor.compress_canonical( - Canonical::Primitive(ends.to_primitive()), + Canonical::Primitive(ends), ctx.descend(), Excludes::int_only(&new_excludes), )?; @@ -783,7 +784,7 @@ impl Scheme for RunEndScheme { // SAFETY: compression doesn't affect invariants unsafe { Ok( - RunEndArray::new_unchecked(compressed_ends, compressed_values, 0, stats.src.len()) + RunEnd::new_unchecked(compressed_ends, compressed_values, 0, stats.src.len()) .into_array(), ) } @@ -872,12 +873,10 @@ impl Scheme for PcoScheme { _ctx: CompressorContext, _excludes: &[IntCode], ) -> VortexResult { - Ok(vortex_pco::PcoArray::from_primitive( - stats.source(), - pco::DEFAULT_COMPRESSION_LEVEL, - 8192, - )? - .into_array()) + Ok( + vortex_pco::Pco::from_primitive(&stats.src, pco::DEFAULT_COMPRESSION_LEVEL, 8192)? + .into_array(), + ) } } diff --git a/vortex-btrblocks/src/compressor/integer/stats.rs b/vortex-btrblocks/src/compressor/integer/stats.rs index 111a1b7a155..d5e1597e106 100644 --- a/vortex-btrblocks/src/compressor/integer/stats.rs +++ b/vortex-btrblocks/src/compressor/integer/stats.rs @@ -5,11 +5,13 @@ use std::hash::Hash; use num_traits::PrimInt; use rustc_hash::FxBuildHasher; +use vortex_array::DynArray; use vortex_array::IntoArray; use vortex_array::ToCanonical; use vortex_array::arrays::Primitive; use vortex_array::arrays::PrimitiveArray; use vortex_array::arrays::primitive::NativeValue; +use vortex_array::arrays::primitive::PrimitiveData; use vortex_array::dtype::IntegerPType; use vortex_array::expr::stats::Stat; use vortex_array::match_each_integer_ptype; @@ -177,12 +179,13 @@ impl IntegerStats { impl CompressorStats for IntegerStats { type ArrayVTable = Primitive; - fn generate_opts(input: &PrimitiveArray, opts: GenerateStatsOptions) -> Self { - Self::generate_opts_fallible(input, opts) + fn generate_opts(input: &PrimitiveData, opts: GenerateStatsOptions) -> Self { + let array = PrimitiveArray::from_inner(input.clone()); + Self::generate_opts_fallible(&array, opts) .vortex_expect("IntegerStats::generate_opts should not fail") } - fn source(&self) -> &PrimitiveArray { + fn source(&self) -> &PrimitiveData { &self.src } @@ -234,7 +237,7 @@ where } .into(), }); - } else if array.all_invalid()? { + } else if array.clone().into_array().all_invalid()? { return Ok(IntegerStats { src: array.clone(), null_count: u32::try_from(array.len())?, @@ -252,7 +255,7 @@ where }); } - let validity = array.validity_mask()?; + let validity = array.validity_mask(); let null_count = validity.false_count(); let value_count = validity.true_count(); @@ -347,12 +350,13 @@ where u32::MAX }; - let min = array + let array_ref = array.clone().into_array(); + let min = array_ref .statistics() .compute_as::(Stat::Min) .vortex_expect("min should be computed"); - let max = array + let max = array_ref .statistics() .compute_as::(Stat::Max) .vortex_expect("max should be computed"); diff --git a/vortex-btrblocks/src/compressor/mod.rs b/vortex-btrblocks/src/compressor/mod.rs index 5c3a31271cd..dea05498efb 100644 --- a/vortex-btrblocks/src/compressor/mod.rs +++ b/vortex-btrblocks/src/compressor/mod.rs @@ -16,6 +16,7 @@ //! result. If compression did not shrink the array, the original is returned. use vortex_array::ArrayRef; +use vortex_array::DynArray; use vortex_array::IntoArray; use vortex_array::arrays::ConstantArray; use vortex_array::scalar::Scalar; @@ -148,16 +149,20 @@ where ctx: CompressorContext, excludes: &[::CodeType], ) -> VortexResult { + let array_ref = array.clone().into_array(); + // Avoid compressing empty arrays. - if array.is_empty() { - return Ok(array.to_array()); + if array_ref.is_empty() { + return Ok(array_ref); } // Avoid compressing all-null arrays. - if array.all_invalid()? { - return Ok( - ConstantArray::new(Scalar::null(array.dtype().clone()), array.len()).into_array(), - ); + if array_ref.all_invalid()? { + return Ok(ConstantArray::new( + Scalar::null(array_ref.dtype().clone()), + array_ref.len(), + ) + .into_array()); } // Generate stats on the array directly. @@ -165,11 +170,11 @@ where let best_scheme = self.choose_scheme(btr_blocks_compressor, &stats, ctx, excludes)?; let output = best_scheme.compress(btr_blocks_compressor, &stats, ctx, excludes)?; - if output.nbytes() < array.nbytes() { + if output.nbytes() < array_ref.nbytes() { Ok(output) } else { tracing::debug!("resulting tree too large: {}", output.encoding_id()); - Ok(array.to_array()) + Ok(array_ref) } } } diff --git a/vortex-btrblocks/src/compressor/rle.rs b/vortex-btrblocks/src/compressor/rle.rs index baa3e7b2656..2bd07830bdc 100644 --- a/vortex-btrblocks/src/compressor/rle.rs +++ b/vortex-btrblocks/src/compressor/rle.rs @@ -11,7 +11,7 @@ use vortex_array::IntoArray; use vortex_array::ToCanonical; use vortex_array::arrays::PrimitiveArray; use vortex_error::VortexResult; -use vortex_fastlanes::RLEArray; +use vortex_fastlanes::RLE; use crate::BtrBlocksCompressor; use crate::CanonicalCompressor; @@ -114,7 +114,7 @@ impl Scheme for RLEScheme { ctx: CompressorContext, excludes: &[C::Code], ) -> VortexResult { - let rle_array = RLEArray::encode(RLEStats::source(stats))?; + let rle_array = RLE::encode(RLEStats::source(stats))?; if ctx.allowed_cascading == 0 { return Ok(rle_array.into_array()); @@ -155,7 +155,7 @@ impl Scheme for RLEScheme { // SAFETY: Recursive compression doesn't affect the invariants. unsafe { - Ok(RLEArray::new_unchecked( + Ok(RLE::new_unchecked( compressed_values, compressed_indices, compressed_offsets, diff --git a/vortex-btrblocks/src/compressor/string.rs b/vortex-btrblocks/src/compressor/string.rs index cac9cf969cd..5642ee38d0e 100644 --- a/vortex-btrblocks/src/compressor/string.rs +++ b/vortex-btrblocks/src/compressor/string.rs @@ -7,6 +7,7 @@ use std::hash::Hasher; use enum_iterator::Sequence; use vortex_array::ArrayRef; use vortex_array::Canonical; +use vortex_array::DynArray; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; use vortex_array::ToCanonical; @@ -18,18 +19,17 @@ use vortex_array::arrays::MaskedArray; use vortex_array::arrays::VarBinArray; use vortex_array::arrays::VarBinView; use vortex_array::arrays::VarBinViewArray; +use vortex_array::arrays::varbinview::VarBinViewData; use vortex_array::builders::dict::dict_encode; use vortex_array::scalar::Scalar; use vortex_array::vtable::VTable; -use vortex_array::vtable::ValidityHelper; use vortex_error::VortexExpect; use vortex_error::VortexResult; use vortex_error::vortex_err; -use vortex_fsst::FSSTArray; +use vortex_fsst::FSST; use vortex_fsst::fsst_compress; use vortex_fsst::fsst_train_compressor; use vortex_sparse::Sparse; -use vortex_sparse::SparseArray; use vortex_utils::aliases::hash_set::HashSet; use super::integer::DictScheme as IntDictScheme; @@ -81,6 +81,8 @@ impl StringStats { opts: GenerateStatsOptions, ) -> VortexResult { let null_count = input + .clone() + .into_array() .statistics() .compute_null_count() .ok_or_else(|| vortex_err!("Failed to compute null_count"))?; @@ -103,12 +105,13 @@ impl StringStats { impl CompressorStats for StringStats { type ArrayVTable = VarBinView; - fn generate_opts(input: &VarBinViewArray, opts: GenerateStatsOptions) -> Self { - Self::generate_opts_fallible(input, opts) + fn generate_opts(input: &VarBinViewData, opts: GenerateStatsOptions) -> Self { + let array = VarBinViewArray::from_inner(input.clone()); + Self::generate_opts_fallible(&array, opts) .vortex_expect("StringStats::generate_opts should not fail") } - fn source(&self) -> &VarBinViewArray { + fn source(&self) -> &VarBinViewData { &self.src } @@ -359,7 +362,7 @@ impl Scheme for FSSTScheme { ) -> VortexResult { let fsst = { let compressor = fsst_train_compressor(&stats.src); - fsst_compress(&stats.src, &compressor) + fsst_compress(&stats.src, stats.src.len(), stats.src.dtype(), &compressor) }; let compressed_original_lengths = compressor.compress_canonical( @@ -380,7 +383,7 @@ impl Scheme for FSSTScheme { fsst.codes().validity().clone(), )?; - let fsst = FSSTArray::try_new( + let fsst = FSST::try_new( fsst.dtype().clone(), fsst.symbols().clone(), fsst.symbol_lengths().clone(), @@ -433,14 +436,15 @@ impl Scheme for ConstantScheme { _ctx: CompressorContext, _excludes: &[Self::CodeType], ) -> VortexResult { + let source_ref = stats.source().clone().into_array(); let scalar_idx = - (0..stats.source().len()).position(|idx| stats.source().is_valid(idx).unwrap_or(false)); + (0..stats.source().len()).position(|idx| source_ref.is_valid(idx).unwrap_or(false)); match scalar_idx { Some(idx) => { - let scalar = stats.source().scalar_at(idx)?; + let scalar = source_ref.scalar_at(idx)?; let const_arr = ConstantArray::new(scalar, stats.src.len()).into_array(); - if !stats.source().all_valid()? { + if !source_ref.all_valid()? { Ok(MaskedArray::try_new(const_arr, stats.src.validity().clone())?.into_array()) } else { Ok(const_arr) @@ -499,7 +503,7 @@ impl Scheme for NullDominated { assert!(ctx.allowed_cascading > 0); // We pass None as we only run this pathway for NULL-dominated string arrays - let sparse_encoded = SparseArray::encode(&stats.src.clone().into_array(), None)?; + let sparse_encoded = Sparse::encode(&stats.src.clone().into_array(), None)?; if let Some(sparse) = sparse_encoded.as_opt::() { // Compress the indices only (not the values for strings) @@ -512,7 +516,7 @@ impl Scheme for NullDominated { Excludes::int_only(&new_excludes), )?; - SparseArray::try_new( + Sparse::try_new( compressed_indices, sparse.patches().values().clone(), sparse.len(), @@ -541,11 +545,8 @@ impl Scheme for ZstdScheme { _ctx: CompressorContext, _excludes: &[StringCode], ) -> VortexResult { - let compacted = stats.source().compact_buffers()?; - Ok( - vortex_zstd::ZstdArray::from_var_bin_view_without_dict(&compacted, 3, 8192)? - .into_array(), - ) + let compacted = stats.src.compact_buffers()?; + Ok(vortex_zstd::Zstd::from_var_bin_view_without_dict(&compacted, 3, 8192)?.into_array()) } } @@ -566,7 +567,7 @@ impl Scheme for ZstdBuffersScheme { _excludes: &[StringCode], ) -> VortexResult { Ok( - vortex_zstd::ZstdBuffersArray::compress(&stats.source().clone().into_array(), 3)? + vortex_zstd::ZstdBuffersData::compress(&stats.src.clone().into_array(), 3)? .into_array(), ) } diff --git a/vortex-btrblocks/src/compressor/temporal.rs b/vortex-btrblocks/src/compressor/temporal.rs index 6fb917be58d..11ab8fcb4d6 100644 --- a/vortex-btrblocks/src/compressor/temporal.rs +++ b/vortex-btrblocks/src/compressor/temporal.rs @@ -8,7 +8,7 @@ use vortex_array::Canonical; use vortex_array::IntoArray; use vortex_array::ToCanonical; use vortex_array::arrays::TemporalArray; -use vortex_datetime_parts::DateTimePartsArray; +use vortex_datetime_parts::DateTimeParts; use vortex_datetime_parts::TemporalParts; use vortex_datetime_parts::split_temporal; use vortex_error::VortexResult; @@ -48,5 +48,5 @@ pub fn compress_temporal( Excludes::none(), )?; - Ok(DateTimePartsArray::try_new(dtype, days, seconds, subseconds)?.into_array()) + Ok(DateTimeParts::try_new(dtype, days, seconds, subseconds)?.into_array()) } diff --git a/vortex-btrblocks/src/scheme.rs b/vortex-btrblocks/src/scheme.rs index 1b12a5930e5..03107adfec0 100644 --- a/vortex-btrblocks/src/scheme.rs +++ b/vortex-btrblocks/src/scheme.rs @@ -25,6 +25,7 @@ use std::hash::Hash; use std::hash::Hasher; use vortex_array::ArrayRef; +use vortex_array::IntoArray; use vortex_error::VortexResult; use crate::BtrBlocksCompressor; @@ -105,7 +106,8 @@ pub trait SchemeExt: Scheme { let sample = if ctx.is_sample { stats.clone() } else { - let source_len = stats.source().len(); + let source_ref = stats.source().clone().into_array(); + let source_len = source_ref.len(); let sample_count = sample_count_approx_one_percent(source_len); tracing::trace!( @@ -120,7 +122,7 @@ pub trait SchemeExt: Scheme { let after = self .compress(btr_blocks_compressor, &sample, ctx.as_sample(), excludes)? .nbytes(); - let before = sample.source().nbytes(); + let before = sample.source().clone().into_array().nbytes(); tracing::debug!( "estimate_compression_ratio_with_sampling(compressor={self:#?} ctx={ctx:?}) = {}", diff --git a/vortex-cuda/src/arrow/canonical.rs b/vortex-cuda/src/arrow/canonical.rs index 65115cbf2f3..763aed4569e 100644 --- a/vortex-cuda/src/arrow/canonical.rs +++ b/vortex-cuda/src/arrow/canonical.rs @@ -69,7 +69,7 @@ fn export_canonical( let len = primitive.len(); let PrimitiveArrayParts { buffer, validity, .. - } = primitive.into_parts(); + } = primitive.into_inner().into_parts(); check_validity_empty(&validity)?; @@ -96,7 +96,7 @@ fn export_canonical( values_type, validity, .. - } = decimal.into_parts(); + } = decimal.into_inner().into_parts(); // verify that there is no null buffer check_validity_empty(&validity)?; @@ -121,7 +121,7 @@ fn export_canonical( let PrimitiveArrayParts { buffer, validity, .. - } = values.into_parts(); + } = values.into_inner().into_parts(); check_validity_empty(&validity)?; diff --git a/vortex-cuda/src/arrow/varbinview.rs b/vortex-cuda/src/arrow/varbinview.rs index 891724b84f6..8c450d16844 100644 --- a/vortex-cuda/src/arrow/varbinview.rs +++ b/vortex-cuda/src/arrow/varbinview.rs @@ -38,7 +38,7 @@ pub(crate) async fn copy_varbinview_to_varbin( buffers, validity, .. - } = array.into_parts(); + } = array.into_inner().into_parts(); // TODO(aduffy): handle nulls check_validity_empty(&validity)?; diff --git a/vortex-cuda/src/canonical.rs b/vortex-cuda/src/canonical.rs index d4eb37e09f3..1927e981b36 100644 --- a/vortex-cuda/src/canonical.rs +++ b/vortex-cuda/src/canonical.rs @@ -81,7 +81,7 @@ impl CanonicalCudaExt for Canonical { buffer, validity, .. - } = prim.into_parts(); + } = prim.into_inner().into_parts(); Ok(Canonical::Primitive(PrimitiveArray::from_byte_buffer( buffer.try_into_host()?.await?, ptype, @@ -95,7 +95,7 @@ impl CanonicalCudaExt for Canonical { values_type, validity, .. - } = decimal.into_parts(); + } = decimal.into_inner().into_parts(); Ok(Canonical::Decimal(unsafe { DecimalArray::new_unchecked_handle( BufferHandle::new_host(values.try_into_host()?.await?), @@ -111,7 +111,7 @@ impl CanonicalCudaExt for Canonical { buffers, validity, dtype, - } = varbinview.into_parts(); + } = varbinview.into_inner().into_parts(); // Copy all device views to host let host_views = views.try_into_host()?.await?; diff --git a/vortex-cuda/src/dynamic_dispatch/plan_builder.rs b/vortex-cuda/src/dynamic_dispatch/plan_builder.rs index c31befb902b..59044c8c07b 100644 --- a/vortex-cuda/src/dynamic_dispatch/plan_builder.rs +++ b/vortex-cuda/src/dynamic_dispatch/plan_builder.rs @@ -391,7 +391,7 @@ impl UnmaterializedPlan { fn walk_primitive(&mut self, array: ArrayRef) -> VortexResult { let prim = array.to_canonical()?.into_primitive(); - let PrimitiveArrayParts { buffer, .. } = prim.into_parts(); + let PrimitiveArrayParts { buffer, .. } = prim.into_inner().into_parts(); let buf_index = self.source_buffers.len(); self.source_buffers.push(buffer); Ok(UnmaterializedStage::new(SourceOp::load(), Some(buf_index))) @@ -407,7 +407,7 @@ impl UnmaterializedPlan { packed, patches, .. - } = bp.into_parts(); + } = bp.into_inner().into_parts(); if patches.is_some() { vortex_bail!("Dynamic dispatch does not support BitPackedArray with patches"); @@ -491,7 +491,7 @@ impl UnmaterializedPlan { .map_err(|_| vortex_err!("Expected SequenceArray"))?; let SequenceArrayParts { base, multiplier, .. - } = seq.into_parts(); + } = seq.into_inner().into_parts(); Ok(UnmaterializedStage::new( SourceOp::sequence(base.cast()?, multiplier.cast()?), @@ -504,7 +504,7 @@ impl UnmaterializedPlan { .try_into::() .map_err(|_| vortex_err!("Expected RunEndArray"))?; let offset = re.offset() as u64; - let RunEndArrayParts { ends, values } = re.into_parts(); + let RunEndArrayParts { ends, values } = re.into_inner().into_parts(); let num_runs = ends.len() as u64; let ends_smem = self.add_input_stage(ends)?; diff --git a/vortex-cuda/src/hybrid_dispatch/mod.rs b/vortex-cuda/src/hybrid_dispatch/mod.rs index 9f841649469..e75dd5791be 100644 --- a/vortex-cuda/src/hybrid_dispatch/mod.rs +++ b/vortex-cuda/src/hybrid_dispatch/mod.rs @@ -125,7 +125,7 @@ async fn try_partial_fuse( let canonical = subtree.clone().execute_cuda(ctx).await?; subtree_inputs.push(( subtree.clone(), - canonical.into_primitive().into_parts().buffer, + canonical.into_primitive().into_inner().into_parts().buffer, )); } diff --git a/vortex-cuda/src/kernel/arrays/dict.rs b/vortex-cuda/src/kernel/arrays/dict.rs index b9b2c803331..ffa8a55047f 100644 --- a/vortex-cuda/src/kernel/arrays/dict.rs +++ b/vortex-cuda/src/kernel/arrays/dict.rs @@ -65,7 +65,7 @@ impl CudaExecute for DictExecutor { #[expect(clippy::cognitive_complexity)] async fn execute_dict_prim(dict: DictArray, ctx: &mut CudaExecutionCtx) -> VortexResult { - let DictArrayParts { values, codes, .. } = dict.into_parts(); + let DictArrayParts { values, codes, .. } = dict.into_inner().into_parts(); // Execute both children to get them as primitives on the device let values_canonical = values.execute_cuda(ctx).await?; @@ -98,12 +98,12 @@ async fn execute_dict_prim_typed 0, "Non empty array"); let offset = offset as usize; diff --git a/vortex-cuda/src/kernel/encodings/date_time_parts.rs b/vortex-cuda/src/kernel/encodings/date_time_parts.rs index 50a74630160..715c2f2c33b 100644 --- a/vortex-cuda/src/kernel/encodings/date_time_parts.rs +++ b/vortex-cuda/src/kernel/encodings/date_time_parts.rs @@ -150,15 +150,15 @@ where let PrimitiveArrayParts { buffer: days_buffer, .. - } = days.into_parts(); + } = days.into_inner().into_parts(); let PrimitiveArrayParts { buffer: seconds_buffer, .. - } = seconds.into_parts(); + } = seconds.into_inner().into_parts(); let PrimitiveArrayParts { buffer: subseconds_buffer, .. - } = subseconds.into_parts(); + } = subseconds.into_inner().into_parts(); // Move buffers to device if not already there let days_device = ctx.ensure_on_device(days_buffer).await?; diff --git a/vortex-cuda/src/kernel/encodings/decimal_byte_parts.rs b/vortex-cuda/src/kernel/encodings/decimal_byte_parts.rs index f7f381708af..b46e2c2c6eb 100644 --- a/vortex-cuda/src/kernel/encodings/decimal_byte_parts.rs +++ b/vortex-cuda/src/kernel/encodings/decimal_byte_parts.rs @@ -35,13 +35,18 @@ impl CudaExecute for DecimalBytePartsExecutor { }; let decimal_dtype = *array.decimal_dtype(); - let DecimalBytePartsArrayParts { msp, .. } = array.into_parts(); + let DecimalBytePartsArrayParts { msp, .. } = array.into_inner().into_parts(); let PrimitiveArrayParts { buffer, ptype, validity, .. - } = msp.execute_cuda(ctx).await?.into_primitive().into_parts(); + } = msp + .execute_cuda(ctx) + .await? + .into_primitive() + .into_inner() + .into_parts(); // SAFETY: The primitive array's buffer is already validated with correct type. // The decimal dtype matches the array's dtype, and validity is preserved. diff --git a/vortex-cuda/src/kernel/encodings/for_.rs b/vortex-cuda/src/kernel/encodings/for_.rs index 29e00f4ec92..c3565be0f72 100644 --- a/vortex-cuda/src/kernel/encodings/for_.rs +++ b/vortex-cuda/src/kernel/encodings/for_.rs @@ -10,6 +10,7 @@ use tracing::instrument; use vortex::array::ArrayRef; use vortex::array::Canonical; use vortex::array::DynArray; +use vortex::array::IntoArray; use vortex::array::arrays::PrimitiveArray; use vortex::array::arrays::Slice; use vortex::array::arrays::primitive::PrimitiveArrayParts; @@ -68,7 +69,11 @@ impl CudaExecute for FoRExecutor { decode_bitpacked(bitpacked.clone(), reference, ctx).await? }); - return unpacked.into_primitive().slice(slice_range)?.to_canonical(); + return unpacked + .into_primitive() + .into_array() + .slice(slice_range)? + .to_canonical(); } match_each_native_simd_ptype!(array.ptype(), |P| { decode_for::

(array, ctx).await }) @@ -94,7 +99,7 @@ where let primitive = canonical.into_primitive(); let PrimitiveArrayParts { buffer, validity, .. - } = primitive.into_parts(); + } = primitive.into_inner().into_parts(); let device_buffer = ctx.ensure_on_device(buffer).await?; diff --git a/vortex-cuda/src/kernel/encodings/runend.rs b/vortex-cuda/src/kernel/encodings/runend.rs index 944545b3c44..78120f00757 100644 --- a/vortex-cuda/src/kernel/encodings/runend.rs +++ b/vortex-cuda/src/kernel/encodings/runend.rs @@ -9,6 +9,7 @@ use cudarc::driver::PushKernelArg; use tracing::instrument; use vortex::array::ArrayRef; use vortex::array::Canonical; +use vortex::array::IntoArray; use vortex::array::arrays::ConstantArray; use vortex::array::arrays::PrimitiveArray; use vortex::array::arrays::primitive::PrimitiveArrayParts; @@ -60,7 +61,7 @@ impl CudaExecute for RunEndExecutor { let offset = array.offset(); let output_len = array.len(); - let RunEndArrayParts { ends, values } = array.into_parts(); + let RunEndArrayParts { ends, values } = array.into_inner().into_parts(); let values_ptype = PType::try_from(values.dtype())?; let ends_ptype = PType::try_from(ends.dtype())?; @@ -75,6 +76,7 @@ impl CudaExecute for RunEndExecutor { if matches!(values.validity()?, Validity::AllInvalid) { return ConstantArray::new(Scalar::null(values.dtype().clone()), output_len) + .into_array() .to_canonical(); } @@ -108,12 +110,12 @@ async fn decode_runend_typed()?; diff --git a/vortex-cuda/src/kernel/encodings/zigzag.rs b/vortex-cuda/src/kernel/encodings/zigzag.rs index 7e470299ac7..4c369510760 100644 --- a/vortex-cuda/src/kernel/encodings/zigzag.rs +++ b/vortex-cuda/src/kernel/encodings/zigzag.rs @@ -72,7 +72,7 @@ where let primitive = canonical.into_primitive(); let PrimitiveArrayParts { buffer, validity, .. - } = primitive.into_parts(); + } = primitive.into_inner().into_parts(); let device_buffer = ctx.ensure_on_device(buffer).await?; diff --git a/vortex-cuda/src/kernel/encodings/zstd.rs b/vortex-cuda/src/kernel/encodings/zstd.rs index 06ff9094691..5723aa8fe49 100644 --- a/vortex-cuda/src/kernel/encodings/zstd.rs +++ b/vortex-cuda/src/kernel/encodings/zstd.rs @@ -199,7 +199,7 @@ impl CudaExecute for ZstdExecutor { ) -> VortexResult { let zstd = Self::try_specialize(array).ok_or_else(|| vortex_err!("Expected ZstdArray"))?; - match zstd.as_ref().dtype() { + match zstd.dtype() { DType::Binary(_) | DType::Utf8(_) => decode_zstd(zstd, ctx).await, _other => { debug!( @@ -222,7 +222,7 @@ async fn decode_zstd(array: ZstdArray, ctx: &mut CudaExecutionCtx) -> VortexResu dictionary, slice_start, slice_stop, - } = array.into_parts(); + } = array.into_inner().into_parts(); // nvCOMP doesn't support ZSTD dictionaries. if dictionary.is_some() { diff --git a/vortex-cuda/src/kernel/filter/decimal.rs b/vortex-cuda/src/kernel/filter/decimal.rs index 00e50d50b23..1d5332ec83d 100644 --- a/vortex-cuda/src/kernel/filter/decimal.rs +++ b/vortex-cuda/src/kernel/filter/decimal.rs @@ -23,7 +23,7 @@ pub(super) async fn filter_decimal(values, mask, ctx).await?; diff --git a/vortex-cuda/src/kernel/filter/mod.rs b/vortex-cuda/src/kernel/filter/mod.rs index 46edfe8a148..a50e351904f 100644 --- a/vortex-cuda/src/kernel/filter/mod.rs +++ b/vortex-cuda/src/kernel/filter/mod.rs @@ -53,7 +53,7 @@ impl CudaExecute for FilterExecutor { .try_into::() .map_err(|_| vortex_err!("Expected FilterArray"))?; - let FilterArrayParts { child, mask } = filter_array.into_parts(); + let FilterArrayParts { child, mask } = filter_array.into_inner().into_parts(); // Early return for trivial cases. match mask { diff --git a/vortex-cuda/src/kernel/filter/primitive.rs b/vortex-cuda/src/kernel/filter/primitive.rs index 72929e5190d..39e4e9f6833 100644 --- a/vortex-cuda/src/kernel/filter/primitive.rs +++ b/vortex-cuda/src/kernel/filter/primitive.rs @@ -24,7 +24,7 @@ where { let PrimitiveArrayParts { buffer, validity, .. - } = array.into_parts(); + } = array.into_inner().into_parts(); let filtered_validity = validity.filter(&mask)?; let filtered_values = filter_sized::(buffer, mask, ctx).await?; diff --git a/vortex-cuda/src/kernel/filter/varbinview.rs b/vortex-cuda/src/kernel/filter/varbinview.rs index 73d861116ce..3091c7d4dce 100644 --- a/vortex-cuda/src/kernel/filter/varbinview.rs +++ b/vortex-cuda/src/kernel/filter/varbinview.rs @@ -20,7 +20,7 @@ pub(super) async fn filter_varbinview( buffers, validity, dtype, - } = array.into_parts(); + } = array.into_inner().into_parts(); let filtered_validity = validity.filter(&mask)?; diff --git a/vortex-cuda/src/kernel/patches/mod.rs b/vortex-cuda/src/kernel/patches/mod.rs index 663ca621860..4c102d2db8e 100644 --- a/vortex-cuda/src/kernel/patches/mod.rs +++ b/vortex-cuda/src/kernel/patches/mod.rs @@ -71,12 +71,12 @@ pub(crate) async fn execute_patches< let PrimitiveArrayParts { buffer: indices_buffer, .. - } = indices.into_parts(); + } = indices.into_inner().into_parts(); let PrimitiveArrayParts { buffer: values_buffer, .. - } = values.into_parts(); + } = values.into_inner().into_parts(); let d_patch_indices = ctx.ensure_on_device(indices_buffer).await?; let d_patch_values = ctx.ensure_on_device(values_buffer).await?; diff --git a/vortex-cuda/src/kernel/slice/mod.rs b/vortex-cuda/src/kernel/slice/mod.rs index 15b91ec0f21..769d2060dab 100644 --- a/vortex-cuda/src/kernel/slice/mod.rs +++ b/vortex-cuda/src/kernel/slice/mod.rs @@ -6,6 +6,7 @@ use tracing::instrument; use vortex::array::ArrayRef; use vortex::array::Canonical; use vortex::array::DynArray; +use vortex::array::IntoArray; use vortex::array::arrays::Slice; use vortex::array::arrays::slice::SliceArrayParts; use vortex::error::VortexResult; @@ -33,16 +34,24 @@ impl CudaExecute for SliceExecutor { ) })?; - let SliceArrayParts { child, range } = slice_array.into_parts(); + let SliceArrayParts { child, range } = slice_array.into_inner().into_parts(); let child = child.execute_cuda(ctx).await?; match child { - Canonical::Null(null_array) => null_array.slice(range)?.to_canonical(), - Canonical::Bool(bool_array) => bool_array.slice(range)?.to_canonical(), - Canonical::Primitive(prim_array) => prim_array.slice(range)?.to_canonical(), - Canonical::Decimal(decimal_array) => decimal_array.slice(range)?.to_canonical(), - Canonical::VarBinView(varbinview) => varbinview.slice(range)?.to_canonical(), - Canonical::Extension(extension_array) => extension_array.slice(range)?.to_canonical(), + Canonical::Null(null_array) => null_array.into_array().slice(range)?.to_canonical(), + Canonical::Bool(bool_array) => bool_array.into_array().slice(range)?.to_canonical(), + Canonical::Primitive(prim_array) => { + prim_array.into_array().slice(range)?.to_canonical() + } + Canonical::Decimal(decimal_array) => { + decimal_array.into_array().slice(range)?.to_canonical() + } + Canonical::VarBinView(varbinview) => { + varbinview.into_array().slice(range)?.to_canonical() + } + Canonical::Extension(extension_array) => { + extension_array.into_array().slice(range)?.to_canonical() + } c => todo!("Slice kernel not implemented for {}", c.dtype()), } } diff --git a/vortex-duckdb/src/exporter/bool.rs b/vortex-duckdb/src/exporter/bool.rs index 75dfa195bc9..4df5701bd60 100644 --- a/vortex-duckdb/src/exporter/bool.rs +++ b/vortex-duckdb/src/exporter/bool.rs @@ -23,7 +23,11 @@ pub(crate) fn new_exporter( ) -> VortexResult> { let len = array.len(); let bits = array.to_bit_buffer(); - let validity = array.validity()?.to_array(len).execute::(ctx)?; + let validity = array + .validity() + .clone() + .to_array(len) + .execute::(ctx)?; if validity.all_false() { return Ok(all_invalid::new_exporter(len, &LogicalType::bool())); diff --git a/vortex-duckdb/src/exporter/decimal.rs b/vortex-duckdb/src/exporter/decimal.rs index c099512cf94..4836f7f22d8 100644 --- a/vortex-duckdb/src/exporter/decimal.rs +++ b/vortex-duckdb/src/exporter/decimal.rs @@ -47,7 +47,7 @@ pub(crate) fn new_exporter( decimal_dtype, values_type, values, - } = array.into_parts(); + } = array.into_inner().into_parts(); let dest_values_type = precision_to_duckdb_storage_size(&decimal_dtype)?; let nullability = validity.nullability(); let validity = validity.to_array(len).execute::(ctx)?; diff --git a/vortex-duckdb/src/exporter/fixed_size_list.rs b/vortex-duckdb/src/exporter/fixed_size_list.rs index bfea0df2034..78cc3fa9f4e 100644 --- a/vortex-duckdb/src/exporter/fixed_size_list.rs +++ b/vortex-duckdb/src/exporter/fixed_size_list.rs @@ -38,7 +38,7 @@ pub(crate) fn new_exporter( ) -> VortexResult> { let list_size = array.list_size(); let len = array.len(); - let (elements, validity, dtype) = array.into_parts(); + let (elements, validity, dtype) = array.into_inner().into_parts(); let mask = validity.to_array(len).execute::(ctx)?; let elements_exporter = new_array_exporter_with_flatten(elements, cache, ctx, true)?; diff --git a/vortex-duckdb/src/exporter/list.rs b/vortex-duckdb/src/exporter/list.rs index 9020bcf1659..8fd406d6c90 100644 --- a/vortex-duckdb/src/exporter/list.rs +++ b/vortex-duckdb/src/exporter/list.rs @@ -51,7 +51,7 @@ pub(crate) fn new_exporter( offsets, validity, dtype, - } = array.into_parts(); + } = array.into_inner().into_parts(); let num_elements = elements.len(); let validity = validity.to_array(array_len).execute::(ctx)?; diff --git a/vortex-duckdb/src/exporter/list_view.rs b/vortex-duckdb/src/exporter/list_view.rs index 2db8229f764..c907a9eaa52 100644 --- a/vortex-duckdb/src/exporter/list_view.rs +++ b/vortex-duckdb/src/exporter/list_view.rs @@ -54,7 +54,7 @@ pub(crate) fn new_exporter( offsets, sizes, validity, - } = array.into_parts(); + } = array.into_inner().into_parts(); // Cache an `elements` vector up front so that future exports can reference it. let num_elements = elements.len(); let nullability = validity.nullability(); diff --git a/vortex-duckdb/src/exporter/run_end.rs b/vortex-duckdb/src/exporter/run_end.rs index 2a27af64940..8c27368109b 100644 --- a/vortex-duckdb/src/exporter/run_end.rs +++ b/vortex-duckdb/src/exporter/run_end.rs @@ -38,7 +38,7 @@ pub(crate) fn new_exporter( ctx: &mut ExecutionCtx, ) -> VortexResult> { let offset = array.offset(); - let RunEndArrayParts { ends, values } = array.into_parts(); + let RunEndArrayParts { ends, values } = array.into_inner().into_parts(); let ends = ends.execute::(ctx)?; let values_exporter = new_array_exporter(values.clone(), cache, ctx)?; diff --git a/vortex-duckdb/src/exporter/varbinview.rs b/vortex-duckdb/src/exporter/varbinview.rs index 13a59d242ef..2fecd2a2070 100644 --- a/vortex-duckdb/src/exporter/varbinview.rs +++ b/vortex-duckdb/src/exporter/varbinview.rs @@ -37,7 +37,7 @@ pub(crate) fn new_exporter( dtype, views, buffers, - } = array.into_parts(); + } = array.into_inner().into_parts(); let validity = validity.to_array(len).execute::(ctx)?; if validity.all_false() { let ltype = LogicalType::try_from(dtype)?; diff --git a/vortex-file/src/v2/file_stats_reader.rs b/vortex-file/src/v2/file_stats_reader.rs index f8de172fea9..ab3fe42ffca 100644 --- a/vortex-file/src/v2/file_stats_reader.rs +++ b/vortex-file/src/v2/file_stats_reader.rs @@ -101,6 +101,7 @@ impl FileStatsLayoutReader { let result = pruning .execute::(&mut ctx)? .into_bool() + .into_array() .scalar_at(0)?; Ok(result.as_bool().value() == Some(true)) diff --git a/vortex-layout/src/layouts/repartition.rs b/vortex-layout/src/layouts/repartition.rs index a022abd27cb..ee106303045 100644 --- a/vortex-layout/src/layouts/repartition.rs +++ b/vortex-layout/src/layouts/repartition.rs @@ -148,7 +148,7 @@ impl LayoutStrategy for RepartitionStrategy { if !chunked.is_empty() { yield ( sequence_pointer.advance(), - chunked.to_canonical()?.into_array(), + chunked.into_array().to_canonical()?.into_array(), ) } } @@ -161,7 +161,7 @@ impl LayoutStrategy for RepartitionStrategy { if !to_flush.is_empty() { yield ( sequence_pointer.advance(), - to_flush.to_canonical()?.into_array(), + to_flush.into_array().to_canonical()?.into_array(), ) } } diff --git a/vortex-layout/src/layouts/row_idx/mod.rs b/vortex-layout/src/layouts/row_idx/mod.rs index 8ce4a2f5f4b..c3c1138f4b5 100644 --- a/vortex-layout/src/layouts/row_idx/mod.rs +++ b/vortex-layout/src/layouts/row_idx/mod.rs @@ -36,6 +36,7 @@ use vortex_array::scalar::PValue; use vortex_error::VortexExpect; use vortex_error::VortexResult; use vortex_mask::Mask; +use vortex_sequence::Sequence; use vortex_sequence::SequenceArray; use vortex_session::VortexSession; use vortex_utils::aliases::dash_map::DashMap; @@ -254,7 +255,7 @@ impl LayoutReader for RowIdxLayoutReader { // Returns a SequenceArray representing the row indices for the given row range, fn idx_array(row_offset: u64, row_range: &Range) -> SequenceArray { - SequenceArray::try_new( + Sequence::try_new( PValue::U64(row_offset + row_range.start), PValue::U64(1), PType::U64, diff --git a/vortex-layout/src/layouts/zoned/writer.rs b/vortex-layout/src/layouts/zoned/writer.rs index 1800532b1ee..f6850826339 100644 --- a/vortex-layout/src/layouts/zoned/writer.rs +++ b/vortex-layout/src/layouts/zoned/writer.rs @@ -7,6 +7,7 @@ use async_trait::async_trait; use futures::StreamExt as _; use parking_lot::Mutex; use vortex_array::ArrayContext; +use vortex_array::IntoArray; use vortex_array::expr::stats::Stat; use vortex_array::stats::PRUNING_STATS; use vortex_error::VortexResult; @@ -144,6 +145,8 @@ impl LayoutStrategy for ZonedStrategy { // the table depends on which stats were successfully computed. let stats_stream = stats_table .array() + .clone() + .into_array() .to_array_stream() .sequenced(eof.split_off()); let zones_layout = self diff --git a/vortex-python/src/arrays/native.rs b/vortex-python/src/arrays/native.rs index 34e7cae3594..832ef926849 100644 --- a/vortex-python/src/arrays/native.rs +++ b/vortex-python/src/arrays/native.rs @@ -5,7 +5,6 @@ use std::ops::Deref; use pyo3::PyClass; use pyo3::prelude::*; -use vortex::array::ArrayAdapter; use vortex::array::ArrayRef; use vortex::array::DynArray; use vortex::array::arrays::Bool; @@ -252,13 +251,11 @@ pub trait AsArrayRef { impl AsArrayRef<::Array> for PyRef<'_, V> { fn as_array_ref(&self) -> &::Array { - let any = self.as_super().inner().as_any(); - // Try new Array path first, then fall back to legacy ArrayAdapter. - if let Some(typed) = any.downcast_ref::>() { - return typed.inner(); - } - any.downcast_ref::>() + self.as_super() + .inner() + .as_any() + .downcast_ref::>() .vortex_expect("Failed to downcast array") - .as_inner() + .inner() } } diff --git a/vortex-python/src/arrays/py/vtable.rs b/vortex-python/src/arrays/py/vtable.rs index a27008f45e6..1f3c4d59454 100644 --- a/vortex-python/src/arrays/py/vtable.rs +++ b/vortex-python/src/arrays/py/vtable.rs @@ -15,7 +15,7 @@ use vortex::array::RawMetadata; use vortex::array::SerializeMetadata; use vortex::array::buffer::BufferHandle; use vortex::array::serde::ArrayChildren; -use vortex::array::stats::StatsSetRef; +use vortex::array::stats::ArrayStats; use vortex::array::validity::Validity; use vortex::array::vtable; use vortex::array::vtable::Array; @@ -64,49 +64,49 @@ impl VTable for PythonVTable { &array.dtype } - fn stats(array: &PythonArray) -> StatsSetRef<'_> { - array.stats.to_ref(array.as_ref()) + fn stats(array: &PythonArray) -> &ArrayStats { + &array.stats } - fn array_hash(array: &PythonArray, state: &mut H, _precision: Precision) { + fn array_hash(array: &Array, state: &mut H, _precision: Precision) { Arc::as_ptr(&array.object).hash(state); array.vtable.id.hash(state); array.len.hash(state); array.dtype.hash(state); } - fn array_eq(array: &PythonArray, other: &PythonArray, _precision: Precision) -> bool { + fn array_eq(array: &Array, other: &Array, _precision: Precision) -> bool { Arc::ptr_eq(&array.object, &other.object) && array.vtable.id == other.vtable.id // TODO(ngates): in the future this check is already done && array.len == other.len && array.dtype == other.dtype } - fn nbuffers(_array: &PythonArray) -> usize { + fn nbuffers(_array: &Array) -> usize { 0 } - fn buffer(_array: &PythonArray, idx: usize) -> BufferHandle { + fn buffer(_array: &Array, idx: usize) -> BufferHandle { vortex_panic!("PythonArray buffer index {idx} out of bounds") } - fn buffer_name(_array: &PythonArray, _idx: usize) -> Option { + fn buffer_name(_array: &Array, _idx: usize) -> Option { None } - fn nchildren(_array: &PythonArray) -> usize { + fn nchildren(_array: &Array) -> usize { 0 } - fn child(_array: &PythonArray, idx: usize) -> ArrayRef { + fn child(_array: &Array, idx: usize) -> ArrayRef { vortex_panic!("PythonArray child index {idx} out of bounds") } - fn child_name(_array: &PythonArray, idx: usize) -> String { + fn child_name(_array: &Array, idx: usize) -> String { vortex_panic!("PythonArray child_name index {idx} out of bounds") } - fn metadata(array: &PythonArray) -> VortexResult { + fn metadata(array: &Array) -> VortexResult { Python::attach(|py| { let obj = array.object.bind(py); if !obj @@ -169,7 +169,7 @@ impl VTable for PythonVTable { impl OperationsVTable for PythonVTable { fn scalar_at( - _array: &PythonArray, + _array: &Array, _index: usize, _ctx: &mut ExecutionCtx, ) -> VortexResult { @@ -178,7 +178,7 @@ impl OperationsVTable for PythonVTable { } impl ValidityVTable for PythonVTable { - fn validity(_array: &PythonArray) -> VortexResult { + fn validity(_array: &Array) -> VortexResult { todo!() } } diff --git a/vortex-python/src/arrays/range_to_sequence.rs b/vortex-python/src/arrays/range_to_sequence.rs index 450d2fa65a3..cfd07168b8b 100644 --- a/vortex-python/src/arrays/range_to_sequence.rs +++ b/vortex-python/src/arrays/range_to_sequence.rs @@ -9,7 +9,7 @@ use vortex::buffer::Buffer; use vortex::dtype::DType; use vortex::dtype::NativePType; use vortex::dtype::Nullability; -use vortex::encodings::sequence::SequenceArray; +use vortex::encodings::sequence::Sequence; use vortex::error::VortexExpect; use vortex::error::VortexResult; use vortex::error::vortex_bail; @@ -43,7 +43,7 @@ pub fn sequence_array_from_range + Into> vortex_bail!("Step, {}, does not fit in requested dtype: {}", step, dtype); }; - Ok(SequenceArray::try_new_typed::(start, step, dtype.nullability(), len)?.into_array()) + Ok(Sequence::try_new_typed::(start, step, dtype.nullability(), len)?.into_array()) } fn range_len(start: isize, stop: isize, step: isize) -> Option { diff --git a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/arrays/list.rs b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/arrays/list.rs index 81845bb2a86..30548704ad5 100644 --- a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/arrays/list.rs +++ b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/arrays/list.rs @@ -45,7 +45,7 @@ impl FlatLayoutFixture for ListFixture { )?; // List of strings: [["a","b"], ["hello"], [], ["x","y","z"]] - let str_elements = VarBinArray::from(vec!["a", "b", "hello", "x", "y", "z"]); + let str_elements = VarBinArray::from_strs(vec!["a", "b", "hello", "x", "y", "z"]); let str_offsets = PrimitiveArray::new(buffer![0i64, 2, 3, 3, 6], Validity::NonNullable); let str_list = ListArray::try_new( str_elements.into_array(), diff --git a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/arrays/listview.rs b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/arrays/listview.rs index f65abdd6cc4..e20a7572d4b 100644 --- a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/arrays/listview.rs +++ b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/arrays/listview.rs @@ -47,7 +47,7 @@ impl FlatLayoutFixture for ListViewFixture { )?; // ListView of strings: [["a","b"], ["hello"], [], ["x","y","z"]] - let str_elements = VarBinArray::from(vec!["a", "b", "hello", "x", "y", "z"]); + let str_elements = VarBinArray::from_strs(vec!["a", "b", "hello", "x", "y", "z"]); let str_offsets = PrimitiveArray::new(buffer![0u32, 2, 3, 3], Validity::NonNullable); let str_sizes = PrimitiveArray::new(buffer![2u32, 1, 0, 3], Validity::NonNullable); let str_listview = ListViewArray::try_new( diff --git a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/arrays/struct_nested.rs b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/arrays/struct_nested.rs index 546414a49fa..db80bbcf4df 100644 --- a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/arrays/struct_nested.rs +++ b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/arrays/struct_nested.rs @@ -35,7 +35,7 @@ impl FlatLayoutFixture for StructNestedFixture { FieldNames::from(["a", "b"]), vec![ PrimitiveArray::new(buffer![10i32, 20, 30], Validity::NonNullable).into_array(), - VarBinArray::from(vec!["x", "y", "z"]).into_array(), + VarBinArray::from_strs(vec!["x", "y", "z"]).into_array(), ], 3, Validity::NonNullable, diff --git a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/arrays/varbin.rs b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/arrays/varbin.rs index ad4588ccc62..4ff469f366d 100644 --- a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/arrays/varbin.rs +++ b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/arrays/varbin.rs @@ -29,9 +29,9 @@ impl FlatLayoutFixture for VarBinFixture { } fn build(&self) -> VortexResult { - let strings = VarBinArray::from(vec!["", "hello", "こんにちは", "\u{1f980}"]); + let strings = VarBinArray::from_strs(vec!["", "hello", "こんにちは", "\u{1f980}"]); let nullable_strings = - VarBinArray::from(vec![Some("hello"), None, Some("world"), Some("")]); + VarBinArray::from_nullable_strs(vec![Some("hello"), None, Some("world"), Some("")]); let arr = StructArray::try_new( FieldNames::from(["text", "nullable_text"]), vec![strings.into_array(), nullable_strings.into_array()], diff --git a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/bytebool.rs b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/bytebool.rs index 14838e13939..d57fbaffa4a 100644 --- a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/bytebool.rs +++ b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/bytebool.rs @@ -9,7 +9,6 @@ use vortex::array::dtype::FieldNames; use vortex::array::validity::Validity; use vortex::array::vtable::ArrayId; use vortex::encodings::bytebool::ByteBool; -use vortex::encodings::bytebool::ByteBoolArray; use vortex::error::VortexResult; use super::N; @@ -61,16 +60,16 @@ impl FlatLayoutFixture for ByteBoolFixture { "edge_nulls", ]), vec![ - ByteBoolArray::from_vec(alternating, Validity::NonNullable).into_array(), - ByteBoolArray::from_vec(mostly_true, Validity::NonNullable).into_array(), - ByteBoolArray::from_vec(mixed, Validity::NonNullable).into_array(), - ByteBoolArray::from_vec(nullable_vals, nullable_validity).into_array(), - ByteBoolArray::from_vec(all_false, Validity::NonNullable).into_array(), - ByteBoolArray::from_vec(all_true, Validity::NonNullable).into_array(), - ByteBoolArray::from_vec(all_null_vals, Validity::AllInvalid).into_array(), - ByteBoolArray::from_vec(single_flip, Validity::NonNullable).into_array(), - ByteBoolArray::from_vec(sparse_true, Validity::NonNullable).into_array(), - ByteBoolArray::from_vec(edge_null_vals, edge_null_validity).into_array(), + ByteBool::from_vec(alternating, Validity::NonNullable).into_array(), + ByteBool::from_vec(mostly_true, Validity::NonNullable).into_array(), + ByteBool::from_vec(mixed, Validity::NonNullable).into_array(), + ByteBool::from_vec(nullable_vals, nullable_validity).into_array(), + ByteBool::from_vec(all_false, Validity::NonNullable).into_array(), + ByteBool::from_vec(all_true, Validity::NonNullable).into_array(), + ByteBool::from_vec(all_null_vals, Validity::AllInvalid).into_array(), + ByteBool::from_vec(single_flip, Validity::NonNullable).into_array(), + ByteBool::from_vec(sparse_true, Validity::NonNullable).into_array(), + ByteBool::from_vec(edge_null_vals, edge_null_validity).into_array(), ], N, Validity::NonNullable, diff --git a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/datetimeparts.rs b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/datetimeparts.rs index 4ef369badca..e8d1543300e 100644 --- a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/datetimeparts.rs +++ b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/datetimeparts.rs @@ -11,7 +11,6 @@ use vortex::array::extension::datetime::TimeUnit; use vortex::array::validity::Validity; use vortex::array::vtable::ArrayId; use vortex::encodings::datetime_parts::DateTimeParts; -use vortex::encodings::datetime_parts::DateTimePartsArray; use vortex::encodings::datetime_parts::split_temporal; use vortex::error::VortexResult; @@ -23,10 +22,7 @@ pub struct DateTimePartsFixture; fn encode_temporal(temporal: TemporalArray) -> VortexResult { let dtype = temporal.dtype().clone(); let parts = split_temporal(temporal)?; - Ok( - DateTimePartsArray::try_new(dtype, parts.days, parts.seconds, parts.subseconds)? - .into_array(), - ) + Ok(DateTimeParts::try_new(dtype, parts.days, parts.seconds, parts.subseconds)?.into_array()) } impl FlatLayoutFixture for DateTimePartsFixture { diff --git a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/decimal_byte_parts.rs b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/decimal_byte_parts.rs index 1b0c9ded30c..7508ed13a2a 100644 --- a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/decimal_byte_parts.rs +++ b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/decimal_byte_parts.rs @@ -10,7 +10,6 @@ use vortex::array::dtype::FieldNames; use vortex::array::validity::Validity; use vortex::array::vtable::ArrayId; use vortex::encodings::decimal_byte_parts::DecimalByteParts; -use vortex::encodings::decimal_byte_parts::DecimalBytePartsArray; use vortex::error::VortexResult; use super::N; @@ -35,19 +34,19 @@ impl FlatLayoutFixture for DecimalBytePartsFixture { let decimal_dtype = DecimalDType::new(10, 2); let values: PrimitiveArray = (0..N as i64).map(|i| i * 100 + (i % 100)).collect(); let msp_arr = values.into_array(); - let decimal_arr = DecimalBytePartsArray::try_new(msp_arr, decimal_dtype)?; + let decimal_arr = DecimalByteParts::try_new(msp_arr, decimal_dtype)?; let hi_prec_dtype = DecimalDType::new(18, 6); let hi_prec_values: PrimitiveArray = (0..N as i64) .map(|i| i * 1_000_000 + (i * 7 % 999_999)) .collect(); let hi_prec_msp = hi_prec_values.into_array(); - let hi_prec_arr = DecimalBytePartsArray::try_new(hi_prec_msp, hi_prec_dtype)?; + let hi_prec_arr = DecimalByteParts::try_new(hi_prec_msp, hi_prec_dtype)?; let neg_dtype = DecimalDType::new(10, 2); let neg_values: PrimitiveArray = (0..N as i64).map(|i| -5000 + (i * 3 % 10000)).collect(); let neg_msp = neg_values.into_array(); - let neg_arr = DecimalBytePartsArray::try_new(neg_msp, neg_dtype)?; + let neg_arr = DecimalByteParts::try_new(neg_msp, neg_dtype)?; let nullable_dtype = DecimalDType::new(12, 4); let nullable_values = PrimitiveArray::from_option_iter((0..N as i64).map(|i| { if i % 11 == 0 { @@ -57,9 +56,9 @@ impl FlatLayoutFixture for DecimalBytePartsFixture { } })) .into_array(); - let nullable_arr = DecimalBytePartsArray::try_new(nullable_values, nullable_dtype)?; + let nullable_arr = DecimalByteParts::try_new(nullable_values, nullable_dtype)?; let zero_dtype = DecimalDType::new(10, 2); - let zero_arr = DecimalBytePartsArray::try_new( + let zero_arr = DecimalByteParts::try_new( std::iter::repeat_n(0i64, N) .collect::() .into_array(), @@ -67,18 +66,17 @@ impl FlatLayoutFixture for DecimalBytePartsFixture { )?; let crossing_dtype = DecimalDType::new(12, 3); let crossing_values: PrimitiveArray = (0..N as i64).map(|i| (i % 200) - 100).collect(); - let crossing_arr = - DecimalBytePartsArray::try_new(crossing_values.into_array(), crossing_dtype)?; + let crossing_arr = DecimalByteParts::try_new(crossing_values.into_array(), crossing_dtype)?; let trailing_zero_dtype = DecimalDType::new(18, 4); let trailing_zero_values: PrimitiveArray = (0..N as i64).map(|i| (i % 1000) * 10_000).collect(); let trailing_zero_arr = - DecimalBytePartsArray::try_new(trailing_zero_values.into_array(), trailing_zero_dtype)?; + DecimalByteParts::try_new(trailing_zero_values.into_array(), trailing_zero_dtype)?; let near_limit_dtype = DecimalDType::new(18, 0); let near_limit_values: PrimitiveArray = (0..N as i64).map(|i| 900_000_000_000_000_000 - i).collect(); let near_limit_arr = - DecimalBytePartsArray::try_new(near_limit_values.into_array(), near_limit_dtype)?; + DecimalByteParts::try_new(near_limit_values.into_array(), near_limit_dtype)?; let arr = StructArray::try_new( FieldNames::from([ diff --git a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/delta.rs b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/delta.rs index 2c83df575ef..1f671ccff75 100644 --- a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/delta.rs +++ b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/delta.rs @@ -11,7 +11,6 @@ use vortex::array::dtype::FieldNames; use vortex::array::validity::Validity; use vortex::array::vtable::ArrayId; use vortex::encodings::fastlanes::Delta; -use vortex::encodings::fastlanes::DeltaArray; use vortex::error::VortexResult; use vortex_session::VortexSession; @@ -77,16 +76,16 @@ impl FlatLayoutFixture for DeltaFixture { "nullable_monotone", ]), vec![ - DeltaArray::try_from_primitive_array(&monotonic_u64, &mut ctx)?.into_array(), - DeltaArray::try_from_primitive_array(&constant_delta_u32, &mut ctx)?.into_array(), - DeltaArray::try_from_primitive_array(&large_stride_u64, &mut ctx)?.into_array(), - DeltaArray::try_from_primitive_array(&monotonic_u16, &mut ctx)?.into_array(), - DeltaArray::try_from_primitive_array(&monotonic_u8, &mut ctx)?.into_array(), - DeltaArray::try_from_primitive_array(&large_base_u64, &mut ctx)?.into_array(), - DeltaArray::try_from_primitive_array(&all_zero_deltas, &mut ctx)?.into_array(), - DeltaArray::try_from_primitive_array(&irregular_monotone, &mut ctx)?.into_array(), - DeltaArray::try_from_primitive_array(&near_overflow_base, &mut ctx)?.into_array(), - DeltaArray::try_from_primitive_array(&nullable_monotone, &mut ctx)?.into_array(), + Delta::try_from_primitive_array(&monotonic_u64, &mut ctx)?.into_array(), + Delta::try_from_primitive_array(&constant_delta_u32, &mut ctx)?.into_array(), + Delta::try_from_primitive_array(&large_stride_u64, &mut ctx)?.into_array(), + Delta::try_from_primitive_array(&monotonic_u16, &mut ctx)?.into_array(), + Delta::try_from_primitive_array(&monotonic_u8, &mut ctx)?.into_array(), + Delta::try_from_primitive_array(&large_base_u64, &mut ctx)?.into_array(), + Delta::try_from_primitive_array(&all_zero_deltas, &mut ctx)?.into_array(), + Delta::try_from_primitive_array(&irregular_monotone, &mut ctx)?.into_array(), + Delta::try_from_primitive_array(&near_overflow_base, &mut ctx)?.into_array(), + Delta::try_from_primitive_array(&nullable_monotone, &mut ctx)?.into_array(), ], N, Validity::NonNullable, diff --git a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/dict.rs b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/dict.rs index 80cb794a418..ffbf3d99d19 100644 --- a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/dict.rs +++ b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/dict.rs @@ -34,24 +34,25 @@ impl FlatLayoutFixture for DictFixture { fn build(&self) -> VortexResult { let categories = ["red", "green", "blue", "yellow", "purple"]; let str_values: Vec<&str> = (0..N).map(|i| categories[i % categories.len()]).collect(); - let str_col = VarBinArray::from(str_values); + let str_col = VarBinArray::from_strs(str_values); let int_col: PrimitiveArray = (0..N as i32).map(|i| (i % 10) * 100).collect(); let nullable_values: Vec> = (0..N) .map(|i| (i % 7 != 0).then_some(categories[i % categories.len()])) .collect(); - let nullable_col = VarBinArray::from(nullable_values); + let nullable_col = VarBinArray::from_nullable_strs(nullable_values); let single_val: Vec<&str> = (0..N).map(|_| "only_value").collect(); - let single_col = VarBinArray::from(single_val); + let single_col = VarBinArray::from_strs(single_val); let bool_cat: Vec<&str> = (0..N) .map(|i| if i % 3 == 0 { "yes" } else { "no" }) .collect(); - let bool_cat_col = VarBinArray::from(bool_cat); - let all_null_col = VarBinArray::from((0..N).map(|_| None::<&str>).collect::>()); - let single_non_null_col = VarBinArray::from( + let bool_cat_col = VarBinArray::from_strs(bool_cat); + let all_null_col = + VarBinArray::from_nullable_strs((0..N).map(|_| None::<&str>).collect::>()); + let single_non_null_col = VarBinArray::from_nullable_strs( (0..N) .map(|i| (i == N / 2).then_some("lonely")) .collect::>(), @@ -60,27 +61,27 @@ impl FlatLayoutFixture for DictFixture { (0..N).map(|i| format!("u255-{}", i % 255)).collect(); let threshold_255_refs: Vec<&str> = threshold_255_values.iter().map(String::as_str).collect(); - let threshold_255_col = VarBinArray::from(threshold_255_refs); + let threshold_255_col = VarBinArray::from_strs(threshold_255_refs); let threshold_256_values: Vec = (0..N).map(|i| format!("u256-{}", i % 256)).collect(); let threshold_256_refs: Vec<&str> = threshold_256_values.iter().map(String::as_str).collect(); - let threshold_256_col = VarBinArray::from(threshold_256_refs); + let threshold_256_col = VarBinArray::from_strs(threshold_256_refs); let threshold_257_values: Vec = (0..N).map(|i| format!("u257-{}", i % 257)).collect(); let threshold_257_refs: Vec<&str> = threshold_257_values.iter().map(String::as_str).collect(); - let threshold_257_col = VarBinArray::from(threshold_257_refs); + let threshold_257_col = VarBinArray::from_strs(threshold_257_refs); let long_values: Vec = (0..N) .map(|i| format!("long-dict-value-{i:04}-{:08x}-suffix", i * 17)) .collect(); let long_refs: Vec<&str> = long_values.iter().map(String::as_str).collect(); - let long_col = VarBinArray::from(long_refs); + let long_col = VarBinArray::from_strs(long_refs); let insertion_values = ["late", "first", "middle", "early", "last"]; let insertion_ordered: Vec<&str> = (0..N) .map(|i| insertion_values[(i * 7 + 3) % insertion_values.len()]) .collect(); - let insertion_ordered_col = VarBinArray::from(insertion_ordered); + let insertion_ordered_col = VarBinArray::from_strs(insertion_ordered); let arr = StructArray::try_new( FieldNames::from([ diff --git a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/for_.rs b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/for_.rs index 60054dc4948..995e906c6de 100644 --- a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/for_.rs +++ b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/for_.rs @@ -9,7 +9,6 @@ use vortex::array::dtype::FieldNames; use vortex::array::validity::Validity; use vortex::array::vtable::ArrayId; use vortex::encodings::fastlanes::FoR; -use vortex::encodings::fastlanes::FoRArray; use vortex::error::VortexResult; use super::N; @@ -69,16 +68,16 @@ impl FlatLayoutFixture for FoRFixture { "near_max_u64", ]), vec![ - FoRArray::encode(clustered_i32)?.into_array(), - FoRArray::encode(clustered_u64)?.into_array(), - FoRArray::encode(clustered_i64)?.into_array(), - FoRArray::encode(negative_i32)?.into_array(), - FoRArray::encode(nullable_i32)?.into_array(), - FoRArray::encode(clustered_i16)?.into_array(), - FoRArray::encode(constant_offsets)?.into_array(), - FoRArray::encode(zero_crossing_i32)?.into_array(), - FoRArray::encode(far_outlier_i64)?.into_array(), - FoRArray::encode(near_max_u64)?.into_array(), + FoR::encode(clustered_i32)?.into_array(), + FoR::encode(clustered_u64)?.into_array(), + FoR::encode(clustered_i64)?.into_array(), + FoR::encode(negative_i32)?.into_array(), + FoR::encode(nullable_i32)?.into_array(), + FoR::encode(clustered_i16)?.into_array(), + FoR::encode(constant_offsets)?.into_array(), + FoR::encode(zero_crossing_i32)?.into_array(), + FoR::encode(far_outlier_i64)?.into_array(), + FoR::encode(near_max_u64)?.into_array(), ], N, Validity::NonNullable, diff --git a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/fsst.rs b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/fsst.rs index ad1706e629d..11c2c4505df 100644 --- a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/fsst.rs +++ b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/fsst.rs @@ -42,7 +42,7 @@ impl FlatLayoutFixture for FsstFixture { .map(|i| format!("{}{}", prefixes[i % prefixes.len()], i)) .collect(); let url_refs: Vec<&str> = urls.iter().map(|s| s.as_str()).collect(); - let url_col = VarBinArray::from(url_refs); + let url_col = VarBinArray::from_strs(url_refs); let severities = ["INFO", "WARN", "ERROR", "DEBUG"]; let components = ["auth", "db", "cache", "api"]; @@ -57,37 +57,37 @@ impl FlatLayoutFixture for FsstFixture { }) .collect(); let log_refs: Vec<&str> = logs.iter().map(|s| s.as_str()).collect(); - let log_col = VarBinArray::from(log_refs); + let log_col = VarBinArray::from_strs(log_refs); let nullable_urls: Vec> = (0..N) .map(|i| (i % 7 != 0).then(|| format!("{}{}", prefixes[i % prefixes.len()], i * 3))) .collect(); let nullable_refs: Vec> = nullable_urls.iter().map(|s| s.as_deref()).collect(); - let nullable_col = VarBinArray::from(nullable_refs); + let nullable_col = VarBinArray::from_nullable_strs(nullable_refs); let short_tokens = ["a", "bb", "ccc", "dd", "e"]; let short_strs: Vec<&str> = (0..N) .map(|i| short_tokens[i % short_tokens.len()]) .collect(); - let short_col = VarBinArray::from(short_strs); + let short_col = VarBinArray::from_strs(short_strs); let empty_and_unicode_values = ["", "こんにちは", "😀", "naive", "façade", "résumé", "مرحبا"]; let empty_and_unicode: Vec<&str> = (0..N) .map(|i| empty_and_unicode_values[i % empty_and_unicode_values.len()]) .collect(); - let empty_and_unicode_col = VarBinArray::from(empty_and_unicode); + let empty_and_unicode_col = VarBinArray::from_strs(empty_and_unicode); let suffix_shared_values: Vec = (0..N) .map(|i| format!("prefix-{:04}-common-suffix", i % 64)) .collect(); let suffix_shared_refs: Vec<&str> = suffix_shared_values.iter().map(String::as_str).collect(); - let suffix_shared_col = VarBinArray::from(suffix_shared_refs); + let suffix_shared_col = VarBinArray::from_strs(suffix_shared_refs); let high_entropy_values: Vec = (0..N) .map(|i| format!("{:016x}{:016x}", i.wrapping_mul(97), i.wrapping_mul(13_579))) .collect(); let high_entropy_refs: Vec<&str> = high_entropy_values.iter().map(String::as_str).collect(); - let high_entropy_col = VarBinArray::from(high_entropy_refs); - let all_null_clustered = VarBinArray::from( + let high_entropy_col = VarBinArray::from_strs(high_entropy_refs); + let all_null_clustered = VarBinArray::from_nullable_strs( (0..N) .map(|i| { if !(16..N - 16).contains(&i) { @@ -120,14 +120,45 @@ impl FlatLayoutFixture for FsstFixture { "all_null_clustered", ]), vec![ - fsst_compress(url_col, &url_comp).into_array(), - fsst_compress(log_col, &log_comp).into_array(), - fsst_compress(nullable_col, &nullable_comp).into_array(), - fsst_compress(short_col, &short_comp).into_array(), - fsst_compress(empty_and_unicode_col, &empty_and_unicode_comp).into_array(), - fsst_compress(suffix_shared_col, &suffix_shared_comp).into_array(), - fsst_compress(high_entropy_col, &high_entropy_comp).into_array(), - fsst_compress(all_null_clustered, &all_null_clustered_comp).into_array(), + fsst_compress(&url_col, url_col.len(), url_col.dtype(), &url_comp).into_array(), + fsst_compress(&log_col, log_col.len(), log_col.dtype(), &log_comp).into_array(), + fsst_compress( + &nullable_col, + nullable_col.len(), + nullable_col.dtype(), + &nullable_comp, + ) + .into_array(), + fsst_compress(&short_col, short_col.len(), short_col.dtype(), &short_comp) + .into_array(), + fsst_compress( + &empty_and_unicode_col, + empty_and_unicode_col.len(), + empty_and_unicode_col.dtype(), + &empty_and_unicode_comp, + ) + .into_array(), + fsst_compress( + &suffix_shared_col, + suffix_shared_col.len(), + suffix_shared_col.dtype(), + &suffix_shared_comp, + ) + .into_array(), + fsst_compress( + &high_entropy_col, + high_entropy_col.len(), + high_entropy_col.dtype(), + &high_entropy_comp, + ) + .into_array(), + fsst_compress( + &all_null_clustered, + all_null_clustered.len(), + all_null_clustered.dtype(), + &all_null_clustered_comp, + ) + .into_array(), ], N, Validity::NonNullable, diff --git a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/pco.rs b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/pco.rs index 8a29c7dd161..d4d9fec3ef6 100644 --- a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/pco.rs +++ b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/pco.rs @@ -9,7 +9,6 @@ use vortex::array::dtype::FieldNames; use vortex::array::validity::Validity; use vortex::array::vtable::ArrayId; use vortex::encodings::pco::Pco; -use vortex::encodings::pco::PcoArray; use vortex::error::VortexResult; use super::N; @@ -70,14 +69,14 @@ impl FlatLayoutFixture for PcoFixture { "narrow_i16", ]), vec![ - PcoArray::from_primitive(&irregular_i64, 8, 0)?.into_array(), - PcoArray::from_primitive(&smooth_f64, 8, 0)?.into_array(), - PcoArray::from_primitive(&pattern_u32, 8, 0)?.into_array(), - PcoArray::from_primitive(&nullable_f32, 8, 0)?.into_array(), - PcoArray::from_primitive(&negative_i32, 8, 0)?.into_array(), - PcoArray::from_primitive(&constant_u16, 8, 0)?.into_array(), - PcoArray::from_primitive(&spike_outliers, 8, 0)?.into_array(), - PcoArray::from_primitive(&narrow_i16, 8, 0)?.into_array(), + Pco::from_primitive(&irregular_i64, 8, 0)?.into_array(), + Pco::from_primitive(&smooth_f64, 8, 0)?.into_array(), + Pco::from_primitive(&pattern_u32, 8, 0)?.into_array(), + Pco::from_primitive(&nullable_f32, 8, 0)?.into_array(), + Pco::from_primitive(&negative_i32, 8, 0)?.into_array(), + Pco::from_primitive(&constant_u16, 8, 0)?.into_array(), + Pco::from_primitive(&spike_outliers, 8, 0)?.into_array(), + Pco::from_primitive(&narrow_i16, 8, 0)?.into_array(), ], N, Validity::NonNullable, diff --git a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/rle.rs b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/rle.rs index d635aea5d2b..71056ec1e7a 100644 --- a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/rle.rs +++ b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/rle.rs @@ -9,7 +9,6 @@ use vortex::array::dtype::FieldNames; use vortex::array::validity::Validity; use vortex::array::vtable::ArrayId; use vortex::encodings::fastlanes::RLE; -use vortex::encodings::fastlanes::RLEArray; use vortex::error::VortexResult; use super::N; @@ -69,14 +68,14 @@ impl FlatLayoutFixture for RleFixture { "short_runs_u8", ]), vec![ - RLEArray::encode(&runs_i32)?.into_array(), - RLEArray::encode(&single_run)?.into_array(), - RLEArray::encode(&nullable_runs)?.into_array(), - RLEArray::encode(&alternating_singletons)?.into_array(), - RLEArray::encode(&exact_boundary_runs)?.into_array(), - RLEArray::encode(&giant_final_run)?.into_array(), - RLEArray::encode(&all_null_i32)?.into_array(), - RLEArray::encode(&short_runs_u8)?.into_array(), + RLE::encode(&runs_i32)?.into_array(), + RLE::encode(&single_run)?.into_array(), + RLE::encode(&nullable_runs)?.into_array(), + RLE::encode(&alternating_singletons)?.into_array(), + RLE::encode(&exact_boundary_runs)?.into_array(), + RLE::encode(&giant_final_run)?.into_array(), + RLE::encode(&all_null_i32)?.into_array(), + RLE::encode(&short_runs_u8)?.into_array(), ], N, Validity::NonNullable, diff --git a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/runend.rs b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/runend.rs index be74b072edf..793ef5be942 100644 --- a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/runend.rs +++ b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/runend.rs @@ -11,7 +11,6 @@ use vortex::array::dtype::FieldNames; use vortex::array::validity::Validity; use vortex::array::vtable::ArrayId; use vortex::encodings::runend::RunEnd; -use vortex::encodings::runend::RunEndArray; use vortex::encodings::runend::compress::runend_encode; use vortex::error::VortexResult; @@ -48,7 +47,7 @@ impl FlatLayoutFixture for RunEndFixture { } let run_prim: PrimitiveArray = values.into_iter().collect(); let (run_ends, run_values) = runend_encode(&run_prim); - let run_col = RunEndArray::try_new(run_ends.into_array(), run_values)?; + let run_col = RunEnd::try_new(run_ends.into_array(), run_values)?; let statuses = ["open", "closed", "pending", "cancelled"]; let mut status_values = Vec::new(); @@ -65,19 +64,19 @@ impl FlatLayoutFixture for RunEndFixture { remaining -= run_len; } let status_ends_prim: PrimitiveArray = status_ends.into_iter().collect(); - let status_col = RunEndArray::try_new( + let status_col = RunEnd::try_new( status_ends_prim.into_array(), - VarBinArray::from(status_values).into_array(), + VarBinArray::from_strs(status_values).into_array(), )?; let uniform_prim: PrimitiveArray = (0..N as i32).map(|i| i / 64).collect(); let (uniform_ends, uniform_values) = runend_encode(&uniform_prim); - let uniform_col = RunEndArray::try_new(uniform_ends.into_array(), uniform_values)?; + let uniform_col = RunEnd::try_new(uniform_ends.into_array(), uniform_values)?; let bool_ends: PrimitiveArray = (1..=N / 32).map(|i| (i * 32) as u16).collect(); let bool_values = BoolArray::from_iter((0..bool_ends.len()).map(|i| i % 2 == 0)).into_array(); - let bool_runs = RunEndArray::try_new(bool_ends.into_array(), bool_values)?; + let bool_runs = RunEnd::try_new(bool_ends.into_array(), bool_values)?; let nullable_run_values = PrimitiveArray::from_option_iter([ Some(10i32), None, @@ -86,18 +85,18 @@ impl FlatLayoutFixture for RunEndFixture { None, Some(0), ]); - let nullable_runs = RunEndArray::try_new( + let nullable_runs = RunEnd::try_new( PrimitiveArray::from_iter([16u16, 64, 128, 256, 512, N as u16]).into_array(), nullable_run_values.into_array(), )?; - let single_run = RunEndArray::try_new( + let single_run = RunEnd::try_new( PrimitiveArray::from_iter([N as u64]).into_array(), PrimitiveArray::from_iter([1234i64]).into_array(), )?; let singleton_values: PrimitiveArray = (0..N as i16).map(|i| i - 512).collect(); let singleton_ends: PrimitiveArray = (1..=N as u16).collect(); let alternating_singletons = - RunEndArray::try_new(singleton_ends.into_array(), singleton_values.into_array())?; + RunEnd::try_new(singleton_ends.into_array(), singleton_values.into_array())?; let arr = StructArray::try_new( FieldNames::from([ diff --git a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/sequence.rs b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/sequence.rs index 493cb9d4365..9c04c466291 100644 --- a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/sequence.rs +++ b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/sequence.rs @@ -9,7 +9,6 @@ use vortex::array::dtype::Nullability; use vortex::array::validity::Validity; use vortex::array::vtable::ArrayId; use vortex::encodings::sequence::Sequence; -use vortex::encodings::sequence::SequenceArray; use vortex::error::VortexResult; use super::N; @@ -31,25 +30,19 @@ impl FlatLayoutFixture for SequenceFixture { } fn build(&self) -> VortexResult { - let row_ids = SequenceArray::try_new_typed::(0, 1, Nullability::NonNullable, N)?; - let stepped = SequenceArray::try_new_typed::(0, 5, Nullability::NonNullable, N)?; - let offset = SequenceArray::try_new_typed::(1000, 1, Nullability::NonNullable, N)?; - let decreasing = - SequenceArray::try_new_typed::(10000, -3, Nullability::NonNullable, N)?; - let large_step = SequenceArray::try_new_typed::(0, 1000, Nullability::NonNullable, N)?; - let zero_step = SequenceArray::try_new_typed::(7, 0, Nullability::NonNullable, N)?; - let zero_crossing = - SequenceArray::try_new_typed::(-512, 1, Nullability::NonNullable, N)?; - let near_overflow = SequenceArray::try_new_typed::( - u64::MAX - N as u64, - 1, - Nullability::NonNullable, - N, - )?; + let row_ids = Sequence::try_new_typed::(0, 1, Nullability::NonNullable, N)?; + let stepped = Sequence::try_new_typed::(0, 5, Nullability::NonNullable, N)?; + let offset = Sequence::try_new_typed::(1000, 1, Nullability::NonNullable, N)?; + let decreasing = Sequence::try_new_typed::(10000, -3, Nullability::NonNullable, N)?; + let large_step = Sequence::try_new_typed::(0, 1000, Nullability::NonNullable, N)?; + let zero_step = Sequence::try_new_typed::(7, 0, Nullability::NonNullable, N)?; + let zero_crossing = Sequence::try_new_typed::(-512, 1, Nullability::NonNullable, N)?; + let near_overflow = + Sequence::try_new_typed::(u64::MAX - N as u64, 1, Nullability::NonNullable, N)?; let small_negative_i16 = - SequenceArray::try_new_typed::(1200, -2, Nullability::NonNullable, N)?; - let nullable_i64 = SequenceArray::try_new_typed::(0, 2, Nullability::Nullable, N)?; - let nullable_u32 = SequenceArray::try_new_typed::(100, 7, Nullability::Nullable, N)?; + Sequence::try_new_typed::(1200, -2, Nullability::NonNullable, N)?; + let nullable_i64 = Sequence::try_new_typed::(0, 2, Nullability::Nullable, N)?; + let nullable_u32 = Sequence::try_new_typed::(100, 7, Nullability::Nullable, N)?; let arr = StructArray::try_new( FieldNames::from([ diff --git a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/sparse.rs b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/sparse.rs index 360f15345ce..810ad769039 100644 --- a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/sparse.rs +++ b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/sparse.rs @@ -14,7 +14,6 @@ use vortex::array::scalar::Scalar; use vortex::array::validity::Validity; use vortex::array::vtable::ArrayId; use vortex::encodings::sparse::Sparse; -use vortex::encodings::sparse::SparseArray; use vortex::error::VortexResult; use super::N; @@ -43,7 +42,7 @@ impl FlatLayoutFixture for SparseFixture { let sparse_str: Vec> = (0..N) .map(|i| (i % 20 == 0).then_some("rare_value")) .collect(); - let sparse_str_col = VarBinArray::from(sparse_str); + let sparse_str_col = VarBinArray::from_nullable_strs(sparse_str); let sparse_bool_col = BoolArray::from_iter((0..N).map(|i| (i % 100 == 0).then_some(true))); @@ -89,22 +88,22 @@ impl FlatLayoutFixture for SparseFixture { "mixed_null_and_values", ]), vec![ - SparseArray::encode(&sparse_i64_col.into_array(), None)?, - SparseArray::encode(&sparse_str_col.into_array(), None)?, - SparseArray::encode(&sparse_bool_col.into_array(), None)?, - SparseArray::encode(&sparse_f64.into_array(), None)?, - SparseArray::encode(&sparse_boundary.into_array(), None)?, - SparseArray::encode( + Sparse::encode(&sparse_i64_col.into_array(), None)?, + Sparse::encode(&sparse_str_col.into_array(), None)?, + Sparse::encode(&sparse_bool_col.into_array(), None)?, + Sparse::encode(&sparse_f64.into_array(), None)?, + Sparse::encode(&sparse_boundary.into_array(), None)?, + Sparse::encode( &explicit_fill_values.into_array(), Some(Scalar::primitive(10i32, Nullability::Nullable)), )?, - SparseArray::encode(&all_default, Some(Scalar::from(10i32)))?, - SparseArray::encode(&clustered_edges.into_array(), None)?, - SparseArray::encode( + Sparse::encode(&all_default, Some(Scalar::from(10i32)))?, + Sparse::encode(&clustered_edges.into_array(), None)?, + Sparse::encode( &almost_dense.into_array(), Some(Scalar::primitive(0i32, Nullability::Nullable)), )?, - SparseArray::encode(&mixed_null_and_values.into_array(), Some(mixed_null_fill))?, + Sparse::encode(&mixed_null_and_values.into_array(), Some(mixed_null_fill))?, ], N, Validity::NonNullable, diff --git a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/zstd.rs b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/zstd.rs index 4546c9f6dbd..d3a222a6ea5 100644 --- a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/zstd.rs +++ b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/zstd.rs @@ -10,7 +10,6 @@ use vortex::array::dtype::FieldNames; use vortex::array::validity::Validity; use vortex::array::vtable::ArrayId; use vortex::encodings::zstd::Zstd; -use vortex::encodings::zstd::ZstdArray; use vortex::error::VortexResult; use super::N; @@ -87,14 +86,14 @@ impl FlatLayoutFixture for ZstdFixture { "pseudo_random", ]), vec![ - ZstdArray::from_primitive(&ints, 3, 128)?.into_array(), - ZstdArray::from_primitive(&floats, 3, 128)?.into_array(), - ZstdArray::from_primitive(&nullable_i64, 3, 128)?.into_array(), - ZstdArray::from_var_bin_view(&utf8, 3, 128)?.into_array(), - ZstdArray::from_var_bin_view(&nullable_utf8, 3, 128)?.into_array(), - ZstdArray::from_primitive(&all_zeros, 3, 128)?.into_array(), - ZstdArray::from_primitive(&all_null_i32, 3, 128)?.into_array(), - ZstdArray::from_primitive(&pseudo_random, 3, 128)?.into_array(), + Zstd::from_primitive(&ints, 3, 128)?.into_array(), + Zstd::from_primitive(&floats, 3, 128)?.into_array(), + Zstd::from_primitive(&nullable_i64, 3, 128)?.into_array(), + Zstd::from_var_bin_view(&utf8, 3, 128)?.into_array(), + Zstd::from_var_bin_view(&nullable_utf8, 3, 128)?.into_array(), + Zstd::from_primitive(&all_zeros, 3, 128)?.into_array(), + Zstd::from_primitive(&all_null_i32, 3, 128)?.into_array(), + Zstd::from_primitive(&pseudo_random, 3, 128)?.into_array(), ], N, Validity::NonNullable, diff --git a/vortex/benches/common_encoding_tree_throughput.rs b/vortex/benches/common_encoding_tree_throughput.rs index 4d88546d2df..e13a9763b18 100644 --- a/vortex/benches/common_encoding_tree_throughput.rs +++ b/vortex/benches/common_encoding_tree_throughput.rs @@ -209,7 +209,12 @@ mod setup { // Train and compress unique values with FSST let unique_varbinview = VarBinViewArray::from_iter_str(unique_strings); let fsst_compressor = fsst_train_compressor(&unique_varbinview); - let fsst_values = fsst_compress(&unique_varbinview, &fsst_compressor); + let fsst_values = fsst_compress( + &unique_varbinview, + unique_varbinview.len(), + unique_varbinview.dtype(), + &fsst_compressor, + ); // Create codes array (random indices into unique values) let codes: Vec = (0..NUM_VALUES) @@ -241,7 +246,12 @@ mod setup { // Train and compress unique values with FSST let unique_varbinview = VarBinViewArray::from_iter_str(unique_strings); let fsst_compressor = fsst_train_compressor(&unique_varbinview); - let fsst = fsst_compress(&unique_varbinview, &fsst_compressor); + let fsst = fsst_compress( + &unique_varbinview, + unique_varbinview.len(), + unique_varbinview.dtype(), + &fsst_compressor, + ); // Compress the VarBin offsets with BitPacked let codes = fsst.codes(); diff --git a/vortex/benches/single_encoding_throughput.rs b/vortex/benches/single_encoding_throughput.rs index 4776afa4a52..ff15dbdacf9 100644 --- a/vortex/benches/single_encoding_throughput.rs +++ b/vortex/benches/single_encoding_throughput.rs @@ -364,7 +364,7 @@ fn bench_fsst_compress_string(bencher: Bencher) { with_byte_counter(bencher, nbytes) .with_inputs(|| &varbinview_arr) - .bench_refs(|a| fsst_compress(*a, &fsst_compressor)); + .bench_refs(|a| fsst_compress(*a, a.len(), a.dtype(), &fsst_compressor)); } #[divan::bench(name = "fsst_decompress_string")] @@ -372,7 +372,12 @@ fn bench_fsst_decompress_string(bencher: Bencher) { let varbinview_arr = VarBinViewArray::from_iter_str(gen_varbin_words(NUM_VALUES as usize, 0.00005)); let fsst_compressor = fsst_train_compressor(&varbinview_arr); - let fsst_array = fsst_compress(&varbinview_arr, &fsst_compressor); + let fsst_array = fsst_compress( + &varbinview_arr, + varbinview_arr.len(), + varbinview_arr.dtype(), + &fsst_compressor, + ); let nbytes = varbinview_arr.into_array().nbytes() as u64; with_byte_counter(bencher, nbytes) From 5cf6f0d4909fd649f19b4ce534f0fa210d7b30b4 Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Mon, 30 Mar 2026 08:46:43 +0100 Subject: [PATCH 02/11] Array VTables 5 Signed-off-by: Nicholas Gates --- encodings/alp/public-api.lock | 210 +- encodings/bytebool/public-api.lock | 86 +- encodings/datetime-parts/public-api.lock | 106 +- encodings/decimal-byte-parts/public-api.lock | 84 +- encodings/fastlanes/public-api.lock | 412 +- encodings/fsst/public-api.lock | 96 +- encodings/pco/public-api.lock | 104 +- encodings/runend/public-api.lock | 114 +- encodings/sequence/public-api.lock | 104 +- encodings/sparse/public-api.lock | 84 +- encodings/zigzag/public-api.lock | 82 +- encodings/zstd/public-api.lock | 144 +- vortex-array/public-api.lock | 7290 ++++++++--------- vortex-array/src/arrays/bool/array.rs | 1 + .../src/arrays/bool/vtable/operations.rs | 1 + vortex-array/src/arrays/chunked/array.rs | 6 +- .../src/arrays/decimal/compute/cast.rs | 2 +- .../src/arrays/decimal/compute/fill_null.rs | 2 +- vortex-array/src/arrays/filter/array.rs | 5 + vortex-array/src/arrays/list/tests.rs | 4 +- vortex-array/src/arrays/masked/tests.rs | 8 +- .../src/arrays/masked/vtable/canonical.rs | 1 + vortex-array/src/arrays/masked/vtable/mod.rs | 5 +- vortex-array/src/arrays/null/compute/mod.rs | 11 +- .../src/arrays/primitive/array/mod.rs | 5 + .../src/arrays/primitive/compute/cast.rs | 2 +- .../src/arrays/primitive/compute/fill_null.rs | 8 +- .../src/arrays/scalar_fn/vtable/operations.rs | 2 +- vortex-array/src/arrays/struct_/array.rs | 12 + vortex-array/src/arrays/varbin/array.rs | 79 + .../src/arrays/varbin/compute/compare.rs | 4 +- vortex-array/src/arrays/varbinview/array.rs | 42 + vortex-array/src/builders/varbinview.rs | 1 + vortex-array/src/patches.rs | 4 +- .../src/scalar_fn/fns/list_contains/mod.rs | 20 +- vortex-btrblocks/public-api.lock | 10 +- .../src/compressor/float/dictionary.rs | 2 +- vortex-btrblocks/src/compressor/float/mod.rs | 2 +- .../src/compressor/integer/dictionary.rs | 2 +- .../src/compressor/integer/mod.rs | 8 +- vortex-cuda/src/dynamic_dispatch/mod.rs | 73 +- vortex-cuda/src/hybrid_dispatch/mod.rs | 34 +- vortex-cuda/src/kernel/arrays/dict.rs | 4 +- vortex-cuda/src/kernel/encodings/alp.rs | 4 +- vortex-cuda/src/kernel/encodings/bitpacked.rs | 14 +- .../src/kernel/encodings/date_time_parts.rs | 5 +- .../kernel/encodings/decimal_byte_parts.rs | 4 +- vortex-cuda/src/kernel/encodings/for_.rs | 9 +- vortex-cuda/src/kernel/encodings/runend.rs | 3 +- vortex-cuda/src/kernel/encodings/sequence.rs | 4 +- vortex-cuda/src/kernel/encodings/zigzag.rs | 4 +- vortex-cuda/src/kernel/encodings/zstd.rs | 8 +- vortex-cuda/src/kernel/patches/mod.rs | 2 +- vortex-datafusion/examples/vortex_table.rs | 2 +- vortex-datafusion/src/persistent/mod.rs | 2 +- .../src/e2e_test/vortex_scan_test.rs | 13 +- vortex-duckdb/src/exporter/sequence.rs | 2 +- vortex-ffi/examples/hello_vortex.rs | 2 +- vortex-file/src/tests.rs | 87 +- vortex-layout/public-api.lock | 6 +- vortex-layout/src/display.rs | 16 +- vortex-layout/src/layouts/chunked/reader.rs | 2 +- vortex-layout/src/layouts/flat/reader.rs | 2 +- vortex-layout/src/layouts/flat/writer.rs | 10 +- vortex-layout/src/layouts/zoned/reader.rs | 2 +- vortex/examples/tracing_vortex.rs | 2 +- vortex/src/lib.rs | 8 +- 67 files changed, 4669 insertions(+), 4820 deletions(-) diff --git a/encodings/alp/public-api.lock b/encodings/alp/public-api.lock index 28660e3d656..e352a064723 100644 --- a/encodings/alp/public-api.lock +++ b/encodings/alp/public-api.lock @@ -8,6 +8,14 @@ impl vortex_alp::ALP pub const vortex_alp::ALP::ID: vortex_array::vtable::dyn_::ArrayId +impl vortex_alp::ALP + +pub fn vortex_alp::ALP::new(encoded: vortex_array::array::ArrayRef, exponents: vortex_alp::Exponents, patches: core::option::Option) -> vortex_alp::ALPArray + +pub unsafe fn vortex_alp::ALP::new_unchecked(encoded: vortex_array::array::ArrayRef, exponents: vortex_alp::Exponents, patches: core::option::Option, dtype: vortex_array::dtype::DType) -> vortex_alp::ALPArray + +pub fn vortex_alp::ALP::try_new(encoded: vortex_array::array::ArrayRef, exponents: vortex_alp::Exponents, patches: core::option::Option) -> vortex_error::VortexResult + impl core::clone::Clone for vortex_alp::ALP pub fn vortex_alp::ALP::clone(&self) -> vortex_alp::ALP @@ -26,7 +34,7 @@ pub fn vortex_alp::ALP::filter(array: &vortex_alp::ALPArray, mask: &vortex_mask: impl vortex_array::arrays::slice::SliceKernel for vortex_alp::ALP -pub fn vortex_alp::ALP::slice(array: &Self::Array, range: core::ops::range::Range, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_alp::ALP::slice(array: &vortex_array::vtable::typed::Array, range: core::ops::range::Range, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::between::kernel::BetweenReduce for vortex_alp::ALP @@ -50,7 +58,7 @@ pub fn vortex_alp::ALP::mask(array: &vortex_alp::ALPArray, mask: &vortex_array:: impl vortex_array::vtable::VTable for vortex_alp::ALP -pub type vortex_alp::ALP::Array = vortex_alp::ALPArray +pub type vortex_alp::ALP::Array = vortex_alp::ALPData pub type vortex_alp::ALP::Metadata = vortex_array::metadata::ProstMetadata @@ -58,23 +66,23 @@ pub type vortex_alp::ALP::OperationsVTable = vortex_alp::ALP pub type vortex_alp::ALP::ValidityVTable = vortex_array::vtable::validity::ValidityVTableFromChild -pub fn vortex_alp::ALP::array_eq(array: &vortex_alp::ALPArray, other: &vortex_alp::ALPArray, precision: vortex_array::hash::Precision) -> bool +pub fn vortex_alp::ALP::array_eq(array: &vortex_array::vtable::typed::Array, other: &vortex_array::vtable::typed::Array, precision: vortex_array::hash::Precision) -> bool -pub fn vortex_alp::ALP::array_hash(array: &vortex_alp::ALPArray, state: &mut H, precision: vortex_array::hash::Precision) +pub fn vortex_alp::ALP::array_hash(array: &vortex_array::vtable::typed::Array, state: &mut H, precision: vortex_array::hash::Precision) -pub fn vortex_alp::ALP::buffer(_array: &vortex_alp::ALPArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_alp::ALP::buffer(_array: &vortex_array::vtable::typed::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_alp::ALP::buffer_name(_array: &vortex_alp::ALPArray, _idx: usize) -> core::option::Option +pub fn vortex_alp::ALP::buffer_name(_array: &vortex_array::vtable::typed::Array, _idx: usize) -> core::option::Option -pub fn vortex_alp::ALP::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_alp::ALP::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_alp::ALP::child(array: &vortex_alp::ALPArray, idx: usize) -> vortex_array::array::ArrayRef +pub fn vortex_alp::ALP::child(array: &vortex_array::vtable::typed::Array, idx: usize) -> vortex_array::array::ArrayRef -pub fn vortex_alp::ALP::child_name(array: &vortex_alp::ALPArray, idx: usize) -> alloc::string::String +pub fn vortex_alp::ALP::child_name(array: &vortex_array::vtable::typed::Array, idx: usize) -> alloc::string::String pub fn vortex_alp::ALP::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_alp::ALP::dtype(array: &vortex_alp::ALPArray) -> &vortex_array::dtype::DType +pub fn vortex_alp::ALP::dtype(array: &vortex_alp::ALPData) -> &vortex_array::dtype::DType pub fn vortex_alp::ALP::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult @@ -82,19 +90,19 @@ pub fn vortex_alp::ALP::execute_parent(array: &vortex_array::vtable::typed::Arra pub fn vortex_alp::ALP::id(&self) -> vortex_array::vtable::dyn_::ArrayId -pub fn vortex_alp::ALP::len(array: &vortex_alp::ALPArray) -> usize +pub fn vortex_alp::ALP::len(array: &vortex_alp::ALPData) -> usize -pub fn vortex_alp::ALP::metadata(array: &vortex_alp::ALPArray) -> vortex_error::VortexResult +pub fn vortex_alp::ALP::metadata(array: &vortex_array::vtable::typed::Array) -> vortex_error::VortexResult -pub fn vortex_alp::ALP::nbuffers(_array: &vortex_alp::ALPArray) -> usize +pub fn vortex_alp::ALP::nbuffers(_array: &vortex_array::vtable::typed::Array) -> usize -pub fn vortex_alp::ALP::nchildren(array: &vortex_alp::ALPArray) -> usize +pub fn vortex_alp::ALP::nchildren(array: &vortex_array::vtable::typed::Array) -> usize pub fn vortex_alp::ALP::reduce_parent(array: &vortex_array::vtable::typed::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize) -> vortex_error::VortexResult> pub fn vortex_alp::ALP::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_alp::ALP::stats(array: &vortex_alp::ALPArray) -> &vortex_array::stats::array::ArrayStats +pub fn vortex_alp::ALP::stats(array: &vortex_alp::ALPData) -> &vortex_array::stats::array::ArrayStats pub fn vortex_alp::ALP::vtable(_array: &Self::Array) -> &Self @@ -102,59 +110,53 @@ pub fn vortex_alp::ALP::with_children(array: &mut Self::Array, children: alloc:: impl vortex_array::vtable::operations::OperationsVTable for vortex_alp::ALP -pub fn vortex_alp::ALP::scalar_at(array: &vortex_alp::ALPArray, index: usize, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_alp::ALP::scalar_at(array: &vortex_array::vtable::typed::Array, index: usize, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::validity::ValidityChild for vortex_alp::ALP -pub fn vortex_alp::ALP::validity_child(array: &vortex_alp::ALPArray) -> &vortex_array::array::ArrayRef +pub fn vortex_alp::ALP::validity_child(array: &vortex_alp::ALPData) -> &vortex_array::array::ArrayRef -pub struct vortex_alp::ALPArray +pub struct vortex_alp::ALPData -impl vortex_alp::ALPArray +impl vortex_alp::ALPData -pub fn vortex_alp::ALPArray::encoded(&self) -> &vortex_array::array::ArrayRef +pub fn vortex_alp::ALPData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_alp::ALPArray::exponents(&self) -> vortex_alp::Exponents +pub fn vortex_alp::ALPData::encoded(&self) -> &vortex_array::array::ArrayRef -pub fn vortex_alp::ALPArray::into_parts(self) -> (vortex_array::array::ArrayRef, vortex_alp::Exponents, core::option::Option, vortex_array::dtype::DType) +pub fn vortex_alp::ALPData::exponents(&self) -> vortex_alp::Exponents -pub fn vortex_alp::ALPArray::new(encoded: vortex_array::array::ArrayRef, exponents: vortex_alp::Exponents, patches: core::option::Option) -> Self +pub fn vortex_alp::ALPData::into_parts(self) -> (vortex_array::array::ArrayRef, vortex_alp::Exponents, core::option::Option, vortex_array::dtype::DType) -pub fn vortex_alp::ALPArray::patches(&self) -> core::option::Option<&vortex_array::patches::Patches> +pub fn vortex_alp::ALPData::is_empty(&self) -> bool -pub fn vortex_alp::ALPArray::ptype(&self) -> vortex_array::dtype::ptype::PType +pub fn vortex_alp::ALPData::len(&self) -> usize -pub fn vortex_alp::ALPArray::try_new(encoded: vortex_array::array::ArrayRef, exponents: vortex_alp::Exponents, patches: core::option::Option) -> vortex_error::VortexResult +pub fn vortex_alp::ALPData::patches(&self) -> core::option::Option<&vortex_array::patches::Patches> -impl vortex_alp::ALPArray +pub fn vortex_alp::ALPData::ptype(&self) -> vortex_array::dtype::ptype::PType -pub fn vortex_alp::ALPArray::to_array(&self) -> vortex_array::array::ArrayRef +impl vortex_alp::ALPData -impl core::clone::Clone for vortex_alp::ALPArray +pub fn vortex_alp::ALPData::new(encoded: vortex_array::array::ArrayRef, exponents: vortex_alp::Exponents, patches: core::option::Option) -> Self -pub fn vortex_alp::ALPArray::clone(&self) -> vortex_alp::ALPArray +pub fn vortex_alp::ALPData::try_new(encoded: vortex_array::array::ArrayRef, exponents: vortex_alp::Exponents, patches: core::option::Option) -> vortex_error::VortexResult -impl core::convert::AsRef for vortex_alp::ALPArray +impl core::clone::Clone for vortex_alp::ALPData -pub fn vortex_alp::ALPArray::as_ref(&self) -> &dyn vortex_array::array::DynArray +pub fn vortex_alp::ALPData::clone(&self) -> vortex_alp::ALPData -impl core::convert::From for vortex_array::array::ArrayRef +impl core::convert::From for vortex_array::array::ArrayRef -pub fn vortex_array::array::ArrayRef::from(value: vortex_alp::ALPArray) -> vortex_array::array::ArrayRef +pub fn vortex_array::array::ArrayRef::from(value: vortex_alp::ALPData) -> vortex_array::array::ArrayRef -impl core::fmt::Debug for vortex_alp::ALPArray +impl core::fmt::Debug for vortex_alp::ALPData -pub fn vortex_alp::ALPArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_alp::ALPData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -impl core::ops::deref::Deref for vortex_alp::ALPArray +impl vortex_array::array::IntoArray for vortex_alp::ALPData -pub type vortex_alp::ALPArray::Target = dyn vortex_array::array::DynArray - -pub fn vortex_alp::ALPArray::deref(&self) -> &Self::Target - -impl vortex_array::array::IntoArray for vortex_alp::ALPArray - -pub fn vortex_alp::ALPArray::into_array(self) -> vortex_array::array::ArrayRef +pub fn vortex_alp::ALPData::into_array(self) -> vortex_array::array::ArrayRef pub struct vortex_alp::ALPMetadata @@ -182,6 +184,10 @@ impl vortex_alp::ALPRD pub const vortex_alp::ALPRD::ID: vortex_array::vtable::dyn_::ArrayId +pub unsafe fn vortex_alp::ALPRD::new_unchecked(dtype: vortex_array::dtype::DType, left_parts: vortex_array::array::ArrayRef, left_parts_dictionary: vortex_buffer::buffer::Buffer, right_parts: vortex_array::array::ArrayRef, right_bit_width: u8, left_parts_patches: core::option::Option) -> vortex_alp::ALPRDArray + +pub fn vortex_alp::ALPRD::try_new(dtype: vortex_array::dtype::DType, left_parts: vortex_array::array::ArrayRef, left_parts_dictionary: vortex_buffer::buffer::Buffer, right_parts: vortex_array::array::ArrayRef, right_bit_width: u8, left_parts_patches: core::option::Option) -> vortex_error::VortexResult + impl core::clone::Clone for vortex_alp::ALPRD pub fn vortex_alp::ALPRD::clone(&self) -> vortex_alp::ALPRD @@ -200,7 +206,7 @@ pub fn vortex_alp::ALPRD::filter(array: &vortex_alp::ALPRDArray, mask: &vortex_m impl vortex_array::arrays::slice::SliceKernel for vortex_alp::ALPRD -pub fn vortex_alp::ALPRD::slice(array: &Self::Array, range: core::ops::range::Range, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_alp::ALPRD::slice(array: &vortex_array::vtable::typed::Array, range: core::ops::range::Range, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::kernel::CastReduce for vortex_alp::ALPRD @@ -212,7 +218,7 @@ pub fn vortex_alp::ALPRD::mask(array: &vortex_alp::ALPRDArray, mask: &vortex_arr impl vortex_array::vtable::VTable for vortex_alp::ALPRD -pub type vortex_alp::ALPRD::Array = vortex_alp::ALPRDArray +pub type vortex_alp::ALPRD::Array = vortex_alp::ALPRDData pub type vortex_alp::ALPRD::Metadata = vortex_array::metadata::ProstMetadata @@ -220,23 +226,23 @@ pub type vortex_alp::ALPRD::OperationsVTable = vortex_alp::ALPRD pub type vortex_alp::ALPRD::ValidityVTable = vortex_array::vtable::validity::ValidityVTableFromChild -pub fn vortex_alp::ALPRD::array_eq(array: &vortex_alp::ALPRDArray, other: &vortex_alp::ALPRDArray, precision: vortex_array::hash::Precision) -> bool +pub fn vortex_alp::ALPRD::array_eq(array: &vortex_array::vtable::typed::Array, other: &vortex_array::vtable::typed::Array, precision: vortex_array::hash::Precision) -> bool -pub fn vortex_alp::ALPRD::array_hash(array: &vortex_alp::ALPRDArray, state: &mut H, precision: vortex_array::hash::Precision) +pub fn vortex_alp::ALPRD::array_hash(array: &vortex_array::vtable::typed::Array, state: &mut H, precision: vortex_array::hash::Precision) -pub fn vortex_alp::ALPRD::buffer(_array: &vortex_alp::ALPRDArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_alp::ALPRD::buffer(_array: &vortex_array::vtable::typed::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_alp::ALPRD::buffer_name(_array: &vortex_alp::ALPRDArray, _idx: usize) -> core::option::Option +pub fn vortex_alp::ALPRD::buffer_name(_array: &vortex_array::vtable::typed::Array, _idx: usize) -> core::option::Option -pub fn vortex_alp::ALPRD::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_alp::ALPRD::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_alp::ALPRD::child(array: &vortex_alp::ALPRDArray, idx: usize) -> vortex_array::array::ArrayRef +pub fn vortex_alp::ALPRD::child(array: &vortex_array::vtable::typed::Array, idx: usize) -> vortex_array::array::ArrayRef -pub fn vortex_alp::ALPRD::child_name(array: &vortex_alp::ALPRDArray, idx: usize) -> alloc::string::String +pub fn vortex_alp::ALPRD::child_name(array: &vortex_array::vtable::typed::Array, idx: usize) -> alloc::string::String pub fn vortex_alp::ALPRD::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_alp::ALPRD::dtype(array: &vortex_alp::ALPRDArray) -> &vortex_array::dtype::DType +pub fn vortex_alp::ALPRD::dtype(array: &vortex_alp::ALPRDData) -> &vortex_array::dtype::DType pub fn vortex_alp::ALPRD::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult @@ -244,19 +250,19 @@ pub fn vortex_alp::ALPRD::execute_parent(array: &vortex_array::vtable::typed::Ar pub fn vortex_alp::ALPRD::id(&self) -> vortex_array::vtable::dyn_::ArrayId -pub fn vortex_alp::ALPRD::len(array: &vortex_alp::ALPRDArray) -> usize +pub fn vortex_alp::ALPRD::len(array: &vortex_alp::ALPRDData) -> usize -pub fn vortex_alp::ALPRD::metadata(array: &vortex_alp::ALPRDArray) -> vortex_error::VortexResult +pub fn vortex_alp::ALPRD::metadata(array: &vortex_array::vtable::typed::Array) -> vortex_error::VortexResult -pub fn vortex_alp::ALPRD::nbuffers(_array: &vortex_alp::ALPRDArray) -> usize +pub fn vortex_alp::ALPRD::nbuffers(_array: &vortex_array::vtable::typed::Array) -> usize -pub fn vortex_alp::ALPRD::nchildren(array: &vortex_alp::ALPRDArray) -> usize +pub fn vortex_alp::ALPRD::nchildren(array: &vortex_array::vtable::typed::Array) -> usize pub fn vortex_alp::ALPRD::reduce_parent(array: &vortex_array::vtable::typed::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize) -> vortex_error::VortexResult> pub fn vortex_alp::ALPRD::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_alp::ALPRD::stats(array: &vortex_alp::ALPRDArray) -> &vortex_array::stats::array::ArrayStats +pub fn vortex_alp::ALPRD::stats(array: &vortex_alp::ALPRDData) -> &vortex_array::stats::array::ArrayStats pub fn vortex_alp::ALPRD::vtable(_array: &Self::Array) -> &Self @@ -264,83 +270,75 @@ pub fn vortex_alp::ALPRD::with_children(array: &mut Self::Array, children: alloc impl vortex_array::vtable::operations::OperationsVTable for vortex_alp::ALPRD -pub fn vortex_alp::ALPRD::scalar_at(array: &vortex_alp::ALPRDArray, index: usize, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_alp::ALPRD::scalar_at(array: &vortex_array::vtable::typed::Array, index: usize, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::validity::ValidityChild for vortex_alp::ALPRD -pub fn vortex_alp::ALPRD::validity_child(array: &vortex_alp::ALPRDArray) -> &vortex_array::array::ArrayRef - -pub struct vortex_alp::ALPRDArray - -impl vortex_alp::ALPRDArray - -pub fn vortex_alp::ALPRDArray::into_parts(self) -> vortex_alp::ALPRDArrayParts - -pub fn vortex_alp::ALPRDArray::is_f32(&self) -> bool +pub fn vortex_alp::ALPRD::validity_child(array: &vortex_alp::ALPRDData) -> &vortex_array::array::ArrayRef -pub fn vortex_alp::ALPRDArray::left_parts(&self) -> &vortex_array::array::ArrayRef +pub struct vortex_alp::ALPRDArrayParts -pub fn vortex_alp::ALPRDArray::left_parts_dictionary(&self) -> &vortex_buffer::buffer::Buffer +pub vortex_alp::ALPRDArrayParts::dtype: vortex_array::dtype::DType -pub fn vortex_alp::ALPRDArray::left_parts_patches(&self) -> core::option::Option<&vortex_array::patches::Patches> +pub vortex_alp::ALPRDArrayParts::left_parts: vortex_array::array::ArrayRef -pub fn vortex_alp::ALPRDArray::replace_left_parts_patches(&mut self, patches: core::option::Option) +pub vortex_alp::ALPRDArrayParts::left_parts_dictionary: vortex_buffer::buffer::Buffer -pub fn vortex_alp::ALPRDArray::right_bit_width(&self) -> u8 +pub vortex_alp::ALPRDArrayParts::left_parts_patches: core::option::Option -pub fn vortex_alp::ALPRDArray::right_parts(&self) -> &vortex_array::array::ArrayRef +pub vortex_alp::ALPRDArrayParts::right_parts: vortex_array::array::ArrayRef -pub fn vortex_alp::ALPRDArray::try_new(dtype: vortex_array::dtype::DType, left_parts: vortex_array::array::ArrayRef, left_parts_dictionary: vortex_buffer::buffer::Buffer, right_parts: vortex_array::array::ArrayRef, right_bit_width: u8, left_parts_patches: core::option::Option) -> vortex_error::VortexResult +impl core::clone::Clone for vortex_alp::ALPRDArrayParts -impl vortex_alp::ALPRDArray +pub fn vortex_alp::ALPRDArrayParts::clone(&self) -> vortex_alp::ALPRDArrayParts -pub fn vortex_alp::ALPRDArray::to_array(&self) -> vortex_array::array::ArrayRef +impl core::fmt::Debug for vortex_alp::ALPRDArrayParts -impl core::clone::Clone for vortex_alp::ALPRDArray +pub fn vortex_alp::ALPRDArrayParts::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub fn vortex_alp::ALPRDArray::clone(&self) -> vortex_alp::ALPRDArray +pub struct vortex_alp::ALPRDData -impl core::convert::AsRef for vortex_alp::ALPRDArray +impl vortex_alp::ALPRDData -pub fn vortex_alp::ALPRDArray::as_ref(&self) -> &dyn vortex_array::array::DynArray +pub fn vortex_alp::ALPRDData::dtype(&self) -> &vortex_array::dtype::DType -impl core::convert::From for vortex_array::array::ArrayRef +pub fn vortex_alp::ALPRDData::into_parts(self) -> vortex_alp::ALPRDArrayParts -pub fn vortex_array::array::ArrayRef::from(value: vortex_alp::ALPRDArray) -> vortex_array::array::ArrayRef +pub fn vortex_alp::ALPRDData::is_empty(&self) -> bool -impl core::fmt::Debug for vortex_alp::ALPRDArray +pub fn vortex_alp::ALPRDData::is_f32(&self) -> bool -pub fn vortex_alp::ALPRDArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_alp::ALPRDData::left_parts(&self) -> &vortex_array::array::ArrayRef -impl core::ops::deref::Deref for vortex_alp::ALPRDArray +pub fn vortex_alp::ALPRDData::left_parts_dictionary(&self) -> &vortex_buffer::buffer::Buffer -pub type vortex_alp::ALPRDArray::Target = dyn vortex_array::array::DynArray +pub fn vortex_alp::ALPRDData::left_parts_patches(&self) -> core::option::Option<&vortex_array::patches::Patches> -pub fn vortex_alp::ALPRDArray::deref(&self) -> &Self::Target +pub fn vortex_alp::ALPRDData::len(&self) -> usize -impl vortex_array::array::IntoArray for vortex_alp::ALPRDArray +pub fn vortex_alp::ALPRDData::replace_left_parts_patches(&mut self, patches: core::option::Option) -pub fn vortex_alp::ALPRDArray::into_array(self) -> vortex_array::array::ArrayRef +pub fn vortex_alp::ALPRDData::right_bit_width(&self) -> u8 -pub struct vortex_alp::ALPRDArrayParts +pub fn vortex_alp::ALPRDData::right_parts(&self) -> &vortex_array::array::ArrayRef -pub vortex_alp::ALPRDArrayParts::dtype: vortex_array::dtype::DType +pub fn vortex_alp::ALPRDData::try_new(dtype: vortex_array::dtype::DType, left_parts: vortex_array::array::ArrayRef, left_parts_dictionary: vortex_buffer::buffer::Buffer, right_parts: vortex_array::array::ArrayRef, right_bit_width: u8, left_parts_patches: core::option::Option) -> vortex_error::VortexResult -pub vortex_alp::ALPRDArrayParts::left_parts: vortex_array::array::ArrayRef +impl core::clone::Clone for vortex_alp::ALPRDData -pub vortex_alp::ALPRDArrayParts::left_parts_dictionary: vortex_buffer::buffer::Buffer +pub fn vortex_alp::ALPRDData::clone(&self) -> vortex_alp::ALPRDData -pub vortex_alp::ALPRDArrayParts::left_parts_patches: core::option::Option +impl core::convert::From for vortex_array::array::ArrayRef -pub vortex_alp::ALPRDArrayParts::right_parts: vortex_array::array::ArrayRef +pub fn vortex_array::array::ArrayRef::from(value: vortex_alp::ALPRDData) -> vortex_array::array::ArrayRef -impl core::clone::Clone for vortex_alp::ALPRDArrayParts +impl core::fmt::Debug for vortex_alp::ALPRDData -pub fn vortex_alp::ALPRDArrayParts::clone(&self) -> vortex_alp::ALPRDArrayParts +pub fn vortex_alp::ALPRDData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -impl core::fmt::Debug for vortex_alp::ALPRDArrayParts +impl vortex_array::array::IntoArray for vortex_alp::ALPRDData -pub fn vortex_alp::ALPRDArrayParts::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_alp::ALPRDData::into_array(self) -> vortex_array::array::ArrayRef pub struct vortex_alp::ALPRDMetadata @@ -404,7 +402,7 @@ pub struct vortex_alp::RDEncoder impl vortex_alp::RDEncoder -pub fn vortex_alp::RDEncoder::encode(&self, array: &vortex_array::arrays::primitive::array::PrimitiveArray) -> vortex_alp::ALPRDArray +pub fn vortex_alp::RDEncoder::encode(&self, array: &vortex_array::arrays::primitive::vtable::PrimitiveArray) -> vortex_alp::ALPRDArray pub fn vortex_alp::RDEncoder::from_parts(right_bit_width: u8, codes: alloc::vec::Vec) -> Self @@ -584,10 +582,14 @@ pub fn f64::to_bits(value: Self) -> Self::UINT pub fn f64::to_u16(bits: Self::UINT) -> u16 -pub fn vortex_alp::alp_encode(parray: &vortex_array::arrays::primitive::array::PrimitiveArray, exponents: core::option::Option) -> vortex_error::VortexResult +pub fn vortex_alp::alp_encode(parray: &vortex_array::arrays::primitive::vtable::PrimitiveArray, exponents: core::option::Option) -> vortex_error::VortexResult pub fn vortex_alp::alp_rd_decode(left_parts: vortex_buffer::buffer::Buffer, left_parts_dict: &[u16], right_bit_width: u8, right_parts: vortex_buffer::buffer::Buffer<::UINT>, left_parts_patches: core::option::Option, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult> -pub fn vortex_alp::decompress_into_array(array: vortex_alp::ALPArray, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_alp::decompress_into_array(array: vortex_alp::ALPArray, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult pub fn vortex_alp::initialize(session: &mut vortex_session::VortexSession) + +pub type vortex_alp::ALPArray = vortex_array::vtable::typed::Array + +pub type vortex_alp::ALPRDArray = vortex_array::vtable::typed::Array diff --git a/encodings/bytebool/public-api.lock b/encodings/bytebool/public-api.lock index fefe8f07fe1..a569077a057 100644 --- a/encodings/bytebool/public-api.lock +++ b/encodings/bytebool/public-api.lock @@ -6,6 +6,8 @@ impl vortex_bytebool::ByteBool pub const vortex_bytebool::ByteBool::ID: vortex_array::vtable::dyn_::ArrayId +pub fn vortex_bytebool::ByteBool::from_vec>(data: alloc::vec::Vec, validity: V) -> vortex_bytebool::ByteBoolArray + impl core::clone::Clone for vortex_bytebool::ByteBool pub fn vortex_bytebool::ByteBool::clone(&self) -> vortex_bytebool::ByteBool @@ -32,7 +34,7 @@ pub fn vortex_bytebool::ByteBool::mask(array: &vortex_bytebool::ByteBoolArray, m impl vortex_array::vtable::VTable for vortex_bytebool::ByteBool -pub type vortex_bytebool::ByteBool::Array = vortex_bytebool::ByteBoolArray +pub type vortex_bytebool::ByteBool::Array = vortex_bytebool::ByteBoolData pub type vortex_bytebool::ByteBool::Metadata = vortex_array::metadata::EmptyMetadata @@ -40,23 +42,23 @@ pub type vortex_bytebool::ByteBool::OperationsVTable = vortex_bytebool::ByteBool pub type vortex_bytebool::ByteBool::ValidityVTable = vortex_array::vtable::validity::ValidityVTableFromValidityHelper -pub fn vortex_bytebool::ByteBool::array_eq(array: &vortex_bytebool::ByteBoolArray, other: &vortex_bytebool::ByteBoolArray, precision: vortex_array::hash::Precision) -> bool +pub fn vortex_bytebool::ByteBool::array_eq(array: &vortex_array::vtable::typed::Array, other: &vortex_array::vtable::typed::Array, precision: vortex_array::hash::Precision) -> bool -pub fn vortex_bytebool::ByteBool::array_hash(array: &vortex_bytebool::ByteBoolArray, state: &mut H, precision: vortex_array::hash::Precision) +pub fn vortex_bytebool::ByteBool::array_hash(array: &vortex_array::vtable::typed::Array, state: &mut H, precision: vortex_array::hash::Precision) -pub fn vortex_bytebool::ByteBool::buffer(array: &vortex_bytebool::ByteBoolArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_bytebool::ByteBool::buffer(array: &vortex_array::vtable::typed::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_bytebool::ByteBool::buffer_name(_array: &vortex_bytebool::ByteBoolArray, idx: usize) -> core::option::Option +pub fn vortex_bytebool::ByteBool::buffer_name(_array: &vortex_array::vtable::typed::Array, idx: usize) -> core::option::Option -pub fn vortex_bytebool::ByteBool::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_bytebool::ByteBool::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_bytebool::ByteBool::child(array: &vortex_bytebool::ByteBoolArray, idx: usize) -> vortex_array::array::ArrayRef +pub fn vortex_bytebool::ByteBool::child(array: &vortex_array::vtable::typed::Array, idx: usize) -> vortex_array::array::ArrayRef -pub fn vortex_bytebool::ByteBool::child_name(_array: &vortex_bytebool::ByteBoolArray, idx: usize) -> alloc::string::String +pub fn vortex_bytebool::ByteBool::child_name(_array: &vortex_array::vtable::typed::Array, idx: usize) -> alloc::string::String pub fn vortex_bytebool::ByteBool::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_bytebool::ByteBool::dtype(array: &vortex_bytebool::ByteBoolArray) -> &vortex_array::dtype::DType +pub fn vortex_bytebool::ByteBool::dtype(array: &vortex_bytebool::ByteBoolData) -> &vortex_array::dtype::DType pub fn vortex_bytebool::ByteBool::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult @@ -64,19 +66,19 @@ pub fn vortex_bytebool::ByteBool::execute_parent(array: &vortex_array::vtable::t pub fn vortex_bytebool::ByteBool::id(&self) -> vortex_array::vtable::dyn_::ArrayId -pub fn vortex_bytebool::ByteBool::len(array: &vortex_bytebool::ByteBoolArray) -> usize +pub fn vortex_bytebool::ByteBool::len(array: &vortex_bytebool::ByteBoolData) -> usize -pub fn vortex_bytebool::ByteBool::metadata(_array: &vortex_bytebool::ByteBoolArray) -> vortex_error::VortexResult +pub fn vortex_bytebool::ByteBool::metadata(_array: &vortex_array::vtable::typed::Array) -> vortex_error::VortexResult -pub fn vortex_bytebool::ByteBool::nbuffers(_array: &vortex_bytebool::ByteBoolArray) -> usize +pub fn vortex_bytebool::ByteBool::nbuffers(_array: &vortex_array::vtable::typed::Array) -> usize -pub fn vortex_bytebool::ByteBool::nchildren(array: &vortex_bytebool::ByteBoolArray) -> usize +pub fn vortex_bytebool::ByteBool::nchildren(array: &vortex_array::vtable::typed::Array) -> usize pub fn vortex_bytebool::ByteBool::reduce_parent(array: &vortex_array::vtable::typed::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize) -> vortex_error::VortexResult> pub fn vortex_bytebool::ByteBool::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_bytebool::ByteBool::stats(array: &vortex_bytebool::ByteBoolArray) -> &vortex_array::stats::array::ArrayStats +pub fn vortex_bytebool::ByteBool::stats(array: &vortex_bytebool::ByteBoolData) -> &vortex_array::stats::array::ArrayStats pub fn vortex_bytebool::ByteBool::vtable(_array: &Self::Array) -> &Self @@ -84,58 +86,54 @@ pub fn vortex_bytebool::ByteBool::with_children(array: &mut Self::Array, childre impl vortex_array::vtable::operations::OperationsVTable for vortex_bytebool::ByteBool -pub fn vortex_bytebool::ByteBool::scalar_at(array: &vortex_bytebool::ByteBoolArray, index: usize, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult - -pub struct vortex_bytebool::ByteBoolArray - -impl vortex_bytebool::ByteBoolArray +pub fn vortex_bytebool::ByteBool::scalar_at(array: &vortex_array::vtable::typed::Array, index: usize, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult -pub fn vortex_bytebool::ByteBoolArray::as_slice(&self) -> &[bool] +pub struct vortex_bytebool::ByteBoolData -pub fn vortex_bytebool::ByteBoolArray::buffer(&self) -> &vortex_array::buffer::BufferHandle +impl vortex_bytebool::ByteBoolData -pub fn vortex_bytebool::ByteBoolArray::from_vec>(data: alloc::vec::Vec, validity: V) -> Self +pub fn vortex_bytebool::ByteBoolData::as_slice(&self) -> &[bool] -pub fn vortex_bytebool::ByteBoolArray::new(buffer: vortex_array::buffer::BufferHandle, validity: vortex_array::validity::Validity) -> Self +pub fn vortex_bytebool::ByteBoolData::buffer(&self) -> &vortex_array::buffer::BufferHandle -impl vortex_bytebool::ByteBoolArray +pub fn vortex_bytebool::ByteBoolData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_bytebool::ByteBoolArray::to_array(&self) -> vortex_array::array::ArrayRef +pub fn vortex_bytebool::ByteBoolData::from_vec>(data: alloc::vec::Vec, validity: V) -> Self -impl core::clone::Clone for vortex_bytebool::ByteBoolArray +pub fn vortex_bytebool::ByteBoolData::is_empty(&self) -> bool -pub fn vortex_bytebool::ByteBoolArray::clone(&self) -> vortex_bytebool::ByteBoolArray +pub fn vortex_bytebool::ByteBoolData::len(&self) -> usize -impl core::convert::AsRef for vortex_bytebool::ByteBoolArray +pub fn vortex_bytebool::ByteBoolData::new(buffer: vortex_array::buffer::BufferHandle, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_bytebool::ByteBoolArray::as_ref(&self) -> &dyn vortex_array::array::DynArray +pub fn vortex_bytebool::ByteBoolData::validity_mask(&self) -> vortex_mask::Mask -impl core::convert::From> for vortex_bytebool::ByteBoolArray +impl core::clone::Clone for vortex_bytebool::ByteBoolData -pub fn vortex_bytebool::ByteBoolArray::from(value: alloc::vec::Vec) -> Self +pub fn vortex_bytebool::ByteBoolData::clone(&self) -> vortex_bytebool::ByteBoolData -impl core::convert::From>> for vortex_bytebool::ByteBoolArray +impl core::convert::From> for vortex_bytebool::ByteBoolData -pub fn vortex_bytebool::ByteBoolArray::from(value: alloc::vec::Vec>) -> Self +pub fn vortex_bytebool::ByteBoolData::from(value: alloc::vec::Vec) -> Self -impl core::convert::From for vortex_array::array::ArrayRef +impl core::convert::From>> for vortex_bytebool::ByteBoolData -pub fn vortex_array::array::ArrayRef::from(value: vortex_bytebool::ByteBoolArray) -> vortex_array::array::ArrayRef +pub fn vortex_bytebool::ByteBoolData::from(value: alloc::vec::Vec>) -> Self -impl core::fmt::Debug for vortex_bytebool::ByteBoolArray +impl core::convert::From for vortex_array::array::ArrayRef -pub fn vortex_bytebool::ByteBoolArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_array::array::ArrayRef::from(value: vortex_bytebool::ByteBoolData) -> vortex_array::array::ArrayRef -impl core::ops::deref::Deref for vortex_bytebool::ByteBoolArray +impl core::fmt::Debug for vortex_bytebool::ByteBoolData -pub type vortex_bytebool::ByteBoolArray::Target = dyn vortex_array::array::DynArray +pub fn vortex_bytebool::ByteBoolData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub fn vortex_bytebool::ByteBoolArray::deref(&self) -> &Self::Target +impl vortex_array::array::IntoArray for vortex_bytebool::ByteBoolData -impl vortex_array::array::IntoArray for vortex_bytebool::ByteBoolArray +pub fn vortex_bytebool::ByteBoolData::into_array(self) -> vortex_array::array::ArrayRef -pub fn vortex_bytebool::ByteBoolArray::into_array(self) -> vortex_array::array::ArrayRef +impl vortex_array::vtable::validity::ValidityHelper for vortex_bytebool::ByteBoolData -impl vortex_array::vtable::validity::ValidityHelper for vortex_bytebool::ByteBoolArray +pub fn vortex_bytebool::ByteBoolData::validity(&self) -> &vortex_array::validity::Validity -pub fn vortex_bytebool::ByteBoolArray::validity(&self) -> &vortex_array::validity::Validity +pub type vortex_bytebool::ByteBoolArray = vortex_array::vtable::typed::Array diff --git a/encodings/datetime-parts/public-api.lock b/encodings/datetime-parts/public-api.lock index def613d61f4..dc3c752f77e 100644 --- a/encodings/datetime-parts/public-api.lock +++ b/encodings/datetime-parts/public-api.lock @@ -6,6 +6,8 @@ impl vortex_datetime_parts::DateTimeParts pub const vortex_datetime_parts::DateTimeParts::ID: vortex_array::vtable::dyn_::ArrayId +pub fn vortex_datetime_parts::DateTimeParts::try_new(dtype: vortex_array::dtype::DType, days: vortex_array::array::ArrayRef, seconds: vortex_array::array::ArrayRef, subseconds: vortex_array::array::ArrayRef) -> vortex_error::VortexResult + impl core::clone::Clone for vortex_datetime_parts::DateTimeParts pub fn vortex_datetime_parts::DateTimeParts::clone(&self) -> vortex_datetime_parts::DateTimeParts @@ -24,7 +26,7 @@ pub fn vortex_datetime_parts::DateTimeParts::filter(array: &vortex_datetime_part impl vortex_array::arrays::slice::SliceReduce for vortex_datetime_parts::DateTimeParts -pub fn vortex_datetime_parts::DateTimeParts::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_datetime_parts::DateTimeParts::slice(array: &vortex_array::vtable::typed::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::binary::compare::CompareKernel for vortex_datetime_parts::DateTimeParts @@ -40,7 +42,7 @@ pub fn vortex_datetime_parts::DateTimeParts::mask(array: &vortex_datetime_parts: impl vortex_array::vtable::VTable for vortex_datetime_parts::DateTimeParts -pub type vortex_datetime_parts::DateTimeParts::Array = vortex_datetime_parts::DateTimePartsArray +pub type vortex_datetime_parts::DateTimeParts::Array = vortex_datetime_parts::DateTimePartsData pub type vortex_datetime_parts::DateTimeParts::Metadata = vortex_array::metadata::ProstMetadata @@ -48,23 +50,23 @@ pub type vortex_datetime_parts::DateTimeParts::OperationsVTable = vortex_datetim pub type vortex_datetime_parts::DateTimeParts::ValidityVTable = vortex_array::vtable::validity::ValidityVTableFromChild -pub fn vortex_datetime_parts::DateTimeParts::array_eq(array: &vortex_datetime_parts::DateTimePartsArray, other: &vortex_datetime_parts::DateTimePartsArray, precision: vortex_array::hash::Precision) -> bool +pub fn vortex_datetime_parts::DateTimeParts::array_eq(array: &vortex_array::vtable::typed::Array, other: &vortex_array::vtable::typed::Array, precision: vortex_array::hash::Precision) -> bool -pub fn vortex_datetime_parts::DateTimeParts::array_hash(array: &vortex_datetime_parts::DateTimePartsArray, state: &mut H, precision: vortex_array::hash::Precision) +pub fn vortex_datetime_parts::DateTimeParts::array_hash(array: &vortex_array::vtable::typed::Array, state: &mut H, precision: vortex_array::hash::Precision) -pub fn vortex_datetime_parts::DateTimeParts::buffer(_array: &vortex_datetime_parts::DateTimePartsArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_datetime_parts::DateTimeParts::buffer(_array: &vortex_array::vtable::typed::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_datetime_parts::DateTimeParts::buffer_name(_array: &vortex_datetime_parts::DateTimePartsArray, idx: usize) -> core::option::Option +pub fn vortex_datetime_parts::DateTimeParts::buffer_name(_array: &vortex_array::vtable::typed::Array, idx: usize) -> core::option::Option -pub fn vortex_datetime_parts::DateTimeParts::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_datetime_parts::DateTimeParts::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_datetime_parts::DateTimeParts::child(array: &vortex_datetime_parts::DateTimePartsArray, idx: usize) -> vortex_array::array::ArrayRef +pub fn vortex_datetime_parts::DateTimeParts::child(array: &vortex_array::vtable::typed::Array, idx: usize) -> vortex_array::array::ArrayRef -pub fn vortex_datetime_parts::DateTimeParts::child_name(_array: &vortex_datetime_parts::DateTimePartsArray, idx: usize) -> alloc::string::String +pub fn vortex_datetime_parts::DateTimeParts::child_name(_array: &vortex_array::vtable::typed::Array, idx: usize) -> alloc::string::String pub fn vortex_datetime_parts::DateTimeParts::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_datetime_parts::DateTimeParts::dtype(array: &vortex_datetime_parts::DateTimePartsArray) -> &vortex_array::dtype::DType +pub fn vortex_datetime_parts::DateTimeParts::dtype(array: &vortex_datetime_parts::DateTimePartsData) -> &vortex_array::dtype::DType pub fn vortex_datetime_parts::DateTimeParts::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult @@ -72,19 +74,19 @@ pub fn vortex_datetime_parts::DateTimeParts::execute_parent(array: &vortex_array pub fn vortex_datetime_parts::DateTimeParts::id(&self) -> vortex_array::vtable::dyn_::ArrayId -pub fn vortex_datetime_parts::DateTimeParts::len(array: &vortex_datetime_parts::DateTimePartsArray) -> usize +pub fn vortex_datetime_parts::DateTimeParts::len(array: &vortex_datetime_parts::DateTimePartsData) -> usize -pub fn vortex_datetime_parts::DateTimeParts::metadata(array: &vortex_datetime_parts::DateTimePartsArray) -> vortex_error::VortexResult +pub fn vortex_datetime_parts::DateTimeParts::metadata(array: &vortex_array::vtable::typed::Array) -> vortex_error::VortexResult -pub fn vortex_datetime_parts::DateTimeParts::nbuffers(_array: &vortex_datetime_parts::DateTimePartsArray) -> usize +pub fn vortex_datetime_parts::DateTimeParts::nbuffers(_array: &vortex_array::vtable::typed::Array) -> usize -pub fn vortex_datetime_parts::DateTimeParts::nchildren(_array: &vortex_datetime_parts::DateTimePartsArray) -> usize +pub fn vortex_datetime_parts::DateTimeParts::nchildren(_array: &vortex_array::vtable::typed::Array) -> usize pub fn vortex_datetime_parts::DateTimeParts::reduce_parent(array: &vortex_array::vtable::typed::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize) -> vortex_error::VortexResult> pub fn vortex_datetime_parts::DateTimeParts::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_datetime_parts::DateTimeParts::stats(array: &vortex_datetime_parts::DateTimePartsArray) -> &vortex_array::stats::array::ArrayStats +pub fn vortex_datetime_parts::DateTimeParts::stats(array: &vortex_datetime_parts::DateTimePartsData) -> &vortex_array::stats::array::ArrayStats pub fn vortex_datetime_parts::DateTimeParts::vtable(_array: &Self::Array) -> &Self @@ -92,79 +94,71 @@ pub fn vortex_datetime_parts::DateTimeParts::with_children(array: &mut Self::Arr impl vortex_array::vtable::operations::OperationsVTable for vortex_datetime_parts::DateTimeParts -pub fn vortex_datetime_parts::DateTimeParts::scalar_at(array: &vortex_datetime_parts::DateTimePartsArray, index: usize, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_datetime_parts::DateTimeParts::scalar_at(array: &vortex_array::vtable::typed::Array, index: usize, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::validity::ValidityChild for vortex_datetime_parts::DateTimeParts -pub fn vortex_datetime_parts::DateTimeParts::validity_child(array: &vortex_datetime_parts::DateTimePartsArray) -> &vortex_array::array::ArrayRef - -pub struct vortex_datetime_parts::DateTimePartsArray - -impl vortex_datetime_parts::DateTimePartsArray +pub fn vortex_datetime_parts::DateTimeParts::validity_child(array: &vortex_datetime_parts::DateTimePartsData) -> &vortex_array::array::ArrayRef -pub fn vortex_datetime_parts::DateTimePartsArray::days(&self) -> &vortex_array::array::ArrayRef - -pub fn vortex_datetime_parts::DateTimePartsArray::into_parts(self) -> vortex_datetime_parts::DateTimePartsArrayParts - -pub fn vortex_datetime_parts::DateTimePartsArray::seconds(&self) -> &vortex_array::array::ArrayRef +pub struct vortex_datetime_parts::DateTimePartsArrayParts -pub fn vortex_datetime_parts::DateTimePartsArray::subseconds(&self) -> &vortex_array::array::ArrayRef +pub vortex_datetime_parts::DateTimePartsArrayParts::days: vortex_array::array::ArrayRef -pub fn vortex_datetime_parts::DateTimePartsArray::try_new(dtype: vortex_array::dtype::DType, days: vortex_array::array::ArrayRef, seconds: vortex_array::array::ArrayRef, subseconds: vortex_array::array::ArrayRef) -> vortex_error::VortexResult +pub vortex_datetime_parts::DateTimePartsArrayParts::dtype: vortex_array::dtype::DType -impl vortex_datetime_parts::DateTimePartsArray +pub vortex_datetime_parts::DateTimePartsArrayParts::seconds: vortex_array::array::ArrayRef -pub fn vortex_datetime_parts::DateTimePartsArray::to_array(&self) -> vortex_array::array::ArrayRef +pub vortex_datetime_parts::DateTimePartsArrayParts::subseconds: vortex_array::array::ArrayRef -impl core::clone::Clone for vortex_datetime_parts::DateTimePartsArray +impl core::clone::Clone for vortex_datetime_parts::DateTimePartsArrayParts -pub fn vortex_datetime_parts::DateTimePartsArray::clone(&self) -> vortex_datetime_parts::DateTimePartsArray +pub fn vortex_datetime_parts::DateTimePartsArrayParts::clone(&self) -> vortex_datetime_parts::DateTimePartsArrayParts -impl core::convert::AsRef for vortex_datetime_parts::DateTimePartsArray +impl core::fmt::Debug for vortex_datetime_parts::DateTimePartsArrayParts -pub fn vortex_datetime_parts::DateTimePartsArray::as_ref(&self) -> &dyn vortex_array::array::DynArray +pub fn vortex_datetime_parts::DateTimePartsArrayParts::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -impl core::convert::From for vortex_array::array::ArrayRef +pub struct vortex_datetime_parts::DateTimePartsData -pub fn vortex_array::array::ArrayRef::from(value: vortex_datetime_parts::DateTimePartsArray) -> vortex_array::array::ArrayRef +impl vortex_datetime_parts::DateTimePartsData -impl core::convert::TryFrom for vortex_datetime_parts::DateTimePartsArray +pub fn vortex_datetime_parts::DateTimePartsData::days(&self) -> &vortex_array::array::ArrayRef -pub type vortex_datetime_parts::DateTimePartsArray::Error = vortex_error::VortexError +pub fn vortex_datetime_parts::DateTimePartsData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_datetime_parts::DateTimePartsArray::try_from(array: vortex_array::arrays::datetime::TemporalArray) -> core::result::Result +pub fn vortex_datetime_parts::DateTimePartsData::into_parts(self) -> vortex_datetime_parts::DateTimePartsArrayParts -impl core::fmt::Debug for vortex_datetime_parts::DateTimePartsArray +pub fn vortex_datetime_parts::DateTimePartsData::is_empty(&self) -> bool -pub fn vortex_datetime_parts::DateTimePartsArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_datetime_parts::DateTimePartsData::len(&self) -> usize -impl core::ops::deref::Deref for vortex_datetime_parts::DateTimePartsArray +pub fn vortex_datetime_parts::DateTimePartsData::seconds(&self) -> &vortex_array::array::ArrayRef -pub type vortex_datetime_parts::DateTimePartsArray::Target = dyn vortex_array::array::DynArray +pub fn vortex_datetime_parts::DateTimePartsData::subseconds(&self) -> &vortex_array::array::ArrayRef -pub fn vortex_datetime_parts::DateTimePartsArray::deref(&self) -> &Self::Target +pub fn vortex_datetime_parts::DateTimePartsData::try_new(dtype: vortex_array::dtype::DType, days: vortex_array::array::ArrayRef, seconds: vortex_array::array::ArrayRef, subseconds: vortex_array::array::ArrayRef) -> vortex_error::VortexResult -impl vortex_array::array::IntoArray for vortex_datetime_parts::DateTimePartsArray +impl core::clone::Clone for vortex_datetime_parts::DateTimePartsData -pub fn vortex_datetime_parts::DateTimePartsArray::into_array(self) -> vortex_array::array::ArrayRef +pub fn vortex_datetime_parts::DateTimePartsData::clone(&self) -> vortex_datetime_parts::DateTimePartsData -pub struct vortex_datetime_parts::DateTimePartsArrayParts +impl core::convert::From for vortex_array::array::ArrayRef -pub vortex_datetime_parts::DateTimePartsArrayParts::days: vortex_array::array::ArrayRef +pub fn vortex_array::array::ArrayRef::from(value: vortex_datetime_parts::DateTimePartsData) -> vortex_array::array::ArrayRef -pub vortex_datetime_parts::DateTimePartsArrayParts::dtype: vortex_array::dtype::DType +impl core::convert::TryFrom for vortex_datetime_parts::DateTimePartsData -pub vortex_datetime_parts::DateTimePartsArrayParts::seconds: vortex_array::array::ArrayRef +pub type vortex_datetime_parts::DateTimePartsData::Error = vortex_error::VortexError -pub vortex_datetime_parts::DateTimePartsArrayParts::subseconds: vortex_array::array::ArrayRef +pub fn vortex_datetime_parts::DateTimePartsData::try_from(array: vortex_array::arrays::datetime::TemporalArray) -> core::result::Result -impl core::clone::Clone for vortex_datetime_parts::DateTimePartsArrayParts +impl core::fmt::Debug for vortex_datetime_parts::DateTimePartsData -pub fn vortex_datetime_parts::DateTimePartsArrayParts::clone(&self) -> vortex_datetime_parts::DateTimePartsArrayParts +pub fn vortex_datetime_parts::DateTimePartsData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -impl core::fmt::Debug for vortex_datetime_parts::DateTimePartsArrayParts +impl vortex_array::array::IntoArray for vortex_datetime_parts::DateTimePartsData -pub fn vortex_datetime_parts::DateTimePartsArrayParts::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_datetime_parts::DateTimePartsData::into_array(self) -> vortex_array::array::ArrayRef #[repr(C)] pub struct vortex_datetime_parts::DateTimePartsMetadata @@ -225,3 +219,5 @@ pub vortex_datetime_parts::TemporalParts::subseconds: vortex_array::array::Array pub fn vortex_datetime_parts::initialize(session: &mut vortex_session::VortexSession) pub fn vortex_datetime_parts::split_temporal(array: vortex_array::arrays::datetime::TemporalArray) -> vortex_error::VortexResult + +pub type vortex_datetime_parts::DateTimePartsArray = vortex_array::vtable::typed::Array diff --git a/encodings/decimal-byte-parts/public-api.lock b/encodings/decimal-byte-parts/public-api.lock index c046b7af686..daf7dbe98ad 100644 --- a/encodings/decimal-byte-parts/public-api.lock +++ b/encodings/decimal-byte-parts/public-api.lock @@ -6,6 +6,8 @@ impl vortex_decimal_byte_parts::DecimalByteParts pub const vortex_decimal_byte_parts::DecimalByteParts::ID: vortex_array::vtable::dyn_::ArrayId +pub fn vortex_decimal_byte_parts::DecimalByteParts::try_new(msp: vortex_array::array::ArrayRef, decimal_dtype: vortex_array::dtype::decimal::DecimalDType) -> vortex_error::VortexResult + impl core::clone::Clone for vortex_decimal_byte_parts::DecimalByteParts pub fn vortex_decimal_byte_parts::DecimalByteParts::clone(&self) -> vortex_decimal_byte_parts::DecimalByteParts @@ -28,7 +30,7 @@ pub fn vortex_decimal_byte_parts::DecimalByteParts::slice(array: &vortex_decimal impl vortex_array::scalar_fn::fns::binary::compare::CompareKernel for vortex_decimal_byte_parts::DecimalByteParts -pub fn vortex_decimal_byte_parts::DecimalByteParts::compare(lhs: &Self::Array, rhs: &vortex_array::array::ArrayRef, operator: vortex_array::scalar_fn::fns::operators::CompareOperator, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_decimal_byte_parts::DecimalByteParts::compare(lhs: &vortex_array::vtable::typed::Array, rhs: &vortex_array::array::ArrayRef, operator: vortex_array::scalar_fn::fns::operators::CompareOperator, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::kernel::CastReduce for vortex_decimal_byte_parts::DecimalByteParts @@ -40,7 +42,7 @@ pub fn vortex_decimal_byte_parts::DecimalByteParts::mask(array: &vortex_decimal_ impl vortex_array::vtable::VTable for vortex_decimal_byte_parts::DecimalByteParts -pub type vortex_decimal_byte_parts::DecimalByteParts::Array = vortex_decimal_byte_parts::DecimalBytePartsArray +pub type vortex_decimal_byte_parts::DecimalByteParts::Array = vortex_decimal_byte_parts::DecimalBytePartsData pub type vortex_decimal_byte_parts::DecimalByteParts::Metadata = vortex_array::metadata::ProstMetadata @@ -48,23 +50,23 @@ pub type vortex_decimal_byte_parts::DecimalByteParts::OperationsVTable = vortex_ pub type vortex_decimal_byte_parts::DecimalByteParts::ValidityVTable = vortex_array::vtable::validity::ValidityVTableFromChild -pub fn vortex_decimal_byte_parts::DecimalByteParts::array_eq(array: &vortex_decimal_byte_parts::DecimalBytePartsArray, other: &vortex_decimal_byte_parts::DecimalBytePartsArray, precision: vortex_array::hash::Precision) -> bool +pub fn vortex_decimal_byte_parts::DecimalByteParts::array_eq(array: &vortex_array::vtable::typed::Array, other: &vortex_array::vtable::typed::Array, precision: vortex_array::hash::Precision) -> bool -pub fn vortex_decimal_byte_parts::DecimalByteParts::array_hash(array: &vortex_decimal_byte_parts::DecimalBytePartsArray, state: &mut H, precision: vortex_array::hash::Precision) +pub fn vortex_decimal_byte_parts::DecimalByteParts::array_hash(array: &vortex_array::vtable::typed::Array, state: &mut H, precision: vortex_array::hash::Precision) -pub fn vortex_decimal_byte_parts::DecimalByteParts::buffer(_array: &vortex_decimal_byte_parts::DecimalBytePartsArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_decimal_byte_parts::DecimalByteParts::buffer(_array: &vortex_array::vtable::typed::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_decimal_byte_parts::DecimalByteParts::buffer_name(_array: &vortex_decimal_byte_parts::DecimalBytePartsArray, idx: usize) -> core::option::Option +pub fn vortex_decimal_byte_parts::DecimalByteParts::buffer_name(_array: &vortex_array::vtable::typed::Array, idx: usize) -> core::option::Option -pub fn vortex_decimal_byte_parts::DecimalByteParts::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_decimal_byte_parts::DecimalByteParts::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_decimal_byte_parts::DecimalByteParts::child(array: &vortex_decimal_byte_parts::DecimalBytePartsArray, idx: usize) -> vortex_array::array::ArrayRef +pub fn vortex_decimal_byte_parts::DecimalByteParts::child(array: &vortex_array::vtable::typed::Array, idx: usize) -> vortex_array::array::ArrayRef -pub fn vortex_decimal_byte_parts::DecimalByteParts::child_name(_array: &vortex_decimal_byte_parts::DecimalBytePartsArray, idx: usize) -> alloc::string::String +pub fn vortex_decimal_byte_parts::DecimalByteParts::child_name(_array: &vortex_array::vtable::typed::Array, idx: usize) -> alloc::string::String pub fn vortex_decimal_byte_parts::DecimalByteParts::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_decimal_byte_parts::DecimalByteParts::dtype(array: &vortex_decimal_byte_parts::DecimalBytePartsArray) -> &vortex_array::dtype::DType +pub fn vortex_decimal_byte_parts::DecimalByteParts::dtype(array: &vortex_decimal_byte_parts::DecimalBytePartsData) -> &vortex_array::dtype::DType pub fn vortex_decimal_byte_parts::DecimalByteParts::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult @@ -72,19 +74,19 @@ pub fn vortex_decimal_byte_parts::DecimalByteParts::execute_parent(array: &vorte pub fn vortex_decimal_byte_parts::DecimalByteParts::id(&self) -> vortex_array::vtable::dyn_::ArrayId -pub fn vortex_decimal_byte_parts::DecimalByteParts::len(array: &vortex_decimal_byte_parts::DecimalBytePartsArray) -> usize +pub fn vortex_decimal_byte_parts::DecimalByteParts::len(array: &vortex_decimal_byte_parts::DecimalBytePartsData) -> usize -pub fn vortex_decimal_byte_parts::DecimalByteParts::metadata(array: &vortex_decimal_byte_parts::DecimalBytePartsArray) -> vortex_error::VortexResult +pub fn vortex_decimal_byte_parts::DecimalByteParts::metadata(array: &vortex_array::vtable::typed::Array) -> vortex_error::VortexResult -pub fn vortex_decimal_byte_parts::DecimalByteParts::nbuffers(_array: &vortex_decimal_byte_parts::DecimalBytePartsArray) -> usize +pub fn vortex_decimal_byte_parts::DecimalByteParts::nbuffers(_array: &vortex_array::vtable::typed::Array) -> usize -pub fn vortex_decimal_byte_parts::DecimalByteParts::nchildren(_array: &vortex_decimal_byte_parts::DecimalBytePartsArray) -> usize +pub fn vortex_decimal_byte_parts::DecimalByteParts::nchildren(_array: &vortex_array::vtable::typed::Array) -> usize pub fn vortex_decimal_byte_parts::DecimalByteParts::reduce_parent(array: &vortex_array::vtable::typed::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize) -> vortex_error::VortexResult> pub fn vortex_decimal_byte_parts::DecimalByteParts::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_decimal_byte_parts::DecimalByteParts::stats(array: &vortex_decimal_byte_parts::DecimalBytePartsArray) -> &vortex_array::stats::array::ArrayStats +pub fn vortex_decimal_byte_parts::DecimalByteParts::stats(array: &vortex_decimal_byte_parts::DecimalBytePartsData) -> &vortex_array::stats::array::ArrayStats pub fn vortex_decimal_byte_parts::DecimalByteParts::vtable(_array: &Self::Array) -> &Self @@ -92,57 +94,49 @@ pub fn vortex_decimal_byte_parts::DecimalByteParts::with_children(array: &mut Se impl vortex_array::vtable::operations::OperationsVTable for vortex_decimal_byte_parts::DecimalByteParts -pub fn vortex_decimal_byte_parts::DecimalByteParts::scalar_at(array: &vortex_decimal_byte_parts::DecimalBytePartsArray, index: usize, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_decimal_byte_parts::DecimalByteParts::scalar_at(array: &vortex_array::vtable::typed::Array, index: usize, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::validity::ValidityChild for vortex_decimal_byte_parts::DecimalByteParts -pub fn vortex_decimal_byte_parts::DecimalByteParts::validity_child(array: &vortex_decimal_byte_parts::DecimalBytePartsArray) -> &vortex_array::array::ArrayRef - -pub struct vortex_decimal_byte_parts::DecimalBytePartsArray - -impl vortex_decimal_byte_parts::DecimalBytePartsArray +pub fn vortex_decimal_byte_parts::DecimalByteParts::validity_child(array: &vortex_decimal_byte_parts::DecimalBytePartsData) -> &vortex_array::array::ArrayRef -pub fn vortex_decimal_byte_parts::DecimalBytePartsArray::decimal_dtype(&self) -> &vortex_array::dtype::decimal::DecimalDType - -pub fn vortex_decimal_byte_parts::DecimalBytePartsArray::into_parts(self) -> vortex_decimal_byte_parts::DecimalBytePartsArrayParts - -pub fn vortex_decimal_byte_parts::DecimalBytePartsArray::try_new(msp: vortex_array::array::ArrayRef, decimal_dtype: vortex_array::dtype::decimal::DecimalDType) -> vortex_error::VortexResult +pub struct vortex_decimal_byte_parts::DecimalBytePartsArrayParts -impl vortex_decimal_byte_parts::DecimalBytePartsArray +pub vortex_decimal_byte_parts::DecimalBytePartsArrayParts::dtype: vortex_array::dtype::DType -pub fn vortex_decimal_byte_parts::DecimalBytePartsArray::to_array(&self) -> vortex_array::array::ArrayRef +pub vortex_decimal_byte_parts::DecimalBytePartsArrayParts::msp: vortex_array::array::ArrayRef -impl core::clone::Clone for vortex_decimal_byte_parts::DecimalBytePartsArray +pub struct vortex_decimal_byte_parts::DecimalBytePartsData -pub fn vortex_decimal_byte_parts::DecimalBytePartsArray::clone(&self) -> vortex_decimal_byte_parts::DecimalBytePartsArray +impl vortex_decimal_byte_parts::DecimalBytePartsData -impl core::convert::AsRef for vortex_decimal_byte_parts::DecimalBytePartsArray +pub fn vortex_decimal_byte_parts::DecimalBytePartsData::decimal_dtype(&self) -> &vortex_array::dtype::decimal::DecimalDType -pub fn vortex_decimal_byte_parts::DecimalBytePartsArray::as_ref(&self) -> &dyn vortex_array::array::DynArray +pub fn vortex_decimal_byte_parts::DecimalBytePartsData::dtype(&self) -> &vortex_array::dtype::DType -impl core::convert::From for vortex_array::array::ArrayRef +pub fn vortex_decimal_byte_parts::DecimalBytePartsData::into_parts(self) -> vortex_decimal_byte_parts::DecimalBytePartsArrayParts -pub fn vortex_array::array::ArrayRef::from(value: vortex_decimal_byte_parts::DecimalBytePartsArray) -> vortex_array::array::ArrayRef +pub fn vortex_decimal_byte_parts::DecimalBytePartsData::is_empty(&self) -> bool -impl core::fmt::Debug for vortex_decimal_byte_parts::DecimalBytePartsArray +pub fn vortex_decimal_byte_parts::DecimalBytePartsData::len(&self) -> usize -pub fn vortex_decimal_byte_parts::DecimalBytePartsArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_decimal_byte_parts::DecimalBytePartsData::try_new(msp: vortex_array::array::ArrayRef, decimal_dtype: vortex_array::dtype::decimal::DecimalDType) -> vortex_error::VortexResult -impl core::ops::deref::Deref for vortex_decimal_byte_parts::DecimalBytePartsArray +impl core::clone::Clone for vortex_decimal_byte_parts::DecimalBytePartsData -pub type vortex_decimal_byte_parts::DecimalBytePartsArray::Target = dyn vortex_array::array::DynArray +pub fn vortex_decimal_byte_parts::DecimalBytePartsData::clone(&self) -> vortex_decimal_byte_parts::DecimalBytePartsData -pub fn vortex_decimal_byte_parts::DecimalBytePartsArray::deref(&self) -> &Self::Target +impl core::convert::From for vortex_array::array::ArrayRef -impl vortex_array::array::IntoArray for vortex_decimal_byte_parts::DecimalBytePartsArray +pub fn vortex_array::array::ArrayRef::from(value: vortex_decimal_byte_parts::DecimalBytePartsData) -> vortex_array::array::ArrayRef -pub fn vortex_decimal_byte_parts::DecimalBytePartsArray::into_array(self) -> vortex_array::array::ArrayRef +impl core::fmt::Debug for vortex_decimal_byte_parts::DecimalBytePartsData -pub struct vortex_decimal_byte_parts::DecimalBytePartsArrayParts +pub fn vortex_decimal_byte_parts::DecimalBytePartsData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub vortex_decimal_byte_parts::DecimalBytePartsArrayParts::dtype: vortex_array::dtype::DType +impl vortex_array::array::IntoArray for vortex_decimal_byte_parts::DecimalBytePartsData -pub vortex_decimal_byte_parts::DecimalBytePartsArrayParts::msp: vortex_array::array::ArrayRef +pub fn vortex_decimal_byte_parts::DecimalBytePartsData::into_array(self) -> vortex_array::array::ArrayRef pub struct vortex_decimal_byte_parts::DecimalBytesPartsMetadata @@ -171,3 +165,5 @@ pub fn vortex_decimal_byte_parts::DecimalBytesPartsMetadata::clear(&mut self) pub fn vortex_decimal_byte_parts::DecimalBytesPartsMetadata::encoded_len(&self) -> usize pub fn vortex_decimal_byte_parts::initialize(session: &mut vortex_session::VortexSession) + +pub type vortex_decimal_byte_parts::DecimalBytePartsArray = vortex_array::vtable::typed::Array diff --git a/encodings/fastlanes/public-api.lock b/encodings/fastlanes/public-api.lock index 35360475979..fad72159867 100644 --- a/encodings/fastlanes/public-api.lock +++ b/encodings/fastlanes/public-api.lock @@ -16,21 +16,21 @@ pub fn vortex_fastlanes::bit_transpose::untranspose_validity(validity: &vortex_a pub mod vortex_fastlanes::bitpack_compress -pub fn vortex_fastlanes::bitpack_compress::bit_width_histogram(array: &vortex_array::arrays::primitive::array::PrimitiveArray) -> vortex_error::VortexResult> +pub fn vortex_fastlanes::bitpack_compress::bit_width_histogram(array: &vortex_array::arrays::primitive::vtable::PrimitiveArray) -> vortex_error::VortexResult> -pub fn vortex_fastlanes::bitpack_compress::bitpack_encode(array: &vortex_array::arrays::primitive::array::PrimitiveArray, bit_width: u8, bit_width_freq: core::option::Option<&[usize]>) -> vortex_error::VortexResult +pub fn vortex_fastlanes::bitpack_compress::bitpack_encode(array: &vortex_array::arrays::primitive::vtable::PrimitiveArray, bit_width: u8, bit_width_freq: core::option::Option<&[usize]>) -> vortex_error::VortexResult -pub unsafe fn vortex_fastlanes::bitpack_compress::bitpack_encode_unchecked(array: vortex_array::arrays::primitive::array::PrimitiveArray, bit_width: u8) -> vortex_error::VortexResult +pub unsafe fn vortex_fastlanes::bitpack_compress::bitpack_encode_unchecked(array: vortex_array::arrays::primitive::vtable::PrimitiveArray, bit_width: u8) -> vortex_error::VortexResult pub fn vortex_fastlanes::bitpack_compress::bitpack_primitive(array: &[T], bit_width: u8) -> vortex_buffer::buffer::Buffer -pub fn vortex_fastlanes::bitpack_compress::bitpack_to_best_bit_width(array: &vortex_array::arrays::primitive::array::PrimitiveArray) -> vortex_error::VortexResult +pub fn vortex_fastlanes::bitpack_compress::bitpack_to_best_bit_width(array: &vortex_array::arrays::primitive::vtable::PrimitiveArray) -> vortex_error::VortexResult -pub unsafe fn vortex_fastlanes::bitpack_compress::bitpack_unchecked(parray: &vortex_array::arrays::primitive::array::PrimitiveArray, bit_width: u8) -> vortex_buffer::ByteBuffer +pub unsafe fn vortex_fastlanes::bitpack_compress::bitpack_unchecked(parray: &vortex_array::arrays::primitive::vtable::PrimitiveArray, bit_width: u8) -> vortex_buffer::ByteBuffer pub fn vortex_fastlanes::bitpack_compress::find_best_bit_width(ptype: vortex_array::dtype::ptype::PType, bit_width_freq: &[usize]) -> vortex_error::VortexResult -pub fn vortex_fastlanes::bitpack_compress::gather_patches(parray: &vortex_array::arrays::primitive::array::PrimitiveArray, bit_width: u8, num_exceptions_hint: usize) -> vortex_error::VortexResult> +pub fn vortex_fastlanes::bitpack_compress::gather_patches(parray: &vortex_array::arrays::primitive::vtable::PrimitiveArray, bit_width: u8, num_exceptions_hint: usize) -> vortex_error::VortexResult> pub mod vortex_fastlanes::bitpack_decompress @@ -40,9 +40,9 @@ pub fn vortex_fastlanes::bitpack_decompress::apply_patches_to_uninit_range_fn usize -pub fn vortex_fastlanes::bitpack_decompress::unpack_array(array: &vortex_fastlanes::BitPackedArray, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_fastlanes::bitpack_decompress::unpack_array(array: &vortex_fastlanes::BitPackedArray, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult -pub fn vortex_fastlanes::bitpack_decompress::unpack_primitive_array(array: &vortex_fastlanes::BitPackedArray, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_fastlanes::bitpack_decompress::unpack_primitive_array(array: &vortex_fastlanes::BitPackedArray, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult pub fn vortex_fastlanes::bitpack_decompress::unpack_single(array: &vortex_fastlanes::BitPackedArray, index: usize) -> vortex_array::scalar::Scalar @@ -86,7 +86,7 @@ impl vortex_fastlanes::unpack_iter: pub fn vortex_fastlanes::unpack_iter::UnpackedChunks::full_chunks(&mut self) -> vortex_fastlanes::unpack_iter::BitUnpackIterator<'_, T> -pub fn vortex_fastlanes::unpack_iter::UnpackedChunks::new(array: &vortex_fastlanes::BitPackedArray) -> Self +pub fn vortex_fastlanes::unpack_iter::UnpackedChunks::new(array: &vortex_fastlanes::BitPackedData) -> Self pub trait vortex_fastlanes::unpack_iter::BitPacked: vortex_array::dtype::ptype::PhysicalPType @@ -148,7 +148,7 @@ pub fn vortex_fastlanes::BitPacked::cast(array: &vortex_fastlanes::BitPackedArra impl vortex_array::vtable::VTable for vortex_fastlanes::BitPacked -pub type vortex_fastlanes::BitPacked::Array = vortex_fastlanes::BitPackedArray +pub type vortex_fastlanes::BitPacked::Array = vortex_fastlanes::BitPackedData pub type vortex_fastlanes::BitPacked::Metadata = vortex_array::metadata::ProstMetadata @@ -156,25 +156,25 @@ pub type vortex_fastlanes::BitPacked::OperationsVTable = vortex_fastlanes::BitPa pub type vortex_fastlanes::BitPacked::ValidityVTable = vortex_array::vtable::validity::ValidityVTableFromValidityHelper -pub fn vortex_fastlanes::BitPacked::append_to_builder(array: &vortex_fastlanes::BitPackedArray, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_fastlanes::BitPacked::append_to_builder(array: &vortex_array::vtable::typed::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_fastlanes::BitPacked::array_eq(array: &vortex_fastlanes::BitPackedArray, other: &vortex_fastlanes::BitPackedArray, precision: vortex_array::hash::Precision) -> bool +pub fn vortex_fastlanes::BitPacked::array_eq(array: &vortex_array::vtable::typed::Array, other: &vortex_array::vtable::typed::Array, precision: vortex_array::hash::Precision) -> bool -pub fn vortex_fastlanes::BitPacked::array_hash(array: &vortex_fastlanes::BitPackedArray, state: &mut H, precision: vortex_array::hash::Precision) +pub fn vortex_fastlanes::BitPacked::array_hash(array: &vortex_array::vtable::typed::Array, state: &mut H, precision: vortex_array::hash::Precision) -pub fn vortex_fastlanes::BitPacked::buffer(array: &vortex_fastlanes::BitPackedArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_fastlanes::BitPacked::buffer(array: &vortex_array::vtable::typed::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_fastlanes::BitPacked::buffer_name(_array: &vortex_fastlanes::BitPackedArray, idx: usize) -> core::option::Option +pub fn vortex_fastlanes::BitPacked::buffer_name(_array: &vortex_array::vtable::typed::Array, idx: usize) -> core::option::Option -pub fn vortex_fastlanes::BitPacked::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_fastlanes::BitPacked::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_fastlanes::BitPacked::child(array: &vortex_fastlanes::BitPackedArray, idx: usize) -> vortex_array::array::ArrayRef +pub fn vortex_fastlanes::BitPacked::child(array: &vortex_array::vtable::typed::Array, idx: usize) -> vortex_array::array::ArrayRef -pub fn vortex_fastlanes::BitPacked::child_name(array: &vortex_fastlanes::BitPackedArray, idx: usize) -> alloc::string::String +pub fn vortex_fastlanes::BitPacked::child_name(array: &vortex_array::vtable::typed::Array, idx: usize) -> alloc::string::String pub fn vortex_fastlanes::BitPacked::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_fastlanes::BitPacked::dtype(array: &vortex_fastlanes::BitPackedArray) -> &vortex_array::dtype::DType +pub fn vortex_fastlanes::BitPacked::dtype(array: &vortex_fastlanes::BitPackedData) -> &vortex_array::dtype::DType pub fn vortex_fastlanes::BitPacked::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult @@ -182,103 +182,99 @@ pub fn vortex_fastlanes::BitPacked::execute_parent(array: &vortex_array::vtable: pub fn vortex_fastlanes::BitPacked::id(&self) -> vortex_array::vtable::dyn_::ArrayId -pub fn vortex_fastlanes::BitPacked::len(array: &vortex_fastlanes::BitPackedArray) -> usize +pub fn vortex_fastlanes::BitPacked::len(array: &vortex_fastlanes::BitPackedData) -> usize -pub fn vortex_fastlanes::BitPacked::metadata(array: &vortex_fastlanes::BitPackedArray) -> vortex_error::VortexResult +pub fn vortex_fastlanes::BitPacked::metadata(array: &vortex_array::vtable::typed::Array) -> vortex_error::VortexResult -pub fn vortex_fastlanes::BitPacked::nbuffers(_array: &vortex_fastlanes::BitPackedArray) -> usize +pub fn vortex_fastlanes::BitPacked::nbuffers(_array: &vortex_array::vtable::typed::Array) -> usize -pub fn vortex_fastlanes::BitPacked::nchildren(array: &vortex_fastlanes::BitPackedArray) -> usize +pub fn vortex_fastlanes::BitPacked::nchildren(array: &vortex_array::vtable::typed::Array) -> usize pub fn vortex_fastlanes::BitPacked::reduce_parent(array: &vortex_array::vtable::typed::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize) -> vortex_error::VortexResult> pub fn vortex_fastlanes::BitPacked::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_fastlanes::BitPacked::stats(array: &vortex_fastlanes::BitPackedArray) -> &vortex_array::stats::array::ArrayStats +pub fn vortex_fastlanes::BitPacked::stats(array: &vortex_fastlanes::BitPackedData) -> &vortex_array::stats::array::ArrayStats -pub fn vortex_fastlanes::BitPacked::vtable(_array: &Self::Array) -> &Self +pub fn vortex_fastlanes::BitPacked::vtable(_array: &vortex_fastlanes::BitPackedData) -> &Self -pub fn vortex_fastlanes::BitPacked::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_fastlanes::BitPacked::with_children(array: &mut vortex_fastlanes::BitPackedData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::operations::OperationsVTable for vortex_fastlanes::BitPacked -pub fn vortex_fastlanes::BitPacked::scalar_at(array: &vortex_fastlanes::BitPackedArray, index: usize, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_fastlanes::BitPacked::scalar_at(array: &vortex_array::vtable::typed::Array, index: usize, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult -pub struct vortex_fastlanes::BitPackedArray +pub struct vortex_fastlanes::BitPackedArrayParts -impl vortex_fastlanes::BitPackedArray +pub vortex_fastlanes::BitPackedArrayParts::bit_width: u8 -pub fn vortex_fastlanes::BitPackedArray::bit_width(&self) -> u8 +pub vortex_fastlanes::BitPackedArrayParts::len: usize -pub fn vortex_fastlanes::BitPackedArray::encode(array: &vortex_array::array::ArrayRef, bit_width: u8) -> vortex_error::VortexResult +pub vortex_fastlanes::BitPackedArrayParts::offset: u16 -pub fn vortex_fastlanes::BitPackedArray::into_parts(self) -> vortex_fastlanes::BitPackedArrayParts +pub vortex_fastlanes::BitPackedArrayParts::packed: vortex_array::buffer::BufferHandle -pub fn vortex_fastlanes::BitPackedArray::max_packed_value(&self) -> usize +pub vortex_fastlanes::BitPackedArrayParts::patches: core::option::Option -pub fn vortex_fastlanes::BitPackedArray::offset(&self) -> u16 +pub vortex_fastlanes::BitPackedArrayParts::validity: vortex_array::validity::Validity -pub fn vortex_fastlanes::BitPackedArray::packed(&self) -> &vortex_array::buffer::BufferHandle +pub struct vortex_fastlanes::BitPackedData -pub fn vortex_fastlanes::BitPackedArray::packed_slice(&self) -> &[T] +impl vortex_fastlanes::BitPackedData -pub fn vortex_fastlanes::BitPackedArray::patches(&self) -> core::option::Option<&vortex_array::patches::Patches> +pub fn vortex_fastlanes::BitPackedData::bit_width(&self) -> u8 -pub fn vortex_fastlanes::BitPackedArray::ptype(&self) -> vortex_array::dtype::ptype::PType +pub fn vortex_fastlanes::BitPackedData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_fastlanes::BitPackedArray::replace_patches(&mut self, patches: core::option::Option) +pub fn vortex_fastlanes::BitPackedData::encode(array: &vortex_array::array::ArrayRef, bit_width: u8) -> vortex_error::VortexResult -pub fn vortex_fastlanes::BitPackedArray::try_new(packed: vortex_array::buffer::BufferHandle, ptype: vortex_array::dtype::ptype::PType, validity: vortex_array::validity::Validity, patches: core::option::Option, bit_width: u8, length: usize, offset: u16) -> vortex_error::VortexResult +pub fn vortex_fastlanes::BitPackedData::into_parts(self) -> vortex_fastlanes::BitPackedArrayParts -pub fn vortex_fastlanes::BitPackedArray::unpacked_chunks(&self) -> vortex_fastlanes::unpack_iter::BitUnpackedChunks +pub fn vortex_fastlanes::BitPackedData::is_empty(&self) -> bool -impl vortex_fastlanes::BitPackedArray +pub fn vortex_fastlanes::BitPackedData::len(&self) -> usize -pub fn vortex_fastlanes::BitPackedArray::to_array(&self) -> vortex_array::array::ArrayRef +pub fn vortex_fastlanes::BitPackedData::max_packed_value(&self) -> usize -impl core::clone::Clone for vortex_fastlanes::BitPackedArray +pub fn vortex_fastlanes::BitPackedData::offset(&self) -> u16 -pub fn vortex_fastlanes::BitPackedArray::clone(&self) -> vortex_fastlanes::BitPackedArray +pub fn vortex_fastlanes::BitPackedData::packed(&self) -> &vortex_array::buffer::BufferHandle -impl core::convert::AsRef for vortex_fastlanes::BitPackedArray +pub fn vortex_fastlanes::BitPackedData::packed_slice(&self) -> &[T] -pub fn vortex_fastlanes::BitPackedArray::as_ref(&self) -> &dyn vortex_array::array::DynArray +pub fn vortex_fastlanes::BitPackedData::patches(&self) -> core::option::Option<&vortex_array::patches::Patches> -impl core::convert::From for vortex_array::array::ArrayRef +pub fn vortex_fastlanes::BitPackedData::ptype(&self) -> vortex_array::dtype::ptype::PType -pub fn vortex_array::array::ArrayRef::from(value: vortex_fastlanes::BitPackedArray) -> vortex_array::array::ArrayRef +pub fn vortex_fastlanes::BitPackedData::replace_patches(&mut self, patches: core::option::Option) -impl core::fmt::Debug for vortex_fastlanes::BitPackedArray +pub fn vortex_fastlanes::BitPackedData::try_new(packed: vortex_array::buffer::BufferHandle, ptype: vortex_array::dtype::ptype::PType, validity: vortex_array::validity::Validity, patches: core::option::Option, bit_width: u8, length: usize, offset: u16) -> vortex_error::VortexResult -pub fn vortex_fastlanes::BitPackedArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_fastlanes::BitPackedData::unpacked_chunks(&self) -> vortex_fastlanes::unpack_iter::BitUnpackedChunks -impl core::ops::deref::Deref for vortex_fastlanes::BitPackedArray +pub fn vortex_fastlanes::BitPackedData::validity(&self) -> &vortex_array::validity::Validity -pub type vortex_fastlanes::BitPackedArray::Target = dyn vortex_array::array::DynArray +pub fn vortex_fastlanes::BitPackedData::validity_mask(&self) -> vortex_mask::Mask -pub fn vortex_fastlanes::BitPackedArray::deref(&self) -> &Self::Target +impl core::clone::Clone for vortex_fastlanes::BitPackedData -impl vortex_array::array::IntoArray for vortex_fastlanes::BitPackedArray +pub fn vortex_fastlanes::BitPackedData::clone(&self) -> vortex_fastlanes::BitPackedData -pub fn vortex_fastlanes::BitPackedArray::into_array(self) -> vortex_array::array::ArrayRef +impl core::convert::From for vortex_array::array::ArrayRef -impl vortex_array::vtable::validity::ValidityHelper for vortex_fastlanes::BitPackedArray +pub fn vortex_array::array::ArrayRef::from(value: vortex_fastlanes::BitPackedData) -> vortex_array::array::ArrayRef -pub fn vortex_fastlanes::BitPackedArray::validity(&self) -> &vortex_array::validity::Validity +impl core::fmt::Debug for vortex_fastlanes::BitPackedData -pub struct vortex_fastlanes::BitPackedArrayParts +pub fn vortex_fastlanes::BitPackedData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub vortex_fastlanes::BitPackedArrayParts::bit_width: u8 +impl vortex_array::array::IntoArray for vortex_fastlanes::BitPackedData -pub vortex_fastlanes::BitPackedArrayParts::len: usize +pub fn vortex_fastlanes::BitPackedData::into_array(self) -> vortex_array::array::ArrayRef -pub vortex_fastlanes::BitPackedArrayParts::offset: u16 +impl vortex_array::vtable::validity::ValidityHelper for vortex_fastlanes::BitPackedData -pub vortex_fastlanes::BitPackedArrayParts::packed: vortex_array::buffer::BufferHandle - -pub vortex_fastlanes::BitPackedArrayParts::patches: core::option::Option - -pub vortex_fastlanes::BitPackedArrayParts::validity: vortex_array::validity::Validity +pub fn vortex_fastlanes::BitPackedData::validity(&self) -> &vortex_array::validity::Validity pub struct vortex_fastlanes::Delta @@ -286,6 +282,8 @@ impl vortex_fastlanes::Delta pub const vortex_fastlanes::Delta::ID: vortex_array::vtable::dyn_::ArrayId +pub fn vortex_fastlanes::Delta::try_from_primitive_array(array: &vortex_array::arrays::primitive::vtable::PrimitiveArray, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult + impl core::clone::Clone for vortex_fastlanes::Delta pub fn vortex_fastlanes::Delta::clone(&self) -> vortex_fastlanes::Delta @@ -296,7 +294,7 @@ pub fn vortex_fastlanes::Delta::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> impl vortex_array::arrays::slice::SliceReduce for vortex_fastlanes::Delta -pub fn vortex_fastlanes::Delta::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_fastlanes::Delta::slice(array: &vortex_array::vtable::typed::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::kernel::CastReduce for vortex_fastlanes::Delta @@ -304,7 +302,7 @@ pub fn vortex_fastlanes::Delta::cast(array: &vortex_fastlanes::DeltaArray, dtype impl vortex_array::vtable::VTable for vortex_fastlanes::Delta -pub type vortex_fastlanes::Delta::Array = vortex_fastlanes::DeltaArray +pub type vortex_fastlanes::Delta::Array = vortex_fastlanes::DeltaData pub type vortex_fastlanes::Delta::Metadata = vortex_array::metadata::ProstMetadata @@ -312,103 +310,89 @@ pub type vortex_fastlanes::Delta::OperationsVTable = vortex_fastlanes::Delta pub type vortex_fastlanes::Delta::ValidityVTable = vortex_fastlanes::Delta -pub fn vortex_fastlanes::Delta::array_eq(array: &vortex_fastlanes::DeltaArray, other: &vortex_fastlanes::DeltaArray, precision: vortex_array::hash::Precision) -> bool +pub fn vortex_fastlanes::Delta::array_eq(array: &vortex_array::vtable::typed::Array, other: &vortex_array::vtable::typed::Array, precision: vortex_array::hash::Precision) -> bool -pub fn vortex_fastlanes::Delta::array_hash(array: &vortex_fastlanes::DeltaArray, state: &mut H, precision: vortex_array::hash::Precision) +pub fn vortex_fastlanes::Delta::array_hash(array: &vortex_array::vtable::typed::Array, state: &mut H, precision: vortex_array::hash::Precision) -pub fn vortex_fastlanes::Delta::buffer(_array: &vortex_fastlanes::DeltaArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_fastlanes::Delta::buffer(_array: &vortex_array::vtable::typed::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_fastlanes::Delta::buffer_name(_array: &vortex_fastlanes::DeltaArray, _idx: usize) -> core::option::Option +pub fn vortex_fastlanes::Delta::buffer_name(_array: &vortex_array::vtable::typed::Array, _idx: usize) -> core::option::Option -pub fn vortex_fastlanes::Delta::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_fastlanes::Delta::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_fastlanes::Delta::child(array: &vortex_fastlanes::DeltaArray, idx: usize) -> vortex_array::array::ArrayRef +pub fn vortex_fastlanes::Delta::child(array: &vortex_array::vtable::typed::Array, idx: usize) -> vortex_array::array::ArrayRef -pub fn vortex_fastlanes::Delta::child_name(_array: &vortex_fastlanes::DeltaArray, idx: usize) -> alloc::string::String +pub fn vortex_fastlanes::Delta::child_name(_array: &vortex_array::vtable::typed::Array, idx: usize) -> alloc::string::String pub fn vortex_fastlanes::Delta::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_fastlanes::Delta::dtype(array: &vortex_fastlanes::DeltaArray) -> &vortex_array::dtype::DType +pub fn vortex_fastlanes::Delta::dtype(array: &vortex_fastlanes::DeltaData) -> &vortex_array::dtype::DType pub fn vortex_fastlanes::Delta::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult pub fn vortex_fastlanes::Delta::id(&self) -> vortex_array::vtable::dyn_::ArrayId -pub fn vortex_fastlanes::Delta::len(array: &vortex_fastlanes::DeltaArray) -> usize +pub fn vortex_fastlanes::Delta::len(array: &vortex_fastlanes::DeltaData) -> usize -pub fn vortex_fastlanes::Delta::metadata(array: &vortex_fastlanes::DeltaArray) -> vortex_error::VortexResult +pub fn vortex_fastlanes::Delta::metadata(array: &vortex_array::vtable::typed::Array) -> vortex_error::VortexResult -pub fn vortex_fastlanes::Delta::nbuffers(_array: &vortex_fastlanes::DeltaArray) -> usize +pub fn vortex_fastlanes::Delta::nbuffers(_array: &vortex_array::vtable::typed::Array) -> usize -pub fn vortex_fastlanes::Delta::nchildren(_array: &vortex_fastlanes::DeltaArray) -> usize +pub fn vortex_fastlanes::Delta::nchildren(_array: &vortex_array::vtable::typed::Array) -> usize pub fn vortex_fastlanes::Delta::reduce_parent(array: &vortex_array::vtable::typed::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize) -> vortex_error::VortexResult> pub fn vortex_fastlanes::Delta::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_fastlanes::Delta::stats(array: &vortex_fastlanes::DeltaArray) -> &vortex_array::stats::array::ArrayStats +pub fn vortex_fastlanes::Delta::stats(array: &vortex_fastlanes::DeltaData) -> &vortex_array::stats::array::ArrayStats -pub fn vortex_fastlanes::Delta::vtable(_array: &Self::Array) -> &Self +pub fn vortex_fastlanes::Delta::vtable(_array: &vortex_fastlanes::DeltaData) -> &Self -pub fn vortex_fastlanes::Delta::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_fastlanes::Delta::with_children(array: &mut vortex_fastlanes::DeltaData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::operations::OperationsVTable for vortex_fastlanes::Delta -pub fn vortex_fastlanes::Delta::scalar_at(array: &vortex_fastlanes::DeltaArray, index: usize, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_fastlanes::Delta::scalar_at(array: &vortex_array::vtable::typed::Array, index: usize, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::validity::ValidityVTable for vortex_fastlanes::Delta -pub fn vortex_fastlanes::Delta::validity(array: &vortex_fastlanes::DeltaArray) -> vortex_error::VortexResult - -pub struct vortex_fastlanes::DeltaArray - -impl vortex_fastlanes::DeltaArray +pub fn vortex_fastlanes::Delta::validity(array: &vortex_array::vtable::typed::Array) -> vortex_error::VortexResult -pub fn vortex_fastlanes::DeltaArray::bases(&self) -> &vortex_array::array::ArrayRef +pub struct vortex_fastlanes::DeltaData -pub fn vortex_fastlanes::DeltaArray::deltas(&self) -> &vortex_array::array::ArrayRef +impl vortex_fastlanes::DeltaData -pub fn vortex_fastlanes::DeltaArray::dtype(&self) -> &vortex_array::dtype::DType +pub fn vortex_fastlanes::DeltaData::bases(&self) -> &vortex_array::array::ArrayRef -pub fn vortex_fastlanes::DeltaArray::is_empty(&self) -> bool +pub fn vortex_fastlanes::DeltaData::deltas(&self) -> &vortex_array::array::ArrayRef -pub fn vortex_fastlanes::DeltaArray::len(&self) -> usize +pub fn vortex_fastlanes::DeltaData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_fastlanes::DeltaArray::offset(&self) -> usize +pub fn vortex_fastlanes::DeltaData::is_empty(&self) -> bool -pub fn vortex_fastlanes::DeltaArray::try_from_primitive_array(array: &vortex_array::arrays::primitive::array::PrimitiveArray, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_fastlanes::DeltaData::len(&self) -> usize -pub fn vortex_fastlanes::DeltaArray::try_new(bases: vortex_array::array::ArrayRef, deltas: vortex_array::array::ArrayRef, offset: usize, len: usize) -> vortex_error::VortexResult +pub fn vortex_fastlanes::DeltaData::offset(&self) -> usize -impl vortex_fastlanes::DeltaArray +pub fn vortex_fastlanes::DeltaData::try_from_primitive_array(array: &vortex_array::arrays::primitive::vtable::PrimitiveArray, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult -pub fn vortex_fastlanes::DeltaArray::to_array(&self) -> vortex_array::array::ArrayRef +pub fn vortex_fastlanes::DeltaData::try_new(bases: vortex_array::array::ArrayRef, deltas: vortex_array::array::ArrayRef, offset: usize, len: usize) -> vortex_error::VortexResult -impl core::clone::Clone for vortex_fastlanes::DeltaArray +impl core::clone::Clone for vortex_fastlanes::DeltaData -pub fn vortex_fastlanes::DeltaArray::clone(&self) -> vortex_fastlanes::DeltaArray +pub fn vortex_fastlanes::DeltaData::clone(&self) -> vortex_fastlanes::DeltaData -impl core::convert::AsRef for vortex_fastlanes::DeltaArray +impl core::convert::From for vortex_array::array::ArrayRef -pub fn vortex_fastlanes::DeltaArray::as_ref(&self) -> &dyn vortex_array::array::DynArray +pub fn vortex_array::array::ArrayRef::from(value: vortex_fastlanes::DeltaData) -> vortex_array::array::ArrayRef -impl core::convert::From for vortex_array::array::ArrayRef +impl core::fmt::Debug for vortex_fastlanes::DeltaData -pub fn vortex_array::array::ArrayRef::from(value: vortex_fastlanes::DeltaArray) -> vortex_array::array::ArrayRef +pub fn vortex_fastlanes::DeltaData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -impl core::fmt::Debug for vortex_fastlanes::DeltaArray +impl vortex_array::array::IntoArray for vortex_fastlanes::DeltaData -pub fn vortex_fastlanes::DeltaArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result - -impl core::ops::deref::Deref for vortex_fastlanes::DeltaArray - -pub type vortex_fastlanes::DeltaArray::Target = dyn vortex_array::array::DynArray - -pub fn vortex_fastlanes::DeltaArray::deref(&self) -> &Self::Target - -impl vortex_array::array::IntoArray for vortex_fastlanes::DeltaArray - -pub fn vortex_fastlanes::DeltaArray::into_array(self) -> vortex_array::array::ArrayRef +pub fn vortex_fastlanes::DeltaData::into_array(self) -> vortex_array::array::ArrayRef pub struct vortex_fastlanes::FoR @@ -416,6 +400,10 @@ impl vortex_fastlanes::FoR pub const vortex_fastlanes::FoR::ID: vortex_array::vtable::dyn_::ArrayId +pub fn vortex_fastlanes::FoR::encode(array: vortex_array::arrays::primitive::vtable::PrimitiveArray) -> vortex_error::VortexResult + +pub fn vortex_fastlanes::FoR::try_new(encoded: vortex_array::array::ArrayRef, reference: vortex_array::scalar::Scalar) -> vortex_error::VortexResult + impl core::clone::Clone for vortex_fastlanes::FoR pub fn vortex_fastlanes::FoR::clone(&self) -> vortex_fastlanes::FoR @@ -434,7 +422,7 @@ pub fn vortex_fastlanes::FoR::filter(array: &vortex_fastlanes::FoRArray, mask: & impl vortex_array::arrays::slice::SliceReduce for vortex_fastlanes::FoR -pub fn vortex_fastlanes::FoR::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_fastlanes::FoR::slice(array: &vortex_array::vtable::typed::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::binary::compare::CompareKernel for vortex_fastlanes::FoR @@ -446,7 +434,7 @@ pub fn vortex_fastlanes::FoR::cast(array: &vortex_fastlanes::FoRArray, dtype: &v impl vortex_array::vtable::VTable for vortex_fastlanes::FoR -pub type vortex_fastlanes::FoR::Array = vortex_fastlanes::FoRArray +pub type vortex_fastlanes::FoR::Array = vortex_fastlanes::FoRData pub type vortex_fastlanes::FoR::Metadata = vortex_array::scalar::Scalar @@ -454,23 +442,23 @@ pub type vortex_fastlanes::FoR::OperationsVTable = vortex_fastlanes::FoR pub type vortex_fastlanes::FoR::ValidityVTable = vortex_array::vtable::validity::ValidityVTableFromChild -pub fn vortex_fastlanes::FoR::array_eq(array: &vortex_fastlanes::FoRArray, other: &vortex_fastlanes::FoRArray, precision: vortex_array::hash::Precision) -> bool +pub fn vortex_fastlanes::FoR::array_eq(array: &vortex_array::vtable::typed::Array, other: &vortex_array::vtable::typed::Array, precision: vortex_array::hash::Precision) -> bool -pub fn vortex_fastlanes::FoR::array_hash(array: &vortex_fastlanes::FoRArray, state: &mut H, precision: vortex_array::hash::Precision) +pub fn vortex_fastlanes::FoR::array_hash(array: &vortex_array::vtable::typed::Array, state: &mut H, precision: vortex_array::hash::Precision) -pub fn vortex_fastlanes::FoR::buffer(_array: &vortex_fastlanes::FoRArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_fastlanes::FoR::buffer(_array: &vortex_array::vtable::typed::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_fastlanes::FoR::buffer_name(_array: &vortex_fastlanes::FoRArray, _idx: usize) -> core::option::Option +pub fn vortex_fastlanes::FoR::buffer_name(_array: &vortex_array::vtable::typed::Array, _idx: usize) -> core::option::Option -pub fn vortex_fastlanes::FoR::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_fastlanes::FoR::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_fastlanes::FoR::child(array: &vortex_fastlanes::FoRArray, idx: usize) -> vortex_array::array::ArrayRef +pub fn vortex_fastlanes::FoR::child(array: &vortex_array::vtable::typed::Array, idx: usize) -> vortex_array::array::ArrayRef -pub fn vortex_fastlanes::FoR::child_name(_array: &vortex_fastlanes::FoRArray, idx: usize) -> alloc::string::String +pub fn vortex_fastlanes::FoR::child_name(_array: &vortex_array::vtable::typed::Array, idx: usize) -> alloc::string::String pub fn vortex_fastlanes::FoR::deserialize(bytes: &[u8], dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_fastlanes::FoR::dtype(array: &vortex_fastlanes::FoRArray) -> &vortex_array::dtype::DType +pub fn vortex_fastlanes::FoR::dtype(array: &vortex_fastlanes::FoRData) -> &vortex_array::dtype::DType pub fn vortex_fastlanes::FoR::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult @@ -478,77 +466,69 @@ pub fn vortex_fastlanes::FoR::execute_parent(array: &vortex_array::vtable::typed pub fn vortex_fastlanes::FoR::id(&self) -> vortex_array::vtable::dyn_::ArrayId -pub fn vortex_fastlanes::FoR::len(array: &vortex_fastlanes::FoRArray) -> usize +pub fn vortex_fastlanes::FoR::len(array: &vortex_fastlanes::FoRData) -> usize -pub fn vortex_fastlanes::FoR::metadata(array: &vortex_fastlanes::FoRArray) -> vortex_error::VortexResult +pub fn vortex_fastlanes::FoR::metadata(array: &vortex_array::vtable::typed::Array) -> vortex_error::VortexResult -pub fn vortex_fastlanes::FoR::nbuffers(_array: &vortex_fastlanes::FoRArray) -> usize +pub fn vortex_fastlanes::FoR::nbuffers(_array: &vortex_array::vtable::typed::Array) -> usize -pub fn vortex_fastlanes::FoR::nchildren(_array: &vortex_fastlanes::FoRArray) -> usize +pub fn vortex_fastlanes::FoR::nchildren(_array: &vortex_array::vtable::typed::Array) -> usize pub fn vortex_fastlanes::FoR::reduce_parent(array: &vortex_array::vtable::typed::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize) -> vortex_error::VortexResult> pub fn vortex_fastlanes::FoR::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_fastlanes::FoR::stats(array: &vortex_fastlanes::FoRArray) -> &vortex_array::stats::array::ArrayStats +pub fn vortex_fastlanes::FoR::stats(array: &vortex_fastlanes::FoRData) -> &vortex_array::stats::array::ArrayStats -pub fn vortex_fastlanes::FoR::vtable(_array: &Self::Array) -> &Self +pub fn vortex_fastlanes::FoR::vtable(_array: &vortex_fastlanes::FoRData) -> &Self -pub fn vortex_fastlanes::FoR::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_fastlanes::FoR::with_children(array: &mut vortex_fastlanes::FoRData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::operations::OperationsVTable for vortex_fastlanes::FoR -pub fn vortex_fastlanes::FoR::scalar_at(array: &vortex_fastlanes::FoRArray, index: usize, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_fastlanes::FoR::scalar_at(array: &vortex_array::vtable::typed::Array, index: usize, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::validity::ValidityChild for vortex_fastlanes::FoR -pub fn vortex_fastlanes::FoR::validity_child(array: &vortex_fastlanes::FoRArray) -> &vortex_array::array::ArrayRef - -pub struct vortex_fastlanes::FoRArray - -impl vortex_fastlanes::FoRArray +pub fn vortex_fastlanes::FoR::validity_child(array: &vortex_fastlanes::FoRData) -> &vortex_array::array::ArrayRef -pub fn vortex_fastlanes::FoRArray::encode(array: vortex_array::arrays::primitive::array::PrimitiveArray) -> vortex_error::VortexResult +pub struct vortex_fastlanes::FoRData -impl vortex_fastlanes::FoRArray +impl vortex_fastlanes::FoRData -pub fn vortex_fastlanes::FoRArray::encoded(&self) -> &vortex_array::array::ArrayRef +pub fn vortex_fastlanes::FoRData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_fastlanes::FoRArray::ptype(&self) -> vortex_array::dtype::ptype::PType +pub fn vortex_fastlanes::FoRData::encoded(&self) -> &vortex_array::array::ArrayRef -pub fn vortex_fastlanes::FoRArray::reference_scalar(&self) -> &vortex_array::scalar::Scalar +pub fn vortex_fastlanes::FoRData::is_empty(&self) -> bool -pub fn vortex_fastlanes::FoRArray::try_new(encoded: vortex_array::array::ArrayRef, reference: vortex_array::scalar::Scalar) -> vortex_error::VortexResult +pub fn vortex_fastlanes::FoRData::len(&self) -> usize -impl vortex_fastlanes::FoRArray +pub fn vortex_fastlanes::FoRData::ptype(&self) -> vortex_array::dtype::ptype::PType -pub fn vortex_fastlanes::FoRArray::to_array(&self) -> vortex_array::array::ArrayRef +pub fn vortex_fastlanes::FoRData::reference_scalar(&self) -> &vortex_array::scalar::Scalar -impl core::clone::Clone for vortex_fastlanes::FoRArray +pub fn vortex_fastlanes::FoRData::try_new(encoded: vortex_array::array::ArrayRef, reference: vortex_array::scalar::Scalar) -> vortex_error::VortexResult -pub fn vortex_fastlanes::FoRArray::clone(&self) -> vortex_fastlanes::FoRArray +impl vortex_fastlanes::FoRData -impl core::convert::AsRef for vortex_fastlanes::FoRArray +pub fn vortex_fastlanes::FoRData::encode(array: vortex_array::arrays::primitive::vtable::PrimitiveArray) -> vortex_error::VortexResult -pub fn vortex_fastlanes::FoRArray::as_ref(&self) -> &dyn vortex_array::array::DynArray +impl core::clone::Clone for vortex_fastlanes::FoRData -impl core::convert::From for vortex_array::array::ArrayRef +pub fn vortex_fastlanes::FoRData::clone(&self) -> vortex_fastlanes::FoRData -pub fn vortex_array::array::ArrayRef::from(value: vortex_fastlanes::FoRArray) -> vortex_array::array::ArrayRef +impl core::convert::From for vortex_array::array::ArrayRef -impl core::fmt::Debug for vortex_fastlanes::FoRArray +pub fn vortex_array::array::ArrayRef::from(value: vortex_fastlanes::FoRData) -> vortex_array::array::ArrayRef -pub fn vortex_fastlanes::FoRArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::fmt::Debug for vortex_fastlanes::FoRData -impl core::ops::deref::Deref for vortex_fastlanes::FoRArray +pub fn vortex_fastlanes::FoRData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub type vortex_fastlanes::FoRArray::Target = dyn vortex_array::array::DynArray +impl vortex_array::array::IntoArray for vortex_fastlanes::FoRData -pub fn vortex_fastlanes::FoRArray::deref(&self) -> &Self::Target - -impl vortex_array::array::IntoArray for vortex_fastlanes::FoRArray - -pub fn vortex_fastlanes::FoRArray::into_array(self) -> vortex_array::array::ArrayRef +pub fn vortex_fastlanes::FoRData::into_array(self) -> vortex_array::array::ArrayRef pub struct vortex_fastlanes::RLE @@ -556,6 +536,10 @@ impl vortex_fastlanes::RLE pub const vortex_fastlanes::RLE::ID: vortex_array::vtable::dyn_::ArrayId +pub fn vortex_fastlanes::RLE::encode(array: &vortex_array::arrays::primitive::vtable::PrimitiveArray) -> vortex_error::VortexResult + +pub unsafe fn vortex_fastlanes::RLE::new_unchecked(values: vortex_array::array::ArrayRef, indices: vortex_array::array::ArrayRef, values_idx_offsets: vortex_array::array::ArrayRef, dtype: vortex_array::dtype::DType, offset: usize, length: usize) -> vortex_fastlanes::RLEArray + impl core::clone::Clone for vortex_fastlanes::RLE pub fn vortex_fastlanes::RLE::clone(&self) -> vortex_fastlanes::RLE @@ -574,7 +558,7 @@ pub fn vortex_fastlanes::RLE::cast(array: &vortex_fastlanes::RLEArray, dtype: &v impl vortex_array::vtable::VTable for vortex_fastlanes::RLE -pub type vortex_fastlanes::RLE::Array = vortex_fastlanes::RLEArray +pub type vortex_fastlanes::RLE::Array = vortex_fastlanes::RLEData pub type vortex_fastlanes::RLE::Metadata = vortex_array::metadata::ProstMetadata @@ -582,23 +566,23 @@ pub type vortex_fastlanes::RLE::OperationsVTable = vortex_fastlanes::RLE pub type vortex_fastlanes::RLE::ValidityVTable = vortex_array::vtable::validity::ValidityVTableFromChildSliceHelper -pub fn vortex_fastlanes::RLE::array_eq(array: &vortex_fastlanes::RLEArray, other: &vortex_fastlanes::RLEArray, precision: vortex_array::hash::Precision) -> bool +pub fn vortex_fastlanes::RLE::array_eq(array: &vortex_array::vtable::typed::Array, other: &vortex_array::vtable::typed::Array, precision: vortex_array::hash::Precision) -> bool -pub fn vortex_fastlanes::RLE::array_hash(array: &vortex_fastlanes::RLEArray, state: &mut H, precision: vortex_array::hash::Precision) +pub fn vortex_fastlanes::RLE::array_hash(array: &vortex_array::vtable::typed::Array, state: &mut H, precision: vortex_array::hash::Precision) -pub fn vortex_fastlanes::RLE::buffer(_array: &vortex_fastlanes::RLEArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_fastlanes::RLE::buffer(_array: &vortex_array::vtable::typed::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_fastlanes::RLE::buffer_name(_array: &vortex_fastlanes::RLEArray, _idx: usize) -> core::option::Option +pub fn vortex_fastlanes::RLE::buffer_name(_array: &vortex_array::vtable::typed::Array, _idx: usize) -> core::option::Option -pub fn vortex_fastlanes::RLE::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_fastlanes::RLE::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_fastlanes::RLE::child(array: &vortex_fastlanes::RLEArray, idx: usize) -> vortex_array::array::ArrayRef +pub fn vortex_fastlanes::RLE::child(array: &vortex_array::vtable::typed::Array, idx: usize) -> vortex_array::array::ArrayRef -pub fn vortex_fastlanes::RLE::child_name(_array: &vortex_fastlanes::RLEArray, idx: usize) -> alloc::string::String +pub fn vortex_fastlanes::RLE::child_name(_array: &vortex_array::vtable::typed::Array, idx: usize) -> alloc::string::String pub fn vortex_fastlanes::RLE::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_fastlanes::RLE::dtype(array: &vortex_fastlanes::RLEArray) -> &vortex_array::dtype::DType +pub fn vortex_fastlanes::RLE::dtype(array: &vortex_fastlanes::RLEData) -> &vortex_array::dtype::DType pub fn vortex_fastlanes::RLE::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult @@ -606,92 +590,86 @@ pub fn vortex_fastlanes::RLE::execute_parent(array: &vortex_array::vtable::typed pub fn vortex_fastlanes::RLE::id(&self) -> vortex_array::vtable::dyn_::ArrayId -pub fn vortex_fastlanes::RLE::len(array: &vortex_fastlanes::RLEArray) -> usize +pub fn vortex_fastlanes::RLE::len(array: &vortex_fastlanes::RLEData) -> usize -pub fn vortex_fastlanes::RLE::metadata(array: &vortex_fastlanes::RLEArray) -> vortex_error::VortexResult +pub fn vortex_fastlanes::RLE::metadata(array: &vortex_array::vtable::typed::Array) -> vortex_error::VortexResult -pub fn vortex_fastlanes::RLE::nbuffers(_array: &vortex_fastlanes::RLEArray) -> usize +pub fn vortex_fastlanes::RLE::nbuffers(_array: &vortex_array::vtable::typed::Array) -> usize -pub fn vortex_fastlanes::RLE::nchildren(_array: &vortex_fastlanes::RLEArray) -> usize +pub fn vortex_fastlanes::RLE::nchildren(_array: &vortex_array::vtable::typed::Array) -> usize pub fn vortex_fastlanes::RLE::reduce_parent(array: &vortex_array::vtable::typed::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize) -> vortex_error::VortexResult> pub fn vortex_fastlanes::RLE::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_fastlanes::RLE::stats(array: &vortex_fastlanes::RLEArray) -> &vortex_array::stats::array::ArrayStats +pub fn vortex_fastlanes::RLE::stats(array: &vortex_fastlanes::RLEData) -> &vortex_array::stats::array::ArrayStats -pub fn vortex_fastlanes::RLE::vtable(_array: &Self::Array) -> &Self +pub fn vortex_fastlanes::RLE::vtable(_array: &vortex_fastlanes::RLEData) -> &Self -pub fn vortex_fastlanes::RLE::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_fastlanes::RLE::with_children(array: &mut vortex_fastlanes::RLEData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::operations::OperationsVTable for vortex_fastlanes::RLE -pub fn vortex_fastlanes::RLE::scalar_at(array: &vortex_fastlanes::RLEArray, index: usize, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_fastlanes::RLE::scalar_at(array: &vortex_array::vtable::typed::Array, index: usize, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::validity::ValidityChild for vortex_fastlanes::RLE -pub fn vortex_fastlanes::RLE::validity_child(array: &vortex_fastlanes::RLEArray) -> &vortex_array::array::ArrayRef - -pub struct vortex_fastlanes::RLEArray +pub fn vortex_fastlanes::RLE::validity_child(array: &vortex_fastlanes::RLEData) -> &vortex_array::array::ArrayRef -impl vortex_fastlanes::RLEArray +pub struct vortex_fastlanes::RLEData -pub fn vortex_fastlanes::RLEArray::dtype(&self) -> &vortex_array::dtype::DType +impl vortex_fastlanes::RLEData -pub fn vortex_fastlanes::RLEArray::indices(&self) -> &vortex_array::array::ArrayRef +pub fn vortex_fastlanes::RLEData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_fastlanes::RLEArray::is_empty(&self) -> bool +pub fn vortex_fastlanes::RLEData::indices(&self) -> &vortex_array::array::ArrayRef -pub fn vortex_fastlanes::RLEArray::len(&self) -> usize +pub fn vortex_fastlanes::RLEData::is_empty(&self) -> bool -pub unsafe fn vortex_fastlanes::RLEArray::new_unchecked(values: vortex_array::array::ArrayRef, indices: vortex_array::array::ArrayRef, values_idx_offsets: vortex_array::array::ArrayRef, dtype: vortex_array::dtype::DType, offset: usize, length: usize) -> Self +pub fn vortex_fastlanes::RLEData::len(&self) -> usize -pub fn vortex_fastlanes::RLEArray::offset(&self) -> usize +pub unsafe fn vortex_fastlanes::RLEData::new_unchecked(values: vortex_array::array::ArrayRef, indices: vortex_array::array::ArrayRef, values_idx_offsets: vortex_array::array::ArrayRef, dtype: vortex_array::dtype::DType, offset: usize, length: usize) -> Self -pub fn vortex_fastlanes::RLEArray::try_new(values: vortex_array::array::ArrayRef, indices: vortex_array::array::ArrayRef, values_idx_offsets: vortex_array::array::ArrayRef, offset: usize, length: usize) -> vortex_error::VortexResult +pub fn vortex_fastlanes::RLEData::offset(&self) -> usize -pub fn vortex_fastlanes::RLEArray::values(&self) -> &vortex_array::array::ArrayRef +pub fn vortex_fastlanes::RLEData::try_new(values: vortex_array::array::ArrayRef, indices: vortex_array::array::ArrayRef, values_idx_offsets: vortex_array::array::ArrayRef, offset: usize, length: usize) -> vortex_error::VortexResult -pub fn vortex_fastlanes::RLEArray::values_idx_offsets(&self) -> &vortex_array::array::ArrayRef +pub fn vortex_fastlanes::RLEData::values(&self) -> &vortex_array::array::ArrayRef -impl vortex_fastlanes::RLEArray +pub fn vortex_fastlanes::RLEData::values_idx_offsets(&self) -> &vortex_array::array::ArrayRef -pub fn vortex_fastlanes::RLEArray::encode(array: &vortex_array::arrays::primitive::array::PrimitiveArray) -> vortex_error::VortexResult +impl vortex_fastlanes::RLEData -impl vortex_fastlanes::RLEArray +pub fn vortex_fastlanes::RLEData::encode(array: &vortex_array::arrays::primitive::vtable::PrimitiveArray) -> vortex_error::VortexResult -pub fn vortex_fastlanes::RLEArray::to_array(&self) -> vortex_array::array::ArrayRef +impl core::clone::Clone for vortex_fastlanes::RLEData -impl core::clone::Clone for vortex_fastlanes::RLEArray +pub fn vortex_fastlanes::RLEData::clone(&self) -> vortex_fastlanes::RLEData -pub fn vortex_fastlanes::RLEArray::clone(&self) -> vortex_fastlanes::RLEArray +impl core::convert::From for vortex_array::array::ArrayRef -impl core::convert::AsRef for vortex_fastlanes::RLEArray +pub fn vortex_array::array::ArrayRef::from(value: vortex_fastlanes::RLEData) -> vortex_array::array::ArrayRef -pub fn vortex_fastlanes::RLEArray::as_ref(&self) -> &dyn vortex_array::array::DynArray +impl core::fmt::Debug for vortex_fastlanes::RLEData -impl core::convert::From for vortex_array::array::ArrayRef +pub fn vortex_fastlanes::RLEData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub fn vortex_array::array::ArrayRef::from(value: vortex_fastlanes::RLEArray) -> vortex_array::array::ArrayRef +impl vortex_array::array::IntoArray for vortex_fastlanes::RLEData -impl core::fmt::Debug for vortex_fastlanes::RLEArray +pub fn vortex_fastlanes::RLEData::into_array(self) -> vortex_array::array::ArrayRef -pub fn vortex_fastlanes::RLEArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl vortex_array::vtable::validity::ValidityChildSliceHelper for vortex_fastlanes::RLEData -impl core::ops::deref::Deref for vortex_fastlanes::RLEArray +pub fn vortex_fastlanes::RLEData::unsliced_child_and_slice(&self) -> (&vortex_array::array::ArrayRef, usize, usize) -pub type vortex_fastlanes::RLEArray::Target = dyn vortex_array::array::DynArray +pub fn vortex_fastlanes::delta_compress(array: &vortex_array::arrays::primitive::vtable::PrimitiveArray, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<(vortex_array::arrays::primitive::vtable::PrimitiveArray, vortex_array::arrays::primitive::vtable::PrimitiveArray)> -pub fn vortex_fastlanes::RLEArray::deref(&self) -> &Self::Target - -impl vortex_array::array::IntoArray for vortex_fastlanes::RLEArray - -pub fn vortex_fastlanes::RLEArray::into_array(self) -> vortex_array::array::ArrayRef +pub fn vortex_fastlanes::initialize(session: &mut vortex_session::VortexSession) -impl vortex_array::vtable::validity::ValidityChildSliceHelper for vortex_fastlanes::RLEArray +pub type vortex_fastlanes::BitPackedArray = vortex_array::vtable::typed::Array -pub fn vortex_fastlanes::RLEArray::unsliced_child_and_slice(&self) -> (&vortex_array::array::ArrayRef, usize, usize) +pub type vortex_fastlanes::DeltaArray = vortex_array::vtable::typed::Array -pub fn vortex_fastlanes::delta_compress(array: &vortex_array::arrays::primitive::array::PrimitiveArray, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<(vortex_array::arrays::primitive::array::PrimitiveArray, vortex_array::arrays::primitive::array::PrimitiveArray)> +pub type vortex_fastlanes::FoRArray = vortex_array::vtable::typed::Array -pub fn vortex_fastlanes::initialize(session: &mut vortex_session::VortexSession) +pub type vortex_fastlanes::RLEArray = vortex_array::vtable::typed::Array diff --git a/encodings/fsst/public-api.lock b/encodings/fsst/public-api.lock index 7c6a068fdbe..22b93348204 100644 --- a/encodings/fsst/public-api.lock +++ b/encodings/fsst/public-api.lock @@ -6,6 +6,8 @@ impl vortex_fsst::FSST pub const vortex_fsst::FSST::ID: vortex_array::vtable::dyn_::ArrayId +pub fn vortex_fsst::FSST::try_new(dtype: vortex_array::dtype::DType, symbols: vortex_buffer::buffer::Buffer, symbol_lengths: vortex_buffer::buffer::Buffer, codes: vortex_array::arrays::varbin::vtable::VarBinArray, uncompressed_lengths: vortex_array::array::ArrayRef) -> vortex_error::VortexResult + impl core::clone::Clone for vortex_fsst::FSST pub fn vortex_fsst::FSST::clone(&self) -> vortex_fsst::FSST @@ -24,7 +26,7 @@ pub fn vortex_fsst::FSST::filter(array: &vortex_fsst::FSSTArray, mask: &vortex_m impl vortex_array::arrays::slice::SliceReduce for vortex_fsst::FSST -pub fn vortex_fsst::FSST::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_fsst::FSST::slice(array: &vortex_array::vtable::typed::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::binary::compare::CompareKernel for vortex_fsst::FSST @@ -40,7 +42,7 @@ pub fn vortex_fsst::FSST::like(array: &vortex_fsst::FSSTArray, pattern: &vortex_ impl vortex_array::vtable::VTable for vortex_fsst::FSST -pub type vortex_fsst::FSST::Array = vortex_fsst::FSSTArray +pub type vortex_fsst::FSST::Array = vortex_fsst::FSSTData pub type vortex_fsst::FSST::Metadata = vortex_array::metadata::ProstMetadata @@ -48,25 +50,25 @@ pub type vortex_fsst::FSST::OperationsVTable = vortex_fsst::FSST pub type vortex_fsst::FSST::ValidityVTable = vortex_array::vtable::validity::ValidityVTableFromChild -pub fn vortex_fsst::FSST::append_to_builder(array: &vortex_fsst::FSSTArray, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_fsst::FSST::append_to_builder(array: &vortex_array::vtable::typed::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_fsst::FSST::array_eq(array: &vortex_fsst::FSSTArray, other: &vortex_fsst::FSSTArray, precision: vortex_array::hash::Precision) -> bool +pub fn vortex_fsst::FSST::array_eq(array: &vortex_array::vtable::typed::Array, other: &vortex_array::vtable::typed::Array, precision: vortex_array::hash::Precision) -> bool -pub fn vortex_fsst::FSST::array_hash(array: &vortex_fsst::FSSTArray, state: &mut H, precision: vortex_array::hash::Precision) +pub fn vortex_fsst::FSST::array_hash(array: &vortex_array::vtable::typed::Array, state: &mut H, precision: vortex_array::hash::Precision) -pub fn vortex_fsst::FSST::buffer(array: &vortex_fsst::FSSTArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_fsst::FSST::buffer(array: &vortex_array::vtable::typed::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_fsst::FSST::buffer_name(_array: &vortex_fsst::FSSTArray, idx: usize) -> core::option::Option +pub fn vortex_fsst::FSST::buffer_name(_array: &vortex_array::vtable::typed::Array, idx: usize) -> core::option::Option -pub fn vortex_fsst::FSST::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_fsst::FSST::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_fsst::FSST::child(array: &vortex_fsst::FSSTArray, idx: usize) -> vortex_array::array::ArrayRef +pub fn vortex_fsst::FSST::child(array: &vortex_array::vtable::typed::Array, idx: usize) -> vortex_array::array::ArrayRef -pub fn vortex_fsst::FSST::child_name(_array: &vortex_fsst::FSSTArray, idx: usize) -> alloc::string::String +pub fn vortex_fsst::FSST::child_name(_array: &vortex_array::vtable::typed::Array, idx: usize) -> alloc::string::String pub fn vortex_fsst::FSST::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_fsst::FSST::dtype(array: &vortex_fsst::FSSTArray) -> &vortex_array::dtype::DType +pub fn vortex_fsst::FSST::dtype(array: &vortex_fsst::FSSTData) -> &vortex_array::dtype::DType pub fn vortex_fsst::FSST::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult @@ -74,19 +76,19 @@ pub fn vortex_fsst::FSST::execute_parent(array: &vortex_array::vtable::typed::Ar pub fn vortex_fsst::FSST::id(&self) -> vortex_array::vtable::dyn_::ArrayId -pub fn vortex_fsst::FSST::len(array: &vortex_fsst::FSSTArray) -> usize +pub fn vortex_fsst::FSST::len(array: &vortex_fsst::FSSTData) -> usize -pub fn vortex_fsst::FSST::metadata(array: &vortex_fsst::FSSTArray) -> vortex_error::VortexResult +pub fn vortex_fsst::FSST::metadata(array: &vortex_array::vtable::typed::Array) -> vortex_error::VortexResult -pub fn vortex_fsst::FSST::nbuffers(_array: &vortex_fsst::FSSTArray) -> usize +pub fn vortex_fsst::FSST::nbuffers(_array: &vortex_array::vtable::typed::Array) -> usize -pub fn vortex_fsst::FSST::nchildren(array: &vortex_fsst::FSSTArray) -> usize +pub fn vortex_fsst::FSST::nchildren(array: &vortex_array::vtable::typed::Array) -> usize pub fn vortex_fsst::FSST::reduce_parent(array: &vortex_array::vtable::typed::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize) -> vortex_error::VortexResult> pub fn vortex_fsst::FSST::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_fsst::FSST::stats(array: &vortex_fsst::FSSTArray) -> &vortex_array::stats::array::ArrayStats +pub fn vortex_fsst::FSST::stats(array: &vortex_fsst::FSSTData) -> &vortex_array::stats::array::ArrayStats pub fn vortex_fsst::FSST::vtable(_array: &Self::Array) -> &Self @@ -94,63 +96,55 @@ pub fn vortex_fsst::FSST::with_children(array: &mut Self::Array, children: alloc impl vortex_array::vtable::operations::OperationsVTable for vortex_fsst::FSST -pub fn vortex_fsst::FSST::scalar_at(array: &vortex_fsst::FSSTArray, index: usize, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_fsst::FSST::scalar_at(array: &vortex_array::vtable::typed::Array, index: usize, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::validity::ValidityChild for vortex_fsst::FSST -pub fn vortex_fsst::FSST::validity_child(array: &vortex_fsst::FSSTArray) -> &vortex_array::array::ArrayRef - -pub struct vortex_fsst::FSSTArray - -impl vortex_fsst::FSSTArray +pub fn vortex_fsst::FSST::validity_child(array: &vortex_fsst::FSSTData) -> &vortex_array::array::ArrayRef -pub fn vortex_fsst::FSSTArray::codes(&self) -> &vortex_array::arrays::varbin::array::VarBinArray +pub struct vortex_fsst::FSSTData -pub fn vortex_fsst::FSSTArray::codes_dtype(&self) -> &vortex_array::dtype::DType +impl vortex_fsst::FSSTData -pub fn vortex_fsst::FSSTArray::compressor(&self) -> &fsst::Compressor +pub fn vortex_fsst::FSSTData::codes(&self) -> &vortex_array::arrays::varbin::vtable::VarBinArray -pub fn vortex_fsst::FSSTArray::decompressor(&self) -> fsst::Decompressor<'_> +pub fn vortex_fsst::FSSTData::codes_dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_fsst::FSSTArray::symbol_lengths(&self) -> &vortex_buffer::buffer::Buffer +pub fn vortex_fsst::FSSTData::compressor(&self) -> &fsst::Compressor -pub fn vortex_fsst::FSSTArray::symbols(&self) -> &vortex_buffer::buffer::Buffer +pub fn vortex_fsst::FSSTData::decompressor(&self) -> fsst::Decompressor<'_> -pub fn vortex_fsst::FSSTArray::try_new(dtype: vortex_array::dtype::DType, symbols: vortex_buffer::buffer::Buffer, symbol_lengths: vortex_buffer::buffer::Buffer, codes: vortex_array::arrays::varbin::array::VarBinArray, uncompressed_lengths: vortex_array::array::ArrayRef) -> vortex_error::VortexResult +pub fn vortex_fsst::FSSTData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_fsst::FSSTArray::uncompressed_lengths(&self) -> &vortex_array::array::ArrayRef +pub fn vortex_fsst::FSSTData::is_empty(&self) -> bool -pub fn vortex_fsst::FSSTArray::uncompressed_lengths_dtype(&self) -> &vortex_array::dtype::DType +pub fn vortex_fsst::FSSTData::len(&self) -> usize -impl vortex_fsst::FSSTArray +pub fn vortex_fsst::FSSTData::symbol_lengths(&self) -> &vortex_buffer::buffer::Buffer -pub fn vortex_fsst::FSSTArray::to_array(&self) -> vortex_array::array::ArrayRef +pub fn vortex_fsst::FSSTData::symbols(&self) -> &vortex_buffer::buffer::Buffer -impl core::clone::Clone for vortex_fsst::FSSTArray +pub fn vortex_fsst::FSSTData::try_new(dtype: vortex_array::dtype::DType, symbols: vortex_buffer::buffer::Buffer, symbol_lengths: vortex_buffer::buffer::Buffer, codes: vortex_array::arrays::varbin::vtable::VarBinArray, uncompressed_lengths: vortex_array::array::ArrayRef) -> vortex_error::VortexResult -pub fn vortex_fsst::FSSTArray::clone(&self) -> vortex_fsst::FSSTArray +pub fn vortex_fsst::FSSTData::uncompressed_lengths(&self) -> &vortex_array::array::ArrayRef -impl core::convert::AsRef for vortex_fsst::FSSTArray +pub fn vortex_fsst::FSSTData::uncompressed_lengths_dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_fsst::FSSTArray::as_ref(&self) -> &dyn vortex_array::array::DynArray +impl core::clone::Clone for vortex_fsst::FSSTData -impl core::convert::From for vortex_array::array::ArrayRef +pub fn vortex_fsst::FSSTData::clone(&self) -> vortex_fsst::FSSTData -pub fn vortex_array::array::ArrayRef::from(value: vortex_fsst::FSSTArray) -> vortex_array::array::ArrayRef +impl core::convert::From for vortex_array::array::ArrayRef -impl core::fmt::Debug for vortex_fsst::FSSTArray +pub fn vortex_array::array::ArrayRef::from(value: vortex_fsst::FSSTData) -> vortex_array::array::ArrayRef -pub fn vortex_fsst::FSSTArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::fmt::Debug for vortex_fsst::FSSTData -impl core::ops::deref::Deref for vortex_fsst::FSSTArray +pub fn vortex_fsst::FSSTData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub type vortex_fsst::FSSTArray::Target = dyn vortex_array::array::DynArray +impl vortex_array::array::IntoArray for vortex_fsst::FSSTData -pub fn vortex_fsst::FSSTArray::deref(&self) -> &Self::Target - -impl vortex_array::array::IntoArray for vortex_fsst::FSSTArray - -pub fn vortex_fsst::FSSTArray::into_array(self) -> vortex_array::array::ArrayRef +pub fn vortex_fsst::FSSTData::into_array(self) -> vortex_array::array::ArrayRef pub struct vortex_fsst::FSSTMetadata @@ -186,8 +180,10 @@ pub fn vortex_fsst::FSSTMetadata::clear(&mut self) pub fn vortex_fsst::FSSTMetadata::encoded_len(&self) -> usize -pub fn vortex_fsst::fsst_compress + core::convert::AsRef>(strings: A, compressor: &fsst::Compressor) -> vortex_fsst::FSSTArray +pub fn vortex_fsst::fsst_compress>(strings: A, len: usize, dtype: &vortex_array::dtype::DType, compressor: &fsst::Compressor) -> vortex_fsst::FSSTData -pub fn vortex_fsst::fsst_compress_iter<'a, I>(iter: I, len: usize, dtype: vortex_array::dtype::DType, compressor: &fsst::Compressor) -> vortex_fsst::FSSTArray where I: core::iter::traits::iterator::Iterator> +pub fn vortex_fsst::fsst_compress_iter<'a, I>(iter: I, len: usize, dtype: vortex_array::dtype::DType, compressor: &fsst::Compressor) -> vortex_fsst::FSSTData where I: core::iter::traits::iterator::Iterator> pub fn vortex_fsst::fsst_train_compressor>(array: &A) -> fsst::Compressor + +pub type vortex_fsst::FSSTArray = vortex_array::vtable::typed::Array diff --git a/encodings/pco/public-api.lock b/encodings/pco/public-api.lock index 857007a044c..a082dd0f400 100644 --- a/encodings/pco/public-api.lock +++ b/encodings/pco/public-api.lock @@ -6,6 +6,8 @@ impl vortex_pco::Pco pub const vortex_pco::Pco::ID: vortex_array::vtable::dyn_::ArrayId +pub fn vortex_pco::Pco::from_primitive(parray: &vortex_array::arrays::primitive::vtable::PrimitiveArray, level: usize, values_per_page: usize) -> vortex_error::VortexResult + impl core::clone::Clone for vortex_pco::Pco pub fn vortex_pco::Pco::clone(&self) -> vortex_pco::Pco @@ -16,7 +18,7 @@ pub fn vortex_pco::Pco::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fm impl vortex_array::arrays::slice::SliceReduce for vortex_pco::Pco -pub fn vortex_pco::Pco::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_pco::Pco::slice(array: &vortex_array::vtable::typed::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::kernel::CastReduce for vortex_pco::Pco @@ -24,7 +26,7 @@ pub fn vortex_pco::Pco::cast(array: &vortex_pco::PcoArray, dtype: &vortex_array: impl vortex_array::vtable::VTable for vortex_pco::Pco -pub type vortex_pco::Pco::Array = vortex_pco::PcoArray +pub type vortex_pco::Pco::Array = vortex_pco::PcoData pub type vortex_pco::Pco::Metadata = vortex_array::metadata::ProstMetadata @@ -32,41 +34,41 @@ pub type vortex_pco::Pco::OperationsVTable = vortex_pco::Pco pub type vortex_pco::Pco::ValidityVTable = vortex_array::vtable::validity::ValidityVTableFromValiditySliceHelper -pub fn vortex_pco::Pco::array_eq(array: &vortex_pco::PcoArray, other: &vortex_pco::PcoArray, precision: vortex_array::hash::Precision) -> bool +pub fn vortex_pco::Pco::array_eq(array: &vortex_array::vtable::typed::Array, other: &vortex_array::vtable::typed::Array, precision: vortex_array::hash::Precision) -> bool -pub fn vortex_pco::Pco::array_hash(array: &vortex_pco::PcoArray, state: &mut H, precision: vortex_array::hash::Precision) +pub fn vortex_pco::Pco::array_hash(array: &vortex_array::vtable::typed::Array, state: &mut H, precision: vortex_array::hash::Precision) -pub fn vortex_pco::Pco::buffer(array: &vortex_pco::PcoArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_pco::Pco::buffer(array: &vortex_array::vtable::typed::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_pco::Pco::buffer_name(array: &vortex_pco::PcoArray, idx: usize) -> core::option::Option +pub fn vortex_pco::Pco::buffer_name(array: &vortex_array::vtable::typed::Array, idx: usize) -> core::option::Option -pub fn vortex_pco::Pco::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_pco::Pco::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_pco::Pco::child(array: &vortex_pco::PcoArray, idx: usize) -> vortex_array::array::ArrayRef +pub fn vortex_pco::Pco::child(array: &vortex_array::vtable::typed::Array, idx: usize) -> vortex_array::array::ArrayRef -pub fn vortex_pco::Pco::child_name(_array: &vortex_pco::PcoArray, idx: usize) -> alloc::string::String +pub fn vortex_pco::Pco::child_name(_array: &vortex_array::vtable::typed::Array, idx: usize) -> alloc::string::String pub fn vortex_pco::Pco::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_pco::Pco::dtype(array: &vortex_pco::PcoArray) -> &vortex_array::dtype::DType +pub fn vortex_pco::Pco::dtype(array: &vortex_pco::PcoData) -> &vortex_array::dtype::DType pub fn vortex_pco::Pco::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult pub fn vortex_pco::Pco::id(&self) -> vortex_array::vtable::dyn_::ArrayId -pub fn vortex_pco::Pco::len(array: &vortex_pco::PcoArray) -> usize +pub fn vortex_pco::Pco::len(array: &vortex_pco::PcoData) -> usize -pub fn vortex_pco::Pco::metadata(array: &vortex_pco::PcoArray) -> vortex_error::VortexResult +pub fn vortex_pco::Pco::metadata(array: &vortex_array::vtable::typed::Array) -> vortex_error::VortexResult -pub fn vortex_pco::Pco::nbuffers(array: &vortex_pco::PcoArray) -> usize +pub fn vortex_pco::Pco::nbuffers(array: &vortex_array::vtable::typed::Array) -> usize -pub fn vortex_pco::Pco::nchildren(array: &vortex_pco::PcoArray) -> usize +pub fn vortex_pco::Pco::nchildren(array: &vortex_array::vtable::typed::Array) -> usize pub fn vortex_pco::Pco::reduce_parent(array: &vortex_array::vtable::typed::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize) -> vortex_error::VortexResult> pub fn vortex_pco::Pco::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_pco::Pco::stats(array: &vortex_pco::PcoArray) -> &vortex_array::stats::array::ArrayStats +pub fn vortex_pco::Pco::stats(array: &vortex_pco::PcoData) -> &vortex_array::stats::array::ArrayStats pub fn vortex_pco::Pco::vtable(_array: &Self::Array) -> &Self @@ -74,75 +76,67 @@ pub fn vortex_pco::Pco::with_children(array: &mut Self::Array, children: alloc:: impl vortex_array::vtable::operations::OperationsVTable for vortex_pco::Pco -pub fn vortex_pco::Pco::scalar_at(array: &vortex_pco::PcoArray, index: usize, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult - -pub struct vortex_pco::PcoArray - -impl vortex_pco::PcoArray - -pub fn vortex_pco::PcoArray::decompress(&self, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_pco::Pco::scalar_at(array: &vortex_array::vtable::typed::Array, index: usize, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult -pub fn vortex_pco::PcoArray::from_array(array: vortex_array::array::ArrayRef, level: usize, nums_per_page: usize) -> vortex_error::VortexResult - -pub fn vortex_pco::PcoArray::from_primitive(parray: &vortex_array::arrays::primitive::array::PrimitiveArray, level: usize, values_per_page: usize) -> vortex_error::VortexResult +pub struct vortex_pco::PcoChunkInfo -pub fn vortex_pco::PcoArray::new(chunk_metas: alloc::vec::Vec, pages: alloc::vec::Vec, dtype: vortex_array::dtype::DType, metadata: vortex_pco::PcoMetadata, len: usize, validity: vortex_array::validity::Validity) -> Self +pub vortex_pco::PcoChunkInfo::pages: alloc::vec::Vec -impl vortex_pco::PcoArray +impl core::clone::Clone for vortex_pco::PcoChunkInfo -pub fn vortex_pco::PcoArray::to_array(&self) -> vortex_array::array::ArrayRef +pub fn vortex_pco::PcoChunkInfo::clone(&self) -> vortex_pco::PcoChunkInfo -impl core::clone::Clone for vortex_pco::PcoArray +impl core::default::Default for vortex_pco::PcoChunkInfo -pub fn vortex_pco::PcoArray::clone(&self) -> vortex_pco::PcoArray +pub fn vortex_pco::PcoChunkInfo::default() -> Self -impl core::convert::AsRef for vortex_pco::PcoArray +impl core::fmt::Debug for vortex_pco::PcoChunkInfo -pub fn vortex_pco::PcoArray::as_ref(&self) -> &dyn vortex_array::array::DynArray +pub fn vortex_pco::PcoChunkInfo::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -impl core::convert::From for vortex_array::array::ArrayRef +impl prost::message::Message for vortex_pco::PcoChunkInfo -pub fn vortex_array::array::ArrayRef::from(value: vortex_pco::PcoArray) -> vortex_array::array::ArrayRef +pub fn vortex_pco::PcoChunkInfo::clear(&mut self) -impl core::fmt::Debug for vortex_pco::PcoArray +pub fn vortex_pco::PcoChunkInfo::encoded_len(&self) -> usize -pub fn vortex_pco::PcoArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub struct vortex_pco::PcoData -impl core::ops::deref::Deref for vortex_pco::PcoArray +impl vortex_pco::PcoData -pub type vortex_pco::PcoArray::Target = dyn vortex_array::array::DynArray +pub fn vortex_pco::PcoData::decompress(&self, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult -pub fn vortex_pco::PcoArray::deref(&self) -> &Self::Target +pub fn vortex_pco::PcoData::dtype(&self) -> &vortex_array::dtype::DType -impl vortex_array::array::IntoArray for vortex_pco::PcoArray +pub fn vortex_pco::PcoData::from_array(array: vortex_array::array::ArrayRef, level: usize, nums_per_page: usize) -> vortex_error::VortexResult -pub fn vortex_pco::PcoArray::into_array(self) -> vortex_array::array::ArrayRef +pub fn vortex_pco::PcoData::from_primitive(parray: &vortex_array::arrays::primitive::vtable::PrimitiveArray, level: usize, values_per_page: usize) -> vortex_error::VortexResult -impl vortex_array::vtable::validity::ValiditySliceHelper for vortex_pco::PcoArray +pub fn vortex_pco::PcoData::is_empty(&self) -> bool -pub fn vortex_pco::PcoArray::unsliced_validity_and_slice(&self) -> (&vortex_array::validity::Validity, usize, usize) +pub fn vortex_pco::PcoData::len(&self) -> usize -pub struct vortex_pco::PcoChunkInfo +pub fn vortex_pco::PcoData::new(chunk_metas: alloc::vec::Vec, pages: alloc::vec::Vec, dtype: vortex_array::dtype::DType, metadata: vortex_pco::PcoMetadata, len: usize, validity: vortex_array::validity::Validity) -> Self -pub vortex_pco::PcoChunkInfo::pages: alloc::vec::Vec +impl core::clone::Clone for vortex_pco::PcoData -impl core::clone::Clone for vortex_pco::PcoChunkInfo +pub fn vortex_pco::PcoData::clone(&self) -> vortex_pco::PcoData -pub fn vortex_pco::PcoChunkInfo::clone(&self) -> vortex_pco::PcoChunkInfo +impl core::convert::From for vortex_array::array::ArrayRef -impl core::default::Default for vortex_pco::PcoChunkInfo +pub fn vortex_array::array::ArrayRef::from(value: vortex_pco::PcoData) -> vortex_array::array::ArrayRef -pub fn vortex_pco::PcoChunkInfo::default() -> Self +impl core::fmt::Debug for vortex_pco::PcoData -impl core::fmt::Debug for vortex_pco::PcoChunkInfo +pub fn vortex_pco::PcoData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub fn vortex_pco::PcoChunkInfo::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl vortex_array::array::IntoArray for vortex_pco::PcoData -impl prost::message::Message for vortex_pco::PcoChunkInfo +pub fn vortex_pco::PcoData::into_array(self) -> vortex_array::array::ArrayRef -pub fn vortex_pco::PcoChunkInfo::clear(&mut self) +impl vortex_array::vtable::validity::ValiditySliceHelper for vortex_pco::PcoData -pub fn vortex_pco::PcoChunkInfo::encoded_len(&self) -> usize +pub fn vortex_pco::PcoData::unsliced_validity_and_slice(&self) -> (&vortex_array::validity::Validity, usize, usize) pub struct vortex_pco::PcoMetadata @@ -189,3 +183,5 @@ impl prost::message::Message for vortex_pco::PcoPageInfo pub fn vortex_pco::PcoPageInfo::clear(&mut self) pub fn vortex_pco::PcoPageInfo::encoded_len(&self) -> usize + +pub type vortex_pco::PcoArray = vortex_array::vtable::typed::Array diff --git a/encodings/runend/public-api.lock b/encodings/runend/public-api.lock index 794331812aa..aa50aac4ec1 100644 --- a/encodings/runend/public-api.lock +++ b/encodings/runend/public-api.lock @@ -2,17 +2,17 @@ pub mod vortex_runend pub mod vortex_runend::compress -pub fn vortex_runend::compress::runend_decode_primitive(ends: vortex_array::arrays::primitive::array::PrimitiveArray, values: vortex_array::arrays::primitive::array::PrimitiveArray, offset: usize, length: usize) -> vortex_error::VortexResult +pub fn vortex_runend::compress::runend_decode_primitive(ends: vortex_array::arrays::primitive::vtable::PrimitiveArray, values: vortex_array::arrays::primitive::vtable::PrimitiveArray, offset: usize, length: usize) -> vortex_error::VortexResult -pub fn vortex_runend::compress::runend_decode_typed_primitive(run_ends: impl core::iter::traits::iterator::Iterator, values: &[T], values_validity: vortex_mask::Mask, values_nullability: vortex_array::dtype::nullability::Nullability, length: usize) -> vortex_array::arrays::primitive::array::PrimitiveArray +pub fn vortex_runend::compress::runend_decode_typed_primitive(run_ends: impl core::iter::traits::iterator::Iterator, values: &[T], values_validity: vortex_mask::Mask, values_nullability: vortex_array::dtype::nullability::Nullability, length: usize) -> vortex_array::arrays::primitive::vtable::PrimitiveArray -pub fn vortex_runend::compress::runend_decode_varbinview(ends: vortex_array::arrays::primitive::array::PrimitiveArray, values: vortex_array::arrays::varbinview::array::VarBinViewArray, offset: usize, length: usize) -> vortex_error::VortexResult +pub fn vortex_runend::compress::runend_decode_varbinview(ends: vortex_array::arrays::primitive::vtable::PrimitiveArray, values: vortex_array::arrays::varbinview::vtable::VarBinViewArray, offset: usize, length: usize) -> vortex_error::VortexResult -pub fn vortex_runend::compress::runend_encode(array: &vortex_array::arrays::primitive::array::PrimitiveArray) -> (vortex_array::arrays::primitive::array::PrimitiveArray, vortex_array::array::ArrayRef) +pub fn vortex_runend::compress::runend_encode(array: &vortex_array::arrays::primitive::vtable::PrimitiveArray) -> (vortex_array::arrays::primitive::vtable::PrimitiveArray, vortex_array::array::ArrayRef) pub mod vortex_runend::decompress_bool -pub fn vortex_runend::decompress_bool::runend_decode_bools(ends: vortex_array::arrays::primitive::array::PrimitiveArray, values: vortex_array::arrays::bool::array::BoolArray, offset: usize, length: usize) -> vortex_error::VortexResult +pub fn vortex_runend::decompress_bool::runend_decode_bools(ends: vortex_array::arrays::primitive::vtable::PrimitiveArray, values: vortex_array::arrays::bool::vtable::BoolArray, offset: usize, length: usize) -> vortex_error::VortexResult pub fn vortex_runend::decompress_bool::runend_decode_typed_bool(run_ends: impl core::iter::traits::iterator::Iterator, values: &vortex_buffer::bit::buf::BitBuffer, values_validity: vortex_mask::Mask, values_nullability: vortex_array::dtype::nullability::Nullability, length: usize) -> vortex_array::array::ArrayRef @@ -22,6 +22,12 @@ impl vortex_runend::RunEnd pub const vortex_runend::RunEnd::ID: vortex_array::vtable::dyn_::ArrayId +pub unsafe fn vortex_runend::RunEnd::new_unchecked(ends: vortex_array::array::ArrayRef, values: vortex_array::array::ArrayRef, offset: usize, length: usize) -> vortex_runend::RunEndArray + +pub fn vortex_runend::RunEnd::try_new(ends: vortex_array::array::ArrayRef, values: vortex_array::array::ArrayRef) -> vortex_error::VortexResult + +pub fn vortex_runend::RunEnd::try_new_offset_length(ends: vortex_array::array::ArrayRef, values: vortex_array::array::ArrayRef, offset: usize, length: usize) -> vortex_error::VortexResult + impl core::clone::Clone for vortex_runend::RunEnd pub fn vortex_runend::RunEnd::clone(&self) -> vortex_runend::RunEnd @@ -52,7 +58,7 @@ pub fn vortex_runend::RunEnd::fill_null(array: &vortex_runend::RunEndArray, fill impl vortex_array::vtable::VTable for vortex_runend::RunEnd -pub type vortex_runend::RunEnd::Array = vortex_runend::RunEndArray +pub type vortex_runend::RunEnd::Array = vortex_runend::RunEndData pub type vortex_runend::RunEnd::Metadata = vortex_array::metadata::ProstMetadata @@ -60,23 +66,23 @@ pub type vortex_runend::RunEnd::OperationsVTable = vortex_runend::RunEnd pub type vortex_runend::RunEnd::ValidityVTable = vortex_runend::RunEnd -pub fn vortex_runend::RunEnd::array_eq(array: &vortex_runend::RunEndArray, other: &vortex_runend::RunEndArray, precision: vortex_array::hash::Precision) -> bool +pub fn vortex_runend::RunEnd::array_eq(array: &vortex_array::vtable::typed::Array, other: &vortex_array::vtable::typed::Array, precision: vortex_array::hash::Precision) -> bool -pub fn vortex_runend::RunEnd::array_hash(array: &vortex_runend::RunEndArray, state: &mut H, precision: vortex_array::hash::Precision) +pub fn vortex_runend::RunEnd::array_hash(array: &vortex_array::vtable::typed::Array, state: &mut H, precision: vortex_array::hash::Precision) -pub fn vortex_runend::RunEnd::buffer(_array: &vortex_runend::RunEndArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_runend::RunEnd::buffer(_array: &vortex_array::vtable::typed::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_runend::RunEnd::buffer_name(_array: &vortex_runend::RunEndArray, idx: usize) -> core::option::Option +pub fn vortex_runend::RunEnd::buffer_name(_array: &vortex_array::vtable::typed::Array, idx: usize) -> core::option::Option -pub fn vortex_runend::RunEnd::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_runend::RunEnd::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_runend::RunEnd::child(array: &vortex_runend::RunEndArray, idx: usize) -> vortex_array::array::ArrayRef +pub fn vortex_runend::RunEnd::child(array: &vortex_array::vtable::typed::Array, idx: usize) -> vortex_array::array::ArrayRef -pub fn vortex_runend::RunEnd::child_name(_array: &vortex_runend::RunEndArray, idx: usize) -> alloc::string::String +pub fn vortex_runend::RunEnd::child_name(_array: &vortex_array::vtable::typed::Array, idx: usize) -> alloc::string::String pub fn vortex_runend::RunEnd::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_runend::RunEnd::dtype(array: &vortex_runend::RunEndArray) -> &vortex_array::dtype::DType +pub fn vortex_runend::RunEnd::dtype(array: &vortex_runend::RunEndData) -> &vortex_array::dtype::DType pub fn vortex_runend::RunEnd::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult @@ -84,19 +90,19 @@ pub fn vortex_runend::RunEnd::execute_parent(array: &vortex_array::vtable::typed pub fn vortex_runend::RunEnd::id(&self) -> vortex_array::vtable::dyn_::ArrayId -pub fn vortex_runend::RunEnd::len(array: &vortex_runend::RunEndArray) -> usize +pub fn vortex_runend::RunEnd::len(array: &vortex_runend::RunEndData) -> usize -pub fn vortex_runend::RunEnd::metadata(array: &vortex_runend::RunEndArray) -> vortex_error::VortexResult +pub fn vortex_runend::RunEnd::metadata(array: &vortex_array::vtable::typed::Array) -> vortex_error::VortexResult -pub fn vortex_runend::RunEnd::nbuffers(_array: &vortex_runend::RunEndArray) -> usize +pub fn vortex_runend::RunEnd::nbuffers(_array: &vortex_array::vtable::typed::Array) -> usize -pub fn vortex_runend::RunEnd::nchildren(_array: &vortex_runend::RunEndArray) -> usize +pub fn vortex_runend::RunEnd::nchildren(_array: &vortex_array::vtable::typed::Array) -> usize pub fn vortex_runend::RunEnd::reduce_parent(array: &vortex_array::vtable::typed::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize) -> vortex_error::VortexResult> pub fn vortex_runend::RunEnd::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_runend::RunEnd::stats(array: &vortex_runend::RunEndArray) -> &vortex_array::stats::array::ArrayStats +pub fn vortex_runend::RunEnd::stats(array: &vortex_runend::RunEndData) -> &vortex_array::stats::array::ArrayStats pub fn vortex_runend::RunEnd::vtable(_array: &Self::Array) -> &Self @@ -104,75 +110,67 @@ pub fn vortex_runend::RunEnd::with_children(array: &mut Self::Array, children: a impl vortex_array::vtable::operations::OperationsVTable for vortex_runend::RunEnd -pub fn vortex_runend::RunEnd::scalar_at(array: &vortex_runend::RunEndArray, index: usize, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_runend::RunEnd::scalar_at(array: &vortex_array::vtable::typed::Array, index: usize, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::validity::ValidityVTable for vortex_runend::RunEnd -pub fn vortex_runend::RunEnd::validity(array: &vortex_runend::RunEndArray) -> vortex_error::VortexResult - -pub struct vortex_runend::RunEndArray - -impl vortex_runend::RunEndArray - -pub fn vortex_runend::RunEndArray::encode(array: vortex_array::array::ArrayRef) -> vortex_error::VortexResult - -pub fn vortex_runend::RunEndArray::ends(&self) -> &vortex_array::array::ArrayRef +pub fn vortex_runend::RunEnd::validity(array: &vortex_array::vtable::typed::Array) -> vortex_error::VortexResult -pub fn vortex_runend::RunEndArray::find_physical_index(&self, index: usize) -> vortex_error::VortexResult +pub struct vortex_runend::RunEndArrayParts -pub fn vortex_runend::RunEndArray::into_parts(self) -> vortex_runend::RunEndArrayParts +pub vortex_runend::RunEndArrayParts::ends: vortex_array::array::ArrayRef -pub fn vortex_runend::RunEndArray::new(ends: vortex_array::array::ArrayRef, values: vortex_array::array::ArrayRef) -> Self +pub vortex_runend::RunEndArrayParts::values: vortex_array::array::ArrayRef -pub unsafe fn vortex_runend::RunEndArray::new_unchecked(ends: vortex_array::array::ArrayRef, values: vortex_array::array::ArrayRef, offset: usize, length: usize) -> Self +pub struct vortex_runend::RunEndData -pub fn vortex_runend::RunEndArray::offset(&self) -> usize +impl vortex_runend::RunEndData -pub fn vortex_runend::RunEndArray::try_new(ends: vortex_array::array::ArrayRef, values: vortex_array::array::ArrayRef) -> vortex_error::VortexResult +pub fn vortex_runend::RunEndData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_runend::RunEndArray::try_new_offset_length(ends: vortex_array::array::ArrayRef, values: vortex_array::array::ArrayRef, offset: usize, length: usize) -> vortex_error::VortexResult +pub fn vortex_runend::RunEndData::encode(array: vortex_array::array::ArrayRef) -> vortex_error::VortexResult -pub fn vortex_runend::RunEndArray::values(&self) -> &vortex_array::array::ArrayRef +pub fn vortex_runend::RunEndData::ends(&self) -> &vortex_array::array::ArrayRef -impl vortex_runend::RunEndArray +pub fn vortex_runend::RunEndData::find_physical_index(&self, index: usize) -> vortex_error::VortexResult -pub fn vortex_runend::RunEndArray::to_array(&self) -> vortex_array::array::ArrayRef +pub fn vortex_runend::RunEndData::into_parts(self) -> vortex_runend::RunEndArrayParts -impl core::clone::Clone for vortex_runend::RunEndArray +pub fn vortex_runend::RunEndData::is_empty(&self) -> bool -pub fn vortex_runend::RunEndArray::clone(&self) -> vortex_runend::RunEndArray +pub fn vortex_runend::RunEndData::len(&self) -> usize -impl core::convert::AsRef for vortex_runend::RunEndArray +pub fn vortex_runend::RunEndData::new(ends: vortex_array::array::ArrayRef, values: vortex_array::array::ArrayRef) -> Self -pub fn vortex_runend::RunEndArray::as_ref(&self) -> &dyn vortex_array::array::DynArray +pub unsafe fn vortex_runend::RunEndData::new_unchecked(ends: vortex_array::array::ArrayRef, values: vortex_array::array::ArrayRef, offset: usize, length: usize) -> Self -impl core::convert::From for vortex_array::array::ArrayRef +pub fn vortex_runend::RunEndData::offset(&self) -> usize -pub fn vortex_array::array::ArrayRef::from(value: vortex_runend::RunEndArray) -> vortex_array::array::ArrayRef +pub fn vortex_runend::RunEndData::try_new(ends: vortex_array::array::ArrayRef, values: vortex_array::array::ArrayRef) -> vortex_error::VortexResult -impl core::fmt::Debug for vortex_runend::RunEndArray +pub fn vortex_runend::RunEndData::try_new_offset_length(ends: vortex_array::array::ArrayRef, values: vortex_array::array::ArrayRef, offset: usize, length: usize) -> vortex_error::VortexResult -pub fn vortex_runend::RunEndArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_runend::RunEndData::values(&self) -> &vortex_array::array::ArrayRef -impl core::ops::deref::Deref for vortex_runend::RunEndArray +impl core::clone::Clone for vortex_runend::RunEndData -pub type vortex_runend::RunEndArray::Target = dyn vortex_array::array::DynArray +pub fn vortex_runend::RunEndData::clone(&self) -> vortex_runend::RunEndData -pub fn vortex_runend::RunEndArray::deref(&self) -> &Self::Target +impl core::convert::From for vortex_array::array::ArrayRef -impl vortex_array::array::IntoArray for vortex_runend::RunEndArray +pub fn vortex_array::array::ArrayRef::from(value: vortex_runend::RunEndData) -> vortex_array::array::ArrayRef -pub fn vortex_runend::RunEndArray::into_array(self) -> vortex_array::array::ArrayRef +impl core::fmt::Debug for vortex_runend::RunEndData -impl vortex_array::arrow::FromArrowArray<&arrow_array::array::run_array::RunArray> for vortex_runend::RunEndArray where ::Native: vortex_array::dtype::ptype::NativePType +pub fn vortex_runend::RunEndData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub fn vortex_runend::RunEndArray::from_arrow(array: &arrow_array::array::run_array::RunArray, nullable: bool) -> vortex_error::VortexResult +impl vortex_array::array::IntoArray for vortex_runend::RunEndData -pub struct vortex_runend::RunEndArrayParts +pub fn vortex_runend::RunEndData::into_array(self) -> vortex_array::array::ArrayRef -pub vortex_runend::RunEndArrayParts::ends: vortex_array::array::ArrayRef +impl vortex_array::arrow::FromArrowArray<&arrow_array::array::run_array::RunArray> for vortex_runend::RunEndData where ::Native: vortex_array::dtype::ptype::NativePType -pub vortex_runend::RunEndArrayParts::values: vortex_array::array::ArrayRef +pub fn vortex_runend::RunEndData::from_arrow(array: &arrow_array::array::run_array::RunArray, nullable: bool) -> vortex_error::VortexResult pub struct vortex_runend::RunEndMetadata @@ -209,3 +207,5 @@ pub fn vortex_runend::RunEndMetadata::encoded_len(&self) -> usize pub fn vortex_runend::initialize(session: &mut vortex_session::VortexSession) pub fn vortex_runend::trimmed_ends_iter(run_ends: &[E], offset: usize, length: usize) -> impl core::iter::traits::iterator::Iterator + use<'_, E> + +pub type vortex_runend::RunEndArray = vortex_array::vtable::typed::Array diff --git a/encodings/sequence/public-api.lock b/encodings/sequence/public-api.lock index 5e398ee93e3..1983e53e73f 100644 --- a/encodings/sequence/public-api.lock +++ b/encodings/sequence/public-api.lock @@ -6,6 +6,10 @@ impl vortex_sequence::Sequence pub const vortex_sequence::Sequence::ID: vortex_array::vtable::dyn_::ArrayId +pub fn vortex_sequence::Sequence::try_new(base: vortex_array::scalar::typed_view::primitive::pvalue::PValue, multiplier: vortex_array::scalar::typed_view::primitive::pvalue::PValue, ptype: vortex_array::dtype::ptype::PType, nullability: vortex_array::dtype::nullability::Nullability, length: usize) -> vortex_error::VortexResult + +pub fn vortex_sequence::Sequence::try_new_typed>(base: T, multiplier: T, nullability: vortex_array::dtype::nullability::Nullability, length: usize) -> vortex_error::VortexResult + impl core::clone::Clone for vortex_sequence::Sequence pub fn vortex_sequence::Sequence::clone(&self) -> vortex_sequence::Sequence @@ -24,7 +28,7 @@ pub fn vortex_sequence::Sequence::filter(array: &vortex_sequence::SequenceArray, impl vortex_array::arrays::slice::SliceReduce for vortex_sequence::Sequence -pub fn vortex_sequence::Sequence::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_sequence::Sequence::slice(array: &vortex_array::vtable::typed::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::binary::compare::CompareKernel for vortex_sequence::Sequence @@ -36,11 +40,11 @@ pub fn vortex_sequence::Sequence::cast(array: &vortex_sequence::SequenceArray, d impl vortex_array::scalar_fn::fns::list_contains::kernel::ListContainsElementReduce for vortex_sequence::Sequence -pub fn vortex_sequence::Sequence::list_contains(list: &vortex_array::array::ArrayRef, element: &Self::Array) -> vortex_error::VortexResult> +pub fn vortex_sequence::Sequence::list_contains(list: &vortex_array::array::ArrayRef, element: &vortex_array::vtable::typed::Array) -> vortex_error::VortexResult> impl vortex_array::vtable::VTable for vortex_sequence::Sequence -pub type vortex_sequence::Sequence::Array = vortex_sequence::SequenceArray +pub type vortex_sequence::Sequence::Array = vortex_sequence::SequenceData pub type vortex_sequence::Sequence::Metadata = vortex_sequence::array::SequenceMetadata @@ -48,23 +52,23 @@ pub type vortex_sequence::Sequence::OperationsVTable = vortex_sequence::Sequence pub type vortex_sequence::Sequence::ValidityVTable = vortex_sequence::Sequence -pub fn vortex_sequence::Sequence::array_eq(array: &vortex_sequence::SequenceArray, other: &vortex_sequence::SequenceArray, _precision: vortex_array::hash::Precision) -> bool +pub fn vortex_sequence::Sequence::array_eq(array: &vortex_array::vtable::typed::Array, other: &vortex_array::vtable::typed::Array, _precision: vortex_array::hash::Precision) -> bool -pub fn vortex_sequence::Sequence::array_hash(array: &vortex_sequence::SequenceArray, state: &mut H, _precision: vortex_array::hash::Precision) +pub fn vortex_sequence::Sequence::array_hash(array: &vortex_array::vtable::typed::Array, state: &mut H, _precision: vortex_array::hash::Precision) -pub fn vortex_sequence::Sequence::buffer(_array: &vortex_sequence::SequenceArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_sequence::Sequence::buffer(_array: &vortex_array::vtable::typed::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_sequence::Sequence::buffer_name(_array: &vortex_sequence::SequenceArray, idx: usize) -> core::option::Option +pub fn vortex_sequence::Sequence::buffer_name(_array: &vortex_array::vtable::typed::Array, idx: usize) -> core::option::Option -pub fn vortex_sequence::Sequence::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], _children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_sequence::Sequence::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], _children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_sequence::Sequence::child(_array: &vortex_sequence::SequenceArray, idx: usize) -> vortex_array::array::ArrayRef +pub fn vortex_sequence::Sequence::child(_array: &vortex_array::vtable::typed::Array, idx: usize) -> vortex_array::array::ArrayRef -pub fn vortex_sequence::Sequence::child_name(_array: &vortex_sequence::SequenceArray, idx: usize) -> alloc::string::String +pub fn vortex_sequence::Sequence::child_name(_array: &vortex_array::vtable::typed::Array, idx: usize) -> alloc::string::String pub fn vortex_sequence::Sequence::deserialize(bytes: &[u8], dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_sequence::Sequence::dtype(array: &vortex_sequence::SequenceArray) -> &vortex_array::dtype::DType +pub fn vortex_sequence::Sequence::dtype(array: &vortex_sequence::SequenceData) -> &vortex_array::dtype::DType pub fn vortex_sequence::Sequence::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult @@ -72,19 +76,19 @@ pub fn vortex_sequence::Sequence::execute_parent(array: &vortex_array::vtable::t pub fn vortex_sequence::Sequence::id(&self) -> vortex_array::vtable::dyn_::ArrayId -pub fn vortex_sequence::Sequence::len(array: &vortex_sequence::SequenceArray) -> usize +pub fn vortex_sequence::Sequence::len(array: &vortex_sequence::SequenceData) -> usize -pub fn vortex_sequence::Sequence::metadata(array: &vortex_sequence::SequenceArray) -> vortex_error::VortexResult +pub fn vortex_sequence::Sequence::metadata(array: &vortex_array::vtable::typed::Array) -> vortex_error::VortexResult -pub fn vortex_sequence::Sequence::nbuffers(_array: &vortex_sequence::SequenceArray) -> usize +pub fn vortex_sequence::Sequence::nbuffers(_array: &vortex_array::vtable::typed::Array) -> usize -pub fn vortex_sequence::Sequence::nchildren(_array: &vortex_sequence::SequenceArray) -> usize +pub fn vortex_sequence::Sequence::nchildren(_array: &vortex_array::vtable::typed::Array) -> usize pub fn vortex_sequence::Sequence::reduce_parent(array: &vortex_array::vtable::typed::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize) -> vortex_error::VortexResult> pub fn vortex_sequence::Sequence::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_sequence::Sequence::stats(array: &vortex_sequence::SequenceArray) -> &vortex_array::stats::array::ArrayStats +pub fn vortex_sequence::Sequence::stats(array: &vortex_sequence::SequenceData) -> &vortex_array::stats::array::ArrayStats pub fn vortex_sequence::Sequence::vtable(_array: &Self::Array) -> &Self @@ -92,72 +96,66 @@ pub fn vortex_sequence::Sequence::with_children(_array: &mut Self::Array, childr impl vortex_array::vtable::operations::OperationsVTable for vortex_sequence::Sequence -pub fn vortex_sequence::Sequence::scalar_at(array: &vortex_sequence::SequenceArray, index: usize, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_sequence::Sequence::scalar_at(array: &vortex_array::vtable::typed::Array, index: usize, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::validity::ValidityVTable for vortex_sequence::Sequence -pub fn vortex_sequence::Sequence::validity(_array: &vortex_sequence::SequenceArray) -> vortex_error::VortexResult - -pub struct vortex_sequence::SequenceArray - -impl vortex_sequence::SequenceArray - -pub fn vortex_sequence::SequenceArray::base(&self) -> vortex_array::scalar::typed_view::primitive::pvalue::PValue +pub fn vortex_sequence::Sequence::validity(_array: &vortex_array::vtable::typed::Array) -> vortex_error::VortexResult -pub fn vortex_sequence::SequenceArray::into_parts(self) -> vortex_sequence::SequenceArrayParts - -pub fn vortex_sequence::SequenceArray::last(&self) -> vortex_array::scalar::typed_view::primitive::pvalue::PValue +pub struct vortex_sequence::SequenceArrayParts -pub fn vortex_sequence::SequenceArray::multiplier(&self) -> vortex_array::scalar::typed_view::primitive::pvalue::PValue +pub vortex_sequence::SequenceArrayParts::base: vortex_array::scalar::typed_view::primitive::pvalue::PValue -pub fn vortex_sequence::SequenceArray::ptype(&self) -> vortex_array::dtype::ptype::PType +pub vortex_sequence::SequenceArrayParts::len: usize -pub fn vortex_sequence::SequenceArray::try_new(base: vortex_array::scalar::typed_view::primitive::pvalue::PValue, multiplier: vortex_array::scalar::typed_view::primitive::pvalue::PValue, ptype: vortex_array::dtype::ptype::PType, nullability: vortex_array::dtype::nullability::Nullability, length: usize) -> vortex_error::VortexResult +pub vortex_sequence::SequenceArrayParts::multiplier: vortex_array::scalar::typed_view::primitive::pvalue::PValue -pub fn vortex_sequence::SequenceArray::try_new_typed>(base: T, multiplier: T, nullability: vortex_array::dtype::nullability::Nullability, length: usize) -> vortex_error::VortexResult +pub vortex_sequence::SequenceArrayParts::nullability: vortex_array::dtype::nullability::Nullability -impl vortex_sequence::SequenceArray +pub vortex_sequence::SequenceArrayParts::ptype: vortex_array::dtype::ptype::PType -pub fn vortex_sequence::SequenceArray::to_array(&self) -> vortex_array::array::ArrayRef +pub struct vortex_sequence::SequenceData -impl core::clone::Clone for vortex_sequence::SequenceArray +impl vortex_sequence::SequenceData -pub fn vortex_sequence::SequenceArray::clone(&self) -> vortex_sequence::SequenceArray +pub fn vortex_sequence::SequenceData::base(&self) -> vortex_array::scalar::typed_view::primitive::pvalue::PValue -impl core::convert::AsRef for vortex_sequence::SequenceArray +pub fn vortex_sequence::SequenceData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_sequence::SequenceArray::as_ref(&self) -> &dyn vortex_array::array::DynArray +pub fn vortex_sequence::SequenceData::into_parts(self) -> vortex_sequence::SequenceArrayParts -impl core::convert::From for vortex_array::array::ArrayRef +pub fn vortex_sequence::SequenceData::is_empty(&self) -> bool -pub fn vortex_array::array::ArrayRef::from(value: vortex_sequence::SequenceArray) -> vortex_array::array::ArrayRef +pub fn vortex_sequence::SequenceData::last(&self) -> vortex_array::scalar::typed_view::primitive::pvalue::PValue -impl core::fmt::Debug for vortex_sequence::SequenceArray +pub fn vortex_sequence::SequenceData::len(&self) -> usize -pub fn vortex_sequence::SequenceArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_sequence::SequenceData::multiplier(&self) -> vortex_array::scalar::typed_view::primitive::pvalue::PValue -impl core::ops::deref::Deref for vortex_sequence::SequenceArray +pub fn vortex_sequence::SequenceData::ptype(&self) -> vortex_array::dtype::ptype::PType -pub type vortex_sequence::SequenceArray::Target = dyn vortex_array::array::DynArray +pub fn vortex_sequence::SequenceData::try_new(base: vortex_array::scalar::typed_view::primitive::pvalue::PValue, multiplier: vortex_array::scalar::typed_view::primitive::pvalue::PValue, ptype: vortex_array::dtype::ptype::PType, nullability: vortex_array::dtype::nullability::Nullability, length: usize) -> vortex_error::VortexResult -pub fn vortex_sequence::SequenceArray::deref(&self) -> &Self::Target +pub fn vortex_sequence::SequenceData::try_new_typed>(base: T, multiplier: T, nullability: vortex_array::dtype::nullability::Nullability, length: usize) -> vortex_error::VortexResult -impl vortex_array::array::IntoArray for vortex_sequence::SequenceArray +impl core::clone::Clone for vortex_sequence::SequenceData -pub fn vortex_sequence::SequenceArray::into_array(self) -> vortex_array::array::ArrayRef +pub fn vortex_sequence::SequenceData::clone(&self) -> vortex_sequence::SequenceData -pub struct vortex_sequence::SequenceArrayParts +impl core::convert::From for vortex_array::array::ArrayRef -pub vortex_sequence::SequenceArrayParts::base: vortex_array::scalar::typed_view::primitive::pvalue::PValue +pub fn vortex_array::array::ArrayRef::from(value: vortex_sequence::SequenceData) -> vortex_array::array::ArrayRef -pub vortex_sequence::SequenceArrayParts::len: usize +impl core::fmt::Debug for vortex_sequence::SequenceData -pub vortex_sequence::SequenceArrayParts::multiplier: vortex_array::scalar::typed_view::primitive::pvalue::PValue +pub fn vortex_sequence::SequenceData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub vortex_sequence::SequenceArrayParts::nullability: vortex_array::dtype::nullability::Nullability +impl vortex_array::array::IntoArray for vortex_sequence::SequenceData -pub vortex_sequence::SequenceArrayParts::ptype: vortex_array::dtype::ptype::PType +pub fn vortex_sequence::SequenceData::into_array(self) -> vortex_array::array::ArrayRef pub fn vortex_sequence::initialize(session: &mut vortex_session::VortexSession) -pub fn vortex_sequence::sequence_encode(primitive_array: &vortex_array::arrays::primitive::array::PrimitiveArray) -> vortex_error::VortexResult> +pub fn vortex_sequence::sequence_encode(primitive_array: &vortex_array::arrays::primitive::vtable::PrimitiveArray) -> vortex_error::VortexResult> + +pub type vortex_sequence::SequenceArray = vortex_array::vtable::typed::Array diff --git a/encodings/sparse/public-api.lock b/encodings/sparse/public-api.lock index 71ef1f96104..057bc07197d 100644 --- a/encodings/sparse/public-api.lock +++ b/encodings/sparse/public-api.lock @@ -26,6 +26,10 @@ impl vortex_sparse::Sparse pub const vortex_sparse::Sparse::ID: vortex_array::vtable::dyn_::ArrayId +pub fn vortex_sparse::Sparse::encode(array: &vortex_array::array::ArrayRef, fill_value: core::option::Option) -> vortex_error::VortexResult + +pub fn vortex_sparse::Sparse::try_new(indices: vortex_array::array::ArrayRef, values: vortex_array::array::ArrayRef, len: usize, fill_value: vortex_array::scalar::Scalar) -> vortex_error::VortexResult + impl core::clone::Clone for vortex_sparse::Sparse pub fn vortex_sparse::Sparse::clone(&self) -> vortex_sparse::Sparse @@ -56,7 +60,7 @@ pub fn vortex_sparse::Sparse::invert(array: &vortex_sparse::SparseArray) -> vort impl vortex_array::vtable::VTable for vortex_sparse::Sparse -pub type vortex_sparse::Sparse::Array = vortex_sparse::SparseArray +pub type vortex_sparse::Sparse::Array = vortex_sparse::SparseData pub type vortex_sparse::Sparse::Metadata = vortex_sparse::SparseMetadata @@ -64,23 +68,23 @@ pub type vortex_sparse::Sparse::OperationsVTable = vortex_sparse::Sparse pub type vortex_sparse::Sparse::ValidityVTable = vortex_sparse::Sparse -pub fn vortex_sparse::Sparse::array_eq(array: &vortex_sparse::SparseArray, other: &vortex_sparse::SparseArray, precision: vortex_array::hash::Precision) -> bool +pub fn vortex_sparse::Sparse::array_eq(array: &vortex_array::vtable::typed::Array, other: &vortex_array::vtable::typed::Array, precision: vortex_array::hash::Precision) -> bool -pub fn vortex_sparse::Sparse::array_hash(array: &vortex_sparse::SparseArray, state: &mut H, precision: vortex_array::hash::Precision) +pub fn vortex_sparse::Sparse::array_hash(array: &vortex_array::vtable::typed::Array, state: &mut H, precision: vortex_array::hash::Precision) -pub fn vortex_sparse::Sparse::buffer(array: &vortex_sparse::SparseArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_sparse::Sparse::buffer(array: &vortex_array::vtable::typed::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_sparse::Sparse::buffer_name(_array: &vortex_sparse::SparseArray, idx: usize) -> core::option::Option +pub fn vortex_sparse::Sparse::buffer_name(_array: &vortex_array::vtable::typed::Array, idx: usize) -> core::option::Option -pub fn vortex_sparse::Sparse::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_sparse::Sparse::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_sparse::Sparse::child(array: &vortex_sparse::SparseArray, idx: usize) -> vortex_array::array::ArrayRef +pub fn vortex_sparse::Sparse::child(array: &vortex_array::vtable::typed::Array, idx: usize) -> vortex_array::array::ArrayRef -pub fn vortex_sparse::Sparse::child_name(_array: &vortex_sparse::SparseArray, idx: usize) -> alloc::string::String +pub fn vortex_sparse::Sparse::child_name(_array: &vortex_array::vtable::typed::Array, idx: usize) -> alloc::string::String pub fn vortex_sparse::Sparse::deserialize(bytes: &[u8], dtype: &vortex_array::dtype::DType, _len: usize, buffers: &[vortex_array::buffer::BufferHandle], session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_sparse::Sparse::dtype(array: &vortex_sparse::SparseArray) -> &vortex_array::dtype::DType +pub fn vortex_sparse::Sparse::dtype(array: &vortex_sparse::SparseData) -> &vortex_array::dtype::DType pub fn vortex_sparse::Sparse::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult @@ -88,19 +92,19 @@ pub fn vortex_sparse::Sparse::execute_parent(array: &vortex_array::vtable::typed pub fn vortex_sparse::Sparse::id(&self) -> vortex_array::vtable::dyn_::ArrayId -pub fn vortex_sparse::Sparse::len(array: &vortex_sparse::SparseArray) -> usize +pub fn vortex_sparse::Sparse::len(array: &vortex_sparse::SparseData) -> usize -pub fn vortex_sparse::Sparse::metadata(array: &vortex_sparse::SparseArray) -> vortex_error::VortexResult +pub fn vortex_sparse::Sparse::metadata(array: &vortex_array::vtable::typed::Array) -> vortex_error::VortexResult -pub fn vortex_sparse::Sparse::nbuffers(_array: &vortex_sparse::SparseArray) -> usize +pub fn vortex_sparse::Sparse::nbuffers(_array: &vortex_array::vtable::typed::Array) -> usize -pub fn vortex_sparse::Sparse::nchildren(array: &vortex_sparse::SparseArray) -> usize +pub fn vortex_sparse::Sparse::nchildren(array: &vortex_array::vtable::typed::Array) -> usize pub fn vortex_sparse::Sparse::reduce_parent(array: &vortex_array::vtable::typed::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize) -> vortex_error::VortexResult> pub fn vortex_sparse::Sparse::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_sparse::Sparse::stats(array: &vortex_sparse::SparseArray) -> &vortex_array::stats::array::ArrayStats +pub fn vortex_sparse::Sparse::stats(array: &vortex_sparse::SparseData) -> &vortex_array::stats::array::ArrayStats pub fn vortex_sparse::Sparse::vtable(_array: &Self::Array) -> &Self @@ -108,60 +112,54 @@ pub fn vortex_sparse::Sparse::with_children(array: &mut Self::Array, children: a impl vortex_array::vtable::operations::OperationsVTable for vortex_sparse::Sparse -pub fn vortex_sparse::Sparse::scalar_at(array: &vortex_sparse::SparseArray, index: usize, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_sparse::Sparse::scalar_at(array: &vortex_array::vtable::typed::Array, index: usize, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::validity::ValidityVTable for vortex_sparse::Sparse -pub fn vortex_sparse::Sparse::validity(array: &vortex_sparse::SparseArray) -> vortex_error::VortexResult - -pub struct vortex_sparse::SparseArray - -impl vortex_sparse::SparseArray +pub fn vortex_sparse::Sparse::validity(array: &vortex_array::vtable::typed::Array) -> vortex_error::VortexResult -pub fn vortex_sparse::SparseArray::encode(array: &vortex_array::array::ArrayRef, fill_value: core::option::Option) -> vortex_error::VortexResult +pub struct vortex_sparse::SparseData -pub fn vortex_sparse::SparseArray::fill_scalar(&self) -> &vortex_array::scalar::Scalar +impl vortex_sparse::SparseData -pub fn vortex_sparse::SparseArray::patches(&self) -> &vortex_array::patches::Patches +pub fn vortex_sparse::SparseData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_sparse::SparseArray::resolved_patches(&self) -> vortex_error::VortexResult +pub fn vortex_sparse::SparseData::encode(array: &vortex_array::array::ArrayRef, fill_value: core::option::Option) -> vortex_error::VortexResult -pub fn vortex_sparse::SparseArray::try_new(indices: vortex_array::array::ArrayRef, values: vortex_array::array::ArrayRef, len: usize, fill_value: vortex_array::scalar::Scalar) -> vortex_error::VortexResult +pub fn vortex_sparse::SparseData::fill_scalar(&self) -> &vortex_array::scalar::Scalar -pub fn vortex_sparse::SparseArray::try_new_from_patches(patches: vortex_array::patches::Patches, fill_value: vortex_array::scalar::Scalar) -> vortex_error::VortexResult +pub fn vortex_sparse::SparseData::is_empty(&self) -> bool -impl vortex_sparse::SparseArray +pub fn vortex_sparse::SparseData::len(&self) -> usize -pub fn vortex_sparse::SparseArray::to_array(&self) -> vortex_array::array::ArrayRef +pub fn vortex_sparse::SparseData::patches(&self) -> &vortex_array::patches::Patches -impl core::clone::Clone for vortex_sparse::SparseArray +pub fn vortex_sparse::SparseData::resolved_patches(&self) -> vortex_error::VortexResult -pub fn vortex_sparse::SparseArray::clone(&self) -> vortex_sparse::SparseArray +pub fn vortex_sparse::SparseData::try_new(indices: vortex_array::array::ArrayRef, values: vortex_array::array::ArrayRef, len: usize, fill_value: vortex_array::scalar::Scalar) -> vortex_error::VortexResult -impl core::convert::AsRef for vortex_sparse::SparseArray +pub fn vortex_sparse::SparseData::try_new_from_patches(patches: vortex_array::patches::Patches, fill_value: vortex_array::scalar::Scalar) -> vortex_error::VortexResult -pub fn vortex_sparse::SparseArray::as_ref(&self) -> &dyn vortex_array::array::DynArray +impl core::clone::Clone for vortex_sparse::SparseData -impl core::convert::From for vortex_array::array::ArrayRef +pub fn vortex_sparse::SparseData::clone(&self) -> vortex_sparse::SparseData -pub fn vortex_array::array::ArrayRef::from(value: vortex_sparse::SparseArray) -> vortex_array::array::ArrayRef +impl core::convert::From for vortex_array::array::ArrayRef -impl core::fmt::Debug for vortex_sparse::SparseArray +pub fn vortex_array::array::ArrayRef::from(value: vortex_sparse::SparseData) -> vortex_array::array::ArrayRef -pub fn vortex_sparse::SparseArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::fmt::Debug for vortex_sparse::SparseData -impl core::ops::deref::Deref for vortex_sparse::SparseArray +pub fn vortex_sparse::SparseData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub type vortex_sparse::SparseArray::Target = dyn vortex_array::array::DynArray +impl vortex_array::array::IntoArray for vortex_sparse::SparseData -pub fn vortex_sparse::SparseArray::deref(&self) -> &Self::Target - -impl vortex_array::array::IntoArray for vortex_sparse::SparseArray - -pub fn vortex_sparse::SparseArray::into_array(self) -> vortex_array::array::ArrayRef +pub fn vortex_sparse::SparseData::into_array(self) -> vortex_array::array::ArrayRef pub struct vortex_sparse::SparseMetadata impl core::fmt::Debug for vortex_sparse::SparseMetadata pub fn vortex_sparse::SparseMetadata::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result + +pub type vortex_sparse::SparseArray = vortex_array::vtable::typed::Array diff --git a/encodings/zigzag/public-api.lock b/encodings/zigzag/public-api.lock index fc75ad9a3f0..b0e432975bf 100644 --- a/encodings/zigzag/public-api.lock +++ b/encodings/zigzag/public-api.lock @@ -6,6 +6,8 @@ impl vortex_zigzag::ZigZag pub const vortex_zigzag::ZigZag::ID: vortex_array::vtable::dyn_::ArrayId +pub fn vortex_zigzag::ZigZag::try_new(encoded: vortex_array::array::ArrayRef) -> vortex_error::VortexResult + impl core::clone::Clone for vortex_zigzag::ZigZag pub fn vortex_zigzag::ZigZag::clone(&self) -> vortex_zigzag::ZigZag @@ -24,7 +26,7 @@ pub fn vortex_zigzag::ZigZag::filter(array: &vortex_zigzag::ZigZagArray, mask: & impl vortex_array::arrays::slice::SliceReduce for vortex_zigzag::ZigZag -pub fn vortex_zigzag::ZigZag::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_zigzag::ZigZag::slice(array: &vortex_array::vtable::typed::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::kernel::CastReduce for vortex_zigzag::ZigZag @@ -36,7 +38,7 @@ pub fn vortex_zigzag::ZigZag::mask(array: &vortex_zigzag::ZigZagArray, mask: &vo impl vortex_array::vtable::VTable for vortex_zigzag::ZigZag -pub type vortex_zigzag::ZigZag::Array = vortex_zigzag::ZigZagArray +pub type vortex_zigzag::ZigZag::Array = vortex_zigzag::ZigZagData pub type vortex_zigzag::ZigZag::Metadata = vortex_array::metadata::EmptyMetadata @@ -44,23 +46,23 @@ pub type vortex_zigzag::ZigZag::OperationsVTable = vortex_zigzag::ZigZag pub type vortex_zigzag::ZigZag::ValidityVTable = vortex_array::vtable::validity::ValidityVTableFromChild -pub fn vortex_zigzag::ZigZag::array_eq(array: &vortex_zigzag::ZigZagArray, other: &vortex_zigzag::ZigZagArray, precision: vortex_array::hash::Precision) -> bool +pub fn vortex_zigzag::ZigZag::array_eq(array: &vortex_array::vtable::typed::Array, other: &vortex_array::vtable::typed::Array, precision: vortex_array::hash::Precision) -> bool -pub fn vortex_zigzag::ZigZag::array_hash(array: &vortex_zigzag::ZigZagArray, state: &mut H, precision: vortex_array::hash::Precision) +pub fn vortex_zigzag::ZigZag::array_hash(array: &vortex_array::vtable::typed::Array, state: &mut H, precision: vortex_array::hash::Precision) -pub fn vortex_zigzag::ZigZag::buffer(_array: &vortex_zigzag::ZigZagArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_zigzag::ZigZag::buffer(_array: &vortex_array::vtable::typed::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_zigzag::ZigZag::buffer_name(_array: &vortex_zigzag::ZigZagArray, idx: usize) -> core::option::Option +pub fn vortex_zigzag::ZigZag::buffer_name(_array: &vortex_array::vtable::typed::Array, idx: usize) -> core::option::Option -pub fn vortex_zigzag::ZigZag::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_zigzag::ZigZag::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_zigzag::ZigZag::child(array: &vortex_zigzag::ZigZagArray, idx: usize) -> vortex_array::array::ArrayRef +pub fn vortex_zigzag::ZigZag::child(array: &vortex_array::vtable::typed::Array, idx: usize) -> vortex_array::array::ArrayRef -pub fn vortex_zigzag::ZigZag::child_name(_array: &vortex_zigzag::ZigZagArray, idx: usize) -> alloc::string::String +pub fn vortex_zigzag::ZigZag::child_name(_array: &vortex_array::vtable::typed::Array, idx: usize) -> alloc::string::String pub fn vortex_zigzag::ZigZag::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_zigzag::ZigZag::dtype(array: &vortex_zigzag::ZigZagArray) -> &vortex_array::dtype::DType +pub fn vortex_zigzag::ZigZag::dtype(array: &vortex_zigzag::ZigZagData) -> &vortex_array::dtype::DType pub fn vortex_zigzag::ZigZag::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult @@ -68,19 +70,19 @@ pub fn vortex_zigzag::ZigZag::execute_parent(array: &vortex_array::vtable::typed pub fn vortex_zigzag::ZigZag::id(&self) -> vortex_array::vtable::dyn_::ArrayId -pub fn vortex_zigzag::ZigZag::len(array: &vortex_zigzag::ZigZagArray) -> usize +pub fn vortex_zigzag::ZigZag::len(array: &vortex_zigzag::ZigZagData) -> usize -pub fn vortex_zigzag::ZigZag::metadata(_array: &vortex_zigzag::ZigZagArray) -> vortex_error::VortexResult +pub fn vortex_zigzag::ZigZag::metadata(_array: &vortex_array::vtable::typed::Array) -> vortex_error::VortexResult -pub fn vortex_zigzag::ZigZag::nbuffers(_array: &vortex_zigzag::ZigZagArray) -> usize +pub fn vortex_zigzag::ZigZag::nbuffers(_array: &vortex_array::vtable::typed::Array) -> usize -pub fn vortex_zigzag::ZigZag::nchildren(_array: &vortex_zigzag::ZigZagArray) -> usize +pub fn vortex_zigzag::ZigZag::nchildren(_array: &vortex_array::vtable::typed::Array) -> usize pub fn vortex_zigzag::ZigZag::reduce_parent(array: &vortex_array::vtable::typed::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize) -> vortex_error::VortexResult> pub fn vortex_zigzag::ZigZag::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_zigzag::ZigZag::stats(array: &vortex_zigzag::ZigZagArray) -> &vortex_array::stats::array::ArrayStats +pub fn vortex_zigzag::ZigZag::stats(array: &vortex_zigzag::ZigZagData) -> &vortex_array::stats::array::ArrayStats pub fn vortex_zigzag::ZigZag::vtable(_array: &Self::Array) -> &Self @@ -88,54 +90,48 @@ pub fn vortex_zigzag::ZigZag::with_children(array: &mut Self::Array, children: a impl vortex_array::vtable::operations::OperationsVTable for vortex_zigzag::ZigZag -pub fn vortex_zigzag::ZigZag::scalar_at(array: &vortex_zigzag::ZigZagArray, index: usize, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_zigzag::ZigZag::scalar_at(array: &vortex_array::vtable::typed::Array, index: usize, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::validity::ValidityChild for vortex_zigzag::ZigZag -pub fn vortex_zigzag::ZigZag::validity_child(array: &vortex_zigzag::ZigZagArray) -> &vortex_array::array::ArrayRef - -pub struct vortex_zigzag::ZigZagArray - -impl vortex_zigzag::ZigZagArray - -pub fn vortex_zigzag::ZigZagArray::encoded(&self) -> &vortex_array::array::ArrayRef +pub fn vortex_zigzag::ZigZag::validity_child(array: &vortex_zigzag::ZigZagData) -> &vortex_array::array::ArrayRef -pub fn vortex_zigzag::ZigZagArray::new(encoded: vortex_array::array::ArrayRef) -> Self +pub struct vortex_zigzag::ZigZagData -pub fn vortex_zigzag::ZigZagArray::ptype(&self) -> vortex_array::dtype::ptype::PType +impl vortex_zigzag::ZigZagData -pub fn vortex_zigzag::ZigZagArray::try_new(encoded: vortex_array::array::ArrayRef) -> vortex_error::VortexResult +pub fn vortex_zigzag::ZigZagData::dtype(&self) -> &vortex_array::dtype::DType -impl vortex_zigzag::ZigZagArray +pub fn vortex_zigzag::ZigZagData::encoded(&self) -> &vortex_array::array::ArrayRef -pub fn vortex_zigzag::ZigZagArray::to_array(&self) -> vortex_array::array::ArrayRef +pub fn vortex_zigzag::ZigZagData::is_empty(&self) -> bool -impl core::clone::Clone for vortex_zigzag::ZigZagArray +pub fn vortex_zigzag::ZigZagData::len(&self) -> usize -pub fn vortex_zigzag::ZigZagArray::clone(&self) -> vortex_zigzag::ZigZagArray +pub fn vortex_zigzag::ZigZagData::new(encoded: vortex_array::array::ArrayRef) -> Self -impl core::convert::AsRef for vortex_zigzag::ZigZagArray +pub fn vortex_zigzag::ZigZagData::ptype(&self) -> vortex_array::dtype::ptype::PType -pub fn vortex_zigzag::ZigZagArray::as_ref(&self) -> &dyn vortex_array::array::DynArray +pub fn vortex_zigzag::ZigZagData::try_new(encoded: vortex_array::array::ArrayRef) -> vortex_error::VortexResult -impl core::convert::From for vortex_array::array::ArrayRef +impl core::clone::Clone for vortex_zigzag::ZigZagData -pub fn vortex_array::array::ArrayRef::from(value: vortex_zigzag::ZigZagArray) -> vortex_array::array::ArrayRef +pub fn vortex_zigzag::ZigZagData::clone(&self) -> vortex_zigzag::ZigZagData -impl core::fmt::Debug for vortex_zigzag::ZigZagArray +impl core::convert::From for vortex_array::array::ArrayRef -pub fn vortex_zigzag::ZigZagArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_array::array::ArrayRef::from(value: vortex_zigzag::ZigZagData) -> vortex_array::array::ArrayRef -impl core::ops::deref::Deref for vortex_zigzag::ZigZagArray +impl core::fmt::Debug for vortex_zigzag::ZigZagData -pub type vortex_zigzag::ZigZagArray::Target = dyn vortex_array::array::DynArray +pub fn vortex_zigzag::ZigZagData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub fn vortex_zigzag::ZigZagArray::deref(&self) -> &Self::Target +impl vortex_array::array::IntoArray for vortex_zigzag::ZigZagData -impl vortex_array::array::IntoArray for vortex_zigzag::ZigZagArray +pub fn vortex_zigzag::ZigZagData::into_array(self) -> vortex_array::array::ArrayRef -pub fn vortex_zigzag::ZigZagArray::into_array(self) -> vortex_array::array::ArrayRef +pub fn vortex_zigzag::zigzag_decode(parray: vortex_array::arrays::primitive::vtable::PrimitiveArray) -> vortex_array::arrays::primitive::vtable::PrimitiveArray -pub fn vortex_zigzag::zigzag_decode(parray: vortex_array::arrays::primitive::array::PrimitiveArray) -> vortex_array::arrays::primitive::array::PrimitiveArray +pub fn vortex_zigzag::zigzag_encode(parray: vortex_array::arrays::primitive::vtable::PrimitiveArray) -> vortex_error::VortexResult -pub fn vortex_zigzag::zigzag_encode(parray: vortex_array::arrays::primitive::array::PrimitiveArray) -> vortex_error::VortexResult +pub type vortex_zigzag::ZigZagArray = vortex_array::vtable::typed::Array diff --git a/encodings/zstd/public-api.lock b/encodings/zstd/public-api.lock index eea087896a3..7beedcd9ac6 100644 --- a/encodings/zstd/public-api.lock +++ b/encodings/zstd/public-api.lock @@ -6,6 +6,12 @@ impl vortex_zstd::Zstd pub const vortex_zstd::Zstd::ID: vortex_array::vtable::dyn_::ArrayId +pub fn vortex_zstd::Zstd::from_primitive(parray: &vortex_array::arrays::primitive::vtable::PrimitiveArray, level: i32, values_per_frame: usize) -> vortex_error::VortexResult + +pub fn vortex_zstd::Zstd::from_var_bin_view(vbv: &vortex_array::arrays::varbinview::vtable::VarBinViewArray, level: i32, values_per_frame: usize) -> vortex_error::VortexResult + +pub fn vortex_zstd::Zstd::from_var_bin_view_without_dict(vbv: &vortex_array::arrays::varbinview::vtable::VarBinViewArray, level: i32, values_per_frame: usize) -> vortex_error::VortexResult + impl core::clone::Clone for vortex_zstd::Zstd pub fn vortex_zstd::Zstd::clone(&self) -> vortex_zstd::Zstd @@ -16,7 +22,7 @@ pub fn vortex_zstd::Zstd::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core:: impl vortex_array::arrays::slice::SliceReduce for vortex_zstd::Zstd -pub fn vortex_zstd::Zstd::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_zstd::Zstd::slice(array: &vortex_array::vtable::typed::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::kernel::CastReduce for vortex_zstd::Zstd @@ -24,7 +30,7 @@ pub fn vortex_zstd::Zstd::cast(array: &vortex_zstd::ZstdArray, dtype: &vortex_ar impl vortex_array::vtable::VTable for vortex_zstd::Zstd -pub type vortex_zstd::Zstd::Array = vortex_zstd::ZstdArray +pub type vortex_zstd::Zstd::Array = vortex_zstd::ZstdData pub type vortex_zstd::Zstd::Metadata = vortex_array::metadata::ProstMetadata @@ -32,41 +38,41 @@ pub type vortex_zstd::Zstd::OperationsVTable = vortex_zstd::Zstd pub type vortex_zstd::Zstd::ValidityVTable = vortex_array::vtable::validity::ValidityVTableFromValiditySliceHelper -pub fn vortex_zstd::Zstd::array_eq(array: &vortex_zstd::ZstdArray, other: &vortex_zstd::ZstdArray, precision: vortex_array::hash::Precision) -> bool +pub fn vortex_zstd::Zstd::array_eq(array: &vortex_array::vtable::typed::Array, other: &vortex_array::vtable::typed::Array, precision: vortex_array::hash::Precision) -> bool -pub fn vortex_zstd::Zstd::array_hash(array: &vortex_zstd::ZstdArray, state: &mut H, precision: vortex_array::hash::Precision) +pub fn vortex_zstd::Zstd::array_hash(array: &vortex_array::vtable::typed::Array, state: &mut H, precision: vortex_array::hash::Precision) -pub fn vortex_zstd::Zstd::buffer(array: &vortex_zstd::ZstdArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_zstd::Zstd::buffer(array: &vortex_array::vtable::typed::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_zstd::Zstd::buffer_name(array: &vortex_zstd::ZstdArray, idx: usize) -> core::option::Option +pub fn vortex_zstd::Zstd::buffer_name(array: &vortex_array::vtable::typed::Array, idx: usize) -> core::option::Option -pub fn vortex_zstd::Zstd::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_zstd::Zstd::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_zstd::Zstd::child(array: &vortex_zstd::ZstdArray, idx: usize) -> vortex_array::array::ArrayRef +pub fn vortex_zstd::Zstd::child(array: &vortex_array::vtable::typed::Array, idx: usize) -> vortex_array::array::ArrayRef -pub fn vortex_zstd::Zstd::child_name(_array: &vortex_zstd::ZstdArray, idx: usize) -> alloc::string::String +pub fn vortex_zstd::Zstd::child_name(_array: &vortex_array::vtable::typed::Array, idx: usize) -> alloc::string::String pub fn vortex_zstd::Zstd::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_zstd::Zstd::dtype(array: &vortex_zstd::ZstdArray) -> &vortex_array::dtype::DType +pub fn vortex_zstd::Zstd::dtype(array: &vortex_zstd::ZstdData) -> &vortex_array::dtype::DType pub fn vortex_zstd::Zstd::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult pub fn vortex_zstd::Zstd::id(&self) -> vortex_array::vtable::dyn_::ArrayId -pub fn vortex_zstd::Zstd::len(array: &vortex_zstd::ZstdArray) -> usize +pub fn vortex_zstd::Zstd::len(array: &vortex_zstd::ZstdData) -> usize -pub fn vortex_zstd::Zstd::metadata(array: &vortex_zstd::ZstdArray) -> vortex_error::VortexResult +pub fn vortex_zstd::Zstd::metadata(array: &vortex_array::vtable::typed::Array) -> vortex_error::VortexResult -pub fn vortex_zstd::Zstd::nbuffers(array: &vortex_zstd::ZstdArray) -> usize +pub fn vortex_zstd::Zstd::nbuffers(array: &vortex_array::vtable::typed::Array) -> usize -pub fn vortex_zstd::Zstd::nchildren(array: &vortex_zstd::ZstdArray) -> usize +pub fn vortex_zstd::Zstd::nchildren(array: &vortex_array::vtable::typed::Array) -> usize pub fn vortex_zstd::Zstd::reduce_parent(array: &vortex_array::vtable::typed::Array, parent: &vortex_array::array::ArrayRef, child_idx: usize) -> vortex_error::VortexResult> pub fn vortex_zstd::Zstd::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_zstd::Zstd::stats(array: &vortex_zstd::ZstdArray) -> &vortex_array::stats::array::ArrayStats +pub fn vortex_zstd::Zstd::stats(array: &vortex_zstd::ZstdData) -> &vortex_array::stats::array::ArrayStats pub fn vortex_zstd::Zstd::vtable(_array: &Self::Array) -> &Self @@ -74,63 +80,7 @@ pub fn vortex_zstd::Zstd::with_children(array: &mut Self::Array, children: alloc impl vortex_array::vtable::operations::OperationsVTable for vortex_zstd::Zstd -pub fn vortex_zstd::Zstd::scalar_at(array: &vortex_zstd::ZstdArray, index: usize, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult - -pub struct vortex_zstd::ZstdArray - -impl vortex_zstd::ZstdArray - -pub fn vortex_zstd::ZstdArray::decompress(&self, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult - -pub fn vortex_zstd::ZstdArray::from_array(array: vortex_array::array::ArrayRef, level: i32, values_per_frame: usize) -> vortex_error::VortexResult - -pub fn vortex_zstd::ZstdArray::from_canonical(canonical: &vortex_array::canonical::Canonical, level: i32, values_per_frame: usize) -> vortex_error::VortexResult> - -pub fn vortex_zstd::ZstdArray::from_primitive(parray: &vortex_array::arrays::primitive::array::PrimitiveArray, level: i32, values_per_frame: usize) -> vortex_error::VortexResult - -pub fn vortex_zstd::ZstdArray::from_primitive_without_dict(parray: &vortex_array::arrays::primitive::array::PrimitiveArray, level: i32, values_per_frame: usize) -> vortex_error::VortexResult - -pub fn vortex_zstd::ZstdArray::from_var_bin_view(vbv: &vortex_array::arrays::varbinview::array::VarBinViewArray, level: i32, values_per_frame: usize) -> vortex_error::VortexResult - -pub fn vortex_zstd::ZstdArray::from_var_bin_view_without_dict(vbv: &vortex_array::arrays::varbinview::array::VarBinViewArray, level: i32, values_per_frame: usize) -> vortex_error::VortexResult - -pub fn vortex_zstd::ZstdArray::into_parts(self) -> vortex_zstd::ZstdArrayParts - -pub fn vortex_zstd::ZstdArray::new(dictionary: core::option::Option, frames: alloc::vec::Vec, dtype: vortex_array::dtype::DType, metadata: vortex_zstd::ZstdMetadata, n_rows: usize, validity: vortex_array::validity::Validity) -> Self - -impl vortex_zstd::ZstdArray - -pub fn vortex_zstd::ZstdArray::to_array(&self) -> vortex_array::array::ArrayRef - -impl core::clone::Clone for vortex_zstd::ZstdArray - -pub fn vortex_zstd::ZstdArray::clone(&self) -> vortex_zstd::ZstdArray - -impl core::convert::AsRef for vortex_zstd::ZstdArray - -pub fn vortex_zstd::ZstdArray::as_ref(&self) -> &dyn vortex_array::array::DynArray - -impl core::convert::From for vortex_array::array::ArrayRef - -pub fn vortex_array::array::ArrayRef::from(value: vortex_zstd::ZstdArray) -> vortex_array::array::ArrayRef - -impl core::fmt::Debug for vortex_zstd::ZstdArray - -pub fn vortex_zstd::ZstdArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result - -impl core::ops::deref::Deref for vortex_zstd::ZstdArray - -pub type vortex_zstd::ZstdArray::Target = dyn vortex_array::array::DynArray - -pub fn vortex_zstd::ZstdArray::deref(&self) -> &Self::Target - -impl vortex_array::array::IntoArray for vortex_zstd::ZstdArray - -pub fn vortex_zstd::ZstdArray::into_array(self) -> vortex_array::array::ArrayRef - -impl vortex_array::vtable::validity::ValiditySliceHelper for vortex_zstd::ZstdArray - -pub fn vortex_zstd::ZstdArray::unsliced_validity_and_slice(&self) -> (&vortex_array::validity::Validity, usize, usize) +pub fn vortex_zstd::Zstd::scalar_at(array: &vortex_array::vtable::typed::Array, index: usize, _ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult pub struct vortex_zstd::ZstdArrayParts @@ -182,6 +132,54 @@ pub fn vortex_zstd::ZstdBuffersMetadata::clear(&mut self) pub fn vortex_zstd::ZstdBuffersMetadata::encoded_len(&self) -> usize +pub struct vortex_zstd::ZstdData + +impl vortex_zstd::ZstdData + +pub fn vortex_zstd::ZstdData::decompress(&self, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult + +pub fn vortex_zstd::ZstdData::dtype(&self) -> &vortex_array::dtype::DType + +pub fn vortex_zstd::ZstdData::from_array(array: vortex_array::array::ArrayRef, level: i32, values_per_frame: usize) -> vortex_error::VortexResult + +pub fn vortex_zstd::ZstdData::from_canonical(canonical: &vortex_array::canonical::Canonical, level: i32, values_per_frame: usize) -> vortex_error::VortexResult> + +pub fn vortex_zstd::ZstdData::from_primitive(parray: &vortex_array::arrays::primitive::vtable::PrimitiveArray, level: i32, values_per_frame: usize) -> vortex_error::VortexResult + +pub fn vortex_zstd::ZstdData::from_primitive_without_dict(parray: &vortex_array::arrays::primitive::vtable::PrimitiveArray, level: i32, values_per_frame: usize) -> vortex_error::VortexResult + +pub fn vortex_zstd::ZstdData::from_var_bin_view(vbv: &vortex_array::arrays::varbinview::vtable::VarBinViewArray, level: i32, values_per_frame: usize) -> vortex_error::VortexResult + +pub fn vortex_zstd::ZstdData::from_var_bin_view_without_dict(vbv: &vortex_array::arrays::varbinview::vtable::VarBinViewArray, level: i32, values_per_frame: usize) -> vortex_error::VortexResult + +pub fn vortex_zstd::ZstdData::into_parts(self) -> vortex_zstd::ZstdArrayParts + +pub fn vortex_zstd::ZstdData::is_empty(&self) -> bool + +pub fn vortex_zstd::ZstdData::len(&self) -> usize + +pub fn vortex_zstd::ZstdData::new(dictionary: core::option::Option, frames: alloc::vec::Vec, dtype: vortex_array::dtype::DType, metadata: vortex_zstd::ZstdMetadata, n_rows: usize, validity: vortex_array::validity::Validity) -> Self + +impl core::clone::Clone for vortex_zstd::ZstdData + +pub fn vortex_zstd::ZstdData::clone(&self) -> vortex_zstd::ZstdData + +impl core::convert::From for vortex_array::array::ArrayRef + +pub fn vortex_array::array::ArrayRef::from(value: vortex_zstd::ZstdData) -> vortex_array::array::ArrayRef + +impl core::fmt::Debug for vortex_zstd::ZstdData + +pub fn vortex_zstd::ZstdData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result + +impl vortex_array::array::IntoArray for vortex_zstd::ZstdData + +pub fn vortex_zstd::ZstdData::into_array(self) -> vortex_array::array::ArrayRef + +impl vortex_array::vtable::validity::ValiditySliceHelper for vortex_zstd::ZstdData + +pub fn vortex_zstd::ZstdData::unsliced_validity_and_slice(&self) -> (&vortex_array::validity::Validity, usize, usize) + pub struct vortex_zstd::ZstdFrameMetadata pub vortex_zstd::ZstdFrameMetadata::n_values: u64 @@ -231,3 +229,5 @@ pub fn vortex_zstd::ZstdMetadata::clear(&mut self) pub fn vortex_zstd::ZstdMetadata::encoded_len(&self) -> usize pub fn vortex_zstd::reconstruct_views(buffer: &vortex_buffer::ByteBuffer, max_buffer_len: usize) -> (alloc::vec::Vec, vortex_buffer::buffer::Buffer) + +pub type vortex_zstd::ZstdArray = vortex_array::vtable::typed::Array diff --git a/vortex-array/public-api.lock b/vortex-array/public-api.lock index 0d1d9deb357..4c89999a99b 100644 --- a/vortex-array/public-api.lock +++ b/vortex-array/public-api.lock @@ -866,7 +866,7 @@ pub fn vortex_array::arrays::Bool::filter(array: &vortex_array::arrays::BoolArra impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::Bool -pub fn vortex_array::arrays::Bool::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Bool::slice(array: &vortex_array::arrays::BoolArray, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_array::arrays::bool::BoolMaskedValidityRule @@ -888,11 +888,11 @@ pub fn vortex_array::arrays::Bool::mask(array: &vortex_array::arrays::BoolArray, impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::Bool -pub fn vortex_array::arrays::Bool::scalar_at(array: &vortex_array::arrays::BoolArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Bool::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::Bool -pub type vortex_array::arrays::Bool::Array = vortex_array::arrays::BoolArray +pub type vortex_array::arrays::Bool::Array = vortex_array::arrays::BoolData pub type vortex_array::arrays::Bool::Metadata = vortex_array::ProstMetadata @@ -900,25 +900,25 @@ pub type vortex_array::arrays::Bool::OperationsVTable = vortex_array::arrays::Bo pub type vortex_array::arrays::Bool::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::Bool::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Bool::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Bool::array_eq(array: &vortex_array::arrays::BoolArray, other: &vortex_array::arrays::BoolArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Bool::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Bool::array_hash(array: &vortex_array::arrays::BoolArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Bool::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Bool::buffer(array: &vortex_array::arrays::BoolArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Bool::buffer(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Bool::buffer_name(_array: &vortex_array::arrays::BoolArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Bool::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Bool::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Bool::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Bool::child(array: &vortex_array::arrays::BoolArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Bool::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Bool::child_name(_array: &vortex_array::arrays::BoolArray, _idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Bool::child_name(_array: &vortex_array::vtable::Array, _idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Bool::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Bool::dtype(array: &vortex_array::arrays::BoolArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Bool::dtype(array: &vortex_array::arrays::BoolData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Bool::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -926,13 +926,13 @@ pub fn vortex_array::arrays::Bool::execute_parent(array: &vortex_array::vtable:: pub fn vortex_array::arrays::Bool::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Bool::len(array: &vortex_array::arrays::BoolArray) -> usize +pub fn vortex_array::arrays::Bool::len(array: &vortex_array::arrays::BoolData) -> usize -pub fn vortex_array::arrays::Bool::metadata(array: &vortex_array::arrays::BoolArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Bool::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Bool::nbuffers(_array: &vortex_array::arrays::BoolArray) -> usize +pub fn vortex_array::arrays::Bool::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Bool::nchildren(array: &vortex_array::arrays::BoolArray) -> usize +pub fn vortex_array::arrays::Bool::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Bool::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -940,105 +940,67 @@ pub fn vortex_array::arrays::Bool::reduce_parent(array: &vortex_array::vtable::A pub fn vortex_array::arrays::Bool::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Bool::stats(array: &vortex_array::arrays::BoolArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Bool::stats(array: &vortex_array::arrays::BoolData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Bool::vtable(_array: &Self::Array) -> &Self pub fn vortex_array::arrays::Bool::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> -pub struct vortex_array::arrays::bool::BoolArray - -impl vortex_array::arrays::BoolArray - -pub fn vortex_array::arrays::BoolArray::from_indices>(length: usize, indices: I, validity: vortex_array::validity::Validity) -> Self - -pub fn vortex_array::arrays::BoolArray::into_bit_buffer(self) -> vortex_buffer::bit::buf::BitBuffer - -pub fn vortex_array::arrays::BoolArray::into_parts(self) -> vortex_array::arrays::bool::BoolArrayParts - -pub fn vortex_array::arrays::BoolArray::maybe_to_mask(&self) -> vortex_error::VortexResult> - -pub fn vortex_array::arrays::BoolArray::new(bits: vortex_buffer::bit::buf::BitBuffer, validity: vortex_array::validity::Validity) -> Self - -pub fn vortex_array::arrays::BoolArray::new_handle(handle: vortex_array::buffer::BufferHandle, offset: usize, len: usize, validity: vortex_array::validity::Validity) -> Self - -pub unsafe fn vortex_array::arrays::BoolArray::new_unchecked(bits: vortex_buffer::bit::buf::BitBuffer, validity: vortex_array::validity::Validity) -> Self - -pub fn vortex_array::arrays::BoolArray::to_bit_buffer(&self) -> vortex_buffer::bit::buf::BitBuffer - -pub fn vortex_array::arrays::BoolArray::to_mask(&self) -> vortex_mask::Mask - -pub fn vortex_array::arrays::BoolArray::to_mask_fill_null_false(&self) -> vortex_mask::Mask - -pub fn vortex_array::arrays::BoolArray::try_new(bits: vortex_buffer::bit::buf::BitBuffer, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult - -pub fn vortex_array::arrays::BoolArray::try_new_from_handle(bits: vortex_array::buffer::BufferHandle, offset: usize, len: usize, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult - -pub fn vortex_array::arrays::BoolArray::validate(bits: &vortex_buffer::bit::buf::BitBuffer, validity: &vortex_array::validity::Validity) -> vortex_error::VortexResult<()> - -impl vortex_array::arrays::BoolArray - -pub fn vortex_array::arrays::BoolArray::patch(self, patches: &vortex_array::patches::Patches, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult - -impl vortex_array::arrays::BoolArray - -pub fn vortex_array::arrays::BoolArray::to_array(&self) -> vortex_array::ArrayRef - -impl core::clone::Clone for vortex_array::arrays::BoolArray +pub struct vortex_array::arrays::bool::BoolArrayParts -pub fn vortex_array::arrays::BoolArray::clone(&self) -> vortex_array::arrays::BoolArray +pub vortex_array::arrays::bool::BoolArrayParts::bits: vortex_array::buffer::BufferHandle -impl core::convert::AsRef for vortex_array::arrays::BoolArray +pub vortex_array::arrays::bool::BoolArrayParts::len: usize -pub fn vortex_array::arrays::BoolArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub vortex_array::arrays::bool::BoolArrayParts::offset: usize -impl core::convert::From for vortex_array::ArrayRef +pub vortex_array::arrays::bool::BoolArrayParts::validity: vortex_array::validity::Validity -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::BoolArray) -> vortex_array::ArrayRef +pub struct vortex_array::arrays::bool::BoolData -impl core::convert::From for vortex_array::arrays::BoolArray +impl vortex_array::arrays::BoolData -pub fn vortex_array::arrays::BoolArray::from(value: vortex_buffer::bit::buf::BitBuffer) -> Self +pub fn vortex_array::arrays::BoolData::dtype(&self) -> &vortex_array::dtype::DType -impl core::fmt::Debug for vortex_array::arrays::BoolArray +pub fn vortex_array::arrays::BoolData::into_bit_buffer(self) -> vortex_buffer::bit::buf::BitBuffer -pub fn vortex_array::arrays::BoolArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_array::arrays::BoolData::into_parts(self) -> vortex_array::arrays::bool::BoolArrayParts -impl core::iter::traits::collect::FromIterator for vortex_array::arrays::BoolArray +pub fn vortex_array::arrays::BoolData::is_empty(&self) -> bool -pub fn vortex_array::arrays::BoolArray::from_iter>(iter: T) -> Self +pub fn vortex_array::arrays::BoolData::len(&self) -> usize -impl core::iter::traits::collect::FromIterator> for vortex_array::arrays::BoolArray +pub fn vortex_array::arrays::BoolData::maybe_to_mask(&self) -> vortex_error::VortexResult> -pub fn vortex_array::arrays::BoolArray::from_iter>>(iter: I) -> Self +pub fn vortex_array::arrays::BoolData::to_bit_buffer(&self) -> vortex_buffer::bit::buf::BitBuffer -impl core::ops::deref::Deref for vortex_array::arrays::BoolArray +pub fn vortex_array::arrays::BoolData::to_mask(&self) -> vortex_mask::Mask -pub type vortex_array::arrays::BoolArray::Target = dyn vortex_array::DynArray +pub fn vortex_array::arrays::BoolData::to_mask_fill_null_false(&self) -> vortex_mask::Mask -pub fn vortex_array::arrays::BoolArray::deref(&self) -> &Self::Target +pub fn vortex_array::arrays::BoolData::validity(&self) -> &vortex_array::validity::Validity -impl vortex_array::Executable for vortex_array::arrays::BoolArray +pub fn vortex_array::arrays::BoolData::validity_mask(&self) -> vortex_mask::Mask -pub fn vortex_array::arrays::BoolArray::execute(array: vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +impl core::clone::Clone for vortex_array::arrays::BoolData -impl vortex_array::IntoArray for vortex_array::arrays::BoolArray +pub fn vortex_array::arrays::BoolData::clone(&self) -> vortex_array::arrays::BoolData -pub fn vortex_array::arrays::BoolArray::into_array(self) -> vortex_array::ArrayRef +impl core::convert::From for vortex_array::ArrayRef -impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::BoolArray +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::BoolData) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::BoolArray::validity(&self) -> &vortex_array::validity::Validity +impl core::fmt::Debug for vortex_array::arrays::BoolData -pub struct vortex_array::arrays::bool::BoolArrayParts +pub fn vortex_array::arrays::BoolData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub vortex_array::arrays::bool::BoolArrayParts::bits: vortex_array::buffer::BufferHandle +impl vortex_array::IntoArray for vortex_array::arrays::BoolData -pub vortex_array::arrays::bool::BoolArrayParts::len: usize +pub fn vortex_array::arrays::BoolData::into_array(self) -> vortex_array::ArrayRef -pub vortex_array::arrays::bool::BoolArrayParts::offset: usize +impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::BoolData -pub vortex_array::arrays::bool::BoolArrayParts::validity: vortex_array::validity::Validity +pub fn vortex_array::arrays::BoolData::validity(&self) -> &vortex_array::validity::Validity pub struct vortex_array::arrays::bool::BoolMaskedValidityRule @@ -1056,6 +1018,8 @@ pub type vortex_array::arrays::bool::BoolMaskedValidityRule::Parent = vortex_arr pub fn vortex_array::arrays::bool::BoolMaskedValidityRule::reduce_parent(&self, array: &vortex_array::arrays::BoolArray, parent: &vortex_array::arrays::MaskedArray, child_idx: usize) -> vortex_error::VortexResult> +pub type vortex_array::arrays::bool::BoolArray = vortex_array::vtable::Array + pub mod vortex_array::arrays::chunked pub struct vortex_array::arrays::chunked::Chunked @@ -1074,39 +1038,39 @@ pub fn vortex_array::arrays::Chunked::fmt(&self, f: &mut core::fmt::Formatter<'_ impl vortex_array::arrays::dict::TakeExecute for vortex_array::arrays::Chunked -pub fn vortex_array::arrays::Chunked::take(array: &vortex_array::arrays::ChunkedArray, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Chunked::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::filter::FilterKernel for vortex_array::arrays::Chunked -pub fn vortex_array::arrays::Chunked::filter(array: &vortex_array::arrays::ChunkedArray, mask: &vortex_mask::Mask, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Chunked::filter(array: &vortex_array::vtable::Array, mask: &vortex_mask::Mask, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceKernel for vortex_array::arrays::Chunked -pub fn vortex_array::arrays::Chunked::slice(array: &Self::Array, range: core::ops::range::Range, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Chunked::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastReduce for vortex_array::arrays::Chunked -pub fn vortex_array::arrays::Chunked::cast(array: &vortex_array::arrays::ChunkedArray, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Chunked::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::fill_null::FillNullReduce for vortex_array::arrays::Chunked -pub fn vortex_array::arrays::Chunked::fill_null(array: &vortex_array::arrays::ChunkedArray, fill_value: &vortex_array::scalar::Scalar) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Chunked::fill_null(array: &vortex_array::vtable::Array, fill_value: &vortex_array::scalar::Scalar) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskKernel for vortex_array::arrays::Chunked -pub fn vortex_array::arrays::Chunked::mask(array: &vortex_array::arrays::ChunkedArray, mask: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Chunked::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::zip::ZipKernel for vortex_array::arrays::Chunked -pub fn vortex_array::arrays::Chunked::zip(if_true: &vortex_array::arrays::ChunkedArray, if_false: &vortex_array::ArrayRef, mask: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Chunked::zip(if_true: &vortex_array::vtable::Array, if_false: &vortex_array::ArrayRef, mask: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::Chunked -pub fn vortex_array::arrays::Chunked::scalar_at(array: &vortex_array::arrays::ChunkedArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Chunked::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::Chunked -pub type vortex_array::arrays::Chunked::Array = vortex_array::arrays::ChunkedArray +pub type vortex_array::arrays::Chunked::Array = vortex_array::arrays::ChunkedData pub type vortex_array::arrays::Chunked::Metadata = vortex_array::EmptyMetadata @@ -1114,25 +1078,25 @@ pub type vortex_array::arrays::Chunked::OperationsVTable = vortex_array::arrays: pub type vortex_array::arrays::Chunked::ValidityVTable = vortex_array::arrays::Chunked -pub fn vortex_array::arrays::Chunked::append_to_builder(array: &vortex_array::arrays::ChunkedArray, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Chunked::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Chunked::array_eq(array: &vortex_array::arrays::ChunkedArray, other: &vortex_array::arrays::ChunkedArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Chunked::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Chunked::array_hash(array: &vortex_array::arrays::ChunkedArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Chunked::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Chunked::buffer(_array: &vortex_array::arrays::ChunkedArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Chunked::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Chunked::buffer_name(_array: &vortex_array::arrays::ChunkedArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Chunked::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Chunked::build(dtype: &vortex_array::dtype::DType, _len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Chunked::build(dtype: &vortex_array::dtype::DType, _len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Chunked::child(array: &vortex_array::arrays::ChunkedArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Chunked::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Chunked::child_name(_array: &vortex_array::arrays::ChunkedArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Chunked::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Chunked::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Chunked::dtype(array: &vortex_array::arrays::ChunkedArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Chunked::dtype(array: &vortex_array::arrays::ChunkedData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Chunked::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -1140,13 +1104,13 @@ pub fn vortex_array::arrays::Chunked::execute_parent(array: &vortex_array::vtabl pub fn vortex_array::arrays::Chunked::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Chunked::len(array: &vortex_array::arrays::ChunkedArray) -> usize +pub fn vortex_array::arrays::Chunked::len(array: &vortex_array::arrays::ChunkedData) -> usize -pub fn vortex_array::arrays::Chunked::metadata(_array: &vortex_array::arrays::ChunkedArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Chunked::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Chunked::nbuffers(_array: &vortex_array::arrays::ChunkedArray) -> usize +pub fn vortex_array::arrays::Chunked::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Chunked::nchildren(array: &vortex_array::arrays::ChunkedArray) -> usize +pub fn vortex_array::arrays::Chunked::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Chunked::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -1154,7 +1118,7 @@ pub fn vortex_array::arrays::Chunked::reduce_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Chunked::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Chunked::stats(array: &vortex_array::arrays::ChunkedArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Chunked::stats(array: &vortex_array::arrays::ChunkedData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Chunked::vtable(_array: &Self::Array) -> &Self @@ -1162,67 +1126,57 @@ pub fn vortex_array::arrays::Chunked::with_children(array: &mut Self::Array, chi impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Chunked -pub fn vortex_array::arrays::Chunked::validity(array: &vortex_array::arrays::ChunkedArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Chunked::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub struct vortex_array::arrays::chunked::ChunkedArray +pub struct vortex_array::arrays::chunked::ChunkedData -impl vortex_array::arrays::ChunkedArray +impl vortex_array::arrays::ChunkedData -pub fn vortex_array::arrays::ChunkedArray::array_iterator(&self) -> impl vortex_array::iter::ArrayIterator + '_ +pub fn vortex_array::arrays::ChunkedData::array_iterator(&self) -> impl vortex_array::iter::ArrayIterator + '_ -pub fn vortex_array::arrays::ChunkedArray::array_stream(&self) -> impl vortex_array::stream::ArrayStream + '_ +pub fn vortex_array::arrays::ChunkedData::array_stream(&self) -> impl vortex_array::stream::ArrayStream + '_ -pub fn vortex_array::arrays::ChunkedArray::chunk(&self, idx: usize) -> &vortex_array::ArrayRef +pub fn vortex_array::arrays::ChunkedData::chunk(&self, idx: usize) -> &vortex_array::ArrayRef -pub fn vortex_array::arrays::ChunkedArray::chunk_offsets(&self) -> vortex_buffer::buffer::Buffer +pub fn vortex_array::arrays::ChunkedData::chunk_offsets(&self) -> vortex_buffer::buffer::Buffer -pub fn vortex_array::arrays::ChunkedArray::chunks(&self) -> &[vortex_array::ArrayRef] +pub fn vortex_array::arrays::ChunkedData::chunks(&self) -> &[vortex_array::ArrayRef] -pub fn vortex_array::arrays::ChunkedArray::nchunks(&self) -> usize +pub fn vortex_array::arrays::ChunkedData::dtype(&self) -> &vortex_array::dtype::DType -pub unsafe fn vortex_array::arrays::ChunkedArray::new_unchecked(chunks: alloc::vec::Vec, dtype: vortex_array::dtype::DType) -> Self +pub fn vortex_array::arrays::ChunkedData::is_empty(&self) -> bool -pub fn vortex_array::arrays::ChunkedArray::non_empty_chunks(&self) -> impl core::iter::traits::iterator::Iterator + '_ +pub fn vortex_array::arrays::ChunkedData::len(&self) -> usize -pub fn vortex_array::arrays::ChunkedArray::rechunk(&self, target_bytesize: u64, target_rowsize: usize) -> vortex_error::VortexResult +pub fn vortex_array::arrays::ChunkedData::nchunks(&self) -> usize -pub fn vortex_array::arrays::ChunkedArray::try_new(chunks: alloc::vec::Vec, dtype: vortex_array::dtype::DType) -> vortex_error::VortexResult +pub unsafe fn vortex_array::arrays::ChunkedData::new_unchecked(chunks: alloc::vec::Vec, dtype: vortex_array::dtype::DType) -> Self -pub fn vortex_array::arrays::ChunkedArray::validate(chunks: &[vortex_array::ArrayRef], dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::ChunkedData::non_empty_chunks(&self) -> impl core::iter::traits::iterator::Iterator + '_ -impl vortex_array::arrays::ChunkedArray +pub fn vortex_array::arrays::ChunkedData::rechunk(&self, target_bytesize: u64, target_rowsize: usize) -> vortex_error::VortexResult -pub fn vortex_array::arrays::ChunkedArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ChunkedData::try_new(chunks: alloc::vec::Vec, dtype: vortex_array::dtype::DType) -> vortex_error::VortexResult -impl core::clone::Clone for vortex_array::arrays::ChunkedArray +pub fn vortex_array::arrays::ChunkedData::validate(chunks: &[vortex_array::ArrayRef], dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::ChunkedArray::clone(&self) -> vortex_array::arrays::ChunkedArray +impl core::clone::Clone for vortex_array::arrays::ChunkedData -impl core::convert::AsRef for vortex_array::arrays::ChunkedArray +pub fn vortex_array::arrays::ChunkedData::clone(&self) -> vortex_array::arrays::ChunkedData -pub fn vortex_array::arrays::ChunkedArray::as_ref(&self) -> &dyn vortex_array::DynArray +impl core::convert::From for vortex_array::ArrayRef -impl core::convert::From for vortex_array::ArrayRef +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::ChunkedData) -> vortex_array::ArrayRef -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::ChunkedArray) -> vortex_array::ArrayRef +impl core::fmt::Debug for vortex_array::arrays::ChunkedData -impl core::fmt::Debug for vortex_array::arrays::ChunkedArray +pub fn vortex_array::arrays::ChunkedData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub fn vortex_array::arrays::ChunkedArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl vortex_array::IntoArray for vortex_array::arrays::ChunkedData -impl core::iter::traits::collect::FromIterator> for vortex_array::arrays::ChunkedArray +pub fn vortex_array::arrays::ChunkedData::into_array(self) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::ChunkedArray::from_iter>(iter: T) -> Self - -impl core::ops::deref::Deref for vortex_array::arrays::ChunkedArray - -pub type vortex_array::arrays::ChunkedArray::Target = dyn vortex_array::DynArray - -pub fn vortex_array::arrays::ChunkedArray::deref(&self) -> &Self::Target - -impl vortex_array::IntoArray for vortex_array::arrays::ChunkedArray - -pub fn vortex_array::arrays::ChunkedArray::into_array(self) -> vortex_array::ArrayRef +pub type vortex_array::arrays::chunked::ChunkedArray = vortex_array::vtable::Array pub mod vortex_array::arrays::constant @@ -1246,39 +1200,39 @@ pub fn vortex_array::arrays::Constant::fmt(&self, f: &mut core::fmt::Formatter<' impl vortex_array::arrays::dict::TakeReduce for vortex_array::arrays::Constant -pub fn vortex_array::arrays::Constant::take(array: &vortex_array::arrays::ConstantArray, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Constant::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::arrays::filter::FilterReduce for vortex_array::arrays::Constant -pub fn vortex_array::arrays::Constant::filter(array: &vortex_array::arrays::ConstantArray, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Constant::filter(array: &vortex_array::vtable::Array, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::Constant -pub fn vortex_array::arrays::Constant::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Constant::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::between::BetweenReduce for vortex_array::arrays::Constant -pub fn vortex_array::arrays::Constant::between(array: &vortex_array::arrays::ConstantArray, lower: &vortex_array::ArrayRef, upper: &vortex_array::ArrayRef, options: &vortex_array::scalar_fn::fns::between::BetweenOptions) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Constant::between(array: &vortex_array::vtable::Array, lower: &vortex_array::ArrayRef, upper: &vortex_array::ArrayRef, options: &vortex_array::scalar_fn::fns::between::BetweenOptions) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastReduce for vortex_array::arrays::Constant -pub fn vortex_array::arrays::Constant::cast(array: &vortex_array::arrays::ConstantArray, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Constant::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::fill_null::FillNullReduce for vortex_array::arrays::Constant -pub fn vortex_array::arrays::Constant::fill_null(array: &vortex_array::arrays::ConstantArray, fill_value: &vortex_array::scalar::Scalar) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Constant::fill_null(array: &vortex_array::vtable::Array, fill_value: &vortex_array::scalar::Scalar) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::not::NotReduce for vortex_array::arrays::Constant -pub fn vortex_array::arrays::Constant::invert(array: &vortex_array::arrays::ConstantArray) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Constant::invert(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::Constant -pub fn vortex_array::arrays::Constant::scalar_at(array: &vortex_array::arrays::ConstantArray, _index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Constant::scalar_at(array: &vortex_array::vtable::Array, _index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::Constant -pub type vortex_array::arrays::Constant::Array = vortex_array::arrays::ConstantArray +pub type vortex_array::arrays::Constant::Array = vortex_array::arrays::ConstantData pub type vortex_array::arrays::Constant::Metadata = vortex_array::scalar::Scalar @@ -1286,25 +1240,25 @@ pub type vortex_array::arrays::Constant::OperationsVTable = vortex_array::arrays pub type vortex_array::arrays::Constant::ValidityVTable = vortex_array::arrays::Constant -pub fn vortex_array::arrays::Constant::append_to_builder(array: &vortex_array::arrays::ConstantArray, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Constant::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Constant::array_eq(array: &vortex_array::arrays::ConstantArray, other: &vortex_array::arrays::ConstantArray, _precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Constant::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, _precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Constant::array_hash(array: &vortex_array::arrays::ConstantArray, state: &mut H, _precision: vortex_array::Precision) +pub fn vortex_array::arrays::Constant::array_hash(array: &vortex_array::vtable::Array, state: &mut H, _precision: vortex_array::Precision) -pub fn vortex_array::arrays::Constant::buffer(array: &vortex_array::arrays::ConstantArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Constant::buffer(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Constant::buffer_name(_array: &vortex_array::arrays::ConstantArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Constant::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Constant::build(_dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], _children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Constant::build(_dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], _children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Constant::child(_array: &vortex_array::arrays::ConstantArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Constant::child(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Constant::child_name(_array: &vortex_array::arrays::ConstantArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Constant::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Constant::deserialize(_bytes: &[u8], dtype: &vortex_array::dtype::DType, _len: usize, buffers: &[vortex_array::buffer::BufferHandle], session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Constant::dtype(array: &vortex_array::arrays::ConstantArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Constant::dtype(array: &vortex_array::arrays::ConstantData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Constant::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -1312,13 +1266,13 @@ pub fn vortex_array::arrays::Constant::execute_parent(array: &vortex_array::vtab pub fn vortex_array::arrays::Constant::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Constant::len(array: &vortex_array::arrays::ConstantArray) -> usize +pub fn vortex_array::arrays::Constant::len(array: &vortex_array::arrays::ConstantData) -> usize -pub fn vortex_array::arrays::Constant::metadata(array: &vortex_array::arrays::ConstantArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Constant::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Constant::nbuffers(_array: &vortex_array::arrays::ConstantArray) -> usize +pub fn vortex_array::arrays::Constant::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Constant::nchildren(_array: &vortex_array::arrays::ConstantArray) -> usize +pub fn vortex_array::arrays::Constant::nchildren(_array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Constant::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -1326,7 +1280,7 @@ pub fn vortex_array::arrays::Constant::reduce_parent(array: &vortex_array::vtabl pub fn vortex_array::arrays::Constant::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Constant::stats(array: &vortex_array::arrays::ConstantArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Constant::stats(array: &vortex_array::arrays::ConstantData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Constant::vtable(_array: &Self::Array) -> &Self @@ -1334,109 +1288,103 @@ pub fn vortex_array::arrays::Constant::with_children(_array: &mut Self::Array, c impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Constant -pub fn vortex_array::arrays::Constant::validity(array: &vortex_array::arrays::ConstantArray) -> vortex_error::VortexResult - -pub struct vortex_array::arrays::constant::ConstantArray - -impl vortex_array::arrays::ConstantArray - -pub fn vortex_array::arrays::ConstantArray::into_parts(self) -> vortex_array::scalar::Scalar +pub fn vortex_array::arrays::Constant::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::ConstantArray::new(scalar: S, len: usize) -> Self where S: core::convert::Into +pub struct vortex_array::arrays::constant::ConstantData -pub fn vortex_array::arrays::ConstantArray::scalar(&self) -> &vortex_array::scalar::Scalar +impl vortex_array::arrays::ConstantData -impl vortex_array::arrays::ConstantArray +pub fn vortex_array::arrays::ConstantData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_array::arrays::ConstantArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ConstantData::into_parts(self) -> vortex_array::scalar::Scalar -impl core::clone::Clone for vortex_array::arrays::ConstantArray +pub fn vortex_array::arrays::ConstantData::is_empty(&self) -> bool -pub fn vortex_array::arrays::ConstantArray::clone(&self) -> vortex_array::arrays::ConstantArray +pub fn vortex_array::arrays::ConstantData::len(&self) -> usize -impl core::convert::AsRef for vortex_array::arrays::ConstantArray +pub fn vortex_array::arrays::ConstantData::new(scalar: S, len: usize) -> Self where S: core::convert::Into -pub fn vortex_array::arrays::ConstantArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub fn vortex_array::arrays::ConstantData::scalar(&self) -> &vortex_array::scalar::Scalar -impl core::convert::From for vortex_array::ArrayRef +impl core::clone::Clone for vortex_array::arrays::ConstantData -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::ConstantArray) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ConstantData::clone(&self) -> vortex_array::arrays::ConstantData -impl core::fmt::Debug for vortex_array::arrays::ConstantArray +impl core::convert::From for vortex_array::ArrayRef -pub fn vortex_array::arrays::ConstantArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::ConstantData) -> vortex_array::ArrayRef -impl core::ops::deref::Deref for vortex_array::arrays::ConstantArray +impl core::fmt::Debug for vortex_array::arrays::ConstantData -pub type vortex_array::arrays::ConstantArray::Target = dyn vortex_array::DynArray +pub fn vortex_array::arrays::ConstantData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub fn vortex_array::arrays::ConstantArray::deref(&self) -> &Self::Target +impl vortex_array::IntoArray for vortex_array::arrays::ConstantData -impl vortex_array::IntoArray for vortex_array::arrays::ConstantArray +pub fn vortex_array::arrays::ConstantData::into_array(self) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::ConstantArray::into_array(self) -> vortex_array::ArrayRef +pub type vortex_array::arrays::constant::ConstantArray = vortex_array::vtable::Array pub mod vortex_array::arrays::datetime -pub struct vortex_array::arrays::datetime::TemporalArray +pub struct vortex_array::arrays::datetime::TemporalData -impl vortex_array::arrays::datetime::TemporalArray +impl vortex_array::arrays::datetime::TemporalData -pub fn vortex_array::arrays::datetime::TemporalArray::dtype(&self) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::datetime::TemporalData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_array::arrays::datetime::TemporalArray::ext_dtype(&self) -> vortex_array::dtype::extension::ExtDTypeRef +pub fn vortex_array::arrays::datetime::TemporalData::ext_dtype(&self) -> vortex_array::dtype::extension::ExtDTypeRef -pub fn vortex_array::arrays::datetime::TemporalArray::temporal_metadata(&self) -> vortex_array::extension::datetime::TemporalMetadata<'_> +pub fn vortex_array::arrays::datetime::TemporalData::temporal_metadata(&self) -> vortex_array::extension::datetime::TemporalMetadata<'_> -pub fn vortex_array::arrays::datetime::TemporalArray::temporal_values(&self) -> &vortex_array::ArrayRef +pub fn vortex_array::arrays::datetime::TemporalData::temporal_values(&self) -> &vortex_array::ArrayRef -impl vortex_array::arrays::datetime::TemporalArray +pub fn vortex_array::arrays::datetime::TemporalData::to_array_ref(&self) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::datetime::TemporalArray::new_date(array: vortex_array::ArrayRef, time_unit: vortex_array::extension::datetime::TimeUnit) -> Self +impl vortex_array::arrays::datetime::TemporalData -pub fn vortex_array::arrays::datetime::TemporalArray::new_time(array: vortex_array::ArrayRef, time_unit: vortex_array::extension::datetime::TimeUnit) -> Self +pub fn vortex_array::arrays::datetime::TemporalData::new_date(array: vortex_array::ArrayRef, time_unit: vortex_array::extension::datetime::TimeUnit) -> Self -pub fn vortex_array::arrays::datetime::TemporalArray::new_timestamp(array: vortex_array::ArrayRef, time_unit: vortex_array::extension::datetime::TimeUnit, time_zone: core::option::Option>) -> Self +pub fn vortex_array::arrays::datetime::TemporalData::new_time(array: vortex_array::ArrayRef, time_unit: vortex_array::extension::datetime::TimeUnit) -> Self -impl core::clone::Clone for vortex_array::arrays::datetime::TemporalArray +pub fn vortex_array::arrays::datetime::TemporalData::new_timestamp(array: vortex_array::ArrayRef, time_unit: vortex_array::extension::datetime::TimeUnit, time_zone: core::option::Option>) -> Self -pub fn vortex_array::arrays::datetime::TemporalArray::clone(&self) -> vortex_array::arrays::datetime::TemporalArray +impl core::clone::Clone for vortex_array::arrays::datetime::TemporalData -impl core::convert::AsRef for vortex_array::arrays::datetime::TemporalArray +pub fn vortex_array::arrays::datetime::TemporalData::clone(&self) -> vortex_array::arrays::datetime::TemporalData -pub fn vortex_array::arrays::datetime::TemporalArray::as_ref(&self) -> &dyn vortex_array::DynArray +impl core::convert::From<&vortex_array::arrays::datetime::TemporalData> for vortex_array::arrays::ExtensionArray -impl core::convert::From<&vortex_array::arrays::datetime::TemporalArray> for vortex_array::arrays::ExtensionArray +pub fn vortex_array::arrays::ExtensionArray::from(value: &vortex_array::arrays::datetime::TemporalData) -> Self -pub fn vortex_array::arrays::ExtensionArray::from(value: &vortex_array::arrays::datetime::TemporalArray) -> Self +impl core::convert::From for vortex_array::ArrayRef -impl core::convert::From for vortex_array::ArrayRef +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::datetime::TemporalData) -> Self -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::datetime::TemporalArray) -> Self +impl core::convert::From for vortex_array::arrays::ExtensionArray -impl core::convert::From for vortex_array::arrays::ExtensionArray +pub fn vortex_array::arrays::ExtensionArray::from(value: vortex_array::arrays::datetime::TemporalData) -> Self -pub fn vortex_array::arrays::ExtensionArray::from(value: vortex_array::arrays::datetime::TemporalArray) -> Self +impl core::convert::TryFrom> for vortex_array::arrays::datetime::TemporalData -impl core::convert::TryFrom> for vortex_array::arrays::datetime::TemporalArray +pub type vortex_array::arrays::datetime::TemporalData::Error = vortex_error::VortexError -pub type vortex_array::arrays::datetime::TemporalArray::Error = vortex_error::VortexError +pub fn vortex_array::arrays::datetime::TemporalData::try_from(value: vortex_array::ArrayRef) -> core::result::Result -pub fn vortex_array::arrays::datetime::TemporalArray::try_from(value: vortex_array::ArrayRef) -> core::result::Result +impl core::convert::TryFrom> for vortex_array::arrays::datetime::TemporalData -impl core::convert::TryFrom for vortex_array::arrays::datetime::TemporalArray +pub type vortex_array::arrays::datetime::TemporalData::Error = vortex_error::VortexError -pub type vortex_array::arrays::datetime::TemporalArray::Error = vortex_error::VortexError +pub fn vortex_array::arrays::datetime::TemporalData::try_from(ext: vortex_array::arrays::ExtensionArray) -> core::result::Result -pub fn vortex_array::arrays::datetime::TemporalArray::try_from(ext: vortex_array::arrays::ExtensionArray) -> core::result::Result +impl core::fmt::Debug for vortex_array::arrays::datetime::TemporalData -impl core::fmt::Debug for vortex_array::arrays::datetime::TemporalArray +pub fn vortex_array::arrays::datetime::TemporalData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub fn vortex_array::arrays::datetime::TemporalArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl vortex_array::IntoArray for vortex_array::arrays::datetime::TemporalData -impl vortex_array::IntoArray for vortex_array::arrays::datetime::TemporalArray +pub fn vortex_array::arrays::datetime::TemporalData::into_array(self) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::datetime::TemporalArray::into_array(self) -> vortex_array::ArrayRef +pub type vortex_array::arrays::datetime::TemporalArray = vortex_array::arrays::datetime::TemporalData pub mod vortex_array::arrays::decimal @@ -1456,41 +1404,41 @@ pub fn vortex_array::arrays::Decimal::fmt(&self, f: &mut core::fmt::Formatter<'_ impl vortex_array::arrays::dict::TakeExecute for vortex_array::arrays::Decimal -pub fn vortex_array::arrays::Decimal::take(array: &vortex_array::arrays::DecimalArray, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Decimal::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::Decimal -pub fn vortex_array::arrays::Decimal::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Decimal::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_array::arrays::decimal::DecimalMaskedValidityRule pub type vortex_array::arrays::decimal::DecimalMaskedValidityRule::Parent = vortex_array::arrays::Masked -pub fn vortex_array::arrays::decimal::DecimalMaskedValidityRule::reduce_parent(&self, array: &vortex_array::arrays::DecimalArray, parent: &vortex_array::arrays::MaskedArray, _child_idx: usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::decimal::DecimalMaskedValidityRule::reduce_parent(&self, array: &vortex_array::vtable::Array, parent: &vortex_array::arrays::MaskedArray, _child_idx: usize) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::between::BetweenKernel for vortex_array::arrays::Decimal -pub fn vortex_array::arrays::Decimal::between(arr: &vortex_array::arrays::DecimalArray, lower: &vortex_array::ArrayRef, upper: &vortex_array::ArrayRef, options: &vortex_array::scalar_fn::fns::between::BetweenOptions, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Decimal::between(arr: &vortex_array::vtable::Array, lower: &vortex_array::ArrayRef, upper: &vortex_array::ArrayRef, options: &vortex_array::scalar_fn::fns::between::BetweenOptions, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastKernel for vortex_array::arrays::Decimal -pub fn vortex_array::arrays::Decimal::cast(array: &vortex_array::arrays::DecimalArray, dtype: &vortex_array::dtype::DType, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Decimal::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::fill_null::FillNullKernel for vortex_array::arrays::Decimal -pub fn vortex_array::arrays::Decimal::fill_null(array: &vortex_array::arrays::DecimalArray, fill_value: &vortex_array::scalar::Scalar, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Decimal::fill_null(array: &vortex_array::vtable::Array, fill_value: &vortex_array::scalar::Scalar, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::Decimal -pub fn vortex_array::arrays::Decimal::mask(array: &vortex_array::arrays::DecimalArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Decimal::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::Decimal -pub fn vortex_array::arrays::Decimal::scalar_at(array: &vortex_array::arrays::DecimalArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Decimal::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::Decimal -pub type vortex_array::arrays::Decimal::Array = vortex_array::arrays::DecimalArray +pub type vortex_array::arrays::Decimal::Array = vortex_array::arrays::DecimalData pub type vortex_array::arrays::Decimal::Metadata = vortex_array::ProstMetadata @@ -1498,25 +1446,25 @@ pub type vortex_array::arrays::Decimal::OperationsVTable = vortex_array::arrays: pub type vortex_array::arrays::Decimal::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::Decimal::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Decimal::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Decimal::array_eq(array: &vortex_array::arrays::DecimalArray, other: &vortex_array::arrays::DecimalArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Decimal::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Decimal::array_hash(array: &vortex_array::arrays::DecimalArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Decimal::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Decimal::buffer(array: &vortex_array::arrays::DecimalArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Decimal::buffer(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Decimal::buffer_name(_array: &vortex_array::arrays::DecimalArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Decimal::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Decimal::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Decimal::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Decimal::child(array: &vortex_array::arrays::DecimalArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Decimal::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Decimal::child_name(_array: &vortex_array::arrays::DecimalArray, _idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Decimal::child_name(_array: &vortex_array::vtable::Array, _idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Decimal::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Decimal::dtype(array: &vortex_array::arrays::DecimalArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Decimal::dtype(array: &vortex_array::arrays::DecimalData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Decimal::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -1524,13 +1472,13 @@ pub fn vortex_array::arrays::Decimal::execute_parent(array: &vortex_array::vtabl pub fn vortex_array::arrays::Decimal::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Decimal::len(array: &vortex_array::arrays::DecimalArray) -> usize +pub fn vortex_array::arrays::Decimal::len(array: &vortex_array::arrays::DecimalData) -> usize -pub fn vortex_array::arrays::Decimal::metadata(array: &vortex_array::arrays::DecimalArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Decimal::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Decimal::nbuffers(_array: &vortex_array::arrays::DecimalArray) -> usize +pub fn vortex_array::arrays::Decimal::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Decimal::nchildren(array: &vortex_array::arrays::DecimalArray) -> usize +pub fn vortex_array::arrays::Decimal::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Decimal::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -1538,97 +1486,89 @@ pub fn vortex_array::arrays::Decimal::reduce_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Decimal::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Decimal::stats(array: &vortex_array::arrays::DecimalArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Decimal::stats(array: &vortex_array::arrays::DecimalData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Decimal::vtable(_array: &Self::Array) -> &Self pub fn vortex_array::arrays::Decimal::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> -pub struct vortex_array::arrays::decimal::DecimalArray - -impl vortex_array::arrays::DecimalArray - -pub fn vortex_array::arrays::DecimalArray::buffer(&self) -> vortex_buffer::buffer::Buffer - -pub fn vortex_array::arrays::DecimalArray::buffer_handle(&self) -> &vortex_array::buffer::BufferHandle - -pub fn vortex_array::arrays::DecimalArray::decimal_dtype(&self) -> vortex_array::dtype::DecimalDType +pub struct vortex_array::arrays::decimal::DecimalArrayParts -pub fn vortex_array::arrays::DecimalArray::from_iter>(iter: I, decimal_dtype: vortex_array::dtype::DecimalDType) -> Self +pub vortex_array::arrays::decimal::DecimalArrayParts::decimal_dtype: vortex_array::dtype::DecimalDType -pub fn vortex_array::arrays::DecimalArray::from_option_iter>>(iter: I, decimal_dtype: vortex_array::dtype::DecimalDType) -> Self +pub vortex_array::arrays::decimal::DecimalArrayParts::validity: vortex_array::validity::Validity -pub fn vortex_array::arrays::DecimalArray::into_parts(self) -> vortex_array::arrays::decimal::DecimalArrayParts +pub vortex_array::arrays::decimal::DecimalArrayParts::values: vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::DecimalArray::new(buffer: vortex_buffer::buffer::Buffer, decimal_dtype: vortex_array::dtype::DecimalDType, validity: vortex_array::validity::Validity) -> Self +pub vortex_array::arrays::decimal::DecimalArrayParts::values_type: vortex_array::dtype::DecimalType -pub fn vortex_array::arrays::DecimalArray::new_handle(values: vortex_array::buffer::BufferHandle, values_type: vortex_array::dtype::DecimalType, decimal_dtype: vortex_array::dtype::DecimalDType, validity: vortex_array::validity::Validity) -> Self +pub struct vortex_array::arrays::decimal::DecimalData -pub unsafe fn vortex_array::arrays::DecimalArray::new_unchecked(buffer: vortex_buffer::buffer::Buffer, decimal_dtype: vortex_array::dtype::DecimalDType, validity: vortex_array::validity::Validity) -> Self +impl vortex_array::arrays::DecimalData -pub unsafe fn vortex_array::arrays::DecimalArray::new_unchecked_from_byte_buffer(byte_buffer: vortex_buffer::ByteBuffer, values_type: vortex_array::dtype::DecimalType, decimal_dtype: vortex_array::dtype::DecimalDType, validity: vortex_array::validity::Validity) -> Self +pub fn vortex_array::arrays::DecimalData::buffer(&self) -> vortex_buffer::buffer::Buffer -pub unsafe fn vortex_array::arrays::DecimalArray::new_unchecked_handle(values: vortex_array::buffer::BufferHandle, values_type: vortex_array::dtype::DecimalType, decimal_dtype: vortex_array::dtype::DecimalDType, validity: vortex_array::validity::Validity) -> Self +pub fn vortex_array::arrays::DecimalData::buffer_handle(&self) -> &vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::DecimalArray::patch(self, patches: &vortex_array::patches::Patches, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::DecimalData::decimal_dtype(&self) -> vortex_array::dtype::DecimalDType -pub fn vortex_array::arrays::DecimalArray::precision(&self) -> u8 +pub fn vortex_array::arrays::DecimalData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_array::arrays::DecimalArray::scale(&self) -> i8 +pub fn vortex_array::arrays::DecimalData::from_iter>(iter: I, decimal_dtype: vortex_array::dtype::DecimalDType) -> Self -pub fn vortex_array::arrays::DecimalArray::try_new(buffer: vortex_buffer::buffer::Buffer, decimal_dtype: vortex_array::dtype::DecimalDType, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult +pub fn vortex_array::arrays::DecimalData::from_option_iter>>(iter: I, decimal_dtype: vortex_array::dtype::DecimalDType) -> Self -pub fn vortex_array::arrays::DecimalArray::try_new_handle(values: vortex_array::buffer::BufferHandle, values_type: vortex_array::dtype::DecimalType, decimal_dtype: vortex_array::dtype::DecimalDType, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult +pub fn vortex_array::arrays::DecimalData::into_parts(self) -> vortex_array::arrays::decimal::DecimalArrayParts -pub fn vortex_array::arrays::DecimalArray::values_type(&self) -> vortex_array::dtype::DecimalType +pub fn vortex_array::arrays::DecimalData::is_empty(&self) -> bool -impl vortex_array::arrays::DecimalArray +pub fn vortex_array::arrays::DecimalData::len(&self) -> usize -pub fn vortex_array::arrays::DecimalArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::DecimalData::new(buffer: vortex_buffer::buffer::Buffer, decimal_dtype: vortex_array::dtype::DecimalDType, validity: vortex_array::validity::Validity) -> Self -impl core::clone::Clone for vortex_array::arrays::DecimalArray +pub fn vortex_array::arrays::DecimalData::new_handle(values: vortex_array::buffer::BufferHandle, values_type: vortex_array::dtype::DecimalType, decimal_dtype: vortex_array::dtype::DecimalDType, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::DecimalArray::clone(&self) -> vortex_array::arrays::DecimalArray +pub unsafe fn vortex_array::arrays::DecimalData::new_unchecked(buffer: vortex_buffer::buffer::Buffer, decimal_dtype: vortex_array::dtype::DecimalDType, validity: vortex_array::validity::Validity) -> Self -impl core::convert::AsRef for vortex_array::arrays::DecimalArray +pub unsafe fn vortex_array::arrays::DecimalData::new_unchecked_from_byte_buffer(byte_buffer: vortex_buffer::ByteBuffer, values_type: vortex_array::dtype::DecimalType, decimal_dtype: vortex_array::dtype::DecimalDType, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::DecimalArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub unsafe fn vortex_array::arrays::DecimalData::new_unchecked_handle(values: vortex_array::buffer::BufferHandle, values_type: vortex_array::dtype::DecimalType, decimal_dtype: vortex_array::dtype::DecimalDType, validity: vortex_array::validity::Validity) -> Self -impl core::convert::From for vortex_array::ArrayRef +pub fn vortex_array::arrays::DecimalData::patch(self, patches: &vortex_array::patches::Patches, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::DecimalArray) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::DecimalData::precision(&self) -> u8 -impl core::fmt::Debug for vortex_array::arrays::DecimalArray +pub fn vortex_array::arrays::DecimalData::scale(&self) -> i8 -pub fn vortex_array::arrays::DecimalArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_array::arrays::DecimalData::try_new(buffer: vortex_buffer::buffer::Buffer, decimal_dtype: vortex_array::dtype::DecimalDType, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult -impl core::ops::deref::Deref for vortex_array::arrays::DecimalArray +pub fn vortex_array::arrays::DecimalData::try_new_handle(values: vortex_array::buffer::BufferHandle, values_type: vortex_array::dtype::DecimalType, decimal_dtype: vortex_array::dtype::DecimalDType, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult -pub type vortex_array::arrays::DecimalArray::Target = dyn vortex_array::DynArray +pub fn vortex_array::arrays::DecimalData::validity(&self) -> &vortex_array::validity::Validity -pub fn vortex_array::arrays::DecimalArray::deref(&self) -> &Self::Target +pub fn vortex_array::arrays::DecimalData::validity_mask(&self) -> vortex_mask::Mask -impl vortex_array::Executable for vortex_array::arrays::DecimalArray +pub fn vortex_array::arrays::DecimalData::values_type(&self) -> vortex_array::dtype::DecimalType -pub fn vortex_array::arrays::DecimalArray::execute(array: vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +impl core::clone::Clone for vortex_array::arrays::DecimalData -impl vortex_array::IntoArray for vortex_array::arrays::DecimalArray +pub fn vortex_array::arrays::DecimalData::clone(&self) -> vortex_array::arrays::DecimalData -pub fn vortex_array::arrays::DecimalArray::into_array(self) -> vortex_array::ArrayRef +impl core::convert::From for vortex_array::ArrayRef -impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::DecimalArray +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::DecimalData) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::DecimalArray::validity(&self) -> &vortex_array::validity::Validity +impl core::fmt::Debug for vortex_array::arrays::DecimalData -pub struct vortex_array::arrays::decimal::DecimalArrayParts +pub fn vortex_array::arrays::DecimalData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub vortex_array::arrays::decimal::DecimalArrayParts::decimal_dtype: vortex_array::dtype::DecimalDType +impl vortex_array::IntoArray for vortex_array::arrays::DecimalData -pub vortex_array::arrays::decimal::DecimalArrayParts::validity: vortex_array::validity::Validity +pub fn vortex_array::arrays::DecimalData::into_array(self) -> vortex_array::ArrayRef -pub vortex_array::arrays::decimal::DecimalArrayParts::values: vortex_array::buffer::BufferHandle +impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::DecimalData -pub vortex_array::arrays::decimal::DecimalArrayParts::values_type: vortex_array::dtype::DecimalType +pub fn vortex_array::arrays::DecimalData::validity(&self) -> &vortex_array::validity::Validity pub struct vortex_array::arrays::decimal::DecimalMaskedValidityRule @@ -1644,10 +1584,12 @@ impl vortex_array::optimizer::rules::ArrayParentReduceRule vortex_error::VortexResult> +pub fn vortex_array::arrays::decimal::DecimalMaskedValidityRule::reduce_parent(&self, array: &vortex_array::vtable::Array, parent: &vortex_array::arrays::MaskedArray, _child_idx: usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::decimal::narrowed_decimal(decimal_array: vortex_array::arrays::DecimalArray) -> vortex_array::arrays::DecimalArray +pub type vortex_array::arrays::decimal::DecimalArray = vortex_array::vtable::Array + pub mod vortex_array::arrays::dict pub mod vortex_array::arrays::dict::vtable @@ -1668,43 +1610,43 @@ pub fn vortex_array::arrays::dict::Dict::fmt(&self, f: &mut core::fmt::Formatter impl vortex_array::arrays::dict::TakeExecute for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::take(array: &vortex_array::arrays::dict::DictArray, indices: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::filter::FilterReduce for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::filter(array: &vortex_array::arrays::dict::DictArray, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::filter(array: &vortex_array::vtable::Array, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::binary::CompareKernel for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::compare(lhs: &vortex_array::arrays::dict::DictArray, rhs: &vortex_array::ArrayRef, operator: vortex_array::scalar_fn::fns::operators::CompareOperator, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::compare(lhs: &vortex_array::vtable::Array, rhs: &vortex_array::ArrayRef, operator: vortex_array::scalar_fn::fns::operators::CompareOperator, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastReduce for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::cast(array: &vortex_array::arrays::dict::DictArray, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::fill_null::FillNullKernel for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::fill_null(array: &vortex_array::arrays::dict::DictArray, fill_value: &vortex_array::scalar::Scalar, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::fill_null(array: &vortex_array::vtable::Array, fill_value: &vortex_array::scalar::Scalar, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::like::LikeReduce for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::like(array: &vortex_array::arrays::dict::DictArray, pattern: &vortex_array::ArrayRef, options: vortex_array::scalar_fn::fns::like::LikeOptions) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::like(array: &vortex_array::vtable::Array, pattern: &vortex_array::ArrayRef, options: vortex_array::scalar_fn::fns::like::LikeOptions) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::mask(array: &vortex_array::arrays::dict::DictArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::scalar_at(array: &vortex_array::arrays::dict::DictArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::dict::Dict::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::dict::Dict -pub type vortex_array::arrays::dict::Dict::Array = vortex_array::arrays::dict::DictArray +pub type vortex_array::arrays::dict::Dict::Array = vortex_array::arrays::dict::DictData pub type vortex_array::arrays::dict::Dict::Metadata = vortex_array::ProstMetadata @@ -1712,25 +1654,25 @@ pub type vortex_array::arrays::dict::Dict::OperationsVTable = vortex_array::arra pub type vortex_array::arrays::dict::Dict::ValidityVTable = vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::dict::Dict::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::dict::Dict::array_eq(array: &vortex_array::arrays::dict::DictArray, other: &vortex_array::arrays::dict::DictArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::dict::Dict::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::dict::Dict::array_hash(array: &vortex_array::arrays::dict::DictArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::dict::Dict::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::dict::Dict::buffer(_array: &vortex_array::arrays::dict::DictArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::dict::Dict::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::dict::Dict::buffer_name(_array: &vortex_array::arrays::dict::DictArray, _idx: usize) -> core::option::Option +pub fn vortex_array::arrays::dict::Dict::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option -pub fn vortex_array::arrays::dict::Dict::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::dict::Dict::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::dict::Dict::child(array: &vortex_array::arrays::dict::DictArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::dict::Dict::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::dict::Dict::child_name(_array: &vortex_array::arrays::dict::DictArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::dict::Dict::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::dict::Dict::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::dict::Dict::dtype(array: &vortex_array::arrays::dict::DictArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::dict::Dict::dtype(array: &vortex_array::arrays::dict::DictData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::dict::Dict::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -1738,13 +1680,13 @@ pub fn vortex_array::arrays::dict::Dict::execute_parent(array: &vortex_array::vt pub fn vortex_array::arrays::dict::Dict::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::dict::Dict::len(array: &vortex_array::arrays::dict::DictArray) -> usize +pub fn vortex_array::arrays::dict::Dict::len(array: &vortex_array::arrays::dict::DictData) -> usize -pub fn vortex_array::arrays::dict::Dict::metadata(array: &vortex_array::arrays::dict::DictArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::dict::Dict::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::dict::Dict::nbuffers(_array: &vortex_array::arrays::dict::DictArray) -> usize +pub fn vortex_array::arrays::dict::Dict::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::dict::Dict::nchildren(_array: &vortex_array::arrays::dict::DictArray) -> usize +pub fn vortex_array::arrays::dict::Dict::nchildren(_array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::dict::Dict::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -1752,7 +1694,7 @@ pub fn vortex_array::arrays::dict::Dict::reduce_parent(array: &vortex_array::vta pub fn vortex_array::arrays::dict::Dict::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::dict::Dict::stats(array: &vortex_array::arrays::dict::DictArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::dict::Dict::stats(array: &vortex_array::arrays::dict::DictData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::dict::Dict::vtable(_array: &Self::Array) -> &Self @@ -1760,7 +1702,9 @@ pub fn vortex_array::arrays::dict::Dict::with_children(array: &mut Self::Array, impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::validity(array: &vortex_array::arrays::dict::DictArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::dict::Dict::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult + +pub type vortex_array::arrays::dict::vtable::DictArray = vortex_array::vtable::Array pub struct vortex_array::arrays::dict::Dict @@ -1778,43 +1722,43 @@ pub fn vortex_array::arrays::dict::Dict::fmt(&self, f: &mut core::fmt::Formatter impl vortex_array::arrays::dict::TakeExecute for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::take(array: &vortex_array::arrays::dict::DictArray, indices: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::filter::FilterReduce for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::filter(array: &vortex_array::arrays::dict::DictArray, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::filter(array: &vortex_array::vtable::Array, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::binary::CompareKernel for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::compare(lhs: &vortex_array::arrays::dict::DictArray, rhs: &vortex_array::ArrayRef, operator: vortex_array::scalar_fn::fns::operators::CompareOperator, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::compare(lhs: &vortex_array::vtable::Array, rhs: &vortex_array::ArrayRef, operator: vortex_array::scalar_fn::fns::operators::CompareOperator, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastReduce for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::cast(array: &vortex_array::arrays::dict::DictArray, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::fill_null::FillNullKernel for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::fill_null(array: &vortex_array::arrays::dict::DictArray, fill_value: &vortex_array::scalar::Scalar, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::fill_null(array: &vortex_array::vtable::Array, fill_value: &vortex_array::scalar::Scalar, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::like::LikeReduce for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::like(array: &vortex_array::arrays::dict::DictArray, pattern: &vortex_array::ArrayRef, options: vortex_array::scalar_fn::fns::like::LikeOptions) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::like(array: &vortex_array::vtable::Array, pattern: &vortex_array::ArrayRef, options: vortex_array::scalar_fn::fns::like::LikeOptions) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::mask(array: &vortex_array::arrays::dict::DictArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::scalar_at(array: &vortex_array::arrays::dict::DictArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::dict::Dict::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::dict::Dict -pub type vortex_array::arrays::dict::Dict::Array = vortex_array::arrays::dict::DictArray +pub type vortex_array::arrays::dict::Dict::Array = vortex_array::arrays::dict::DictData pub type vortex_array::arrays::dict::Dict::Metadata = vortex_array::ProstMetadata @@ -1822,25 +1766,25 @@ pub type vortex_array::arrays::dict::Dict::OperationsVTable = vortex_array::arra pub type vortex_array::arrays::dict::Dict::ValidityVTable = vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::dict::Dict::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::dict::Dict::array_eq(array: &vortex_array::arrays::dict::DictArray, other: &vortex_array::arrays::dict::DictArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::dict::Dict::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::dict::Dict::array_hash(array: &vortex_array::arrays::dict::DictArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::dict::Dict::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::dict::Dict::buffer(_array: &vortex_array::arrays::dict::DictArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::dict::Dict::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::dict::Dict::buffer_name(_array: &vortex_array::arrays::dict::DictArray, _idx: usize) -> core::option::Option +pub fn vortex_array::arrays::dict::Dict::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option -pub fn vortex_array::arrays::dict::Dict::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::dict::Dict::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::dict::Dict::child(array: &vortex_array::arrays::dict::DictArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::dict::Dict::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::dict::Dict::child_name(_array: &vortex_array::arrays::dict::DictArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::dict::Dict::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::dict::Dict::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::dict::Dict::dtype(array: &vortex_array::arrays::dict::DictArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::dict::Dict::dtype(array: &vortex_array::arrays::dict::DictData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::dict::Dict::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -1848,13 +1792,13 @@ pub fn vortex_array::arrays::dict::Dict::execute_parent(array: &vortex_array::vt pub fn vortex_array::arrays::dict::Dict::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::dict::Dict::len(array: &vortex_array::arrays::dict::DictArray) -> usize +pub fn vortex_array::arrays::dict::Dict::len(array: &vortex_array::arrays::dict::DictData) -> usize -pub fn vortex_array::arrays::dict::Dict::metadata(array: &vortex_array::arrays::dict::DictArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::dict::Dict::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::dict::Dict::nbuffers(_array: &vortex_array::arrays::dict::DictArray) -> usize +pub fn vortex_array::arrays::dict::Dict::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::dict::Dict::nchildren(_array: &vortex_array::arrays::dict::DictArray) -> usize +pub fn vortex_array::arrays::dict::Dict::nchildren(_array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::dict::Dict::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -1862,7 +1806,7 @@ pub fn vortex_array::arrays::dict::Dict::reduce_parent(array: &vortex_array::vta pub fn vortex_array::arrays::dict::Dict::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::dict::Dict::stats(array: &vortex_array::arrays::dict::DictArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::dict::Dict::stats(array: &vortex_array::arrays::dict::DictData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::dict::Dict::vtable(_array: &Self::Array) -> &Self @@ -1870,73 +1814,63 @@ pub fn vortex_array::arrays::dict::Dict::with_children(array: &mut Self::Array, impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::validity(array: &vortex_array::arrays::dict::DictArray) -> vortex_error::VortexResult - -pub struct vortex_array::arrays::dict::DictArray - -impl vortex_array::arrays::dict::DictArray +pub fn vortex_array::arrays::dict::Dict::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::dict::DictArray::codes(&self) -> &vortex_array::ArrayRef - -pub fn vortex_array::arrays::dict::DictArray::compute_referenced_values_mask(&self, referenced: bool) -> vortex_error::VortexResult - -pub fn vortex_array::arrays::dict::DictArray::has_all_values_referenced(&self) -> bool - -pub fn vortex_array::arrays::dict::DictArray::into_parts(self) -> vortex_array::arrays::dict::DictArrayParts +pub struct vortex_array::arrays::dict::DictArrayParts -pub fn vortex_array::arrays::dict::DictArray::new(codes: vortex_array::ArrayRef, values: vortex_array::ArrayRef) -> Self +pub vortex_array::arrays::dict::DictArrayParts::codes: vortex_array::ArrayRef -pub unsafe fn vortex_array::arrays::dict::DictArray::new_unchecked(codes: vortex_array::ArrayRef, values: vortex_array::ArrayRef) -> Self +pub vortex_array::arrays::dict::DictArrayParts::dtype: vortex_array::dtype::DType -pub unsafe fn vortex_array::arrays::dict::DictArray::set_all_values_referenced(self, all_values_referenced: bool) -> Self +pub vortex_array::arrays::dict::DictArrayParts::values: vortex_array::ArrayRef -pub fn vortex_array::arrays::dict::DictArray::try_new(codes: vortex_array::ArrayRef, values: vortex_array::ArrayRef) -> vortex_error::VortexResult +pub struct vortex_array::arrays::dict::DictData -pub fn vortex_array::arrays::dict::DictArray::validate_all_values_referenced(&self) -> vortex_error::VortexResult<()> +impl vortex_array::arrays::dict::DictData -pub fn vortex_array::arrays::dict::DictArray::values(&self) -> &vortex_array::ArrayRef +pub fn vortex_array::arrays::dict::DictData::codes(&self) -> &vortex_array::ArrayRef -impl vortex_array::arrays::dict::DictArray +pub fn vortex_array::arrays::dict::DictData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_array::arrays::dict::DictArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::dict::DictData::has_all_values_referenced(&self) -> bool -impl core::clone::Clone for vortex_array::arrays::dict::DictArray +pub fn vortex_array::arrays::dict::DictData::into_parts(self) -> vortex_array::arrays::dict::DictArrayParts -pub fn vortex_array::arrays::dict::DictArray::clone(&self) -> vortex_array::arrays::dict::DictArray +pub fn vortex_array::arrays::dict::DictData::is_empty(&self) -> bool -impl core::convert::AsRef for vortex_array::arrays::dict::DictArray +pub fn vortex_array::arrays::dict::DictData::len(&self) -> usize -pub fn vortex_array::arrays::dict::DictArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub fn vortex_array::arrays::dict::DictData::new(codes: vortex_array::ArrayRef, values: vortex_array::ArrayRef) -> Self -impl core::convert::From for vortex_array::ArrayRef +pub unsafe fn vortex_array::arrays::dict::DictData::new_unchecked(codes: vortex_array::ArrayRef, values: vortex_array::ArrayRef) -> Self -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::dict::DictArray) -> vortex_array::ArrayRef +pub unsafe fn vortex_array::arrays::dict::DictData::set_all_values_referenced(self, all_values_referenced: bool) -> Self -impl core::fmt::Debug for vortex_array::arrays::dict::DictArray +pub fn vortex_array::arrays::dict::DictData::try_new(codes: vortex_array::ArrayRef, values: vortex_array::ArrayRef) -> vortex_error::VortexResult -pub fn vortex_array::arrays::dict::DictArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_array::arrays::dict::DictData::validate_all_values_referenced(&self) -> vortex_error::VortexResult<()> -impl core::ops::deref::Deref for vortex_array::arrays::dict::DictArray +pub fn vortex_array::arrays::dict::DictData::values(&self) -> &vortex_array::ArrayRef -pub type vortex_array::arrays::dict::DictArray::Target = dyn vortex_array::DynArray +impl vortex_array::arrays::dict::DictData -pub fn vortex_array::arrays::dict::DictArray::deref(&self) -> &Self::Target +pub fn vortex_array::arrays::dict::DictData::compute_referenced_values_mask(&self, referenced: bool) -> vortex_error::VortexResult -impl vortex_array::IntoArray for vortex_array::arrays::dict::DictArray +impl core::clone::Clone for vortex_array::arrays::dict::DictData -pub fn vortex_array::arrays::dict::DictArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::dict::DictData::clone(&self) -> vortex_array::arrays::dict::DictData -impl vortex_array::arrow::FromArrowArray<&arrow_array::array::dictionary_array::DictionaryArray> for vortex_array::arrays::dict::DictArray +impl core::convert::From for vortex_array::ArrayRef -pub fn vortex_array::arrays::dict::DictArray::from_arrow(array: &arrow_array::array::dictionary_array::DictionaryArray, nullable: bool) -> vortex_error::VortexResult +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::dict::DictData) -> vortex_array::ArrayRef -pub struct vortex_array::arrays::dict::DictArrayParts +impl core::fmt::Debug for vortex_array::arrays::dict::DictData -pub vortex_array::arrays::dict::DictArrayParts::codes: vortex_array::ArrayRef +pub fn vortex_array::arrays::dict::DictData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub vortex_array::arrays::dict::DictArrayParts::dtype: vortex_array::dtype::DType +impl vortex_array::IntoArray for vortex_array::arrays::dict::DictData -pub vortex_array::arrays::dict::DictArrayParts::values: vortex_array::ArrayRef +pub fn vortex_array::arrays::dict::DictData::into_array(self) -> vortex_array::ArrayRef pub struct vortex_array::arrays::dict::DictMetadata @@ -1982,7 +1916,7 @@ impl vortex_array::kernel::ExecuteParentKernel for vortex_array::arrays::d pub type vortex_array::arrays::dict::TakeExecuteAdaptor::Parent = vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::TakeExecuteAdaptor::execute_parent(&self, array: &::Array, parent: ::Match, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::TakeExecuteAdaptor::execute_parent(&self, array: &vortex_array::vtable::Array, parent: ::Match, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> pub struct vortex_array::arrays::dict::TakeReduceAdaptor(pub V) @@ -1998,11 +1932,11 @@ impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_arra pub type vortex_array::arrays::dict::TakeReduceAdaptor::Parent = vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::TakeReduceAdaptor::reduce_parent(&self, array: &::Array, parent: &vortex_array::arrays::dict::DictArray, child_idx: usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::TakeReduceAdaptor::reduce_parent(&self, array: &vortex_array::vtable::Array, parent: &vortex_array::arrays::dict::DictArray, child_idx: usize) -> vortex_error::VortexResult> pub trait vortex_array::arrays::dict::TakeExecute: vortex_array::vtable::VTable -pub fn vortex_array::arrays::dict::TakeExecute::take(array: &Self::Array, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::TakeExecute::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::dict::TakeExecute for vortex_array::arrays::Bool @@ -2010,66 +1944,68 @@ pub fn vortex_array::arrays::Bool::take(array: &vortex_array::arrays::BoolArray, impl vortex_array::arrays::dict::TakeExecute for vortex_array::arrays::Chunked -pub fn vortex_array::arrays::Chunked::take(array: &vortex_array::arrays::ChunkedArray, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Chunked::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::dict::TakeExecute for vortex_array::arrays::Decimal -pub fn vortex_array::arrays::Decimal::take(array: &vortex_array::arrays::DecimalArray, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Decimal::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::dict::TakeExecute for vortex_array::arrays::Extension -pub fn vortex_array::arrays::Extension::take(array: &vortex_array::arrays::ExtensionArray, indices: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Extension::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::dict::TakeExecute for vortex_array::arrays::FixedSizeList -pub fn vortex_array::arrays::FixedSizeList::take(array: &vortex_array::arrays::FixedSizeListArray, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::FixedSizeList::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::dict::TakeExecute for vortex_array::arrays::List -pub fn vortex_array::arrays::List::take(array: &vortex_array::arrays::ListArray, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::List::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::dict::TakeExecute for vortex_array::arrays::Primitive -pub fn vortex_array::arrays::Primitive::take(array: &vortex_array::arrays::PrimitiveArray, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Primitive::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::dict::TakeExecute for vortex_array::arrays::VarBin -pub fn vortex_array::arrays::VarBin::take(array: &vortex_array::arrays::VarBinArray, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBin::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::dict::TakeExecute for vortex_array::arrays::VarBinView -pub fn vortex_array::arrays::VarBinView::take(array: &vortex_array::arrays::VarBinViewArray, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBinView::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::dict::TakeExecute for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::take(array: &vortex_array::arrays::dict::DictArray, indices: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> pub trait vortex_array::arrays::dict::TakeReduce: vortex_array::vtable::VTable -pub fn vortex_array::arrays::dict::TakeReduce::take(array: &Self::Array, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::TakeReduce::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::arrays::dict::TakeReduce for vortex_array::arrays::Constant -pub fn vortex_array::arrays::Constant::take(array: &vortex_array::arrays::ConstantArray, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Constant::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::arrays::dict::TakeReduce for vortex_array::arrays::ListView -pub fn vortex_array::arrays::ListView::take(array: &vortex_array::arrays::ListViewArray, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::ListView::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::arrays::dict::TakeReduce for vortex_array::arrays::Masked -pub fn vortex_array::arrays::Masked::take(array: &vortex_array::arrays::MaskedArray, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Masked::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::arrays::dict::TakeReduce for vortex_array::arrays::Struct -pub fn vortex_array::arrays::Struct::take(array: &vortex_array::arrays::StructArray, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Struct::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::arrays::dict::TakeReduce for vortex_array::arrays::null::Null -pub fn vortex_array::arrays::null::Null::take(array: &vortex_array::arrays::null::NullArray, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::null::Null::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult> pub fn vortex_array::arrays::dict::take_canonical(values: vortex_array::Canonical, codes: &vortex_array::arrays::PrimitiveArray, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub type vortex_array::arrays::dict::DictArray = vortex_array::vtable::Array + pub mod vortex_array::arrays::extension pub struct vortex_array::arrays::extension::Extension @@ -2088,35 +2024,35 @@ pub fn vortex_array::arrays::Extension::fmt(&self, f: &mut core::fmt::Formatter< impl vortex_array::arrays::dict::TakeExecute for vortex_array::arrays::Extension -pub fn vortex_array::arrays::Extension::take(array: &vortex_array::arrays::ExtensionArray, indices: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Extension::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::filter::FilterReduce for vortex_array::arrays::Extension -pub fn vortex_array::arrays::Extension::filter(array: &vortex_array::arrays::ExtensionArray, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Extension::filter(array: &vortex_array::vtable::Array, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::Extension -pub fn vortex_array::arrays::Extension::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Extension::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::binary::CompareKernel for vortex_array::arrays::Extension -pub fn vortex_array::arrays::Extension::compare(lhs: &vortex_array::arrays::ExtensionArray, rhs: &vortex_array::ArrayRef, operator: vortex_array::scalar_fn::fns::operators::CompareOperator, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Extension::compare(lhs: &vortex_array::vtable::Array, rhs: &vortex_array::ArrayRef, operator: vortex_array::scalar_fn::fns::operators::CompareOperator, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastReduce for vortex_array::arrays::Extension -pub fn vortex_array::arrays::Extension::cast(array: &vortex_array::arrays::ExtensionArray, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Extension::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::Extension -pub fn vortex_array::arrays::Extension::mask(array: &vortex_array::arrays::ExtensionArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Extension::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::Extension -pub fn vortex_array::arrays::Extension::scalar_at(array: &vortex_array::arrays::ExtensionArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Extension::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::Extension -pub type vortex_array::arrays::Extension::Array = vortex_array::arrays::ExtensionArray +pub type vortex_array::arrays::Extension::Array = vortex_array::arrays::ExtensionData pub type vortex_array::arrays::Extension::Metadata = vortex_array::EmptyMetadata @@ -2124,25 +2060,25 @@ pub type vortex_array::arrays::Extension::OperationsVTable = vortex_array::array pub type vortex_array::arrays::Extension::ValidityVTable = vortex_array::vtable::ValidityVTableFromChild -pub fn vortex_array::arrays::Extension::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Extension::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Extension::array_eq(array: &vortex_array::arrays::ExtensionArray, other: &vortex_array::arrays::ExtensionArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Extension::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Extension::array_hash(array: &vortex_array::arrays::ExtensionArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Extension::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Extension::buffer(_array: &vortex_array::arrays::ExtensionArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Extension::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Extension::buffer_name(_array: &vortex_array::arrays::ExtensionArray, _idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Extension::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Extension::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Extension::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Extension::child(array: &vortex_array::arrays::ExtensionArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Extension::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Extension::child_name(_array: &vortex_array::arrays::ExtensionArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Extension::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Extension::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Extension::dtype(array: &vortex_array::arrays::ExtensionArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Extension::dtype(array: &vortex_array::arrays::ExtensionData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Extension::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -2150,13 +2086,13 @@ pub fn vortex_array::arrays::Extension::execute_parent(array: &vortex_array::vta pub fn vortex_array::arrays::Extension::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Extension::len(array: &vortex_array::arrays::ExtensionArray) -> usize +pub fn vortex_array::arrays::Extension::len(array: &vortex_array::arrays::ExtensionData) -> usize -pub fn vortex_array::arrays::Extension::metadata(_array: &vortex_array::arrays::ExtensionArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Extension::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Extension::nbuffers(_array: &vortex_array::arrays::ExtensionArray) -> usize +pub fn vortex_array::arrays::Extension::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Extension::nchildren(_array: &vortex_array::arrays::ExtensionArray) -> usize +pub fn vortex_array::arrays::Extension::nchildren(_array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Extension::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -2164,7 +2100,7 @@ pub fn vortex_array::arrays::Extension::reduce_parent(array: &vortex_array::vtab pub fn vortex_array::arrays::Extension::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Extension::stats(array: &vortex_array::arrays::ExtensionArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Extension::stats(array: &vortex_array::arrays::ExtensionData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Extension::vtable(_array: &Self::Array) -> &Self @@ -2172,69 +2108,45 @@ pub fn vortex_array::arrays::Extension::with_children(array: &mut Self::Array, c impl vortex_array::vtable::ValidityChild for vortex_array::arrays::Extension -pub fn vortex_array::arrays::Extension::validity_child(array: &vortex_array::arrays::ExtensionArray) -> &vortex_array::ArrayRef - -pub struct vortex_array::arrays::extension::ExtensionArray - -impl vortex_array::arrays::ExtensionArray - -pub fn vortex_array::arrays::ExtensionArray::ext_dtype(&self) -> &vortex_array::dtype::extension::ExtDTypeRef - -pub fn vortex_array::arrays::ExtensionArray::new(ext_dtype: vortex_array::dtype::extension::ExtDTypeRef, storage_array: vortex_array::ArrayRef) -> Self - -pub unsafe fn vortex_array::arrays::ExtensionArray::new_unchecked(ext_dtype: vortex_array::dtype::extension::ExtDTypeRef, storage_array: vortex_array::ArrayRef) -> Self - -pub fn vortex_array::arrays::ExtensionArray::storage_array(&self) -> &vortex_array::ArrayRef +pub fn vortex_array::arrays::Extension::validity_child(array: &vortex_array::arrays::ExtensionData) -> &vortex_array::ArrayRef -pub fn vortex_array::arrays::ExtensionArray::try_new(ext_dtype: vortex_array::dtype::extension::ExtDTypeRef, storage_array: vortex_array::ArrayRef) -> vortex_error::VortexResult +pub struct vortex_array::arrays::extension::ExtensionData -impl vortex_array::arrays::ExtensionArray +impl vortex_array::arrays::ExtensionData -pub fn vortex_array::arrays::ExtensionArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ExtensionData::dtype(&self) -> &vortex_array::dtype::DType -impl core::clone::Clone for vortex_array::arrays::ExtensionArray +pub fn vortex_array::arrays::ExtensionData::ext_dtype(&self) -> &vortex_array::dtype::extension::ExtDTypeRef -pub fn vortex_array::arrays::ExtensionArray::clone(&self) -> vortex_array::arrays::ExtensionArray +pub fn vortex_array::arrays::ExtensionData::is_empty(&self) -> bool -impl core::convert::AsRef for vortex_array::arrays::ExtensionArray +pub fn vortex_array::arrays::ExtensionData::len(&self) -> usize -pub fn vortex_array::arrays::ExtensionArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub fn vortex_array::arrays::ExtensionData::new(ext_dtype: vortex_array::dtype::extension::ExtDTypeRef, storage_array: vortex_array::ArrayRef) -> Self -impl core::convert::From<&vortex_array::arrays::datetime::TemporalArray> for vortex_array::arrays::ExtensionArray +pub unsafe fn vortex_array::arrays::ExtensionData::new_unchecked(ext_dtype: vortex_array::dtype::extension::ExtDTypeRef, storage_array: vortex_array::ArrayRef) -> Self -pub fn vortex_array::arrays::ExtensionArray::from(value: &vortex_array::arrays::datetime::TemporalArray) -> Self +pub fn vortex_array::arrays::ExtensionData::storage_array(&self) -> &vortex_array::ArrayRef -impl core::convert::From for vortex_array::ArrayRef +pub fn vortex_array::arrays::ExtensionData::try_new(ext_dtype: vortex_array::dtype::extension::ExtDTypeRef, storage_array: vortex_array::ArrayRef) -> vortex_error::VortexResult -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::ExtensionArray) -> vortex_array::ArrayRef +impl core::clone::Clone for vortex_array::arrays::ExtensionData -impl core::convert::From for vortex_array::arrays::ExtensionArray +pub fn vortex_array::arrays::ExtensionData::clone(&self) -> vortex_array::arrays::ExtensionData -pub fn vortex_array::arrays::ExtensionArray::from(value: vortex_array::arrays::datetime::TemporalArray) -> Self +impl core::convert::From for vortex_array::ArrayRef -impl core::convert::TryFrom for vortex_array::arrays::datetime::TemporalArray +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::ExtensionData) -> vortex_array::ArrayRef -pub type vortex_array::arrays::datetime::TemporalArray::Error = vortex_error::VortexError +impl core::fmt::Debug for vortex_array::arrays::ExtensionData -pub fn vortex_array::arrays::datetime::TemporalArray::try_from(ext: vortex_array::arrays::ExtensionArray) -> core::result::Result +pub fn vortex_array::arrays::ExtensionData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -impl core::fmt::Debug for vortex_array::arrays::ExtensionArray +impl vortex_array::IntoArray for vortex_array::arrays::ExtensionData -pub fn vortex_array::arrays::ExtensionArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_array::arrays::ExtensionData::into_array(self) -> vortex_array::ArrayRef -impl core::ops::deref::Deref for vortex_array::arrays::ExtensionArray - -pub type vortex_array::arrays::ExtensionArray::Target = dyn vortex_array::DynArray - -pub fn vortex_array::arrays::ExtensionArray::deref(&self) -> &Self::Target - -impl vortex_array::Executable for vortex_array::arrays::ExtensionArray - -pub fn vortex_array::arrays::ExtensionArray::execute(array: vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult - -impl vortex_array::IntoArray for vortex_array::arrays::ExtensionArray - -pub fn vortex_array::arrays::ExtensionArray::into_array(self) -> vortex_array::ArrayRef +pub type vortex_array::arrays::extension::ExtensionArray = vortex_array::vtable::Array pub mod vortex_array::arrays::filter @@ -2254,11 +2166,11 @@ pub fn vortex_array::arrays::Filter::fmt(&self, f: &mut core::fmt::Formatter<'_> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::Filter -pub fn vortex_array::arrays::Filter::scalar_at(array: &vortex_array::arrays::FilterArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Filter::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::Filter -pub type vortex_array::arrays::Filter::Array = vortex_array::arrays::FilterArray +pub type vortex_array::arrays::Filter::Array = vortex_array::arrays::FilterData pub type vortex_array::arrays::Filter::Metadata = vortex_array::arrays::filter::vtable::FilterMetadata @@ -2266,25 +2178,25 @@ pub type vortex_array::arrays::Filter::OperationsVTable = vortex_array::arrays:: pub type vortex_array::arrays::Filter::ValidityVTable = vortex_array::arrays::Filter -pub fn vortex_array::arrays::Filter::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Filter::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Filter::array_eq(array: &vortex_array::arrays::FilterArray, other: &vortex_array::arrays::FilterArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Filter::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Filter::array_hash(array: &vortex_array::arrays::FilterArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Filter::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Filter::buffer(_array: &Self::Array, _idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Filter::buffer(_array: &vortex_array::vtable::Array, _idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Filter::buffer_name(_array: &Self::Array, _idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Filter::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Filter::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &vortex_array::arrays::filter::vtable::FilterMetadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Filter::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &vortex_array::arrays::filter::vtable::FilterMetadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Filter::child(array: &Self::Array, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Filter::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Filter::child_name(_array: &Self::Array, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Filter::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Filter::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Filter::dtype(array: &vortex_array::arrays::FilterArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Filter::dtype(array: &vortex_array::arrays::FilterData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Filter::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -2292,13 +2204,13 @@ pub fn vortex_array::arrays::Filter::execute_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Filter::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Filter::len(array: &vortex_array::arrays::FilterArray) -> usize +pub fn vortex_array::arrays::Filter::len(array: &vortex_array::arrays::FilterData) -> usize -pub fn vortex_array::arrays::Filter::metadata(array: &Self::Array) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Filter::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Filter::nbuffers(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::Filter::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Filter::nchildren(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::Filter::nchildren(_array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Filter::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -2306,65 +2218,59 @@ pub fn vortex_array::arrays::Filter::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::Filter::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Filter::stats(array: &vortex_array::arrays::FilterArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Filter::stats(array: &vortex_array::arrays::FilterData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Filter::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Filter::vtable(_array: &vortex_array::arrays::FilterData) -> &Self pub fn vortex_array::arrays::Filter::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Filter -pub fn vortex_array::arrays::Filter::validity(array: &vortex_array::arrays::FilterArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Filter::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub struct vortex_array::arrays::filter::FilterArray - -impl vortex_array::arrays::FilterArray - -pub fn vortex_array::arrays::FilterArray::child(&self) -> &vortex_array::ArrayRef - -pub fn vortex_array::arrays::FilterArray::filter_mask(&self) -> &vortex_mask::Mask +pub struct vortex_array::arrays::filter::FilterArrayParts -pub fn vortex_array::arrays::FilterArray::into_parts(self) -> vortex_array::arrays::filter::FilterArrayParts +pub vortex_array::arrays::filter::FilterArrayParts::child: vortex_array::ArrayRef -pub fn vortex_array::arrays::FilterArray::new(array: vortex_array::ArrayRef, mask: vortex_mask::Mask) -> Self +pub vortex_array::arrays::filter::FilterArrayParts::mask: vortex_mask::Mask -pub fn vortex_array::arrays::FilterArray::try_new(array: vortex_array::ArrayRef, mask: vortex_mask::Mask) -> vortex_error::VortexResult +pub struct vortex_array::arrays::filter::FilterData -impl vortex_array::arrays::FilterArray +impl vortex_array::arrays::FilterData -pub fn vortex_array::arrays::FilterArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::FilterData::child(&self) -> &vortex_array::ArrayRef -impl core::clone::Clone for vortex_array::arrays::FilterArray +pub fn vortex_array::arrays::FilterData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_array::arrays::FilterArray::clone(&self) -> vortex_array::arrays::FilterArray +pub fn vortex_array::arrays::FilterData::filter_mask(&self) -> &vortex_mask::Mask -impl core::convert::AsRef for vortex_array::arrays::FilterArray +pub fn vortex_array::arrays::FilterData::is_empty(&self) -> bool -pub fn vortex_array::arrays::FilterArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub fn vortex_array::arrays::FilterData::len(&self) -> usize -impl core::convert::From for vortex_array::ArrayRef +pub fn vortex_array::arrays::FilterData::new(array: vortex_array::ArrayRef, mask: vortex_mask::Mask) -> Self -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::FilterArray) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::FilterData::try_new(array: vortex_array::ArrayRef, mask: vortex_mask::Mask) -> vortex_error::VortexResult -impl core::fmt::Debug for vortex_array::arrays::FilterArray +impl vortex_array::arrays::FilterData -pub fn vortex_array::arrays::FilterArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_array::arrays::FilterData::into_parts(self) -> vortex_array::arrays::filter::FilterArrayParts -impl core::ops::deref::Deref for vortex_array::arrays::FilterArray +impl core::clone::Clone for vortex_array::arrays::FilterData -pub type vortex_array::arrays::FilterArray::Target = dyn vortex_array::DynArray +pub fn vortex_array::arrays::FilterData::clone(&self) -> vortex_array::arrays::FilterData -pub fn vortex_array::arrays::FilterArray::deref(&self) -> &Self::Target +impl core::convert::From for vortex_array::ArrayRef -impl vortex_array::IntoArray for vortex_array::arrays::FilterArray +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::FilterData) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::FilterArray::into_array(self) -> vortex_array::ArrayRef +impl core::fmt::Debug for vortex_array::arrays::FilterData -pub struct vortex_array::arrays::filter::FilterArrayParts +pub fn vortex_array::arrays::FilterData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub vortex_array::arrays::filter::FilterArrayParts::child: vortex_array::ArrayRef +impl vortex_array::IntoArray for vortex_array::arrays::FilterData -pub vortex_array::arrays::filter::FilterArrayParts::mask: vortex_mask::Mask +pub fn vortex_array::arrays::FilterData::into_array(self) -> vortex_array::ArrayRef pub struct vortex_array::arrays::filter::FilterExecuteAdaptor(pub V) @@ -2380,7 +2286,7 @@ impl vortex_array::kernel::ExecuteParentKernel for vortex_array::arrays::f pub type vortex_array::arrays::filter::FilterExecuteAdaptor::Parent = vortex_array::arrays::Filter -pub fn vortex_array::arrays::filter::FilterExecuteAdaptor::execute_parent(&self, array: &::Array, parent: ::Match, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::filter::FilterExecuteAdaptor::execute_parent(&self, array: &vortex_array::vtable::Array, parent: ::Match, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> pub struct vortex_array::arrays::filter::FilterReduceAdaptor(pub V) @@ -2396,27 +2302,27 @@ impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_arra pub type vortex_array::arrays::filter::FilterReduceAdaptor::Parent = vortex_array::arrays::Filter -pub fn vortex_array::arrays::filter::FilterReduceAdaptor::reduce_parent(&self, array: &::Array, parent: &vortex_array::arrays::FilterArray, child_idx: usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::filter::FilterReduceAdaptor::reduce_parent(&self, array: &vortex_array::vtable::Array, parent: &vortex_array::arrays::FilterArray, child_idx: usize) -> vortex_error::VortexResult> pub trait vortex_array::arrays::filter::FilterKernel: vortex_array::vtable::VTable -pub fn vortex_array::arrays::filter::FilterKernel::filter(array: &Self::Array, mask: &vortex_mask::Mask, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::filter::FilterKernel::filter(array: &vortex_array::vtable::Array, mask: &vortex_mask::Mask, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::filter::FilterKernel for vortex_array::arrays::Chunked -pub fn vortex_array::arrays::Chunked::filter(array: &vortex_array::arrays::ChunkedArray, mask: &vortex_mask::Mask, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Chunked::filter(array: &vortex_array::vtable::Array, mask: &vortex_mask::Mask, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::filter::FilterKernel for vortex_array::arrays::List -pub fn vortex_array::arrays::List::filter(array: &vortex_array::arrays::ListArray, mask: &vortex_mask::Mask, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::List::filter(array: &vortex_array::vtable::Array, mask: &vortex_mask::Mask, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::filter::FilterKernel for vortex_array::arrays::VarBin -pub fn vortex_array::arrays::VarBin::filter(array: &vortex_array::arrays::VarBinArray, mask: &vortex_mask::Mask, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBin::filter(array: &vortex_array::vtable::Array, mask: &vortex_mask::Mask, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> pub trait vortex_array::arrays::filter::FilterReduce: vortex_array::vtable::VTable -pub fn vortex_array::arrays::filter::FilterReduce::filter(array: &Self::Array, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::filter::FilterReduce::filter(array: &vortex_array::vtable::Array, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> impl vortex_array::arrays::filter::FilterReduce for vortex_array::arrays::Bool @@ -2424,23 +2330,25 @@ pub fn vortex_array::arrays::Bool::filter(array: &vortex_array::arrays::BoolArra impl vortex_array::arrays::filter::FilterReduce for vortex_array::arrays::Constant -pub fn vortex_array::arrays::Constant::filter(array: &vortex_array::arrays::ConstantArray, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Constant::filter(array: &vortex_array::vtable::Array, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> impl vortex_array::arrays::filter::FilterReduce for vortex_array::arrays::Extension -pub fn vortex_array::arrays::Extension::filter(array: &vortex_array::arrays::ExtensionArray, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Extension::filter(array: &vortex_array::vtable::Array, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> impl vortex_array::arrays::filter::FilterReduce for vortex_array::arrays::Masked -pub fn vortex_array::arrays::Masked::filter(array: &vortex_array::arrays::MaskedArray, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Masked::filter(array: &vortex_array::vtable::Array, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> impl vortex_array::arrays::filter::FilterReduce for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::filter(array: &vortex_array::arrays::dict::DictArray, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::filter(array: &vortex_array::vtable::Array, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> impl vortex_array::arrays::filter::FilterReduce for vortex_array::arrays::null::Null -pub fn vortex_array::arrays::null::Null::filter(_array: &vortex_array::arrays::null::NullArray, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::null::Null::filter(_array: &vortex_array::vtable::Array, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> + +pub type vortex_array::arrays::filter::FilterArray = vortex_array::vtable::Array pub mod vortex_array::arrays::fixed_size_list @@ -2460,27 +2368,27 @@ pub fn vortex_array::arrays::FixedSizeList::fmt(&self, f: &mut core::fmt::Format impl vortex_array::arrays::dict::TakeExecute for vortex_array::arrays::FixedSizeList -pub fn vortex_array::arrays::FixedSizeList::take(array: &vortex_array::arrays::FixedSizeListArray, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::FixedSizeList::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::FixedSizeList -pub fn vortex_array::arrays::FixedSizeList::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::FixedSizeList::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastReduce for vortex_array::arrays::FixedSizeList -pub fn vortex_array::arrays::FixedSizeList::cast(array: &vortex_array::arrays::FixedSizeListArray, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::FixedSizeList::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::FixedSizeList -pub fn vortex_array::arrays::FixedSizeList::mask(array: &vortex_array::arrays::FixedSizeListArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::FixedSizeList::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::FixedSizeList -pub fn vortex_array::arrays::FixedSizeList::scalar_at(array: &vortex_array::arrays::FixedSizeListArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::FixedSizeList::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::FixedSizeList -pub type vortex_array::arrays::FixedSizeList::Array = vortex_array::arrays::FixedSizeListArray +pub type vortex_array::arrays::FixedSizeList::Array = vortex_array::arrays::FixedSizeListData pub type vortex_array::arrays::FixedSizeList::Metadata = vortex_array::EmptyMetadata @@ -2488,25 +2396,25 @@ pub type vortex_array::arrays::FixedSizeList::OperationsVTable = vortex_array::a pub type vortex_array::arrays::FixedSizeList::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::FixedSizeList::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::FixedSizeList::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::FixedSizeList::array_eq(array: &vortex_array::arrays::FixedSizeListArray, other: &vortex_array::arrays::FixedSizeListArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::FixedSizeList::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::FixedSizeList::array_hash(array: &vortex_array::arrays::FixedSizeListArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::FixedSizeList::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::FixedSizeList::buffer(_array: &vortex_array::arrays::FixedSizeListArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::FixedSizeList::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::FixedSizeList::buffer_name(_array: &vortex_array::arrays::FixedSizeListArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::FixedSizeList::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::FixedSizeList::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::FixedSizeList::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::FixedSizeList::child(array: &vortex_array::arrays::FixedSizeListArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::FixedSizeList::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::FixedSizeList::child_name(_array: &vortex_array::arrays::FixedSizeListArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::FixedSizeList::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::FixedSizeList::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::FixedSizeList::dtype(array: &vortex_array::arrays::FixedSizeListArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::FixedSizeList::dtype(array: &vortex_array::arrays::FixedSizeListData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::FixedSizeList::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -2514,13 +2422,13 @@ pub fn vortex_array::arrays::FixedSizeList::execute_parent(array: &vortex_array: pub fn vortex_array::arrays::FixedSizeList::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::FixedSizeList::len(array: &vortex_array::arrays::FixedSizeListArray) -> usize +pub fn vortex_array::arrays::FixedSizeList::len(array: &vortex_array::arrays::FixedSizeListData) -> usize -pub fn vortex_array::arrays::FixedSizeList::metadata(_array: &vortex_array::arrays::FixedSizeListArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::FixedSizeList::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::FixedSizeList::nbuffers(_array: &vortex_array::arrays::FixedSizeListArray) -> usize +pub fn vortex_array::arrays::FixedSizeList::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::FixedSizeList::nchildren(array: &vortex_array::arrays::FixedSizeListArray) -> usize +pub fn vortex_array::arrays::FixedSizeList::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::FixedSizeList::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -2528,69 +2436,65 @@ pub fn vortex_array::arrays::FixedSizeList::reduce_parent(array: &vortex_array:: pub fn vortex_array::arrays::FixedSizeList::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::FixedSizeList::stats(array: &vortex_array::arrays::FixedSizeListArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::FixedSizeList::stats(array: &vortex_array::arrays::FixedSizeListData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::FixedSizeList::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::FixedSizeList::vtable(_array: &vortex_array::arrays::FixedSizeListData) -> &Self pub fn vortex_array::arrays::FixedSizeList::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> -pub struct vortex_array::arrays::fixed_size_list::FixedSizeListArray - -impl vortex_array::arrays::FixedSizeListArray - -pub fn vortex_array::arrays::FixedSizeListArray::elements(&self) -> &vortex_array::ArrayRef +pub struct vortex_array::arrays::fixed_size_list::FixedSizeListData -pub fn vortex_array::arrays::FixedSizeListArray::fixed_size_list_elements_at(&self, index: usize) -> vortex_error::VortexResult +impl vortex_array::arrays::FixedSizeListData -pub fn vortex_array::arrays::FixedSizeListArray::into_parts(self) -> (vortex_array::ArrayRef, vortex_array::validity::Validity, vortex_array::dtype::DType) +pub fn vortex_array::arrays::FixedSizeListData::dtype(&self) -> &vortex_array::dtype::DType -pub const fn vortex_array::arrays::FixedSizeListArray::list_size(&self) -> u32 +pub fn vortex_array::arrays::FixedSizeListData::elements(&self) -> &vortex_array::ArrayRef -pub fn vortex_array::arrays::FixedSizeListArray::new(elements: vortex_array::ArrayRef, list_size: u32, validity: vortex_array::validity::Validity, len: usize) -> Self +pub fn vortex_array::arrays::FixedSizeListData::into_parts(self) -> (vortex_array::ArrayRef, vortex_array::validity::Validity, vortex_array::dtype::DType) -pub unsafe fn vortex_array::arrays::FixedSizeListArray::new_unchecked(elements: vortex_array::ArrayRef, list_size: u32, validity: vortex_array::validity::Validity, len: usize) -> Self +pub fn vortex_array::arrays::FixedSizeListData::is_empty(&self) -> bool -pub fn vortex_array::arrays::FixedSizeListArray::try_new(elements: vortex_array::ArrayRef, list_size: u32, validity: vortex_array::validity::Validity, len: usize) -> vortex_error::VortexResult +pub fn vortex_array::arrays::FixedSizeListData::len(&self) -> usize -pub fn vortex_array::arrays::FixedSizeListArray::validate(elements: &vortex_array::ArrayRef, len: usize, list_size: u32, validity: &vortex_array::validity::Validity) -> vortex_error::VortexResult<()> +pub const fn vortex_array::arrays::FixedSizeListData::list_size(&self) -> u32 -impl vortex_array::arrays::FixedSizeListArray +pub fn vortex_array::arrays::FixedSizeListData::new(elements: vortex_array::ArrayRef, list_size: u32, validity: vortex_array::validity::Validity, len: usize) -> Self -pub fn vortex_array::arrays::FixedSizeListArray::to_array(&self) -> vortex_array::ArrayRef +pub unsafe fn vortex_array::arrays::FixedSizeListData::new_unchecked(elements: vortex_array::ArrayRef, list_size: u32, validity: vortex_array::validity::Validity, len: usize) -> Self -impl core::clone::Clone for vortex_array::arrays::FixedSizeListArray +pub fn vortex_array::arrays::FixedSizeListData::try_new(elements: vortex_array::ArrayRef, list_size: u32, validity: vortex_array::validity::Validity, len: usize) -> vortex_error::VortexResult -pub fn vortex_array::arrays::FixedSizeListArray::clone(&self) -> vortex_array::arrays::FixedSizeListArray +pub fn vortex_array::arrays::FixedSizeListData::validate(elements: &vortex_array::ArrayRef, len: usize, list_size: u32, validity: &vortex_array::validity::Validity) -> vortex_error::VortexResult<()> -impl core::convert::AsRef for vortex_array::arrays::FixedSizeListArray +pub fn vortex_array::arrays::FixedSizeListData::validity(&self) -> &vortex_array::validity::Validity -pub fn vortex_array::arrays::FixedSizeListArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub fn vortex_array::arrays::FixedSizeListData::validity_mask(&self) -> vortex_mask::Mask -impl core::convert::From for vortex_array::ArrayRef +impl vortex_array::arrays::FixedSizeListData -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::FixedSizeListArray) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::FixedSizeListData::fixed_size_list_elements_at(&self, index: usize) -> vortex_error::VortexResult -impl core::fmt::Debug for vortex_array::arrays::FixedSizeListArray +impl core::clone::Clone for vortex_array::arrays::FixedSizeListData -pub fn vortex_array::arrays::FixedSizeListArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_array::arrays::FixedSizeListData::clone(&self) -> vortex_array::arrays::FixedSizeListData -impl core::ops::deref::Deref for vortex_array::arrays::FixedSizeListArray +impl core::convert::From for vortex_array::ArrayRef -pub type vortex_array::arrays::FixedSizeListArray::Target = dyn vortex_array::DynArray +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::FixedSizeListData) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::FixedSizeListArray::deref(&self) -> &Self::Target +impl core::fmt::Debug for vortex_array::arrays::FixedSizeListData -impl vortex_array::Executable for vortex_array::arrays::FixedSizeListArray +pub fn vortex_array::arrays::FixedSizeListData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub fn vortex_array::arrays::FixedSizeListArray::execute(array: vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +impl vortex_array::IntoArray for vortex_array::arrays::FixedSizeListData -impl vortex_array::IntoArray for vortex_array::arrays::FixedSizeListArray +pub fn vortex_array::arrays::FixedSizeListData::into_array(self) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::FixedSizeListArray::into_array(self) -> vortex_array::ArrayRef +impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::FixedSizeListData -impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::FixedSizeListArray +pub fn vortex_array::arrays::FixedSizeListData::validity(&self) -> &vortex_array::validity::Validity -pub fn vortex_array::arrays::FixedSizeListArray::validity(&self) -> &vortex_array::validity::Validity +pub type vortex_array::arrays::fixed_size_list::FixedSizeListArray = vortex_array::vtable::Array pub mod vortex_array::arrays::list @@ -2610,31 +2514,31 @@ pub fn vortex_array::arrays::List::fmt(&self, f: &mut core::fmt::Formatter<'_>) impl vortex_array::arrays::dict::TakeExecute for vortex_array::arrays::List -pub fn vortex_array::arrays::List::take(array: &vortex_array::arrays::ListArray, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::List::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::filter::FilterKernel for vortex_array::arrays::List -pub fn vortex_array::arrays::List::filter(array: &vortex_array::arrays::ListArray, mask: &vortex_mask::Mask, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::List::filter(array: &vortex_array::vtable::Array, mask: &vortex_mask::Mask, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::List -pub fn vortex_array::arrays::List::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::List::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastReduce for vortex_array::arrays::List -pub fn vortex_array::arrays::List::cast(array: &vortex_array::arrays::ListArray, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::List::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::List -pub fn vortex_array::arrays::List::mask(array: &vortex_array::arrays::ListArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::List::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::List -pub fn vortex_array::arrays::List::scalar_at(array: &vortex_array::arrays::ListArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::List::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::List -pub type vortex_array::arrays::List::Array = vortex_array::arrays::ListArray +pub type vortex_array::arrays::List::Array = vortex_array::arrays::ListData pub type vortex_array::arrays::List::Metadata = vortex_array::ProstMetadata @@ -2642,25 +2546,25 @@ pub type vortex_array::arrays::List::OperationsVTable = vortex_array::arrays::Li pub type vortex_array::arrays::List::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::List::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::List::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::List::array_eq(array: &vortex_array::arrays::ListArray, other: &vortex_array::arrays::ListArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::List::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::List::array_hash(array: &vortex_array::arrays::ListArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::List::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::List::buffer(_array: &vortex_array::arrays::ListArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::List::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::List::buffer_name(_array: &vortex_array::arrays::ListArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::List::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::List::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::List::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::List::child(array: &vortex_array::arrays::ListArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::List::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::List::child_name(_array: &vortex_array::arrays::ListArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::List::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::List::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::List::dtype(array: &vortex_array::arrays::ListArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::List::dtype(array: &vortex_array::arrays::ListData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::List::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -2668,13 +2572,13 @@ pub fn vortex_array::arrays::List::execute_parent(array: &vortex_array::vtable:: pub fn vortex_array::arrays::List::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::List::len(array: &vortex_array::arrays::ListArray) -> usize +pub fn vortex_array::arrays::List::len(array: &vortex_array::arrays::ListData) -> usize -pub fn vortex_array::arrays::List::metadata(array: &vortex_array::arrays::ListArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::List::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::List::nbuffers(_array: &vortex_array::arrays::ListArray) -> usize +pub fn vortex_array::arrays::List::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::List::nchildren(array: &vortex_array::arrays::ListArray) -> usize +pub fn vortex_array::arrays::List::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::List::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -2682,83 +2586,83 @@ pub fn vortex_array::arrays::List::reduce_parent(array: &vortex_array::vtable::A pub fn vortex_array::arrays::List::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::List::stats(array: &vortex_array::arrays::ListArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::List::stats(array: &vortex_array::arrays::ListData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::List::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::List::vtable(_array: &vortex_array::arrays::ListData) -> &Self pub fn vortex_array::arrays::List::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> -pub struct vortex_array::arrays::list::ListArray +pub struct vortex_array::arrays::list::ListArrayParts -impl vortex_array::arrays::ListArray +pub vortex_array::arrays::list::ListArrayParts::dtype: vortex_array::dtype::DType -pub fn vortex_array::arrays::ListArray::element_dtype(&self) -> &alloc::sync::Arc +pub vortex_array::arrays::list::ListArrayParts::elements: vortex_array::ArrayRef -pub fn vortex_array::arrays::ListArray::elements(&self) -> &vortex_array::ArrayRef +pub vortex_array::arrays::list::ListArrayParts::offsets: vortex_array::ArrayRef -pub fn vortex_array::arrays::ListArray::into_parts(self) -> vortex_array::arrays::list::ListArrayParts +pub vortex_array::arrays::list::ListArrayParts::validity: vortex_array::validity::Validity -pub fn vortex_array::arrays::ListArray::list_elements_at(&self, index: usize) -> vortex_error::VortexResult +pub struct vortex_array::arrays::list::ListData -pub fn vortex_array::arrays::ListArray::new(elements: vortex_array::ArrayRef, offsets: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> Self +impl vortex_array::arrays::ListData -pub unsafe fn vortex_array::arrays::ListArray::new_unchecked(elements: vortex_array::ArrayRef, offsets: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> Self +pub fn vortex_array::arrays::ListData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_array::arrays::ListArray::offset_at(&self, index: usize) -> vortex_error::VortexResult +pub fn vortex_array::arrays::ListData::element_dtype(&self) -> &alloc::sync::Arc -pub fn vortex_array::arrays::ListArray::offsets(&self) -> &vortex_array::ArrayRef +pub fn vortex_array::arrays::ListData::elements(&self) -> &vortex_array::ArrayRef -pub fn vortex_array::arrays::ListArray::reset_offsets(&self, recurse: bool) -> vortex_error::VortexResult +pub fn vortex_array::arrays::ListData::into_parts(self) -> vortex_array::arrays::list::ListArrayParts -pub fn vortex_array::arrays::ListArray::sliced_elements(&self) -> vortex_error::VortexResult +pub fn vortex_array::arrays::ListData::is_empty(&self) -> bool -pub fn vortex_array::arrays::ListArray::try_new(elements: vortex_array::ArrayRef, offsets: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult +pub fn vortex_array::arrays::ListData::len(&self) -> usize -pub fn vortex_array::arrays::ListArray::validate(elements: &vortex_array::ArrayRef, offsets: &vortex_array::ArrayRef, validity: &vortex_array::validity::Validity) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::ListData::list_elements_at(&self, index: usize) -> vortex_error::VortexResult -impl vortex_array::arrays::ListArray +pub fn vortex_array::arrays::ListData::new(elements: vortex_array::ArrayRef, offsets: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::ListArray::to_array(&self) -> vortex_array::ArrayRef +pub unsafe fn vortex_array::arrays::ListData::new_unchecked(elements: vortex_array::ArrayRef, offsets: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> Self -impl core::clone::Clone for vortex_array::arrays::ListArray +pub fn vortex_array::arrays::ListData::offset_at(&self, index: usize) -> vortex_error::VortexResult -pub fn vortex_array::arrays::ListArray::clone(&self) -> vortex_array::arrays::ListArray +pub fn vortex_array::arrays::ListData::offsets(&self) -> &vortex_array::ArrayRef -impl core::convert::AsRef for vortex_array::arrays::ListArray +pub fn vortex_array::arrays::ListData::sliced_elements(&self) -> vortex_error::VortexResult -pub fn vortex_array::arrays::ListArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub fn vortex_array::arrays::ListData::try_new(elements: vortex_array::ArrayRef, offsets: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult -impl core::convert::From for vortex_array::ArrayRef +pub fn vortex_array::arrays::ListData::validate(elements: &vortex_array::ArrayRef, offsets: &vortex_array::ArrayRef, validity: &vortex_array::validity::Validity) -> vortex_error::VortexResult<()> -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::ListArray) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ListData::validity(&self) -> &vortex_array::validity::Validity -impl core::fmt::Debug for vortex_array::arrays::ListArray +pub fn vortex_array::arrays::ListData::validity_mask(&self) -> vortex_mask::Mask -pub fn vortex_array::arrays::ListArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl vortex_array::arrays::ListData -impl core::ops::deref::Deref for vortex_array::arrays::ListArray +pub fn vortex_array::arrays::ListData::reset_offsets(&self, recurse: bool) -> vortex_error::VortexResult -pub type vortex_array::arrays::ListArray::Target = dyn vortex_array::DynArray +impl core::clone::Clone for vortex_array::arrays::ListData -pub fn vortex_array::arrays::ListArray::deref(&self) -> &Self::Target +pub fn vortex_array::arrays::ListData::clone(&self) -> vortex_array::arrays::ListData -impl vortex_array::IntoArray for vortex_array::arrays::ListArray +impl core::convert::From for vortex_array::ArrayRef -pub fn vortex_array::arrays::ListArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::ListData) -> vortex_array::ArrayRef -impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::ListArray +impl core::fmt::Debug for vortex_array::arrays::ListData -pub fn vortex_array::arrays::ListArray::validity(&self) -> &vortex_array::validity::Validity +pub fn vortex_array::arrays::ListData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub struct vortex_array::arrays::list::ListArrayParts +impl vortex_array::IntoArray for vortex_array::arrays::ListData -pub vortex_array::arrays::list::ListArrayParts::dtype: vortex_array::dtype::DType +pub fn vortex_array::arrays::ListData::into_array(self) -> vortex_array::ArrayRef -pub vortex_array::arrays::list::ListArrayParts::elements: vortex_array::ArrayRef +impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::ListData -pub vortex_array::arrays::list::ListArrayParts::offsets: vortex_array::ArrayRef +pub fn vortex_array::arrays::ListData::validity(&self) -> &vortex_array::validity::Validity -pub vortex_array::arrays::list::ListArrayParts::validity: vortex_array::validity::Validity +pub type vortex_array::arrays::list::ListArray = vortex_array::vtable::Array pub mod vortex_array::arrays::listview @@ -2788,27 +2692,27 @@ pub fn vortex_array::arrays::ListView::fmt(&self, f: &mut core::fmt::Formatter<' impl vortex_array::arrays::dict::TakeReduce for vortex_array::arrays::ListView -pub fn vortex_array::arrays::ListView::take(array: &vortex_array::arrays::ListViewArray, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::ListView::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::ListView -pub fn vortex_array::arrays::ListView::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::ListView::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastReduce for vortex_array::arrays::ListView -pub fn vortex_array::arrays::ListView::cast(array: &vortex_array::arrays::ListViewArray, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::ListView::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::ListView -pub fn vortex_array::arrays::ListView::mask(array: &vortex_array::arrays::ListViewArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::ListView::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::ListView -pub fn vortex_array::arrays::ListView::scalar_at(array: &vortex_array::arrays::ListViewArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::ListView::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::ListView -pub type vortex_array::arrays::ListView::Array = vortex_array::arrays::ListViewArray +pub type vortex_array::arrays::ListView::Array = vortex_array::arrays::ListViewData pub type vortex_array::arrays::ListView::Metadata = vortex_array::ProstMetadata @@ -2816,25 +2720,25 @@ pub type vortex_array::arrays::ListView::OperationsVTable = vortex_array::arrays pub type vortex_array::arrays::ListView::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::ListView::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::ListView::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::ListView::array_eq(array: &vortex_array::arrays::ListViewArray, other: &vortex_array::arrays::ListViewArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::ListView::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::ListView::array_hash(array: &vortex_array::arrays::ListViewArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::ListView::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::ListView::buffer(_array: &vortex_array::arrays::ListViewArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::ListView::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::ListView::buffer_name(_array: &vortex_array::arrays::ListViewArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::ListView::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::ListView::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::ListView::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::ListView::child(array: &vortex_array::arrays::ListViewArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ListView::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::ListView::child_name(_array: &vortex_array::arrays::ListViewArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::ListView::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::ListView::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::ListView::dtype(array: &vortex_array::arrays::ListViewArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::ListView::dtype(array: &vortex_array::arrays::ListViewData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::ListView::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -2842,13 +2746,13 @@ pub fn vortex_array::arrays::ListView::execute_parent(array: &vortex_array::vtab pub fn vortex_array::arrays::ListView::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::ListView::len(array: &vortex_array::arrays::ListViewArray) -> usize +pub fn vortex_array::arrays::ListView::len(array: &vortex_array::arrays::ListViewData) -> usize -pub fn vortex_array::arrays::ListView::metadata(array: &vortex_array::arrays::ListViewArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::ListView::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::ListView::nbuffers(_array: &vortex_array::arrays::ListViewArray) -> usize +pub fn vortex_array::arrays::ListView::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::ListView::nchildren(array: &vortex_array::arrays::ListViewArray) -> usize +pub fn vortex_array::arrays::ListView::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::ListView::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -2856,97 +2760,85 @@ pub fn vortex_array::arrays::ListView::reduce_parent(array: &vortex_array::vtabl pub fn vortex_array::arrays::ListView::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::ListView::stats(array: &vortex_array::arrays::ListViewArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::ListView::stats(array: &vortex_array::arrays::ListViewData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::ListView::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::ListView::vtable(_array: &vortex_array::arrays::ListViewData) -> &Self pub fn vortex_array::arrays::ListView::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> -pub struct vortex_array::arrays::listview::ListViewArray - -impl vortex_array::arrays::ListViewArray - -pub fn vortex_array::arrays::ListViewArray::elements(&self) -> &vortex_array::ArrayRef - -pub fn vortex_array::arrays::ListViewArray::into_parts(self) -> vortex_array::arrays::listview::ListViewArrayParts - -pub fn vortex_array::arrays::ListViewArray::is_zero_copy_to_list(&self) -> bool - -pub fn vortex_array::arrays::ListViewArray::list_elements_at(&self, index: usize) -> vortex_error::VortexResult - -pub fn vortex_array::arrays::ListViewArray::new(elements: vortex_array::ArrayRef, offsets: vortex_array::ArrayRef, sizes: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> Self +pub struct vortex_array::arrays::listview::ListViewArrayParts -pub unsafe fn vortex_array::arrays::ListViewArray::new_unchecked(elements: vortex_array::ArrayRef, offsets: vortex_array::ArrayRef, sizes: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> Self +pub vortex_array::arrays::listview::ListViewArrayParts::elements: vortex_array::ArrayRef -pub fn vortex_array::arrays::ListViewArray::offset_at(&self, index: usize) -> usize +pub vortex_array::arrays::listview::ListViewArrayParts::elements_dtype: alloc::sync::Arc -pub fn vortex_array::arrays::ListViewArray::offsets(&self) -> &vortex_array::ArrayRef +pub vortex_array::arrays::listview::ListViewArrayParts::offsets: vortex_array::ArrayRef -pub fn vortex_array::arrays::ListViewArray::size_at(&self, index: usize) -> usize +pub vortex_array::arrays::listview::ListViewArrayParts::sizes: vortex_array::ArrayRef -pub fn vortex_array::arrays::ListViewArray::sizes(&self) -> &vortex_array::ArrayRef +pub vortex_array::arrays::listview::ListViewArrayParts::validity: vortex_array::validity::Validity -pub fn vortex_array::arrays::ListViewArray::try_new(elements: vortex_array::ArrayRef, offsets: vortex_array::ArrayRef, sizes: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult +pub struct vortex_array::arrays::listview::ListViewData -pub fn vortex_array::arrays::ListViewArray::validate(elements: &vortex_array::ArrayRef, offsets: &vortex_array::ArrayRef, sizes: &vortex_array::ArrayRef, validity: &vortex_array::validity::Validity) -> vortex_error::VortexResult<()> +impl vortex_array::arrays::ListViewData -pub fn vortex_array::arrays::ListViewArray::verify_is_zero_copy_to_list(&self) -> bool +pub fn vortex_array::arrays::ListViewData::dtype(&self) -> &vortex_array::dtype::DType -pub unsafe fn vortex_array::arrays::ListViewArray::with_zero_copy_to_list(self, is_zctl: bool) -> Self +pub fn vortex_array::arrays::ListViewData::elements(&self) -> &vortex_array::ArrayRef -impl vortex_array::arrays::ListViewArray +pub fn vortex_array::arrays::ListViewData::into_parts(self) -> vortex_array::arrays::listview::ListViewArrayParts -pub fn vortex_array::arrays::ListViewArray::rebuild(&self, mode: vortex_array::arrays::listview::ListViewRebuildMode) -> vortex_error::VortexResult +pub fn vortex_array::arrays::ListViewData::is_empty(&self) -> bool -impl vortex_array::arrays::ListViewArray +pub fn vortex_array::arrays::ListViewData::is_zero_copy_to_list(&self) -> bool -pub fn vortex_array::arrays::ListViewArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ListViewData::len(&self) -> usize -impl core::clone::Clone for vortex_array::arrays::ListViewArray +pub fn vortex_array::arrays::ListViewData::list_elements_at(&self, index: usize) -> vortex_error::VortexResult -pub fn vortex_array::arrays::ListViewArray::clone(&self) -> vortex_array::arrays::ListViewArray +pub fn vortex_array::arrays::ListViewData::new(elements: vortex_array::ArrayRef, offsets: vortex_array::ArrayRef, sizes: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> Self -impl core::convert::AsRef for vortex_array::arrays::ListViewArray +pub unsafe fn vortex_array::arrays::ListViewData::new_unchecked(elements: vortex_array::ArrayRef, offsets: vortex_array::ArrayRef, sizes: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::ListViewArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub fn vortex_array::arrays::ListViewData::offset_at(&self, index: usize) -> usize -impl core::convert::From for vortex_array::ArrayRef +pub fn vortex_array::arrays::ListViewData::offsets(&self) -> &vortex_array::ArrayRef -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::ListViewArray) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ListViewData::size_at(&self, index: usize) -> usize -impl core::fmt::Debug for vortex_array::arrays::ListViewArray +pub fn vortex_array::arrays::ListViewData::sizes(&self) -> &vortex_array::ArrayRef -pub fn vortex_array::arrays::ListViewArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_array::arrays::ListViewData::try_new(elements: vortex_array::ArrayRef, offsets: vortex_array::ArrayRef, sizes: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult -impl core::ops::deref::Deref for vortex_array::arrays::ListViewArray +pub fn vortex_array::arrays::ListViewData::validate(elements: &vortex_array::ArrayRef, offsets: &vortex_array::ArrayRef, sizes: &vortex_array::ArrayRef, validity: &vortex_array::validity::Validity) -> vortex_error::VortexResult<()> -pub type vortex_array::arrays::ListViewArray::Target = dyn vortex_array::DynArray +pub fn vortex_array::arrays::ListViewData::validity(&self) -> &vortex_array::validity::Validity -pub fn vortex_array::arrays::ListViewArray::deref(&self) -> &Self::Target +pub fn vortex_array::arrays::ListViewData::validity_mask(&self) -> vortex_mask::Mask -impl vortex_array::Executable for vortex_array::arrays::ListViewArray +pub fn vortex_array::arrays::ListViewData::verify_is_zero_copy_to_list(&self) -> bool -pub fn vortex_array::arrays::ListViewArray::execute(array: vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub unsafe fn vortex_array::arrays::ListViewData::with_zero_copy_to_list(self, is_zctl: bool) -> Self -impl vortex_array::IntoArray for vortex_array::arrays::ListViewArray +impl core::clone::Clone for vortex_array::arrays::ListViewData -pub fn vortex_array::arrays::ListViewArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ListViewData::clone(&self) -> vortex_array::arrays::ListViewData -impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::ListViewArray +impl core::convert::From for vortex_array::ArrayRef -pub fn vortex_array::arrays::ListViewArray::validity(&self) -> &vortex_array::validity::Validity +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::ListViewData) -> vortex_array::ArrayRef -pub struct vortex_array::arrays::listview::ListViewArrayParts +impl core::fmt::Debug for vortex_array::arrays::ListViewData -pub vortex_array::arrays::listview::ListViewArrayParts::elements: vortex_array::ArrayRef +pub fn vortex_array::arrays::ListViewData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub vortex_array::arrays::listview::ListViewArrayParts::elements_dtype: alloc::sync::Arc +impl vortex_array::IntoArray for vortex_array::arrays::ListViewData -pub vortex_array::arrays::listview::ListViewArrayParts::offsets: vortex_array::ArrayRef +pub fn vortex_array::arrays::ListViewData::into_array(self) -> vortex_array::ArrayRef -pub vortex_array::arrays::listview::ListViewArrayParts::sizes: vortex_array::ArrayRef +impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::ListViewData -pub vortex_array::arrays::listview::ListViewArrayParts::validity: vortex_array::validity::Validity +pub fn vortex_array::arrays::ListViewData::validity(&self) -> &vortex_array::validity::Validity pub fn vortex_array::arrays::listview::list_from_list_view(list_view: vortex_array::arrays::ListViewArray) -> vortex_error::VortexResult @@ -2954,6 +2846,8 @@ pub fn vortex_array::arrays::listview::list_view_from_list(list: vortex_array::a pub fn vortex_array::arrays::listview::recursive_list_from_list_view(array: vortex_array::ArrayRef) -> vortex_error::VortexResult +pub type vortex_array::arrays::listview::ListViewArray = vortex_array::vtable::Array + pub mod vortex_array::arrays::masked pub struct vortex_array::arrays::masked::Masked @@ -2972,27 +2866,27 @@ pub fn vortex_array::arrays::Masked::fmt(&self, f: &mut core::fmt::Formatter<'_> impl vortex_array::arrays::dict::TakeReduce for vortex_array::arrays::Masked -pub fn vortex_array::arrays::Masked::take(array: &vortex_array::arrays::MaskedArray, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Masked::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::arrays::filter::FilterReduce for vortex_array::arrays::Masked -pub fn vortex_array::arrays::Masked::filter(array: &vortex_array::arrays::MaskedArray, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Masked::filter(array: &vortex_array::vtable::Array, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::Masked -pub fn vortex_array::arrays::Masked::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Masked::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::Masked -pub fn vortex_array::arrays::Masked::mask(array: &vortex_array::arrays::MaskedArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Masked::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::Masked -pub fn vortex_array::arrays::Masked::scalar_at(array: &vortex_array::arrays::MaskedArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Masked::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::Masked -pub type vortex_array::arrays::Masked::Array = vortex_array::arrays::MaskedArray +pub type vortex_array::arrays::Masked::Array = vortex_array::arrays::MaskedData pub type vortex_array::arrays::Masked::Metadata = vortex_array::EmptyMetadata @@ -3000,25 +2894,25 @@ pub type vortex_array::arrays::Masked::OperationsVTable = vortex_array::arrays:: pub type vortex_array::arrays::Masked::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::Masked::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Masked::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Masked::array_eq(array: &vortex_array::arrays::MaskedArray, other: &vortex_array::arrays::MaskedArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Masked::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Masked::array_hash(array: &vortex_array::arrays::MaskedArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Masked::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Masked::buffer(_array: &Self::Array, _idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Masked::buffer(_array: &vortex_array::vtable::Array, _idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Masked::buffer_name(_array: &Self::Array, _idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Masked::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Masked::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Masked::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Masked::child(array: &Self::Array, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Masked::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Masked::child_name(_array: &Self::Array, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Masked::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Masked::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Masked::dtype(array: &vortex_array::arrays::MaskedArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Masked::dtype(array: &vortex_array::arrays::MaskedData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Masked::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -3026,13 +2920,13 @@ pub fn vortex_array::arrays::Masked::execute_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Masked::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Masked::len(array: &vortex_array::arrays::MaskedArray) -> usize +pub fn vortex_array::arrays::Masked::len(array: &vortex_array::arrays::MaskedData) -> usize -pub fn vortex_array::arrays::Masked::metadata(_array: &vortex_array::arrays::MaskedArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Masked::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Masked::nbuffers(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::Masked::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Masked::nchildren(array: &Self::Array) -> usize +pub fn vortex_array::arrays::Masked::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Masked::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -3040,56 +2934,54 @@ pub fn vortex_array::arrays::Masked::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::Masked::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Masked::stats(array: &vortex_array::arrays::MaskedArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Masked::stats(array: &vortex_array::arrays::MaskedData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Masked::vtable(_array: &Self::Array) -> &Self pub fn vortex_array::arrays::Masked::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> -pub struct vortex_array::arrays::masked::MaskedArray - -impl vortex_array::arrays::MaskedArray +pub struct vortex_array::arrays::masked::MaskedData -pub fn vortex_array::arrays::MaskedArray::child(&self) -> &vortex_array::ArrayRef +impl vortex_array::arrays::MaskedData -pub fn vortex_array::arrays::MaskedArray::try_new(child: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult +pub fn vortex_array::arrays::MaskedData::child(&self) -> &vortex_array::ArrayRef -impl vortex_array::arrays::MaskedArray +pub fn vortex_array::arrays::MaskedData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_array::arrays::MaskedArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::MaskedData::is_empty(&self) -> bool -impl core::clone::Clone for vortex_array::arrays::MaskedArray +pub fn vortex_array::arrays::MaskedData::len(&self) -> usize -pub fn vortex_array::arrays::MaskedArray::clone(&self) -> vortex_array::arrays::MaskedArray +pub fn vortex_array::arrays::MaskedData::try_new(child: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult -impl core::convert::AsRef for vortex_array::arrays::MaskedArray +pub fn vortex_array::arrays::MaskedData::validity(&self) -> &vortex_array::validity::Validity -pub fn vortex_array::arrays::MaskedArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub fn vortex_array::arrays::MaskedData::validity_mask(&self) -> vortex_mask::Mask -impl core::convert::From for vortex_array::ArrayRef +impl core::clone::Clone for vortex_array::arrays::MaskedData -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::MaskedArray) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::MaskedData::clone(&self) -> vortex_array::arrays::MaskedData -impl core::fmt::Debug for vortex_array::arrays::MaskedArray +impl core::convert::From for vortex_array::ArrayRef -pub fn vortex_array::arrays::MaskedArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::MaskedData) -> vortex_array::ArrayRef -impl core::ops::deref::Deref for vortex_array::arrays::MaskedArray +impl core::fmt::Debug for vortex_array::arrays::MaskedData -pub type vortex_array::arrays::MaskedArray::Target = dyn vortex_array::DynArray +pub fn vortex_array::arrays::MaskedData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub fn vortex_array::arrays::MaskedArray::deref(&self) -> &Self::Target +impl vortex_array::IntoArray for vortex_array::arrays::MaskedData -impl vortex_array::IntoArray for vortex_array::arrays::MaskedArray +pub fn vortex_array::arrays::MaskedData::into_array(self) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::MaskedArray::into_array(self) -> vortex_array::ArrayRef +impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::MaskedData -impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::MaskedArray - -pub fn vortex_array::arrays::MaskedArray::validity(&self) -> &vortex_array::validity::Validity +pub fn vortex_array::arrays::MaskedData::validity(&self) -> &vortex_array::validity::Validity pub fn vortex_array::arrays::masked::mask_validity_canonical(canonical: vortex_array::Canonical, validity_mask: &vortex_mask::Mask, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub type vortex_array::arrays::masked::MaskedArray = vortex_array::vtable::Array + pub mod vortex_array::arrays::null pub struct vortex_array::arrays::null::Null @@ -3112,31 +3004,31 @@ pub fn vortex_array::arrays::null::Null::fmt(&self, f: &mut core::fmt::Formatter impl vortex_array::arrays::dict::TakeReduce for vortex_array::arrays::null::Null -pub fn vortex_array::arrays::null::Null::take(array: &vortex_array::arrays::null::NullArray, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::null::Null::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::arrays::filter::FilterReduce for vortex_array::arrays::null::Null -pub fn vortex_array::arrays::null::Null::filter(_array: &vortex_array::arrays::null::NullArray, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::null::Null::filter(_array: &vortex_array::vtable::Array, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::null::Null -pub fn vortex_array::arrays::null::Null::slice(_array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::null::Null::slice(_array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastReduce for vortex_array::arrays::null::Null -pub fn vortex_array::arrays::null::Null::cast(array: &vortex_array::arrays::null::NullArray, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::null::Null::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::null::Null -pub fn vortex_array::arrays::null::Null::mask(array: &vortex_array::arrays::null::NullArray, _mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::null::Null::mask(array: &vortex_array::vtable::Array, _mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::null::Null -pub fn vortex_array::arrays::null::Null::scalar_at(_array: &vortex_array::arrays::null::NullArray, _index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::null::Null::scalar_at(_array: &vortex_array::vtable::Array, _index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::null::Null -pub type vortex_array::arrays::null::Null::Array = vortex_array::arrays::null::NullArray +pub type vortex_array::arrays::null::Null::Array = vortex_array::arrays::null::NullData pub type vortex_array::arrays::null::Null::Metadata = vortex_array::EmptyMetadata @@ -3144,25 +3036,25 @@ pub type vortex_array::arrays::null::Null::OperationsVTable = vortex_array::arra pub type vortex_array::arrays::null::Null::ValidityVTable = vortex_array::arrays::null::Null -pub fn vortex_array::arrays::null::Null::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::null::Null::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::null::Null::array_eq(array: &vortex_array::arrays::null::NullArray, other: &vortex_array::arrays::null::NullArray, _precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::null::Null::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, _precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::null::Null::array_hash(array: &vortex_array::arrays::null::NullArray, state: &mut H, _precision: vortex_array::Precision) +pub fn vortex_array::arrays::null::Null::array_hash(array: &vortex_array::vtable::Array, state: &mut H, _precision: vortex_array::Precision) -pub fn vortex_array::arrays::null::Null::buffer(_array: &vortex_array::arrays::null::NullArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::null::Null::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::null::Null::buffer_name(_array: &vortex_array::arrays::null::NullArray, _idx: usize) -> core::option::Option +pub fn vortex_array::arrays::null::Null::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option -pub fn vortex_array::arrays::null::Null::build(_dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], _children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::null::Null::build(_dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], _children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::null::Null::child(_array: &vortex_array::arrays::null::NullArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::null::Null::child(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::null::Null::child_name(_array: &vortex_array::arrays::null::NullArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::null::Null::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::null::Null::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::null::Null::dtype(_array: &vortex_array::arrays::null::NullArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::null::Null::dtype(_array: &vortex_array::arrays::null::NullData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::null::Null::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -3170,13 +3062,13 @@ pub fn vortex_array::arrays::null::Null::execute_parent(array: &vortex_array::vt pub fn vortex_array::arrays::null::Null::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::null::Null::len(array: &vortex_array::arrays::null::NullArray) -> usize +pub fn vortex_array::arrays::null::Null::len(array: &vortex_array::arrays::null::NullData) -> usize -pub fn vortex_array::arrays::null::Null::metadata(_array: &vortex_array::arrays::null::NullArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::null::Null::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::null::Null::nbuffers(_array: &vortex_array::arrays::null::NullArray) -> usize +pub fn vortex_array::arrays::null::Null::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::null::Null::nchildren(_array: &vortex_array::arrays::null::NullArray) -> usize +pub fn vortex_array::arrays::null::Null::nchildren(_array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::null::Null::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -3184,7 +3076,7 @@ pub fn vortex_array::arrays::null::Null::reduce_parent(array: &vortex_array::vta pub fn vortex_array::arrays::null::Null::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::null::Null::stats(array: &vortex_array::arrays::null::NullArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::null::Null::stats(array: &vortex_array::arrays::null::NullData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::null::Null::vtable(_array: &Self::Array) -> &Self @@ -3192,47 +3084,37 @@ pub fn vortex_array::arrays::null::Null::with_children(_array: &mut Self::Array, impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::null::Null -pub fn vortex_array::arrays::null::Null::validity(_array: &vortex_array::arrays::null::NullArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::null::Null::validity(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub struct vortex_array::arrays::null::NullArray +pub struct vortex_array::arrays::null::NullData -impl vortex_array::arrays::null::NullArray +impl vortex_array::arrays::null::NullData -pub fn vortex_array::arrays::null::NullArray::new(len: usize) -> Self +pub fn vortex_array::arrays::null::NullData::dtype(&self) -> &vortex_array::dtype::DType -impl vortex_array::arrays::null::NullArray +pub fn vortex_array::arrays::null::NullData::is_empty(&self) -> bool -pub fn vortex_array::arrays::null::NullArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::null::NullData::len(&self) -> usize -impl core::clone::Clone for vortex_array::arrays::null::NullArray +pub fn vortex_array::arrays::null::NullData::new(len: usize) -> Self -pub fn vortex_array::arrays::null::NullArray::clone(&self) -> vortex_array::arrays::null::NullArray +impl core::clone::Clone for vortex_array::arrays::null::NullData -impl core::convert::AsRef for vortex_array::arrays::null::NullArray +pub fn vortex_array::arrays::null::NullData::clone(&self) -> vortex_array::arrays::null::NullData -pub fn vortex_array::arrays::null::NullArray::as_ref(&self) -> &dyn vortex_array::DynArray +impl core::convert::From for vortex_array::ArrayRef -impl core::convert::From for vortex_array::ArrayRef +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::null::NullData) -> vortex_array::ArrayRef -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::null::NullArray) -> vortex_array::ArrayRef +impl core::fmt::Debug for vortex_array::arrays::null::NullData -impl core::fmt::Debug for vortex_array::arrays::null::NullArray +pub fn vortex_array::arrays::null::NullData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub fn vortex_array::arrays::null::NullArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl vortex_array::IntoArray for vortex_array::arrays::null::NullData -impl core::ops::deref::Deref for vortex_array::arrays::null::NullArray +pub fn vortex_array::arrays::null::NullData::into_array(self) -> vortex_array::ArrayRef -pub type vortex_array::arrays::null::NullArray::Target = dyn vortex_array::DynArray - -pub fn vortex_array::arrays::null::NullArray::deref(&self) -> &Self::Target - -impl vortex_array::Executable for vortex_array::arrays::null::NullArray - -pub fn vortex_array::arrays::null::NullArray::execute(array: vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult - -impl vortex_array::IntoArray for vortex_array::arrays::null::NullArray - -pub fn vortex_array::arrays::null::NullArray::into_array(self) -> vortex_array::ArrayRef +pub type vortex_array::arrays::null::NullArray = vortex_array::vtable::Array pub mod vortex_array::arrays::primitive @@ -3318,41 +3200,41 @@ pub fn vortex_array::arrays::Primitive::fmt(&self, f: &mut core::fmt::Formatter< impl vortex_array::arrays::dict::TakeExecute for vortex_array::arrays::Primitive -pub fn vortex_array::arrays::Primitive::take(array: &vortex_array::arrays::PrimitiveArray, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Primitive::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::Primitive -pub fn vortex_array::arrays::Primitive::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Primitive::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_array::arrays::primitive::PrimitiveMaskedValidityRule pub type vortex_array::arrays::primitive::PrimitiveMaskedValidityRule::Parent = vortex_array::arrays::Masked -pub fn vortex_array::arrays::primitive::PrimitiveMaskedValidityRule::reduce_parent(&self, array: &vortex_array::arrays::PrimitiveArray, parent: &vortex_array::arrays::MaskedArray, _child_idx: usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::primitive::PrimitiveMaskedValidityRule::reduce_parent(&self, array: &vortex_array::vtable::Array, parent: &vortex_array::arrays::MaskedArray, _child_idx: usize) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::between::BetweenKernel for vortex_array::arrays::Primitive -pub fn vortex_array::arrays::Primitive::between(arr: &vortex_array::arrays::PrimitiveArray, lower: &vortex_array::ArrayRef, upper: &vortex_array::ArrayRef, options: &vortex_array::scalar_fn::fns::between::BetweenOptions, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Primitive::between(arr: &vortex_array::vtable::Array, lower: &vortex_array::ArrayRef, upper: &vortex_array::ArrayRef, options: &vortex_array::scalar_fn::fns::between::BetweenOptions, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastKernel for vortex_array::arrays::Primitive -pub fn vortex_array::arrays::Primitive::cast(array: &vortex_array::arrays::PrimitiveArray, dtype: &vortex_array::dtype::DType, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Primitive::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::fill_null::FillNullKernel for vortex_array::arrays::Primitive -pub fn vortex_array::arrays::Primitive::fill_null(array: &vortex_array::arrays::PrimitiveArray, fill_value: &vortex_array::scalar::Scalar, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Primitive::fill_null(array: &vortex_array::vtable::Array, fill_value: &vortex_array::scalar::Scalar, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::Primitive -pub fn vortex_array::arrays::Primitive::mask(array: &vortex_array::arrays::PrimitiveArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Primitive::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::Primitive -pub fn vortex_array::arrays::Primitive::scalar_at(array: &vortex_array::arrays::PrimitiveArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Primitive::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::Primitive -pub type vortex_array::arrays::Primitive::Array = vortex_array::arrays::PrimitiveArray +pub type vortex_array::arrays::Primitive::Array = vortex_array::arrays::PrimitiveData pub type vortex_array::arrays::Primitive::Metadata = vortex_array::EmptyMetadata @@ -3360,25 +3242,25 @@ pub type vortex_array::arrays::Primitive::OperationsVTable = vortex_array::array pub type vortex_array::arrays::Primitive::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::Primitive::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Primitive::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Primitive::array_eq(array: &vortex_array::arrays::PrimitiveArray, other: &vortex_array::arrays::PrimitiveArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Primitive::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Primitive::array_hash(array: &vortex_array::arrays::PrimitiveArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Primitive::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Primitive::buffer(array: &vortex_array::arrays::PrimitiveArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Primitive::buffer(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Primitive::buffer_name(_array: &vortex_array::arrays::PrimitiveArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Primitive::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Primitive::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Primitive::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Primitive::child(array: &vortex_array::arrays::PrimitiveArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Primitive::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Primitive::child_name(_array: &vortex_array::arrays::PrimitiveArray, _idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Primitive::child_name(_array: &vortex_array::vtable::Array, _idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Primitive::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Primitive::dtype(array: &vortex_array::arrays::PrimitiveArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Primitive::dtype(array: &vortex_array::arrays::PrimitiveData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Primitive::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -3386,13 +3268,13 @@ pub fn vortex_array::arrays::Primitive::execute_parent(array: &vortex_array::vta pub fn vortex_array::arrays::Primitive::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Primitive::len(array: &vortex_array::arrays::PrimitiveArray) -> usize +pub fn vortex_array::arrays::Primitive::len(array: &vortex_array::arrays::PrimitiveData) -> usize -pub fn vortex_array::arrays::Primitive::metadata(_array: &vortex_array::arrays::PrimitiveArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Primitive::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Primitive::nbuffers(_array: &vortex_array::arrays::PrimitiveArray) -> usize +pub fn vortex_array::arrays::Primitive::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Primitive::nchildren(array: &vortex_array::arrays::PrimitiveArray) -> usize +pub fn vortex_array::arrays::Primitive::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Primitive::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -3400,129 +3282,93 @@ pub fn vortex_array::arrays::Primitive::reduce_parent(array: &vortex_array::vtab pub fn vortex_array::arrays::Primitive::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Primitive::stats(array: &vortex_array::arrays::PrimitiveArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Primitive::stats(array: &vortex_array::arrays::PrimitiveData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Primitive::vtable(_array: &Self::Array) -> &Self pub fn vortex_array::arrays::Primitive::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> -pub struct vortex_array::arrays::primitive::PrimitiveArray - -impl vortex_array::arrays::PrimitiveArray - -pub fn vortex_array::arrays::PrimitiveArray::as_slice(&self) -> &[T] - -pub fn vortex_array::arrays::PrimitiveArray::narrow(&self) -> vortex_error::VortexResult - -pub fn vortex_array::arrays::PrimitiveArray::reinterpret_cast(&self, ptype: vortex_array::dtype::PType) -> Self - -impl vortex_array::arrays::PrimitiveArray - -pub fn vortex_array::arrays::PrimitiveArray::buffer_handle(&self) -> &vortex_array::buffer::BufferHandle - -pub fn vortex_array::arrays::PrimitiveArray::from_buffer_handle(handle: vortex_array::buffer::BufferHandle, ptype: vortex_array::dtype::PType, validity: vortex_array::validity::Validity) -> Self - -pub fn vortex_array::arrays::PrimitiveArray::from_byte_buffer(buffer: vortex_buffer::ByteBuffer, ptype: vortex_array::dtype::PType, validity: vortex_array::validity::Validity) -> Self - -pub fn vortex_array::arrays::PrimitiveArray::from_values_byte_buffer(valid_elems_buffer: vortex_buffer::ByteBuffer, ptype: vortex_array::dtype::PType, validity: vortex_array::validity::Validity, n_rows: usize) -> Self - -pub fn vortex_array::arrays::PrimitiveArray::map_each(self, f: F) -> vortex_array::arrays::PrimitiveArray where T: vortex_array::dtype::NativePType, R: vortex_array::dtype::NativePType, F: core::ops::function::FnMut(T) -> R - -pub fn vortex_array::arrays::PrimitiveArray::map_each_with_validity(self, f: F) -> vortex_error::VortexResult where T: vortex_array::dtype::NativePType, R: vortex_array::dtype::NativePType, F: core::ops::function::FnMut((T, bool)) -> R - -pub fn vortex_array::arrays::PrimitiveArray::ptype(&self) -> vortex_array::dtype::PType - -impl vortex_array::arrays::PrimitiveArray - -pub fn vortex_array::arrays::PrimitiveArray::empty(nullability: vortex_array::dtype::Nullability) -> Self - -pub fn vortex_array::arrays::PrimitiveArray::new(buffer: impl core::convert::Into>, validity: vortex_array::validity::Validity) -> Self - -pub unsafe fn vortex_array::arrays::PrimitiveArray::new_unchecked(buffer: vortex_buffer::buffer::Buffer, validity: vortex_array::validity::Validity) -> Self - -pub unsafe fn vortex_array::arrays::PrimitiveArray::new_unchecked_from_handle(handle: vortex_array::buffer::BufferHandle, ptype: vortex_array::dtype::PType, validity: vortex_array::validity::Validity) -> Self - -pub fn vortex_array::arrays::PrimitiveArray::try_new(buffer: vortex_buffer::buffer::Buffer, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult +pub struct vortex_array::arrays::primitive::PrimitiveArrayParts -pub fn vortex_array::arrays::PrimitiveArray::validate(buffer: &vortex_buffer::buffer::Buffer, validity: &vortex_array::validity::Validity) -> vortex_error::VortexResult<()> +pub vortex_array::arrays::primitive::PrimitiveArrayParts::buffer: vortex_array::buffer::BufferHandle -impl vortex_array::arrays::PrimitiveArray +pub vortex_array::arrays::primitive::PrimitiveArrayParts::ptype: vortex_array::dtype::PType -pub fn vortex_array::arrays::PrimitiveArray::from_option_iter>>(iter: I) -> Self +pub vortex_array::arrays::primitive::PrimitiveArrayParts::validity: vortex_array::validity::Validity -pub fn vortex_array::arrays::PrimitiveArray::into_buffer(self) -> vortex_buffer::buffer::Buffer +pub struct vortex_array::arrays::primitive::PrimitiveData -pub fn vortex_array::arrays::PrimitiveArray::into_buffer_mut(self) -> vortex_buffer::buffer_mut::BufferMut +impl vortex_array::arrays::PrimitiveData -pub fn vortex_array::arrays::PrimitiveArray::to_buffer(&self) -> vortex_buffer::buffer::Buffer +pub fn vortex_array::arrays::PrimitiveData::buffer_handle(&self) -> &vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::PrimitiveArray::try_into_buffer_mut(self) -> core::result::Result, vortex_buffer::buffer::Buffer> +pub fn vortex_array::arrays::PrimitiveData::dtype(&self) -> &vortex_array::dtype::DType -impl vortex_array::arrays::PrimitiveArray +pub fn vortex_array::arrays::PrimitiveData::from_buffer_handle(handle: vortex_array::buffer::BufferHandle, ptype: vortex_array::dtype::PType, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::PrimitiveArray::into_parts(self) -> vortex_array::arrays::primitive::PrimitiveArrayParts +pub fn vortex_array::arrays::PrimitiveData::from_byte_buffer(buffer: vortex_buffer::ByteBuffer, ptype: vortex_array::dtype::PType, validity: vortex_array::validity::Validity) -> Self -impl vortex_array::arrays::PrimitiveArray +pub fn vortex_array::arrays::PrimitiveData::from_values_byte_buffer(valid_elems_buffer: vortex_buffer::ByteBuffer, ptype: vortex_array::dtype::PType, validity: vortex_array::validity::Validity, n_rows: usize) -> Self -pub fn vortex_array::arrays::PrimitiveArray::patch(self, patches: &vortex_array::patches::Patches, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::PrimitiveData::into_buffer(self) -> vortex_buffer::buffer::Buffer -impl vortex_array::arrays::PrimitiveArray +pub fn vortex_array::arrays::PrimitiveData::into_buffer_mut(self) -> vortex_buffer::buffer_mut::BufferMut -pub fn vortex_array::arrays::PrimitiveArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::PrimitiveData::is_empty(&self) -> bool -impl vortex_array::arrays::PrimitiveArray +pub fn vortex_array::arrays::PrimitiveData::len(&self) -> usize -pub fn vortex_array::arrays::PrimitiveArray::top_value(&self) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::PrimitiveData::map_each(self, f: F) -> Self where T: vortex_array::dtype::NativePType, R: vortex_array::dtype::NativePType, F: core::ops::function::FnMut(T) -> R -impl core::clone::Clone for vortex_array::arrays::PrimitiveArray +pub fn vortex_array::arrays::PrimitiveData::map_each_with_validity(self, f: F) -> vortex_error::VortexResult where T: vortex_array::dtype::NativePType, R: vortex_array::dtype::NativePType, F: core::ops::function::FnMut((T, bool)) -> R -pub fn vortex_array::arrays::PrimitiveArray::clone(&self) -> vortex_array::arrays::PrimitiveArray +pub fn vortex_array::arrays::PrimitiveData::ptype(&self) -> vortex_array::dtype::PType -impl core::convert::AsRef for vortex_array::arrays::PrimitiveArray +pub fn vortex_array::arrays::PrimitiveData::to_buffer(&self) -> vortex_buffer::buffer::Buffer -pub fn vortex_array::arrays::PrimitiveArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub fn vortex_array::arrays::PrimitiveData::try_into_buffer_mut(self) -> core::result::Result, vortex_buffer::buffer::Buffer> -impl core::convert::From for vortex_array::ArrayRef +pub fn vortex_array::arrays::PrimitiveData::validity(&self) -> &vortex_array::validity::Validity -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::PrimitiveArray) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::PrimitiveData::validity_mask(&self) -> vortex_mask::Mask -impl core::fmt::Debug for vortex_array::arrays::PrimitiveArray +impl vortex_array::arrays::PrimitiveData -pub fn vortex_array::arrays::PrimitiveArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_array::arrays::PrimitiveData::empty(nullability: vortex_array::dtype::Nullability) -> Self -impl core::ops::deref::Deref for vortex_array::arrays::PrimitiveArray +pub fn vortex_array::arrays::PrimitiveData::new(buffer: impl core::convert::Into>, validity: vortex_array::validity::Validity) -> Self -pub type vortex_array::arrays::PrimitiveArray::Target = dyn vortex_array::DynArray +pub unsafe fn vortex_array::arrays::PrimitiveData::new_unchecked(buffer: vortex_buffer::buffer::Buffer, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::PrimitiveArray::deref(&self) -> &Self::Target +pub unsafe fn vortex_array::arrays::PrimitiveData::new_unchecked_from_handle(handle: vortex_array::buffer::BufferHandle, ptype: vortex_array::dtype::PType, validity: vortex_array::validity::Validity) -> Self -impl vortex_array::Executable for vortex_array::arrays::PrimitiveArray +pub fn vortex_array::arrays::PrimitiveData::try_new(buffer: vortex_buffer::buffer::Buffer, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult -pub fn vortex_array::arrays::PrimitiveArray::execute(array: vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::PrimitiveData::validate(buffer: &vortex_buffer::buffer::Buffer, validity: &vortex_array::validity::Validity) -> vortex_error::VortexResult<()> -impl vortex_array::IntoArray for vortex_array::arrays::PrimitiveArray +impl vortex_array::arrays::PrimitiveData -pub fn vortex_array::arrays::PrimitiveArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::PrimitiveData::into_parts(self) -> vortex_array::arrays::primitive::PrimitiveArrayParts -impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::PrimitiveArray +impl core::clone::Clone for vortex_array::arrays::PrimitiveData -pub fn vortex_array::arrays::PrimitiveArray::validity(&self) -> &vortex_array::validity::Validity +pub fn vortex_array::arrays::PrimitiveData::clone(&self) -> vortex_array::arrays::PrimitiveData -impl core::iter::traits::collect::FromIterator for vortex_array::arrays::PrimitiveArray +impl core::convert::From for vortex_array::ArrayRef -pub fn vortex_array::arrays::PrimitiveArray::from_iter>(iter: I) -> Self +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::PrimitiveData) -> vortex_array::ArrayRef -impl vortex_array::accessor::ArrayAccessor for vortex_array::arrays::PrimitiveArray +impl core::fmt::Debug for vortex_array::arrays::PrimitiveData -pub fn vortex_array::arrays::PrimitiveArray::with_iterator(&self, f: F) -> R where F: for<'a> core::ops::function::FnOnce(&mut dyn core::iter::traits::iterator::Iterator>) -> R +pub fn vortex_array::arrays::PrimitiveData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub struct vortex_array::arrays::primitive::PrimitiveArrayParts +impl vortex_array::IntoArray for vortex_array::arrays::PrimitiveData -pub vortex_array::arrays::primitive::PrimitiveArrayParts::buffer: vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::PrimitiveData::into_array(self) -> vortex_array::ArrayRef -pub vortex_array::arrays::primitive::PrimitiveArrayParts::ptype: vortex_array::dtype::PType +impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::PrimitiveData -pub vortex_array::arrays::primitive::PrimitiveArrayParts::validity: vortex_array::validity::Validity +pub fn vortex_array::arrays::PrimitiveData::validity(&self) -> &vortex_array::validity::Validity pub struct vortex_array::arrays::primitive::PrimitiveMaskedValidityRule @@ -3538,12 +3384,14 @@ impl vortex_array::optimizer::rules::ArrayParentReduceRule vortex_error::VortexResult> +pub fn vortex_array::arrays::primitive::PrimitiveMaskedValidityRule::reduce_parent(&self, array: &vortex_array::vtable::Array, parent: &vortex_array::arrays::MaskedArray, _child_idx: usize) -> vortex_error::VortexResult> pub fn vortex_array::arrays::primitive::chunk_range(chunk_idx: usize, offset: usize, array_len: usize) -> core::ops::range::Range pub fn vortex_array::arrays::primitive::patch_chunk(decoded_values: &mut [T], patches_indices: &[I], patches_values: &[T], patches_offset: usize, chunk_offsets_slice: &[C], chunk_idx: usize, offset_within_chunk: usize) where T: vortex_array::dtype::NativePType, I: vortex_array::dtype::UnsignedPType, C: vortex_array::dtype::UnsignedPType +pub type vortex_array::arrays::primitive::PrimitiveArray = vortex_array::vtable::Array + pub mod vortex_array::arrays::scalar_fn pub struct vortex_array::arrays::scalar_fn::AnyScalarFn @@ -3554,7 +3402,7 @@ pub fn vortex_array::arrays::scalar_fn::AnyScalarFn::fmt(&self, f: &mut core::fm impl vortex_array::matcher::Matcher for vortex_array::arrays::scalar_fn::AnyScalarFn -pub type vortex_array::arrays::scalar_fn::AnyScalarFn::Match<'a> = &'a vortex_array::arrays::scalar_fn::ScalarFnArray +pub type vortex_array::arrays::scalar_fn::AnyScalarFn::Match<'a> = &'a vortex_array::vtable::Array pub fn vortex_array::arrays::scalar_fn::AnyScalarFn::matches(array: &dyn vortex_array::DynArray) -> bool @@ -3578,69 +3426,61 @@ pub fn vortex_array::arrays::scalar_fn::ExactScalarFn::matches(array: &dyn vo pub fn vortex_array::arrays::scalar_fn::ExactScalarFn::try_match(array: &dyn vortex_array::DynArray) -> core::option::Option -pub struct vortex_array::arrays::scalar_fn::ScalarFnArray - -impl vortex_array::arrays::scalar_fn::ScalarFnArray - -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::children(&self) -> &[vortex_array::ArrayRef] - -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::scalar_fn(&self) -> &vortex_array::scalar_fn::ScalarFnRef - -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::try_new(scalar_fn: vortex_array::scalar_fn::ScalarFnRef, children: alloc::vec::Vec, len: usize) -> vortex_error::VortexResult +pub struct vortex_array::arrays::scalar_fn::ScalarFnArrayView<'a, F: vortex_array::scalar_fn::ScalarFnVTable> -impl vortex_array::arrays::scalar_fn::ScalarFnArray +pub vortex_array::arrays::scalar_fn::ScalarFnArrayView::options: &'a ::Options -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::to_array(&self) -> vortex_array::ArrayRef +pub vortex_array::arrays::scalar_fn::ScalarFnArrayView::vtable: &'a F -impl core::clone::Clone for vortex_array::arrays::scalar_fn::ScalarFnArray +impl core::ops::deref::Deref for vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, F> -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::clone(&self) -> vortex_array::arrays::scalar_fn::ScalarFnArray +pub type vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, F>::Target = dyn vortex_array::DynArray -impl core::convert::AsRef for vortex_array::arrays::scalar_fn::ScalarFnArray +pub fn vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, F>::deref(&self) -> &Self::Target -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub struct vortex_array::arrays::scalar_fn::ScalarFnData -impl core::convert::From for vortex_array::ArrayRef +impl vortex_array::arrays::ScalarFnData -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::scalar_fn::ScalarFnArray) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ScalarFnData::children(&self) -> &[vortex_array::ArrayRef] -impl core::fmt::Debug for vortex_array::arrays::scalar_fn::ScalarFnArray +pub fn vortex_array::arrays::ScalarFnData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_array::arrays::ScalarFnData::is_empty(&self) -> bool -impl core::ops::deref::Deref for vortex_array::arrays::scalar_fn::ScalarFnArray +pub fn vortex_array::arrays::ScalarFnData::len(&self) -> usize -pub type vortex_array::arrays::scalar_fn::ScalarFnArray::Target = dyn vortex_array::DynArray +pub fn vortex_array::arrays::ScalarFnData::scalar_fn(&self) -> &vortex_array::scalar_fn::ScalarFnRef -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::deref(&self) -> &Self::Target +pub fn vortex_array::arrays::ScalarFnData::try_new(scalar_fn: vortex_array::scalar_fn::ScalarFnRef, children: alloc::vec::Vec, len: usize) -> vortex_error::VortexResult -impl vortex_array::IntoArray for vortex_array::arrays::scalar_fn::ScalarFnArray +impl core::clone::Clone for vortex_array::arrays::ScalarFnData -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ScalarFnData::clone(&self) -> vortex_array::arrays::ScalarFnData -impl vortex_array::scalar_fn::ReduceNode for vortex_array::arrays::scalar_fn::ScalarFnArray +impl core::convert::From for vortex_array::ArrayRef -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::as_any(&self) -> &dyn core::any::Any +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::ScalarFnData) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::child(&self, idx: usize) -> vortex_array::scalar_fn::ReduceNodeRef +impl core::fmt::Debug for vortex_array::arrays::ScalarFnData -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::child_count(&self) -> usize +pub fn vortex_array::arrays::ScalarFnData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::node_dtype(&self) -> vortex_error::VortexResult +impl vortex_array::IntoArray for vortex_array::arrays::ScalarFnData -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::scalar_fn(&self) -> core::option::Option<&vortex_array::scalar_fn::ScalarFnRef> +pub fn vortex_array::arrays::ScalarFnData::into_array(self) -> vortex_array::ArrayRef -pub struct vortex_array::arrays::scalar_fn::ScalarFnArrayView<'a, F: vortex_array::scalar_fn::ScalarFnVTable> +impl vortex_array::scalar_fn::ReduceNode for vortex_array::arrays::ScalarFnData -pub vortex_array::arrays::scalar_fn::ScalarFnArrayView::options: &'a ::Options +pub fn vortex_array::arrays::ScalarFnData::as_any(&self) -> &dyn core::any::Any -pub vortex_array::arrays::scalar_fn::ScalarFnArrayView::vtable: &'a F +pub fn vortex_array::arrays::ScalarFnData::child(&self, idx: usize) -> vortex_array::scalar_fn::ReduceNodeRef -impl core::ops::deref::Deref for vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, F> +pub fn vortex_array::arrays::ScalarFnData::child_count(&self) -> usize -pub type vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, F>::Target = dyn vortex_array::DynArray +pub fn vortex_array::arrays::ScalarFnData::node_dtype(&self) -> vortex_error::VortexResult -pub fn vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, F>::deref(&self) -> &Self::Target +pub fn vortex_array::arrays::ScalarFnData::scalar_fn(&self) -> core::option::Option<&vortex_array::scalar_fn::ScalarFnRef> pub struct vortex_array::arrays::scalar_fn::ScalarFnVTable @@ -3654,11 +3494,11 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::fmt(&self, f: &mut core: impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::scalar_fn::ScalarFnVTable -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::scalar_at(array: &vortex_array::arrays::scalar_fn::ScalarFnArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::scalar_fn::ScalarFnVTable -pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::Array = vortex_array::arrays::scalar_fn::ScalarFnArray +pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::Array = vortex_array::arrays::ScalarFnData pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::Metadata = vortex_array::arrays::scalar_fn::metadata::ScalarFnMetadata @@ -3666,25 +3506,25 @@ pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::OperationsVTable = vor pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::ValidityVTable = vortex_array::arrays::scalar_fn::ScalarFnVTable -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::array_eq(array: &vortex_array::arrays::scalar_fn::ScalarFnArray, other: &vortex_array::arrays::scalar_fn::ScalarFnArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::array_hash(array: &vortex_array::arrays::scalar_fn::ScalarFnArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::buffer(_array: &vortex_array::arrays::scalar_fn::ScalarFnArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::buffer_name(_array: &vortex_array::arrays::scalar_fn::ScalarFnArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &vortex_array::arrays::scalar_fn::metadata::ScalarFnMetadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::child(array: &vortex_array::arrays::scalar_fn::ScalarFnArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::child_name(array: &vortex_array::arrays::scalar_fn::ScalarFnArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::child_name(array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::dtype(array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::dtype(array: &vortex_array::arrays::ScalarFnData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -3692,13 +3532,13 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::execute_parent(array: &v pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::len(array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> usize +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::len(array: &vortex_array::arrays::ScalarFnData) -> usize -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::metadata(array: &Self::Array) -> vortex_error::VortexResult +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::nbuffers(_array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> usize +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::nchildren(array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> usize +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -3706,15 +3546,15 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::reduce_parent(array: &vo pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::stats(array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::stats(array: &vortex_array::arrays::ScalarFnData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::vtable(array: &Self::Array) -> &Self +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::vtable(array: &vortex_array::arrays::ScalarFnData) -> &Self pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::scalar_fn::ScalarFnVTable -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::validity(array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult pub trait vortex_array::arrays::scalar_fn::ScalarFnArrayExt: vortex_array::scalar_fn::ScalarFnVTable @@ -3724,6 +3564,8 @@ impl vortex_array::arrays::scalar_fn pub fn V::try_new_array(&self, len: usize, options: Self::Options, children: impl core::convert::Into>) -> vortex_error::VortexResult +pub type vortex_array::arrays::scalar_fn::ScalarFnArray = vortex_array::vtable::Array + pub mod vortex_array::arrays::shared pub struct vortex_array::arrays::shared::Shared @@ -3742,11 +3584,11 @@ pub fn vortex_array::arrays::Shared::fmt(&self, f: &mut core::fmt::Formatter<'_> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::Shared -pub fn vortex_array::arrays::Shared::scalar_at(array: &vortex_array::arrays::SharedArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Shared::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::Shared -pub type vortex_array::arrays::Shared::Array = vortex_array::arrays::SharedArray +pub type vortex_array::arrays::Shared::Array = vortex_array::arrays::SharedData pub type vortex_array::arrays::Shared::Metadata = vortex_array::EmptyMetadata @@ -3754,25 +3596,25 @@ pub type vortex_array::arrays::Shared::OperationsVTable = vortex_array::arrays:: pub type vortex_array::arrays::Shared::ValidityVTable = vortex_array::arrays::Shared -pub fn vortex_array::arrays::Shared::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Shared::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Shared::array_eq(array: &vortex_array::arrays::SharedArray, other: &vortex_array::arrays::SharedArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Shared::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Shared::array_hash(array: &vortex_array::arrays::SharedArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Shared::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Shared::buffer(_array: &Self::Array, _idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Shared::buffer(_array: &vortex_array::vtable::Array, _idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Shared::buffer_name(_array: &Self::Array, _idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Shared::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Shared::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Shared::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Shared::child(array: &Self::Array, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Shared::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Shared::child_name(_array: &Self::Array, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Shared::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Shared::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Shared::dtype(array: &vortex_array::arrays::SharedArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Shared::dtype(array: &vortex_array::arrays::SharedData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Shared::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -3780,13 +3622,13 @@ pub fn vortex_array::arrays::Shared::execute_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Shared::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Shared::len(array: &vortex_array::arrays::SharedArray) -> usize +pub fn vortex_array::arrays::Shared::len(array: &vortex_array::arrays::SharedData) -> usize -pub fn vortex_array::arrays::Shared::metadata(_array: &Self::Array) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Shared::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Shared::nbuffers(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::Shared::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Shared::nchildren(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::Shared::nchildren(_array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Shared::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -3794,55 +3636,49 @@ pub fn vortex_array::arrays::Shared::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::Shared::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Shared::stats(array: &vortex_array::arrays::SharedArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Shared::stats(array: &vortex_array::arrays::SharedData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Shared::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Shared::vtable(_array: &vortex_array::arrays::SharedData) -> &Self pub fn vortex_array::arrays::Shared::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Shared -pub fn vortex_array::arrays::Shared::validity(array: &vortex_array::arrays::SharedArray) -> vortex_error::VortexResult - -pub struct vortex_array::arrays::shared::SharedArray +pub fn vortex_array::arrays::Shared::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -impl vortex_array::arrays::SharedArray +pub struct vortex_array::arrays::shared::SharedData -pub fn vortex_array::arrays::SharedArray::get_or_compute(&self, f: impl core::ops::function::FnOnce(&vortex_array::ArrayRef) -> vortex_error::VortexResult) -> vortex_error::VortexResult +impl vortex_array::arrays::SharedData -pub async fn vortex_array::arrays::SharedArray::get_or_compute_async(&self, f: F) -> vortex_error::VortexResult where F: core::ops::function::FnOnce(vortex_array::ArrayRef) -> Fut, Fut: core::future::future::Future> +pub fn vortex_array::arrays::SharedData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_array::arrays::SharedArray::new(source: vortex_array::ArrayRef) -> Self +pub fn vortex_array::arrays::SharedData::get_or_compute(&self, f: impl core::ops::function::FnOnce(&vortex_array::ArrayRef) -> vortex_error::VortexResult) -> vortex_error::VortexResult -impl vortex_array::arrays::SharedArray +pub async fn vortex_array::arrays::SharedData::get_or_compute_async(&self, f: F) -> vortex_error::VortexResult where F: core::ops::function::FnOnce(vortex_array::ArrayRef) -> Fut, Fut: core::future::future::Future> -pub fn vortex_array::arrays::SharedArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::SharedData::is_empty(&self) -> bool -impl core::clone::Clone for vortex_array::arrays::SharedArray +pub fn vortex_array::arrays::SharedData::len(&self) -> usize -pub fn vortex_array::arrays::SharedArray::clone(&self) -> vortex_array::arrays::SharedArray +pub fn vortex_array::arrays::SharedData::new(source: vortex_array::ArrayRef) -> Self -impl core::convert::AsRef for vortex_array::arrays::SharedArray +impl core::clone::Clone for vortex_array::arrays::SharedData -pub fn vortex_array::arrays::SharedArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub fn vortex_array::arrays::SharedData::clone(&self) -> vortex_array::arrays::SharedData -impl core::convert::From for vortex_array::ArrayRef +impl core::convert::From for vortex_array::ArrayRef -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::SharedArray) -> vortex_array::ArrayRef +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::SharedData) -> vortex_array::ArrayRef -impl core::fmt::Debug for vortex_array::arrays::SharedArray +impl core::fmt::Debug for vortex_array::arrays::SharedData -pub fn vortex_array::arrays::SharedArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_array::arrays::SharedData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -impl core::ops::deref::Deref for vortex_array::arrays::SharedArray +impl vortex_array::IntoArray for vortex_array::arrays::SharedData -pub type vortex_array::arrays::SharedArray::Target = dyn vortex_array::DynArray +pub fn vortex_array::arrays::SharedData::into_array(self) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::SharedArray::deref(&self) -> &Self::Target - -impl vortex_array::IntoArray for vortex_array::arrays::SharedArray - -pub fn vortex_array::arrays::SharedArray::into_array(self) -> vortex_array::ArrayRef +pub type vortex_array::arrays::shared::SharedArray = vortex_array::vtable::Array pub mod vortex_array::arrays::slice @@ -3862,15 +3698,15 @@ pub fn vortex_array::arrays::slice::Slice::fmt(&self, f: &mut core::fmt::Formatt impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::slice::Slice -pub fn vortex_array::arrays::slice::Slice::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::slice::Slice::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::slice::Slice -pub fn vortex_array::arrays::slice::Slice::scalar_at(array: &vortex_array::arrays::slice::SliceArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::slice::Slice::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::slice::Slice -pub type vortex_array::arrays::slice::Slice::Array = vortex_array::arrays::slice::SliceArray +pub type vortex_array::arrays::slice::Slice::Array = vortex_array::arrays::SliceData pub type vortex_array::arrays::slice::Slice::Metadata = vortex_array::arrays::slice::SliceMetadata @@ -3878,25 +3714,25 @@ pub type vortex_array::arrays::slice::Slice::OperationsVTable = vortex_array::ar pub type vortex_array::arrays::slice::Slice::ValidityVTable = vortex_array::arrays::slice::Slice -pub fn vortex_array::arrays::slice::Slice::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::slice::Slice::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::slice::Slice::array_eq(array: &vortex_array::arrays::slice::SliceArray, other: &vortex_array::arrays::slice::SliceArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::slice::Slice::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::slice::Slice::array_hash(array: &vortex_array::arrays::slice::SliceArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::slice::Slice::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::slice::Slice::buffer(_array: &Self::Array, _idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::slice::Slice::buffer(_array: &vortex_array::vtable::Array, _idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::slice::Slice::buffer_name(_array: &Self::Array, _idx: usize) -> core::option::Option +pub fn vortex_array::arrays::slice::Slice::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option pub fn vortex_array::arrays::slice::Slice::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &vortex_array::arrays::slice::SliceMetadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::slice::Slice::child(array: &Self::Array, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::slice::Slice::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::slice::Slice::child_name(_array: &Self::Array, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::slice::Slice::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::slice::Slice::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::slice::Slice::dtype(array: &vortex_array::arrays::slice::SliceArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::slice::Slice::dtype(array: &vortex_array::arrays::SliceData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::slice::Slice::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -3904,13 +3740,13 @@ pub fn vortex_array::arrays::slice::Slice::execute_parent(array: &vortex_array:: pub fn vortex_array::arrays::slice::Slice::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::slice::Slice::len(array: &vortex_array::arrays::slice::SliceArray) -> usize +pub fn vortex_array::arrays::slice::Slice::len(array: &vortex_array::arrays::SliceData) -> usize -pub fn vortex_array::arrays::slice::Slice::metadata(array: &Self::Array) -> vortex_error::VortexResult +pub fn vortex_array::arrays::slice::Slice::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::slice::Slice::nbuffers(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::slice::Slice::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::slice::Slice::nchildren(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::slice::Slice::nchildren(_array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::slice::Slice::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -3918,65 +3754,59 @@ pub fn vortex_array::arrays::slice::Slice::reduce_parent(array: &vortex_array::v pub fn vortex_array::arrays::slice::Slice::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::slice::Slice::stats(array: &vortex_array::arrays::slice::SliceArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::slice::Slice::stats(array: &vortex_array::arrays::SliceData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::slice::Slice::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::slice::Slice::vtable(_array: &vortex_array::arrays::SliceData) -> &Self pub fn vortex_array::arrays::slice::Slice::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::slice::Slice -pub fn vortex_array::arrays::slice::Slice::validity(array: &vortex_array::arrays::slice::SliceArray) -> vortex_error::VortexResult - -pub struct vortex_array::arrays::slice::SliceArray - -impl vortex_array::arrays::slice::SliceArray +pub fn vortex_array::arrays::slice::Slice::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::slice::SliceArray::child(&self) -> &vortex_array::ArrayRef - -pub fn vortex_array::arrays::slice::SliceArray::into_parts(self) -> vortex_array::arrays::slice::SliceArrayParts +pub struct vortex_array::arrays::slice::SliceArrayParts -pub fn vortex_array::arrays::slice::SliceArray::new(child: vortex_array::ArrayRef, range: core::ops::range::Range) -> Self +pub vortex_array::arrays::slice::SliceArrayParts::child: vortex_array::ArrayRef -pub fn vortex_array::arrays::slice::SliceArray::slice_range(&self) -> &core::ops::range::Range +pub vortex_array::arrays::slice::SliceArrayParts::range: core::ops::range::Range -pub fn vortex_array::arrays::slice::SliceArray::try_new(child: vortex_array::ArrayRef, range: core::ops::range::Range) -> vortex_error::VortexResult +pub struct vortex_array::arrays::slice::SliceData -impl vortex_array::arrays::slice::SliceArray +impl vortex_array::arrays::SliceData -pub fn vortex_array::arrays::slice::SliceArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::SliceData::child(&self) -> &vortex_array::ArrayRef -impl core::clone::Clone for vortex_array::arrays::slice::SliceArray +pub fn vortex_array::arrays::SliceData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_array::arrays::slice::SliceArray::clone(&self) -> vortex_array::arrays::slice::SliceArray +pub fn vortex_array::arrays::SliceData::is_empty(&self) -> bool -impl core::convert::AsRef for vortex_array::arrays::slice::SliceArray +pub fn vortex_array::arrays::SliceData::len(&self) -> usize -pub fn vortex_array::arrays::slice::SliceArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub fn vortex_array::arrays::SliceData::new(child: vortex_array::ArrayRef, range: core::ops::range::Range) -> Self -impl core::convert::From for vortex_array::ArrayRef +pub fn vortex_array::arrays::SliceData::slice_range(&self) -> &core::ops::range::Range -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::slice::SliceArray) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::SliceData::try_new(child: vortex_array::ArrayRef, range: core::ops::range::Range) -> vortex_error::VortexResult -impl core::fmt::Debug for vortex_array::arrays::slice::SliceArray +impl vortex_array::arrays::SliceData -pub fn vortex_array::arrays::slice::SliceArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_array::arrays::SliceData::into_parts(self) -> vortex_array::arrays::slice::SliceArrayParts -impl core::ops::deref::Deref for vortex_array::arrays::slice::SliceArray +impl core::clone::Clone for vortex_array::arrays::SliceData -pub type vortex_array::arrays::slice::SliceArray::Target = dyn vortex_array::DynArray +pub fn vortex_array::arrays::SliceData::clone(&self) -> vortex_array::arrays::SliceData -pub fn vortex_array::arrays::slice::SliceArray::deref(&self) -> &Self::Target +impl core::convert::From for vortex_array::ArrayRef -impl vortex_array::IntoArray for vortex_array::arrays::slice::SliceArray +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::SliceData) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::slice::SliceArray::into_array(self) -> vortex_array::ArrayRef +impl core::fmt::Debug for vortex_array::arrays::SliceData -pub struct vortex_array::arrays::slice::SliceArrayParts +pub fn vortex_array::arrays::SliceData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub vortex_array::arrays::slice::SliceArrayParts::child: vortex_array::ArrayRef +impl vortex_array::IntoArray for vortex_array::arrays::SliceData -pub vortex_array::arrays::slice::SliceArrayParts::range: core::ops::range::Range +pub fn vortex_array::arrays::SliceData::into_array(self) -> vortex_array::ArrayRef pub struct vortex_array::arrays::slice::SliceExecuteAdaptor(pub V) @@ -3992,7 +3822,7 @@ impl vortex_array::kernel::ExecuteParentKernel for vortex_array::arrays::s pub type vortex_array::arrays::slice::SliceExecuteAdaptor::Parent = vortex_array::arrays::slice::Slice -pub fn vortex_array::arrays::slice::SliceExecuteAdaptor::execute_parent(&self, array: &::Array, parent: ::Match, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::slice::SliceExecuteAdaptor::execute_parent(&self, array: &vortex_array::vtable::Array, parent: ::Match, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> pub struct vortex_array::arrays::slice::SliceMetadata(_) @@ -4014,79 +3844,81 @@ impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_arra pub type vortex_array::arrays::slice::SliceReduceAdaptor::Parent = vortex_array::arrays::slice::Slice -pub fn vortex_array::arrays::slice::SliceReduceAdaptor::reduce_parent(&self, array: &::Array, parent: ::Match, child_idx: usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::slice::SliceReduceAdaptor::reduce_parent(&self, array: &vortex_array::vtable::Array, parent: ::Match, child_idx: usize) -> vortex_error::VortexResult> pub trait vortex_array::arrays::slice::SliceKernel: vortex_array::vtable::VTable -pub fn vortex_array::arrays::slice::SliceKernel::slice(array: &Self::Array, range: core::ops::range::Range, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::slice::SliceKernel::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceKernel for vortex_array::arrays::Chunked -pub fn vortex_array::arrays::Chunked::slice(array: &Self::Array, range: core::ops::range::Range, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Chunked::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> pub trait vortex_array::arrays::slice::SliceReduce: vortex_array::vtable::VTable -pub fn vortex_array::arrays::slice::SliceReduce::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::slice::SliceReduce::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::Bool -pub fn vortex_array::arrays::Bool::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Bool::slice(array: &vortex_array::arrays::BoolArray, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::Constant -pub fn vortex_array::arrays::Constant::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Constant::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::Decimal -pub fn vortex_array::arrays::Decimal::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Decimal::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::Extension -pub fn vortex_array::arrays::Extension::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Extension::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::FixedSizeList -pub fn vortex_array::arrays::FixedSizeList::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::FixedSizeList::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::List -pub fn vortex_array::arrays::List::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::List::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::ListView -pub fn vortex_array::arrays::ListView::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::ListView::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::Masked -pub fn vortex_array::arrays::Masked::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Masked::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::Primitive -pub fn vortex_array::arrays::Primitive::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Primitive::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::Struct -pub fn vortex_array::arrays::Struct::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Struct::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::VarBin -pub fn vortex_array::arrays::VarBin::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBin::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::VarBinView -pub fn vortex_array::arrays::VarBinView::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBinView::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::null::Null -pub fn vortex_array::arrays::null::Null::slice(_array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::null::Null::slice(_array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::slice::Slice -pub fn vortex_array::arrays::slice::Slice::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::slice::Slice::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> + +pub type vortex_array::arrays::slice::SliceArray = vortex_array::vtable::Array pub mod vortex_array::arrays::struct_ @@ -4106,31 +3938,31 @@ pub fn vortex_array::arrays::Struct::fmt(&self, f: &mut core::fmt::Formatter<'_> impl vortex_array::arrays::dict::TakeReduce for vortex_array::arrays::Struct -pub fn vortex_array::arrays::Struct::take(array: &vortex_array::arrays::StructArray, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Struct::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::Struct -pub fn vortex_array::arrays::Struct::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Struct::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastKernel for vortex_array::arrays::Struct -pub fn vortex_array::arrays::Struct::cast(array: &vortex_array::arrays::StructArray, dtype: &vortex_array::dtype::DType, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Struct::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::Struct -pub fn vortex_array::arrays::Struct::mask(array: &vortex_array::arrays::StructArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Struct::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::zip::ZipKernel for vortex_array::arrays::Struct -pub fn vortex_array::arrays::Struct::zip(if_true: &vortex_array::arrays::StructArray, if_false: &vortex_array::ArrayRef, mask: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Struct::zip(if_true: &vortex_array::vtable::Array, if_false: &vortex_array::ArrayRef, mask: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::Struct -pub fn vortex_array::arrays::Struct::scalar_at(array: &vortex_array::arrays::StructArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Struct::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::Struct -pub type vortex_array::arrays::Struct::Array = vortex_array::arrays::StructArray +pub type vortex_array::arrays::Struct::Array = vortex_array::arrays::StructData pub type vortex_array::arrays::Struct::Metadata = vortex_array::EmptyMetadata @@ -4138,25 +3970,25 @@ pub type vortex_array::arrays::Struct::OperationsVTable = vortex_array::arrays:: pub type vortex_array::arrays::Struct::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::Struct::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Struct::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Struct::array_eq(array: &vortex_array::arrays::StructArray, other: &vortex_array::arrays::StructArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Struct::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Struct::array_hash(array: &vortex_array::arrays::StructArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Struct::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Struct::buffer(_array: &vortex_array::arrays::StructArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Struct::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Struct::buffer_name(_array: &vortex_array::arrays::StructArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Struct::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Struct::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Struct::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Struct::child(array: &vortex_array::arrays::StructArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Struct::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Struct::child_name(array: &vortex_array::arrays::StructArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Struct::child_name(array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Struct::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Struct::dtype(array: &vortex_array::arrays::StructArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Struct::dtype(array: &vortex_array::arrays::StructData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Struct::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -4164,13 +3996,13 @@ pub fn vortex_array::arrays::Struct::execute_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Struct::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Struct::len(array: &vortex_array::arrays::StructArray) -> usize +pub fn vortex_array::arrays::Struct::len(array: &vortex_array::arrays::StructData) -> usize -pub fn vortex_array::arrays::Struct::metadata(_array: &vortex_array::arrays::StructArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Struct::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Struct::nbuffers(_array: &vortex_array::arrays::StructArray) -> usize +pub fn vortex_array::arrays::Struct::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Struct::nchildren(array: &vortex_array::arrays::StructArray) -> usize +pub fn vortex_array::arrays::Struct::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Struct::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -4178,103 +4010,95 @@ pub fn vortex_array::arrays::Struct::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::Struct::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Struct::stats(array: &vortex_array::arrays::StructArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Struct::stats(array: &vortex_array::arrays::StructData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Struct::vtable(_array: &Self::Array) -> &Self pub fn vortex_array::arrays::Struct::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> -pub struct vortex_array::arrays::struct_::StructArray - -impl vortex_array::arrays::StructArray - -pub fn vortex_array::arrays::StructArray::from_fields>(items: &[(N, vortex_array::ArrayRef)]) -> vortex_error::VortexResult - -pub fn vortex_array::arrays::StructArray::into_fields(self) -> alloc::vec::Vec - -pub fn vortex_array::arrays::StructArray::into_parts(self) -> vortex_array::arrays::struct_::StructArrayParts +pub struct vortex_array::arrays::struct_::StructArrayParts -pub fn vortex_array::arrays::StructArray::names(&self) -> &vortex_array::dtype::FieldNames +pub vortex_array::arrays::struct_::StructArrayParts::fields: alloc::sync::Arc<[vortex_array::ArrayRef]> -pub fn vortex_array::arrays::StructArray::new(names: vortex_array::dtype::FieldNames, fields: impl core::convert::Into>, length: usize, validity: vortex_array::validity::Validity) -> Self +pub vortex_array::arrays::struct_::StructArrayParts::struct_fields: vortex_array::dtype::StructFields -pub fn vortex_array::arrays::StructArray::new_fieldless_with_len(len: usize) -> Self +pub vortex_array::arrays::struct_::StructArrayParts::validity: vortex_array::validity::Validity -pub unsafe fn vortex_array::arrays::StructArray::new_unchecked(fields: impl core::convert::Into>, dtype: vortex_array::dtype::StructFields, length: usize, validity: vortex_array::validity::Validity) -> Self +pub struct vortex_array::arrays::struct_::StructData -pub fn vortex_array::arrays::StructArray::project(&self, projection: &[vortex_array::dtype::FieldName]) -> vortex_error::VortexResult +impl vortex_array::arrays::StructData -pub fn vortex_array::arrays::StructArray::remove_column(&mut self, name: impl core::convert::Into) -> core::option::Option +pub fn vortex_array::arrays::StructData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_array::arrays::StructArray::struct_fields(&self) -> &vortex_array::dtype::StructFields +pub fn vortex_array::arrays::StructData::from_fields>(items: &[(N, vortex_array::ArrayRef)]) -> vortex_error::VortexResult -pub fn vortex_array::arrays::StructArray::try_from_iter, A: vortex_array::IntoArray, T: core::iter::traits::collect::IntoIterator>(iter: T) -> vortex_error::VortexResult +pub fn vortex_array::arrays::StructData::into_fields(self) -> alloc::vec::Vec -pub fn vortex_array::arrays::StructArray::try_from_iter_with_validity, A: vortex_array::IntoArray, T: core::iter::traits::collect::IntoIterator>(iter: T, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult +pub fn vortex_array::arrays::StructData::into_parts(self) -> vortex_array::arrays::struct_::StructArrayParts -pub fn vortex_array::arrays::StructArray::try_new(names: vortex_array::dtype::FieldNames, fields: impl core::convert::Into>, length: usize, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult +pub fn vortex_array::arrays::StructData::is_empty(&self) -> bool -pub fn vortex_array::arrays::StructArray::try_new_with_dtype(fields: impl core::convert::Into>, dtype: vortex_array::dtype::StructFields, length: usize, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult +pub fn vortex_array::arrays::StructData::len(&self) -> usize -pub fn vortex_array::arrays::StructArray::unmasked_field_by_name(&self, name: impl core::convert::AsRef) -> vortex_error::VortexResult<&vortex_array::ArrayRef> +pub fn vortex_array::arrays::StructData::names(&self) -> &vortex_array::dtype::FieldNames -pub fn vortex_array::arrays::StructArray::unmasked_field_by_name_opt(&self, name: impl core::convert::AsRef) -> core::option::Option<&vortex_array::ArrayRef> +pub fn vortex_array::arrays::StructData::new(names: vortex_array::dtype::FieldNames, fields: impl core::convert::Into>, length: usize, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::StructArray::unmasked_fields(&self) -> &alloc::sync::Arc<[vortex_array::ArrayRef]> +pub fn vortex_array::arrays::StructData::new_fieldless_with_len(len: usize) -> Self -pub fn vortex_array::arrays::StructArray::validate(fields: &[vortex_array::ArrayRef], dtype: &vortex_array::dtype::StructFields, length: usize, validity: &vortex_array::validity::Validity) -> vortex_error::VortexResult<()> +pub unsafe fn vortex_array::arrays::StructData::new_unchecked(fields: impl core::convert::Into>, dtype: vortex_array::dtype::StructFields, length: usize, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::StructArray::with_column(&self, name: impl core::convert::Into, array: vortex_array::ArrayRef) -> vortex_error::VortexResult +pub fn vortex_array::arrays::StructData::project(&self, projection: &[vortex_array::dtype::FieldName]) -> vortex_error::VortexResult -impl vortex_array::arrays::StructArray +pub fn vortex_array::arrays::StructData::remove_column(&mut self, name: impl core::convert::Into) -> core::option::Option -pub fn vortex_array::arrays::StructArray::into_record_batch_with_schema(self, schema: impl core::convert::AsRef) -> vortex_error::VortexResult +pub fn vortex_array::arrays::StructData::struct_fields(&self) -> &vortex_array::dtype::StructFields -impl vortex_array::arrays::StructArray +pub fn vortex_array::arrays::StructData::try_from_iter, A: vortex_array::IntoArray, T: core::iter::traits::collect::IntoIterator>(iter: T) -> vortex_error::VortexResult -pub fn vortex_array::arrays::StructArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::StructData::try_from_iter_with_validity, A: vortex_array::IntoArray, T: core::iter::traits::collect::IntoIterator>(iter: T, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult -impl core::clone::Clone for vortex_array::arrays::StructArray +pub fn vortex_array::arrays::StructData::try_new(names: vortex_array::dtype::FieldNames, fields: impl core::convert::Into>, length: usize, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult -pub fn vortex_array::arrays::StructArray::clone(&self) -> vortex_array::arrays::StructArray +pub fn vortex_array::arrays::StructData::try_new_with_dtype(fields: impl core::convert::Into>, dtype: vortex_array::dtype::StructFields, length: usize, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult -impl core::convert::AsRef for vortex_array::arrays::StructArray +pub fn vortex_array::arrays::StructData::unmasked_field_by_name(&self, name: impl core::convert::AsRef) -> vortex_error::VortexResult<&vortex_array::ArrayRef> -pub fn vortex_array::arrays::StructArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub fn vortex_array::arrays::StructData::unmasked_field_by_name_opt(&self, name: impl core::convert::AsRef) -> core::option::Option<&vortex_array::ArrayRef> -impl core::convert::From for vortex_array::ArrayRef +pub fn vortex_array::arrays::StructData::unmasked_fields(&self) -> &alloc::sync::Arc<[vortex_array::ArrayRef]> -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::StructArray) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::StructData::validate(fields: &[vortex_array::ArrayRef], dtype: &vortex_array::dtype::StructFields, length: usize, validity: &vortex_array::validity::Validity) -> vortex_error::VortexResult<()> -impl core::fmt::Debug for vortex_array::arrays::StructArray +pub fn vortex_array::arrays::StructData::validity(&self) -> &vortex_array::validity::Validity -pub fn vortex_array::arrays::StructArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_array::arrays::StructData::validity_mask(&self) -> vortex_mask::Mask -impl core::ops::deref::Deref for vortex_array::arrays::StructArray +impl vortex_array::arrays::StructData -pub type vortex_array::arrays::StructArray::Target = dyn vortex_array::DynArray +pub fn vortex_array::arrays::StructData::with_column(&self, name: impl core::convert::Into, array: vortex_array::ArrayRef) -> vortex_error::VortexResult -pub fn vortex_array::arrays::StructArray::deref(&self) -> &Self::Target +impl core::clone::Clone for vortex_array::arrays::StructData -impl vortex_array::Executable for vortex_array::arrays::StructArray +pub fn vortex_array::arrays::StructData::clone(&self) -> vortex_array::arrays::StructData -pub fn vortex_array::arrays::StructArray::execute(array: vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +impl core::convert::From for vortex_array::ArrayRef -impl vortex_array::IntoArray for vortex_array::arrays::StructArray +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::StructData) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::StructArray::into_array(self) -> vortex_array::ArrayRef +impl core::fmt::Debug for vortex_array::arrays::StructData -impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::StructArray +pub fn vortex_array::arrays::StructData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub fn vortex_array::arrays::StructArray::validity(&self) -> &vortex_array::validity::Validity +impl vortex_array::IntoArray for vortex_array::arrays::StructData -pub struct vortex_array::arrays::struct_::StructArrayParts +pub fn vortex_array::arrays::StructData::into_array(self) -> vortex_array::ArrayRef -pub vortex_array::arrays::struct_::StructArrayParts::fields: alloc::sync::Arc<[vortex_array::ArrayRef]> +impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::StructData -pub vortex_array::arrays::struct_::StructArrayParts::struct_fields: vortex_array::dtype::StructFields +pub fn vortex_array::arrays::StructData::validity(&self) -> &vortex_array::validity::Validity -pub vortex_array::arrays::struct_::StructArrayParts::validity: vortex_array::validity::Validity +pub type vortex_array::arrays::struct_::StructArray = vortex_array::vtable::Array pub mod vortex_array::arrays::varbin @@ -4312,7 +4136,7 @@ pub const vortex_array::arrays::VarBin::ID: vortex_array::vtable::ArrayId impl vortex_array::arrays::VarBin -pub fn vortex_array::arrays::VarBin::_slice(array: &vortex_array::arrays::VarBinArray, range: core::ops::range::Range) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBin::_slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult impl core::clone::Clone for vortex_array::arrays::VarBin @@ -4324,35 +4148,35 @@ pub fn vortex_array::arrays::VarBin::fmt(&self, f: &mut core::fmt::Formatter<'_> impl vortex_array::arrays::dict::TakeExecute for vortex_array::arrays::VarBin -pub fn vortex_array::arrays::VarBin::take(array: &vortex_array::arrays::VarBinArray, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBin::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::filter::FilterKernel for vortex_array::arrays::VarBin -pub fn vortex_array::arrays::VarBin::filter(array: &vortex_array::arrays::VarBinArray, mask: &vortex_mask::Mask, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBin::filter(array: &vortex_array::vtable::Array, mask: &vortex_mask::Mask, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::VarBin -pub fn vortex_array::arrays::VarBin::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBin::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::binary::CompareKernel for vortex_array::arrays::VarBin -pub fn vortex_array::arrays::VarBin::compare(lhs: &vortex_array::arrays::VarBinArray, rhs: &vortex_array::ArrayRef, operator: vortex_array::scalar_fn::fns::operators::CompareOperator, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBin::compare(lhs: &vortex_array::vtable::Array, rhs: &vortex_array::ArrayRef, operator: vortex_array::scalar_fn::fns::operators::CompareOperator, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastReduce for vortex_array::arrays::VarBin -pub fn vortex_array::arrays::VarBin::cast(array: &vortex_array::arrays::VarBinArray, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBin::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::VarBin -pub fn vortex_array::arrays::VarBin::mask(array: &vortex_array::arrays::VarBinArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBin::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::VarBin -pub fn vortex_array::arrays::VarBin::scalar_at(array: &vortex_array::arrays::VarBinArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBin::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::VarBin -pub type vortex_array::arrays::VarBin::Array = vortex_array::arrays::VarBinArray +pub type vortex_array::arrays::VarBin::Array = vortex_array::arrays::VarBinData pub type vortex_array::arrays::VarBin::Metadata = vortex_array::ProstMetadata @@ -4360,25 +4184,25 @@ pub type vortex_array::arrays::VarBin::OperationsVTable = vortex_array::arrays:: pub type vortex_array::arrays::VarBin::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::VarBin::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::VarBin::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::VarBin::array_eq(array: &vortex_array::arrays::VarBinArray, other: &vortex_array::arrays::VarBinArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::VarBin::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::VarBin::array_hash(array: &vortex_array::arrays::VarBinArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::VarBin::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::VarBin::buffer(array: &vortex_array::arrays::VarBinArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::VarBin::buffer(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::VarBin::buffer_name(_array: &vortex_array::arrays::VarBinArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::VarBin::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::VarBin::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBin::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::VarBin::child(array: &vortex_array::arrays::VarBinArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::VarBin::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::VarBin::child_name(_array: &vortex_array::arrays::VarBinArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::VarBin::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::VarBin::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::VarBin::dtype(array: &vortex_array::arrays::VarBinArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::VarBin::dtype(array: &vortex_array::arrays::VarBinData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::VarBin::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -4386,13 +4210,13 @@ pub fn vortex_array::arrays::VarBin::execute_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::VarBin::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::VarBin::len(array: &vortex_array::arrays::VarBinArray) -> usize +pub fn vortex_array::arrays::VarBin::len(array: &vortex_array::arrays::VarBinData) -> usize -pub fn vortex_array::arrays::VarBin::metadata(array: &vortex_array::arrays::VarBinArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBin::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::VarBin::nbuffers(_array: &vortex_array::arrays::VarBinArray) -> usize +pub fn vortex_array::arrays::VarBin::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::VarBin::nchildren(array: &vortex_array::arrays::VarBinArray) -> usize +pub fn vortex_array::arrays::VarBin::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::VarBin::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -4400,142 +4224,134 @@ pub fn vortex_array::arrays::VarBin::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::VarBin::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::VarBin::stats(array: &vortex_array::arrays::VarBinArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::VarBin::stats(array: &vortex_array::arrays::VarBinData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::VarBin::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::VarBin::vtable(_array: &vortex_array::arrays::VarBinData) -> &Self pub fn vortex_array::arrays::VarBin::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> -pub struct vortex_array::arrays::varbin::VarBinArray - -impl vortex_array::arrays::VarBinArray - -pub fn vortex_array::arrays::VarBinArray::bytes(&self) -> &vortex_buffer::ByteBuffer +pub struct vortex_array::arrays::varbin::VarBinData -pub fn vortex_array::arrays::VarBinArray::bytes_at(&self, index: usize) -> vortex_buffer::ByteBuffer +impl vortex_array::arrays::VarBinData -pub fn vortex_array::arrays::VarBinArray::bytes_handle(&self) -> &vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::VarBinData::bytes(&self) -> &vortex_buffer::ByteBuffer -pub fn vortex_array::arrays::VarBinArray::from_iter, I: core::iter::traits::collect::IntoIterator>>(iter: I, dtype: vortex_array::dtype::DType) -> Self +pub fn vortex_array::arrays::VarBinData::bytes_handle(&self) -> &vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::VarBinArray::from_iter_nonnull, I: core::iter::traits::collect::IntoIterator>(iter: I, dtype: vortex_array::dtype::DType) -> Self +pub fn vortex_array::arrays::VarBinData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_array::arrays::VarBinArray::from_vec>(vec: alloc::vec::Vec, dtype: vortex_array::dtype::DType) -> Self +pub fn vortex_array::arrays::VarBinData::from_iter, I: core::iter::traits::collect::IntoIterator>>(iter: I, dtype: vortex_array::dtype::DType) -> Self -pub fn vortex_array::arrays::VarBinArray::into_parts(self) -> (vortex_array::dtype::DType, vortex_array::buffer::BufferHandle, vortex_array::ArrayRef, vortex_array::validity::Validity) +pub fn vortex_array::arrays::VarBinData::from_iter_nonnull, I: core::iter::traits::collect::IntoIterator>(iter: I, dtype: vortex_array::dtype::DType) -> Self -pub fn vortex_array::arrays::VarBinArray::new(offsets: vortex_array::ArrayRef, bytes: vortex_buffer::ByteBuffer, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self +pub fn vortex_array::arrays::VarBinData::from_vec>(vec: alloc::vec::Vec, dtype: vortex_array::dtype::DType) -> Self -pub fn vortex_array::arrays::VarBinArray::new_from_handle(offset: vortex_array::ArrayRef, bytes: vortex_array::buffer::BufferHandle, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self +pub fn vortex_array::arrays::VarBinData::is_empty(&self) -> bool -pub unsafe fn vortex_array::arrays::VarBinArray::new_unchecked(offsets: vortex_array::ArrayRef, bytes: vortex_buffer::ByteBuffer, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self +pub fn vortex_array::arrays::VarBinData::len(&self) -> usize -pub unsafe fn vortex_array::arrays::VarBinArray::new_unchecked_from_handle(offsets: vortex_array::ArrayRef, bytes: vortex_array::buffer::BufferHandle, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self +pub fn vortex_array::arrays::VarBinData::new(offsets: vortex_array::ArrayRef, bytes: vortex_buffer::ByteBuffer, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::VarBinArray::offset_at(&self, index: usize) -> usize +pub fn vortex_array::arrays::VarBinData::new_from_handle(offset: vortex_array::ArrayRef, bytes: vortex_array::buffer::BufferHandle, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::VarBinArray::offsets(&self) -> &vortex_array::ArrayRef +pub unsafe fn vortex_array::arrays::VarBinData::new_unchecked(offsets: vortex_array::ArrayRef, bytes: vortex_buffer::ByteBuffer, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::VarBinArray::sliced_bytes(&self) -> vortex_buffer::ByteBuffer +pub unsafe fn vortex_array::arrays::VarBinData::new_unchecked_from_handle(offsets: vortex_array::ArrayRef, bytes: vortex_array::buffer::BufferHandle, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::VarBinArray::try_new(offsets: vortex_array::ArrayRef, bytes: vortex_buffer::ByteBuffer, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBinData::offsets(&self) -> &vortex_array::ArrayRef -pub fn vortex_array::arrays::VarBinArray::try_new_from_handle(offsets: vortex_array::ArrayRef, bytes: vortex_array::buffer::BufferHandle, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBinData::sliced_bytes(&self) -> vortex_buffer::ByteBuffer -pub fn vortex_array::arrays::VarBinArray::validate(offsets: &vortex_array::ArrayRef, bytes: &vortex_array::buffer::BufferHandle, dtype: &vortex_array::dtype::DType, validity: &vortex_array::validity::Validity) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::VarBinData::try_new(offsets: vortex_array::ArrayRef, bytes: vortex_buffer::ByteBuffer, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult -impl vortex_array::arrays::VarBinArray +pub fn vortex_array::arrays::VarBinData::try_new_from_handle(offsets: vortex_array::ArrayRef, bytes: vortex_array::buffer::BufferHandle, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult -pub fn vortex_array::arrays::VarBinArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::VarBinData::validate(offsets: &vortex_array::ArrayRef, bytes: &vortex_array::buffer::BufferHandle, dtype: &vortex_array::dtype::DType, validity: &vortex_array::validity::Validity) -> vortex_error::VortexResult<()> -impl core::clone::Clone for vortex_array::arrays::VarBinArray +pub fn vortex_array::arrays::VarBinData::validity(&self) -> &vortex_array::validity::Validity -pub fn vortex_array::arrays::VarBinArray::clone(&self) -> vortex_array::arrays::VarBinArray +pub fn vortex_array::arrays::VarBinData::validity_mask(&self) -> vortex_mask::Mask -impl core::convert::AsRef for vortex_array::arrays::VarBinArray +impl vortex_array::arrays::VarBinData -pub fn vortex_array::arrays::VarBinArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub fn vortex_array::arrays::VarBinData::bytes_at(&self, index: usize) -> vortex_buffer::ByteBuffer -impl core::convert::From> for vortex_array::arrays::VarBinArray +pub fn vortex_array::arrays::VarBinData::into_parts(self) -> (vortex_array::dtype::DType, vortex_array::buffer::BufferHandle, vortex_array::ArrayRef, vortex_array::validity::Validity) -pub fn vortex_array::arrays::VarBinArray::from(value: alloc::vec::Vec<&[u8]>) -> Self +pub fn vortex_array::arrays::VarBinData::offset_at(&self, index: usize) -> usize -impl core::convert::From> for vortex_array::arrays::VarBinArray +impl core::clone::Clone for vortex_array::arrays::VarBinData -pub fn vortex_array::arrays::VarBinArray::from(value: alloc::vec::Vec<&str>) -> Self +pub fn vortex_array::arrays::VarBinData::clone(&self) -> vortex_array::arrays::VarBinData -impl core::convert::From> for vortex_array::arrays::VarBinArray +impl core::convert::From> for vortex_array::arrays::VarBinData -pub fn vortex_array::arrays::VarBinArray::from(value: alloc::vec::Vec) -> Self +pub fn vortex_array::arrays::VarBinData::from(value: alloc::vec::Vec<&[u8]>) -> Self -impl core::convert::From>> for vortex_array::arrays::VarBinArray +impl core::convert::From> for vortex_array::arrays::VarBinData -pub fn vortex_array::arrays::VarBinArray::from(value: alloc::vec::Vec>) -> Self +pub fn vortex_array::arrays::VarBinData::from(value: alloc::vec::Vec<&str>) -> Self -impl core::convert::From>> for vortex_array::arrays::VarBinArray +impl core::convert::From> for vortex_array::arrays::VarBinData -pub fn vortex_array::arrays::VarBinArray::from(value: alloc::vec::Vec>) -> Self +pub fn vortex_array::arrays::VarBinData::from(value: alloc::vec::Vec) -> Self -impl core::convert::From>> for vortex_array::arrays::VarBinArray +impl core::convert::From>> for vortex_array::arrays::VarBinData -pub fn vortex_array::arrays::VarBinArray::from(value: alloc::vec::Vec>) -> Self +pub fn vortex_array::arrays::VarBinData::from(value: alloc::vec::Vec>) -> Self -impl core::convert::From>> for vortex_array::arrays::VarBinArray +impl core::convert::From>> for vortex_array::arrays::VarBinData -pub fn vortex_array::arrays::VarBinArray::from(value: alloc::vec::Vec>) -> Self +pub fn vortex_array::arrays::VarBinData::from(value: alloc::vec::Vec>) -> Self -impl core::convert::From>>> for vortex_array::arrays::VarBinArray +impl core::convert::From>> for vortex_array::arrays::VarBinData -pub fn vortex_array::arrays::VarBinArray::from(value: alloc::vec::Vec>>) -> Self +pub fn vortex_array::arrays::VarBinData::from(value: alloc::vec::Vec>) -> Self -impl core::convert::From for vortex_array::ArrayRef +impl core::convert::From>> for vortex_array::arrays::VarBinData -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::VarBinArray) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::VarBinData::from(value: alloc::vec::Vec>) -> Self -impl core::fmt::Debug for vortex_array::arrays::VarBinArray +impl core::convert::From>>> for vortex_array::arrays::VarBinData -pub fn vortex_array::arrays::VarBinArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_array::arrays::VarBinData::from(value: alloc::vec::Vec>>) -> Self -impl core::iter::traits::collect::FromIterator> for vortex_array::arrays::VarBinArray +impl core::convert::From for vortex_array::ArrayRef -pub fn vortex_array::arrays::VarBinArray::from_iter>>(iter: T) -> Self +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::VarBinData) -> vortex_array::ArrayRef -impl core::iter::traits::collect::FromIterator>> for vortex_array::arrays::VarBinArray +impl core::fmt::Debug for vortex_array::arrays::VarBinData -pub fn vortex_array::arrays::VarBinArray::from_iter>>>(iter: T) -> Self +pub fn vortex_array::arrays::VarBinData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -impl core::ops::deref::Deref for vortex_array::arrays::VarBinArray +impl core::iter::traits::collect::FromIterator> for vortex_array::arrays::VarBinData -pub type vortex_array::arrays::VarBinArray::Target = dyn vortex_array::DynArray +pub fn vortex_array::arrays::VarBinData::from_iter>>(iter: T) -> Self -pub fn vortex_array::arrays::VarBinArray::deref(&self) -> &Self::Target - -impl vortex_array::IntoArray for vortex_array::arrays::VarBinArray - -pub fn vortex_array::arrays::VarBinArray::into_array(self) -> vortex_array::ArrayRef - -impl vortex_array::accessor::ArrayAccessor<[u8]> for &vortex_array::arrays::VarBinArray +impl core::iter::traits::collect::FromIterator>> for vortex_array::arrays::VarBinData -pub fn &vortex_array::arrays::VarBinArray::with_iterator(&self, f: F) -> R where F: for<'a> core::ops::function::FnOnce(&mut dyn core::iter::traits::iterator::Iterator>) -> R +pub fn vortex_array::arrays::VarBinData::from_iter>>>(iter: T) -> Self -impl vortex_array::accessor::ArrayAccessor<[u8]> for vortex_array::arrays::VarBinArray +impl vortex_array::IntoArray for vortex_array::arrays::VarBinData -pub fn vortex_array::arrays::VarBinArray::with_iterator(&self, f: F) -> R where F: for<'a> core::ops::function::FnOnce(&mut dyn core::iter::traits::iterator::Iterator>) -> R +pub fn vortex_array::arrays::VarBinData::into_array(self) -> vortex_array::ArrayRef -impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::VarBinArray +impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::VarBinData -pub fn vortex_array::arrays::VarBinArray::validity(&self) -> &vortex_array::validity::Validity +pub fn vortex_array::arrays::VarBinData::validity(&self) -> &vortex_array::validity::Validity -impl<'a> core::iter::traits::collect::FromIterator> for vortex_array::arrays::VarBinArray +impl<'a> core::iter::traits::collect::FromIterator> for vortex_array::arrays::VarBinData -pub fn vortex_array::arrays::VarBinArray::from_iter>>(iter: T) -> Self +pub fn vortex_array::arrays::VarBinData::from_iter>>(iter: T) -> Self -impl<'a> core::iter::traits::collect::FromIterator> for vortex_array::arrays::VarBinArray +impl<'a> core::iter::traits::collect::FromIterator> for vortex_array::arrays::VarBinData -pub fn vortex_array::arrays::VarBinArray::from_iter>>(iter: T) -> Self +pub fn vortex_array::arrays::VarBinData::from_iter>>(iter: T) -> Self pub fn vortex_array::arrays::varbin::varbin_scalar(value: vortex_buffer::ByteBuffer, dtype: &vortex_array::dtype::DType) -> vortex_array::scalar::Scalar +pub type vortex_array::arrays::varbin::VarBinArray = vortex_array::vtable::Array + pub mod vortex_array::arrays::varbinview pub mod vortex_array::arrays::varbinview::build_views @@ -4736,31 +4552,31 @@ pub fn vortex_array::arrays::VarBinView::fmt(&self, f: &mut core::fmt::Formatter impl vortex_array::arrays::dict::TakeExecute for vortex_array::arrays::VarBinView -pub fn vortex_array::arrays::VarBinView::take(array: &vortex_array::arrays::VarBinViewArray, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBinView::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::VarBinView -pub fn vortex_array::arrays::VarBinView::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBinView::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastReduce for vortex_array::arrays::VarBinView -pub fn vortex_array::arrays::VarBinView::cast(array: &vortex_array::arrays::VarBinViewArray, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBinView::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::VarBinView -pub fn vortex_array::arrays::VarBinView::mask(array: &vortex_array::arrays::VarBinViewArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBinView::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::zip::ZipKernel for vortex_array::arrays::VarBinView -pub fn vortex_array::arrays::VarBinView::zip(if_true: &vortex_array::arrays::VarBinViewArray, if_false: &vortex_array::ArrayRef, mask: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBinView::zip(if_true: &vortex_array::vtable::Array, if_false: &vortex_array::ArrayRef, mask: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::VarBinView -pub fn vortex_array::arrays::VarBinView::scalar_at(array: &vortex_array::arrays::VarBinViewArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBinView::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::VarBinView -pub type vortex_array::arrays::VarBinView::Array = vortex_array::arrays::VarBinViewArray +pub type vortex_array::arrays::VarBinView::Array = vortex_array::arrays::VarBinViewData pub type vortex_array::arrays::VarBinView::Metadata = vortex_array::EmptyMetadata @@ -4768,25 +4584,25 @@ pub type vortex_array::arrays::VarBinView::OperationsVTable = vortex_array::arra pub type vortex_array::arrays::VarBinView::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::VarBinView::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::VarBinView::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::VarBinView::array_eq(array: &vortex_array::arrays::VarBinViewArray, other: &vortex_array::arrays::VarBinViewArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::VarBinView::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::VarBinView::array_hash(array: &vortex_array::arrays::VarBinViewArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::VarBinView::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::VarBinView::buffer(array: &vortex_array::arrays::VarBinViewArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::VarBinView::buffer(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::VarBinView::buffer_name(array: &vortex_array::arrays::VarBinViewArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::VarBinView::buffer_name(array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::VarBinView::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBinView::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::VarBinView::child(array: &vortex_array::arrays::VarBinViewArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::VarBinView::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::VarBinView::child_name(_array: &vortex_array::arrays::VarBinViewArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::VarBinView::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::VarBinView::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::VarBinView::dtype(array: &vortex_array::arrays::VarBinViewArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::VarBinView::dtype(array: &vortex_array::arrays::VarBinViewData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::VarBinView::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -4794,13 +4610,13 @@ pub fn vortex_array::arrays::VarBinView::execute_parent(array: &vortex_array::vt pub fn vortex_array::arrays::VarBinView::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::VarBinView::len(array: &vortex_array::arrays::VarBinViewArray) -> usize +pub fn vortex_array::arrays::VarBinView::len(array: &vortex_array::arrays::VarBinViewData) -> usize -pub fn vortex_array::arrays::VarBinView::metadata(_array: &vortex_array::arrays::VarBinViewArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBinView::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::VarBinView::nbuffers(array: &vortex_array::arrays::VarBinViewArray) -> usize +pub fn vortex_array::arrays::VarBinView::nbuffers(array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::VarBinView::nchildren(array: &vortex_array::arrays::VarBinViewArray) -> usize +pub fn vortex_array::arrays::VarBinView::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::VarBinView::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -4808,131 +4624,111 @@ pub fn vortex_array::arrays::VarBinView::reduce_parent(array: &vortex_array::vta pub fn vortex_array::arrays::VarBinView::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::VarBinView::stats(array: &vortex_array::arrays::VarBinViewArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::VarBinView::stats(array: &vortex_array::arrays::VarBinViewData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::VarBinView::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::VarBinView::vtable(_array: &vortex_array::arrays::VarBinViewData) -> &Self pub fn vortex_array::arrays::VarBinView::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> -pub struct vortex_array::arrays::varbinview::VarBinViewArray - -impl vortex_array::arrays::VarBinViewArray - -pub fn vortex_array::arrays::VarBinViewArray::buffer(&self, idx: usize) -> &vortex_buffer::ByteBuffer - -pub fn vortex_array::arrays::VarBinViewArray::buffers(&self) -> &alloc::sync::Arc<[vortex_array::buffer::BufferHandle]> - -pub fn vortex_array::arrays::VarBinViewArray::bytes_at(&self, index: usize) -> vortex_buffer::ByteBuffer - -pub fn vortex_array::arrays::VarBinViewArray::from_iter, I: core::iter::traits::collect::IntoIterator>>(iter: I, dtype: vortex_array::dtype::DType) -> Self - -pub fn vortex_array::arrays::VarBinViewArray::from_iter_bin, I: core::iter::traits::collect::IntoIterator>(iter: I) -> Self - -pub fn vortex_array::arrays::VarBinViewArray::from_iter_nullable_bin, I: core::iter::traits::collect::IntoIterator>>(iter: I) -> Self - -pub fn vortex_array::arrays::VarBinViewArray::from_iter_nullable_str, I: core::iter::traits::collect::IntoIterator>>(iter: I) -> Self - -pub fn vortex_array::arrays::VarBinViewArray::from_iter_str, I: core::iter::traits::collect::IntoIterator>(iter: I) -> Self - -pub fn vortex_array::arrays::VarBinViewArray::into_parts(self) -> vortex_array::arrays::varbinview::VarBinViewArrayParts +pub struct vortex_array::arrays::varbinview::VarBinViewArrayParts -pub fn vortex_array::arrays::VarBinViewArray::nbuffers(&self) -> usize +pub vortex_array::arrays::varbinview::VarBinViewArrayParts::buffers: alloc::sync::Arc<[vortex_array::buffer::BufferHandle]> -pub fn vortex_array::arrays::VarBinViewArray::new(views: vortex_buffer::buffer::Buffer, buffers: alloc::sync::Arc<[vortex_buffer::ByteBuffer]>, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self +pub vortex_array::arrays::varbinview::VarBinViewArrayParts::dtype: vortex_array::dtype::DType -pub fn vortex_array::arrays::VarBinViewArray::new_handle(views: vortex_array::buffer::BufferHandle, buffers: alloc::sync::Arc<[vortex_array::buffer::BufferHandle]>, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self +pub vortex_array::arrays::varbinview::VarBinViewArrayParts::validity: vortex_array::validity::Validity -pub unsafe fn vortex_array::arrays::VarBinViewArray::new_handle_unchecked(views: vortex_array::buffer::BufferHandle, buffers: alloc::sync::Arc<[vortex_array::buffer::BufferHandle]>, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self +pub vortex_array::arrays::varbinview::VarBinViewArrayParts::views: vortex_array::buffer::BufferHandle -pub unsafe fn vortex_array::arrays::VarBinViewArray::new_unchecked(views: vortex_buffer::buffer::Buffer, buffers: alloc::sync::Arc<[vortex_buffer::ByteBuffer]>, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self +pub struct vortex_array::arrays::varbinview::VarBinViewData -pub fn vortex_array::arrays::VarBinViewArray::try_new(views: vortex_buffer::buffer::Buffer, buffers: alloc::sync::Arc<[vortex_buffer::ByteBuffer]>, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult +impl vortex_array::arrays::VarBinViewData -pub fn vortex_array::arrays::VarBinViewArray::try_new_handle(views: vortex_array::buffer::BufferHandle, buffers: alloc::sync::Arc<[vortex_array::buffer::BufferHandle]>, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBinViewData::buffer(&self, idx: usize) -> &vortex_buffer::ByteBuffer -pub fn vortex_array::arrays::VarBinViewArray::validate(views: &vortex_buffer::buffer::Buffer, buffers: &alloc::sync::Arc<[vortex_buffer::ByteBuffer]>, dtype: &vortex_array::dtype::DType, validity: &vortex_array::validity::Validity) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::VarBinViewData::buffers(&self) -> &alloc::sync::Arc<[vortex_array::buffer::BufferHandle]> -pub fn vortex_array::arrays::VarBinViewArray::views(&self) -> &[vortex_array::arrays::varbinview::BinaryView] +pub fn vortex_array::arrays::VarBinViewData::bytes_at(&self, index: usize) -> vortex_buffer::ByteBuffer -pub fn vortex_array::arrays::VarBinViewArray::views_handle(&self) -> &vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::VarBinViewData::dtype(&self) -> &vortex_array::dtype::DType -impl vortex_array::arrays::VarBinViewArray +pub fn vortex_array::arrays::VarBinViewData::from_iter, I: core::iter::traits::collect::IntoIterator>>(iter: I, dtype: vortex_array::dtype::DType) -> Self -pub fn vortex_array::arrays::VarBinViewArray::compact_buffers(&self) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBinViewData::from_iter_bin, I: core::iter::traits::collect::IntoIterator>(iter: I) -> Self -pub fn vortex_array::arrays::VarBinViewArray::compact_with_threshold(&self, buffer_utilization_threshold: f64) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBinViewData::from_iter_nullable_bin, I: core::iter::traits::collect::IntoIterator>>(iter: I) -> Self -impl vortex_array::arrays::VarBinViewArray +pub fn vortex_array::arrays::VarBinViewData::from_iter_nullable_str, I: core::iter::traits::collect::IntoIterator>>(iter: I) -> Self -pub fn vortex_array::arrays::VarBinViewArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::VarBinViewData::from_iter_str, I: core::iter::traits::collect::IntoIterator>(iter: I) -> Self -impl core::clone::Clone for vortex_array::arrays::VarBinViewArray +pub fn vortex_array::arrays::VarBinViewData::into_parts(self) -> vortex_array::arrays::varbinview::VarBinViewArrayParts -pub fn vortex_array::arrays::VarBinViewArray::clone(&self) -> vortex_array::arrays::VarBinViewArray +pub fn vortex_array::arrays::VarBinViewData::is_empty(&self) -> bool -impl core::convert::AsRef for vortex_array::arrays::VarBinViewArray +pub fn vortex_array::arrays::VarBinViewData::len(&self) -> usize -pub fn vortex_array::arrays::VarBinViewArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub fn vortex_array::arrays::VarBinViewData::nbuffers(&self) -> usize -impl core::convert::From for vortex_array::ArrayRef +pub fn vortex_array::arrays::VarBinViewData::new(views: vortex_buffer::buffer::Buffer, buffers: alloc::sync::Arc<[vortex_buffer::ByteBuffer]>, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::VarBinViewArray) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::VarBinViewData::new_handle(views: vortex_array::buffer::BufferHandle, buffers: alloc::sync::Arc<[vortex_array::buffer::BufferHandle]>, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self -impl core::fmt::Debug for vortex_array::arrays::VarBinViewArray +pub unsafe fn vortex_array::arrays::VarBinViewData::new_handle_unchecked(views: vortex_array::buffer::BufferHandle, buffers: alloc::sync::Arc<[vortex_array::buffer::BufferHandle]>, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::VarBinViewArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub unsafe fn vortex_array::arrays::VarBinViewData::new_unchecked(views: vortex_buffer::buffer::Buffer, buffers: alloc::sync::Arc<[vortex_buffer::ByteBuffer]>, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self -impl core::iter::traits::collect::FromIterator> for vortex_array::arrays::VarBinViewArray +pub fn vortex_array::arrays::VarBinViewData::try_new(views: vortex_buffer::buffer::Buffer, buffers: alloc::sync::Arc<[vortex_buffer::ByteBuffer]>, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult -pub fn vortex_array::arrays::VarBinViewArray::from_iter>>(iter: T) -> Self +pub fn vortex_array::arrays::VarBinViewData::try_new_handle(views: vortex_array::buffer::BufferHandle, buffers: alloc::sync::Arc<[vortex_array::buffer::BufferHandle]>, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult -impl core::iter::traits::collect::FromIterator>> for vortex_array::arrays::VarBinViewArray +pub fn vortex_array::arrays::VarBinViewData::validate(views: &vortex_buffer::buffer::Buffer, buffers: &alloc::sync::Arc<[vortex_buffer::ByteBuffer]>, dtype: &vortex_array::dtype::DType, validity: &vortex_array::validity::Validity) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::VarBinViewArray::from_iter>>>(iter: T) -> Self +pub fn vortex_array::arrays::VarBinViewData::validity(&self) -> &vortex_array::validity::Validity -impl core::ops::deref::Deref for vortex_array::arrays::VarBinViewArray +pub fn vortex_array::arrays::VarBinViewData::validity_mask(&self) -> vortex_mask::Mask -pub type vortex_array::arrays::VarBinViewArray::Target = dyn vortex_array::DynArray +pub fn vortex_array::arrays::VarBinViewData::views(&self) -> &[vortex_array::arrays::varbinview::BinaryView] -pub fn vortex_array::arrays::VarBinViewArray::deref(&self) -> &Self::Target +pub fn vortex_array::arrays::VarBinViewData::views_handle(&self) -> &vortex_array::buffer::BufferHandle -impl vortex_array::Executable for vortex_array::arrays::VarBinViewArray +impl core::clone::Clone for vortex_array::arrays::VarBinViewData -pub fn vortex_array::arrays::VarBinViewArray::execute(array: vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBinViewData::clone(&self) -> vortex_array::arrays::VarBinViewData -impl vortex_array::IntoArray for vortex_array::arrays::VarBinViewArray +impl core::convert::From for vortex_array::ArrayRef -pub fn vortex_array::arrays::VarBinViewArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::VarBinViewData) -> vortex_array::ArrayRef -impl vortex_array::accessor::ArrayAccessor<[u8]> for &vortex_array::arrays::VarBinViewArray +impl core::fmt::Debug for vortex_array::arrays::VarBinViewData -pub fn &vortex_array::arrays::VarBinViewArray::with_iterator(&self, f: F) -> R where F: for<'a> core::ops::function::FnOnce(&mut dyn core::iter::traits::iterator::Iterator>) -> R +pub fn vortex_array::arrays::VarBinViewData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -impl vortex_array::accessor::ArrayAccessor<[u8]> for vortex_array::arrays::VarBinViewArray +impl core::iter::traits::collect::FromIterator> for vortex_array::arrays::VarBinViewData -pub fn vortex_array::arrays::VarBinViewArray::with_iterator core::ops::function::FnOnce(&mut dyn core::iter::traits::iterator::Iterator>) -> R, R>(&self, f: F) -> R +pub fn vortex_array::arrays::VarBinViewData::from_iter>>(iter: T) -> Self -impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::VarBinViewArray +impl core::iter::traits::collect::FromIterator>> for vortex_array::arrays::VarBinViewData -pub fn vortex_array::arrays::VarBinViewArray::validity(&self) -> &vortex_array::validity::Validity +pub fn vortex_array::arrays::VarBinViewData::from_iter>>>(iter: T) -> Self -impl<'a> core::iter::traits::collect::FromIterator> for vortex_array::arrays::VarBinViewArray +impl vortex_array::IntoArray for vortex_array::arrays::VarBinViewData -pub fn vortex_array::arrays::VarBinViewArray::from_iter>>(iter: T) -> Self +pub fn vortex_array::arrays::VarBinViewData::into_array(self) -> vortex_array::ArrayRef -impl<'a> core::iter::traits::collect::FromIterator> for vortex_array::arrays::VarBinViewArray +impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::VarBinViewData -pub fn vortex_array::arrays::VarBinViewArray::from_iter>>(iter: T) -> Self +pub fn vortex_array::arrays::VarBinViewData::validity(&self) -> &vortex_array::validity::Validity -pub struct vortex_array::arrays::varbinview::VarBinViewArrayParts +impl<'a> core::iter::traits::collect::FromIterator> for vortex_array::arrays::VarBinViewData -pub vortex_array::arrays::varbinview::VarBinViewArrayParts::buffers: alloc::sync::Arc<[vortex_array::buffer::BufferHandle]> +pub fn vortex_array::arrays::VarBinViewData::from_iter>>(iter: T) -> Self -pub vortex_array::arrays::varbinview::VarBinViewArrayParts::dtype: vortex_array::dtype::DType +impl<'a> core::iter::traits::collect::FromIterator> for vortex_array::arrays::VarBinViewData -pub vortex_array::arrays::varbinview::VarBinViewArrayParts::validity: vortex_array::validity::Validity +pub fn vortex_array::arrays::VarBinViewData::from_iter>>(iter: T) -> Self -pub vortex_array::arrays::varbinview::VarBinViewArrayParts::views: vortex_array::buffer::BufferHandle +pub type vortex_array::arrays::varbinview::VarBinViewArray = vortex_array::vtable::Array pub mod vortex_array::arrays::variant @@ -4952,11 +4748,11 @@ pub fn vortex_array::arrays::Variant::fmt(&self, f: &mut core::fmt::Formatter<'_ impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::Variant -pub fn vortex_array::arrays::Variant::scalar_at(array: &::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Variant::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::Variant -pub type vortex_array::arrays::Variant::Array = vortex_array::arrays::variant::VariantArray +pub type vortex_array::arrays::Variant::Array = vortex_array::arrays::variant::VariantData pub type vortex_array::arrays::Variant::Metadata = vortex_array::EmptyMetadata @@ -4964,21 +4760,21 @@ pub type vortex_array::arrays::Variant::OperationsVTable = vortex_array::arrays: pub type vortex_array::arrays::Variant::ValidityVTable = vortex_array::arrays::Variant -pub fn vortex_array::arrays::Variant::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Variant::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Variant::array_eq(array: &Self::Array, other: &Self::Array, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Variant::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Variant::array_hash(array: &Self::Array, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Variant::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Variant::buffer(_array: &Self::Array, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Variant::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Variant::buffer_name(_array: &Self::Array, _idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Variant::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option pub fn vortex_array::arrays::Variant::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Variant::child(array: &Self::Array, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Variant::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Variant::child_name(_array: &Self::Array, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Variant::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Variant::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult @@ -4992,11 +4788,11 @@ pub fn vortex_array::arrays::Variant::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Variant::len(array: &Self::Array) -> usize -pub fn vortex_array::arrays::Variant::metadata(_array: &Self::Array) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Variant::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Variant::nbuffers(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::Variant::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Variant::nchildren(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::Variant::nchildren(_array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Variant::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -5012,49 +4808,43 @@ pub fn vortex_array::arrays::Variant::with_children(array: &mut Self::Array, chi impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Variant -pub fn vortex_array::arrays::Variant::validity(array: &::Array) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Variant::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub struct vortex_array::arrays::variant::VariantArray +pub struct vortex_array::arrays::variant::VariantData -impl vortex_array::arrays::variant::VariantArray +impl vortex_array::arrays::variant::VariantData -pub fn vortex_array::arrays::variant::VariantArray::child(&self) -> &vortex_array::ArrayRef +pub fn vortex_array::arrays::variant::VariantData::child(&self) -> &vortex_array::ArrayRef -pub fn vortex_array::arrays::variant::VariantArray::new(child: vortex_array::ArrayRef) -> Self +pub fn vortex_array::arrays::variant::VariantData::dtype(&self) -> &vortex_array::dtype::DType -impl vortex_array::arrays::variant::VariantArray +pub fn vortex_array::arrays::variant::VariantData::is_empty(&self) -> bool -pub fn vortex_array::arrays::variant::VariantArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::variant::VariantData::len(&self) -> usize -impl core::clone::Clone for vortex_array::arrays::variant::VariantArray +pub fn vortex_array::arrays::variant::VariantData::new(child: vortex_array::ArrayRef) -> Self -pub fn vortex_array::arrays::variant::VariantArray::clone(&self) -> vortex_array::arrays::variant::VariantArray +impl core::clone::Clone for vortex_array::arrays::variant::VariantData -impl core::convert::AsRef for vortex_array::arrays::variant::VariantArray +pub fn vortex_array::arrays::variant::VariantData::clone(&self) -> vortex_array::arrays::variant::VariantData -pub fn vortex_array::arrays::variant::VariantArray::as_ref(&self) -> &dyn vortex_array::DynArray +impl core::convert::From for vortex_array::ArrayRef -impl core::convert::From for vortex_array::ArrayRef +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::variant::VariantData) -> vortex_array::ArrayRef -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::variant::VariantArray) -> vortex_array::ArrayRef +impl core::fmt::Debug for vortex_array::arrays::variant::VariantData -impl core::fmt::Debug for vortex_array::arrays::variant::VariantArray +pub fn vortex_array::arrays::variant::VariantData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub fn vortex_array::arrays::variant::VariantArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl vortex_array::IntoArray for vortex_array::arrays::variant::VariantData -impl core::ops::deref::Deref for vortex_array::arrays::variant::VariantArray +pub fn vortex_array::arrays::variant::VariantData::into_array(self) -> vortex_array::ArrayRef -pub type vortex_array::arrays::variant::VariantArray::Target = dyn vortex_array::DynArray +pub type vortex_array::arrays::variant::VariantArray = vortex_array::vtable::Array -pub fn vortex_array::arrays::variant::VariantArray::deref(&self) -> &Self::Target +pub struct vortex_array::arrays::Bool -impl vortex_array::IntoArray for vortex_array::arrays::variant::VariantArray - -pub fn vortex_array::arrays::variant::VariantArray::into_array(self) -> vortex_array::ArrayRef - -pub struct vortex_array::arrays::Bool - -impl vortex_array::arrays::Bool +impl vortex_array::arrays::Bool pub const vortex_array::arrays::Bool::ID: vortex_array::vtable::ArrayId @@ -5076,7 +4866,7 @@ pub fn vortex_array::arrays::Bool::filter(array: &vortex_array::arrays::BoolArra impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::Bool -pub fn vortex_array::arrays::Bool::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Bool::slice(array: &vortex_array::arrays::BoolArray, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_array::arrays::bool::BoolMaskedValidityRule @@ -5098,11 +4888,11 @@ pub fn vortex_array::arrays::Bool::mask(array: &vortex_array::arrays::BoolArray, impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::Bool -pub fn vortex_array::arrays::Bool::scalar_at(array: &vortex_array::arrays::BoolArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Bool::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::Bool -pub type vortex_array::arrays::Bool::Array = vortex_array::arrays::BoolArray +pub type vortex_array::arrays::Bool::Array = vortex_array::arrays::BoolData pub type vortex_array::arrays::Bool::Metadata = vortex_array::ProstMetadata @@ -5110,25 +4900,25 @@ pub type vortex_array::arrays::Bool::OperationsVTable = vortex_array::arrays::Bo pub type vortex_array::arrays::Bool::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::Bool::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Bool::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Bool::array_eq(array: &vortex_array::arrays::BoolArray, other: &vortex_array::arrays::BoolArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Bool::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Bool::array_hash(array: &vortex_array::arrays::BoolArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Bool::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Bool::buffer(array: &vortex_array::arrays::BoolArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Bool::buffer(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Bool::buffer_name(_array: &vortex_array::arrays::BoolArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Bool::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Bool::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Bool::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Bool::child(array: &vortex_array::arrays::BoolArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Bool::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Bool::child_name(_array: &vortex_array::arrays::BoolArray, _idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Bool::child_name(_array: &vortex_array::vtable::Array, _idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Bool::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Bool::dtype(array: &vortex_array::arrays::BoolArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Bool::dtype(array: &vortex_array::arrays::BoolData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Bool::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -5136,13 +4926,13 @@ pub fn vortex_array::arrays::Bool::execute_parent(array: &vortex_array::vtable:: pub fn vortex_array::arrays::Bool::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Bool::len(array: &vortex_array::arrays::BoolArray) -> usize +pub fn vortex_array::arrays::Bool::len(array: &vortex_array::arrays::BoolData) -> usize -pub fn vortex_array::arrays::Bool::metadata(array: &vortex_array::arrays::BoolArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Bool::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Bool::nbuffers(_array: &vortex_array::arrays::BoolArray) -> usize +pub fn vortex_array::arrays::Bool::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Bool::nchildren(array: &vortex_array::arrays::BoolArray) -> usize +pub fn vortex_array::arrays::Bool::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Bool::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -5150,95 +4940,57 @@ pub fn vortex_array::arrays::Bool::reduce_parent(array: &vortex_array::vtable::A pub fn vortex_array::arrays::Bool::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Bool::stats(array: &vortex_array::arrays::BoolArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Bool::stats(array: &vortex_array::arrays::BoolData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Bool::vtable(_array: &Self::Array) -> &Self pub fn vortex_array::arrays::Bool::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> -pub struct vortex_array::arrays::BoolArray - -impl vortex_array::arrays::BoolArray - -pub fn vortex_array::arrays::BoolArray::from_indices>(length: usize, indices: I, validity: vortex_array::validity::Validity) -> Self - -pub fn vortex_array::arrays::BoolArray::into_bit_buffer(self) -> vortex_buffer::bit::buf::BitBuffer - -pub fn vortex_array::arrays::BoolArray::into_parts(self) -> vortex_array::arrays::bool::BoolArrayParts - -pub fn vortex_array::arrays::BoolArray::maybe_to_mask(&self) -> vortex_error::VortexResult> - -pub fn vortex_array::arrays::BoolArray::new(bits: vortex_buffer::bit::buf::BitBuffer, validity: vortex_array::validity::Validity) -> Self - -pub fn vortex_array::arrays::BoolArray::new_handle(handle: vortex_array::buffer::BufferHandle, offset: usize, len: usize, validity: vortex_array::validity::Validity) -> Self - -pub unsafe fn vortex_array::arrays::BoolArray::new_unchecked(bits: vortex_buffer::bit::buf::BitBuffer, validity: vortex_array::validity::Validity) -> Self - -pub fn vortex_array::arrays::BoolArray::to_bit_buffer(&self) -> vortex_buffer::bit::buf::BitBuffer - -pub fn vortex_array::arrays::BoolArray::to_mask(&self) -> vortex_mask::Mask - -pub fn vortex_array::arrays::BoolArray::to_mask_fill_null_false(&self) -> vortex_mask::Mask +pub struct vortex_array::arrays::BoolData -pub fn vortex_array::arrays::BoolArray::try_new(bits: vortex_buffer::bit::buf::BitBuffer, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult +impl vortex_array::arrays::BoolData -pub fn vortex_array::arrays::BoolArray::try_new_from_handle(bits: vortex_array::buffer::BufferHandle, offset: usize, len: usize, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult +pub fn vortex_array::arrays::BoolData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_array::arrays::BoolArray::validate(bits: &vortex_buffer::bit::buf::BitBuffer, validity: &vortex_array::validity::Validity) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::BoolData::into_bit_buffer(self) -> vortex_buffer::bit::buf::BitBuffer -impl vortex_array::arrays::BoolArray +pub fn vortex_array::arrays::BoolData::into_parts(self) -> vortex_array::arrays::bool::BoolArrayParts -pub fn vortex_array::arrays::BoolArray::patch(self, patches: &vortex_array::patches::Patches, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::BoolData::is_empty(&self) -> bool -impl vortex_array::arrays::BoolArray +pub fn vortex_array::arrays::BoolData::len(&self) -> usize -pub fn vortex_array::arrays::BoolArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::BoolData::maybe_to_mask(&self) -> vortex_error::VortexResult> -impl core::clone::Clone for vortex_array::arrays::BoolArray +pub fn vortex_array::arrays::BoolData::to_bit_buffer(&self) -> vortex_buffer::bit::buf::BitBuffer -pub fn vortex_array::arrays::BoolArray::clone(&self) -> vortex_array::arrays::BoolArray +pub fn vortex_array::arrays::BoolData::to_mask(&self) -> vortex_mask::Mask -impl core::convert::AsRef for vortex_array::arrays::BoolArray +pub fn vortex_array::arrays::BoolData::to_mask_fill_null_false(&self) -> vortex_mask::Mask -pub fn vortex_array::arrays::BoolArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub fn vortex_array::arrays::BoolData::validity(&self) -> &vortex_array::validity::Validity -impl core::convert::From for vortex_array::ArrayRef +pub fn vortex_array::arrays::BoolData::validity_mask(&self) -> vortex_mask::Mask -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::BoolArray) -> vortex_array::ArrayRef +impl core::clone::Clone for vortex_array::arrays::BoolData -impl core::convert::From for vortex_array::arrays::BoolArray +pub fn vortex_array::arrays::BoolData::clone(&self) -> vortex_array::arrays::BoolData -pub fn vortex_array::arrays::BoolArray::from(value: vortex_buffer::bit::buf::BitBuffer) -> Self +impl core::convert::From for vortex_array::ArrayRef -impl core::fmt::Debug for vortex_array::arrays::BoolArray +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::BoolData) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::BoolArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::fmt::Debug for vortex_array::arrays::BoolData -impl core::iter::traits::collect::FromIterator for vortex_array::arrays::BoolArray +pub fn vortex_array::arrays::BoolData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub fn vortex_array::arrays::BoolArray::from_iter>(iter: T) -> Self +impl vortex_array::IntoArray for vortex_array::arrays::BoolData -impl core::iter::traits::collect::FromIterator> for vortex_array::arrays::BoolArray +pub fn vortex_array::arrays::BoolData::into_array(self) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::BoolArray::from_iter>>(iter: I) -> Self +impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::BoolData -impl core::ops::deref::Deref for vortex_array::arrays::BoolArray - -pub type vortex_array::arrays::BoolArray::Target = dyn vortex_array::DynArray - -pub fn vortex_array::arrays::BoolArray::deref(&self) -> &Self::Target - -impl vortex_array::Executable for vortex_array::arrays::BoolArray - -pub fn vortex_array::arrays::BoolArray::execute(array: vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult - -impl vortex_array::IntoArray for vortex_array::arrays::BoolArray - -pub fn vortex_array::arrays::BoolArray::into_array(self) -> vortex_array::ArrayRef - -impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::BoolArray - -pub fn vortex_array::arrays::BoolArray::validity(&self) -> &vortex_array::validity::Validity +pub fn vortex_array::arrays::BoolData::validity(&self) -> &vortex_array::validity::Validity pub struct vortex_array::arrays::Chunked @@ -5256,39 +5008,39 @@ pub fn vortex_array::arrays::Chunked::fmt(&self, f: &mut core::fmt::Formatter<'_ impl vortex_array::arrays::dict::TakeExecute for vortex_array::arrays::Chunked -pub fn vortex_array::arrays::Chunked::take(array: &vortex_array::arrays::ChunkedArray, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Chunked::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::filter::FilterKernel for vortex_array::arrays::Chunked -pub fn vortex_array::arrays::Chunked::filter(array: &vortex_array::arrays::ChunkedArray, mask: &vortex_mask::Mask, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Chunked::filter(array: &vortex_array::vtable::Array, mask: &vortex_mask::Mask, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceKernel for vortex_array::arrays::Chunked -pub fn vortex_array::arrays::Chunked::slice(array: &Self::Array, range: core::ops::range::Range, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Chunked::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastReduce for vortex_array::arrays::Chunked -pub fn vortex_array::arrays::Chunked::cast(array: &vortex_array::arrays::ChunkedArray, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Chunked::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::fill_null::FillNullReduce for vortex_array::arrays::Chunked -pub fn vortex_array::arrays::Chunked::fill_null(array: &vortex_array::arrays::ChunkedArray, fill_value: &vortex_array::scalar::Scalar) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Chunked::fill_null(array: &vortex_array::vtable::Array, fill_value: &vortex_array::scalar::Scalar) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskKernel for vortex_array::arrays::Chunked -pub fn vortex_array::arrays::Chunked::mask(array: &vortex_array::arrays::ChunkedArray, mask: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Chunked::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::zip::ZipKernel for vortex_array::arrays::Chunked -pub fn vortex_array::arrays::Chunked::zip(if_true: &vortex_array::arrays::ChunkedArray, if_false: &vortex_array::ArrayRef, mask: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Chunked::zip(if_true: &vortex_array::vtable::Array, if_false: &vortex_array::ArrayRef, mask: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::Chunked -pub fn vortex_array::arrays::Chunked::scalar_at(array: &vortex_array::arrays::ChunkedArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Chunked::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::Chunked -pub type vortex_array::arrays::Chunked::Array = vortex_array::arrays::ChunkedArray +pub type vortex_array::arrays::Chunked::Array = vortex_array::arrays::ChunkedData pub type vortex_array::arrays::Chunked::Metadata = vortex_array::EmptyMetadata @@ -5296,25 +5048,25 @@ pub type vortex_array::arrays::Chunked::OperationsVTable = vortex_array::arrays: pub type vortex_array::arrays::Chunked::ValidityVTable = vortex_array::arrays::Chunked -pub fn vortex_array::arrays::Chunked::append_to_builder(array: &vortex_array::arrays::ChunkedArray, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Chunked::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Chunked::array_eq(array: &vortex_array::arrays::ChunkedArray, other: &vortex_array::arrays::ChunkedArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Chunked::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Chunked::array_hash(array: &vortex_array::arrays::ChunkedArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Chunked::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Chunked::buffer(_array: &vortex_array::arrays::ChunkedArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Chunked::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Chunked::buffer_name(_array: &vortex_array::arrays::ChunkedArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Chunked::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Chunked::build(dtype: &vortex_array::dtype::DType, _len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Chunked::build(dtype: &vortex_array::dtype::DType, _len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Chunked::child(array: &vortex_array::arrays::ChunkedArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Chunked::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Chunked::child_name(_array: &vortex_array::arrays::ChunkedArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Chunked::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Chunked::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Chunked::dtype(array: &vortex_array::arrays::ChunkedArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Chunked::dtype(array: &vortex_array::arrays::ChunkedData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Chunked::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -5322,13 +5074,13 @@ pub fn vortex_array::arrays::Chunked::execute_parent(array: &vortex_array::vtabl pub fn vortex_array::arrays::Chunked::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Chunked::len(array: &vortex_array::arrays::ChunkedArray) -> usize +pub fn vortex_array::arrays::Chunked::len(array: &vortex_array::arrays::ChunkedData) -> usize -pub fn vortex_array::arrays::Chunked::metadata(_array: &vortex_array::arrays::ChunkedArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Chunked::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Chunked::nbuffers(_array: &vortex_array::arrays::ChunkedArray) -> usize +pub fn vortex_array::arrays::Chunked::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Chunked::nchildren(array: &vortex_array::arrays::ChunkedArray) -> usize +pub fn vortex_array::arrays::Chunked::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Chunked::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -5336,7 +5088,7 @@ pub fn vortex_array::arrays::Chunked::reduce_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Chunked::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Chunked::stats(array: &vortex_array::arrays::ChunkedArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Chunked::stats(array: &vortex_array::arrays::ChunkedData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Chunked::vtable(_array: &Self::Array) -> &Self @@ -5344,67 +5096,55 @@ pub fn vortex_array::arrays::Chunked::with_children(array: &mut Self::Array, chi impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Chunked -pub fn vortex_array::arrays::Chunked::validity(array: &vortex_array::arrays::ChunkedArray) -> vortex_error::VortexResult - -pub struct vortex_array::arrays::ChunkedArray - -impl vortex_array::arrays::ChunkedArray - -pub fn vortex_array::arrays::ChunkedArray::array_iterator(&self) -> impl vortex_array::iter::ArrayIterator + '_ - -pub fn vortex_array::arrays::ChunkedArray::array_stream(&self) -> impl vortex_array::stream::ArrayStream + '_ - -pub fn vortex_array::arrays::ChunkedArray::chunk(&self, idx: usize) -> &vortex_array::ArrayRef +pub fn vortex_array::arrays::Chunked::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::ChunkedArray::chunk_offsets(&self) -> vortex_buffer::buffer::Buffer +pub struct vortex_array::arrays::ChunkedData -pub fn vortex_array::arrays::ChunkedArray::chunks(&self) -> &[vortex_array::ArrayRef] +impl vortex_array::arrays::ChunkedData -pub fn vortex_array::arrays::ChunkedArray::nchunks(&self) -> usize +pub fn vortex_array::arrays::ChunkedData::array_iterator(&self) -> impl vortex_array::iter::ArrayIterator + '_ -pub unsafe fn vortex_array::arrays::ChunkedArray::new_unchecked(chunks: alloc::vec::Vec, dtype: vortex_array::dtype::DType) -> Self +pub fn vortex_array::arrays::ChunkedData::array_stream(&self) -> impl vortex_array::stream::ArrayStream + '_ -pub fn vortex_array::arrays::ChunkedArray::non_empty_chunks(&self) -> impl core::iter::traits::iterator::Iterator + '_ +pub fn vortex_array::arrays::ChunkedData::chunk(&self, idx: usize) -> &vortex_array::ArrayRef -pub fn vortex_array::arrays::ChunkedArray::rechunk(&self, target_bytesize: u64, target_rowsize: usize) -> vortex_error::VortexResult +pub fn vortex_array::arrays::ChunkedData::chunk_offsets(&self) -> vortex_buffer::buffer::Buffer -pub fn vortex_array::arrays::ChunkedArray::try_new(chunks: alloc::vec::Vec, dtype: vortex_array::dtype::DType) -> vortex_error::VortexResult +pub fn vortex_array::arrays::ChunkedData::chunks(&self) -> &[vortex_array::ArrayRef] -pub fn vortex_array::arrays::ChunkedArray::validate(chunks: &[vortex_array::ArrayRef], dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::ChunkedData::dtype(&self) -> &vortex_array::dtype::DType -impl vortex_array::arrays::ChunkedArray +pub fn vortex_array::arrays::ChunkedData::is_empty(&self) -> bool -pub fn vortex_array::arrays::ChunkedArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ChunkedData::len(&self) -> usize -impl core::clone::Clone for vortex_array::arrays::ChunkedArray +pub fn vortex_array::arrays::ChunkedData::nchunks(&self) -> usize -pub fn vortex_array::arrays::ChunkedArray::clone(&self) -> vortex_array::arrays::ChunkedArray +pub unsafe fn vortex_array::arrays::ChunkedData::new_unchecked(chunks: alloc::vec::Vec, dtype: vortex_array::dtype::DType) -> Self -impl core::convert::AsRef for vortex_array::arrays::ChunkedArray +pub fn vortex_array::arrays::ChunkedData::non_empty_chunks(&self) -> impl core::iter::traits::iterator::Iterator + '_ -pub fn vortex_array::arrays::ChunkedArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub fn vortex_array::arrays::ChunkedData::rechunk(&self, target_bytesize: u64, target_rowsize: usize) -> vortex_error::VortexResult -impl core::convert::From for vortex_array::ArrayRef +pub fn vortex_array::arrays::ChunkedData::try_new(chunks: alloc::vec::Vec, dtype: vortex_array::dtype::DType) -> vortex_error::VortexResult -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::ChunkedArray) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ChunkedData::validate(chunks: &[vortex_array::ArrayRef], dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult<()> -impl core::fmt::Debug for vortex_array::arrays::ChunkedArray +impl core::clone::Clone for vortex_array::arrays::ChunkedData -pub fn vortex_array::arrays::ChunkedArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_array::arrays::ChunkedData::clone(&self) -> vortex_array::arrays::ChunkedData -impl core::iter::traits::collect::FromIterator> for vortex_array::arrays::ChunkedArray +impl core::convert::From for vortex_array::ArrayRef -pub fn vortex_array::arrays::ChunkedArray::from_iter>(iter: T) -> Self +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::ChunkedData) -> vortex_array::ArrayRef -impl core::ops::deref::Deref for vortex_array::arrays::ChunkedArray +impl core::fmt::Debug for vortex_array::arrays::ChunkedData -pub type vortex_array::arrays::ChunkedArray::Target = dyn vortex_array::DynArray +pub fn vortex_array::arrays::ChunkedData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub fn vortex_array::arrays::ChunkedArray::deref(&self) -> &Self::Target +impl vortex_array::IntoArray for vortex_array::arrays::ChunkedData -impl vortex_array::IntoArray for vortex_array::arrays::ChunkedArray - -pub fn vortex_array::arrays::ChunkedArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ChunkedData::into_array(self) -> vortex_array::ArrayRef pub struct vortex_array::arrays::Constant @@ -5426,39 +5166,39 @@ pub fn vortex_array::arrays::Constant::fmt(&self, f: &mut core::fmt::Formatter<' impl vortex_array::arrays::dict::TakeReduce for vortex_array::arrays::Constant -pub fn vortex_array::arrays::Constant::take(array: &vortex_array::arrays::ConstantArray, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Constant::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::arrays::filter::FilterReduce for vortex_array::arrays::Constant -pub fn vortex_array::arrays::Constant::filter(array: &vortex_array::arrays::ConstantArray, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Constant::filter(array: &vortex_array::vtable::Array, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::Constant -pub fn vortex_array::arrays::Constant::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Constant::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::between::BetweenReduce for vortex_array::arrays::Constant -pub fn vortex_array::arrays::Constant::between(array: &vortex_array::arrays::ConstantArray, lower: &vortex_array::ArrayRef, upper: &vortex_array::ArrayRef, options: &vortex_array::scalar_fn::fns::between::BetweenOptions) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Constant::between(array: &vortex_array::vtable::Array, lower: &vortex_array::ArrayRef, upper: &vortex_array::ArrayRef, options: &vortex_array::scalar_fn::fns::between::BetweenOptions) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastReduce for vortex_array::arrays::Constant -pub fn vortex_array::arrays::Constant::cast(array: &vortex_array::arrays::ConstantArray, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Constant::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::fill_null::FillNullReduce for vortex_array::arrays::Constant -pub fn vortex_array::arrays::Constant::fill_null(array: &vortex_array::arrays::ConstantArray, fill_value: &vortex_array::scalar::Scalar) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Constant::fill_null(array: &vortex_array::vtable::Array, fill_value: &vortex_array::scalar::Scalar) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::not::NotReduce for vortex_array::arrays::Constant -pub fn vortex_array::arrays::Constant::invert(array: &vortex_array::arrays::ConstantArray) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Constant::invert(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::Constant -pub fn vortex_array::arrays::Constant::scalar_at(array: &vortex_array::arrays::ConstantArray, _index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Constant::scalar_at(array: &vortex_array::vtable::Array, _index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::Constant -pub type vortex_array::arrays::Constant::Array = vortex_array::arrays::ConstantArray +pub type vortex_array::arrays::Constant::Array = vortex_array::arrays::ConstantData pub type vortex_array::arrays::Constant::Metadata = vortex_array::scalar::Scalar @@ -5466,25 +5206,25 @@ pub type vortex_array::arrays::Constant::OperationsVTable = vortex_array::arrays pub type vortex_array::arrays::Constant::ValidityVTable = vortex_array::arrays::Constant -pub fn vortex_array::arrays::Constant::append_to_builder(array: &vortex_array::arrays::ConstantArray, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Constant::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Constant::array_eq(array: &vortex_array::arrays::ConstantArray, other: &vortex_array::arrays::ConstantArray, _precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Constant::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, _precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Constant::array_hash(array: &vortex_array::arrays::ConstantArray, state: &mut H, _precision: vortex_array::Precision) +pub fn vortex_array::arrays::Constant::array_hash(array: &vortex_array::vtable::Array, state: &mut H, _precision: vortex_array::Precision) -pub fn vortex_array::arrays::Constant::buffer(array: &vortex_array::arrays::ConstantArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Constant::buffer(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Constant::buffer_name(_array: &vortex_array::arrays::ConstantArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Constant::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Constant::build(_dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], _children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Constant::build(_dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], _children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Constant::child(_array: &vortex_array::arrays::ConstantArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Constant::child(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Constant::child_name(_array: &vortex_array::arrays::ConstantArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Constant::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Constant::deserialize(_bytes: &[u8], dtype: &vortex_array::dtype::DType, _len: usize, buffers: &[vortex_array::buffer::BufferHandle], session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Constant::dtype(array: &vortex_array::arrays::ConstantArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Constant::dtype(array: &vortex_array::arrays::ConstantData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Constant::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -5492,13 +5232,13 @@ pub fn vortex_array::arrays::Constant::execute_parent(array: &vortex_array::vtab pub fn vortex_array::arrays::Constant::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Constant::len(array: &vortex_array::arrays::ConstantArray) -> usize +pub fn vortex_array::arrays::Constant::len(array: &vortex_array::arrays::ConstantData) -> usize -pub fn vortex_array::arrays::Constant::metadata(array: &vortex_array::arrays::ConstantArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Constant::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Constant::nbuffers(_array: &vortex_array::arrays::ConstantArray) -> usize +pub fn vortex_array::arrays::Constant::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Constant::nchildren(_array: &vortex_array::arrays::ConstantArray) -> usize +pub fn vortex_array::arrays::Constant::nchildren(_array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Constant::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -5506,7 +5246,7 @@ pub fn vortex_array::arrays::Constant::reduce_parent(array: &vortex_array::vtabl pub fn vortex_array::arrays::Constant::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Constant::stats(array: &vortex_array::arrays::ConstantArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Constant::stats(array: &vortex_array::arrays::ConstantData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Constant::vtable(_array: &Self::Array) -> &Self @@ -5514,47 +5254,39 @@ pub fn vortex_array::arrays::Constant::with_children(_array: &mut Self::Array, c impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Constant -pub fn vortex_array::arrays::Constant::validity(array: &vortex_array::arrays::ConstantArray) -> vortex_error::VortexResult - -pub struct vortex_array::arrays::ConstantArray - -impl vortex_array::arrays::ConstantArray - -pub fn vortex_array::arrays::ConstantArray::into_parts(self) -> vortex_array::scalar::Scalar +pub fn vortex_array::arrays::Constant::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::ConstantArray::new(scalar: S, len: usize) -> Self where S: core::convert::Into +pub struct vortex_array::arrays::ConstantData -pub fn vortex_array::arrays::ConstantArray::scalar(&self) -> &vortex_array::scalar::Scalar +impl vortex_array::arrays::ConstantData -impl vortex_array::arrays::ConstantArray +pub fn vortex_array::arrays::ConstantData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_array::arrays::ConstantArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ConstantData::into_parts(self) -> vortex_array::scalar::Scalar -impl core::clone::Clone for vortex_array::arrays::ConstantArray +pub fn vortex_array::arrays::ConstantData::is_empty(&self) -> bool -pub fn vortex_array::arrays::ConstantArray::clone(&self) -> vortex_array::arrays::ConstantArray +pub fn vortex_array::arrays::ConstantData::len(&self) -> usize -impl core::convert::AsRef for vortex_array::arrays::ConstantArray +pub fn vortex_array::arrays::ConstantData::new(scalar: S, len: usize) -> Self where S: core::convert::Into -pub fn vortex_array::arrays::ConstantArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub fn vortex_array::arrays::ConstantData::scalar(&self) -> &vortex_array::scalar::Scalar -impl core::convert::From for vortex_array::ArrayRef +impl core::clone::Clone for vortex_array::arrays::ConstantData -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::ConstantArray) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ConstantData::clone(&self) -> vortex_array::arrays::ConstantData -impl core::fmt::Debug for vortex_array::arrays::ConstantArray +impl core::convert::From for vortex_array::ArrayRef -pub fn vortex_array::arrays::ConstantArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::ConstantData) -> vortex_array::ArrayRef -impl core::ops::deref::Deref for vortex_array::arrays::ConstantArray +impl core::fmt::Debug for vortex_array::arrays::ConstantData -pub type vortex_array::arrays::ConstantArray::Target = dyn vortex_array::DynArray +pub fn vortex_array::arrays::ConstantData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub fn vortex_array::arrays::ConstantArray::deref(&self) -> &Self::Target +impl vortex_array::IntoArray for vortex_array::arrays::ConstantData -impl vortex_array::IntoArray for vortex_array::arrays::ConstantArray - -pub fn vortex_array::arrays::ConstantArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ConstantData::into_array(self) -> vortex_array::ArrayRef pub struct vortex_array::arrays::Decimal @@ -5572,41 +5304,41 @@ pub fn vortex_array::arrays::Decimal::fmt(&self, f: &mut core::fmt::Formatter<'_ impl vortex_array::arrays::dict::TakeExecute for vortex_array::arrays::Decimal -pub fn vortex_array::arrays::Decimal::take(array: &vortex_array::arrays::DecimalArray, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Decimal::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::Decimal -pub fn vortex_array::arrays::Decimal::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Decimal::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_array::arrays::decimal::DecimalMaskedValidityRule pub type vortex_array::arrays::decimal::DecimalMaskedValidityRule::Parent = vortex_array::arrays::Masked -pub fn vortex_array::arrays::decimal::DecimalMaskedValidityRule::reduce_parent(&self, array: &vortex_array::arrays::DecimalArray, parent: &vortex_array::arrays::MaskedArray, _child_idx: usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::decimal::DecimalMaskedValidityRule::reduce_parent(&self, array: &vortex_array::vtable::Array, parent: &vortex_array::arrays::MaskedArray, _child_idx: usize) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::between::BetweenKernel for vortex_array::arrays::Decimal -pub fn vortex_array::arrays::Decimal::between(arr: &vortex_array::arrays::DecimalArray, lower: &vortex_array::ArrayRef, upper: &vortex_array::ArrayRef, options: &vortex_array::scalar_fn::fns::between::BetweenOptions, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Decimal::between(arr: &vortex_array::vtable::Array, lower: &vortex_array::ArrayRef, upper: &vortex_array::ArrayRef, options: &vortex_array::scalar_fn::fns::between::BetweenOptions, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastKernel for vortex_array::arrays::Decimal -pub fn vortex_array::arrays::Decimal::cast(array: &vortex_array::arrays::DecimalArray, dtype: &vortex_array::dtype::DType, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Decimal::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::fill_null::FillNullKernel for vortex_array::arrays::Decimal -pub fn vortex_array::arrays::Decimal::fill_null(array: &vortex_array::arrays::DecimalArray, fill_value: &vortex_array::scalar::Scalar, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Decimal::fill_null(array: &vortex_array::vtable::Array, fill_value: &vortex_array::scalar::Scalar, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::Decimal -pub fn vortex_array::arrays::Decimal::mask(array: &vortex_array::arrays::DecimalArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Decimal::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::Decimal -pub fn vortex_array::arrays::Decimal::scalar_at(array: &vortex_array::arrays::DecimalArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Decimal::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::Decimal -pub type vortex_array::arrays::Decimal::Array = vortex_array::arrays::DecimalArray +pub type vortex_array::arrays::Decimal::Array = vortex_array::arrays::DecimalData pub type vortex_array::arrays::Decimal::Metadata = vortex_array::ProstMetadata @@ -5614,25 +5346,25 @@ pub type vortex_array::arrays::Decimal::OperationsVTable = vortex_array::arrays: pub type vortex_array::arrays::Decimal::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::Decimal::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Decimal::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Decimal::array_eq(array: &vortex_array::arrays::DecimalArray, other: &vortex_array::arrays::DecimalArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Decimal::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Decimal::array_hash(array: &vortex_array::arrays::DecimalArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Decimal::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Decimal::buffer(array: &vortex_array::arrays::DecimalArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Decimal::buffer(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Decimal::buffer_name(_array: &vortex_array::arrays::DecimalArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Decimal::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Decimal::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Decimal::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Decimal::child(array: &vortex_array::arrays::DecimalArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Decimal::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Decimal::child_name(_array: &vortex_array::arrays::DecimalArray, _idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Decimal::child_name(_array: &vortex_array::vtable::Array, _idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Decimal::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Decimal::dtype(array: &vortex_array::arrays::DecimalArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Decimal::dtype(array: &vortex_array::arrays::DecimalData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Decimal::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -5640,13 +5372,13 @@ pub fn vortex_array::arrays::Decimal::execute_parent(array: &vortex_array::vtabl pub fn vortex_array::arrays::Decimal::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Decimal::len(array: &vortex_array::arrays::DecimalArray) -> usize +pub fn vortex_array::arrays::Decimal::len(array: &vortex_array::arrays::DecimalData) -> usize -pub fn vortex_array::arrays::Decimal::metadata(array: &vortex_array::arrays::DecimalArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Decimal::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Decimal::nbuffers(_array: &vortex_array::arrays::DecimalArray) -> usize +pub fn vortex_array::arrays::Decimal::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Decimal::nchildren(array: &vortex_array::arrays::DecimalArray) -> usize +pub fn vortex_array::arrays::Decimal::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Decimal::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -5654,87 +5386,79 @@ pub fn vortex_array::arrays::Decimal::reduce_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Decimal::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Decimal::stats(array: &vortex_array::arrays::DecimalArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Decimal::stats(array: &vortex_array::arrays::DecimalData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Decimal::vtable(_array: &Self::Array) -> &Self pub fn vortex_array::arrays::Decimal::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> -pub struct vortex_array::arrays::DecimalArray - -impl vortex_array::arrays::DecimalArray +pub struct vortex_array::arrays::DecimalData -pub fn vortex_array::arrays::DecimalArray::buffer(&self) -> vortex_buffer::buffer::Buffer +impl vortex_array::arrays::DecimalData -pub fn vortex_array::arrays::DecimalArray::buffer_handle(&self) -> &vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::DecimalData::buffer(&self) -> vortex_buffer::buffer::Buffer -pub fn vortex_array::arrays::DecimalArray::decimal_dtype(&self) -> vortex_array::dtype::DecimalDType +pub fn vortex_array::arrays::DecimalData::buffer_handle(&self) -> &vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::DecimalArray::from_iter>(iter: I, decimal_dtype: vortex_array::dtype::DecimalDType) -> Self +pub fn vortex_array::arrays::DecimalData::decimal_dtype(&self) -> vortex_array::dtype::DecimalDType -pub fn vortex_array::arrays::DecimalArray::from_option_iter>>(iter: I, decimal_dtype: vortex_array::dtype::DecimalDType) -> Self +pub fn vortex_array::arrays::DecimalData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_array::arrays::DecimalArray::into_parts(self) -> vortex_array::arrays::decimal::DecimalArrayParts +pub fn vortex_array::arrays::DecimalData::from_iter>(iter: I, decimal_dtype: vortex_array::dtype::DecimalDType) -> Self -pub fn vortex_array::arrays::DecimalArray::new(buffer: vortex_buffer::buffer::Buffer, decimal_dtype: vortex_array::dtype::DecimalDType, validity: vortex_array::validity::Validity) -> Self +pub fn vortex_array::arrays::DecimalData::from_option_iter>>(iter: I, decimal_dtype: vortex_array::dtype::DecimalDType) -> Self -pub fn vortex_array::arrays::DecimalArray::new_handle(values: vortex_array::buffer::BufferHandle, values_type: vortex_array::dtype::DecimalType, decimal_dtype: vortex_array::dtype::DecimalDType, validity: vortex_array::validity::Validity) -> Self +pub fn vortex_array::arrays::DecimalData::into_parts(self) -> vortex_array::arrays::decimal::DecimalArrayParts -pub unsafe fn vortex_array::arrays::DecimalArray::new_unchecked(buffer: vortex_buffer::buffer::Buffer, decimal_dtype: vortex_array::dtype::DecimalDType, validity: vortex_array::validity::Validity) -> Self +pub fn vortex_array::arrays::DecimalData::is_empty(&self) -> bool -pub unsafe fn vortex_array::arrays::DecimalArray::new_unchecked_from_byte_buffer(byte_buffer: vortex_buffer::ByteBuffer, values_type: vortex_array::dtype::DecimalType, decimal_dtype: vortex_array::dtype::DecimalDType, validity: vortex_array::validity::Validity) -> Self +pub fn vortex_array::arrays::DecimalData::len(&self) -> usize -pub unsafe fn vortex_array::arrays::DecimalArray::new_unchecked_handle(values: vortex_array::buffer::BufferHandle, values_type: vortex_array::dtype::DecimalType, decimal_dtype: vortex_array::dtype::DecimalDType, validity: vortex_array::validity::Validity) -> Self +pub fn vortex_array::arrays::DecimalData::new(buffer: vortex_buffer::buffer::Buffer, decimal_dtype: vortex_array::dtype::DecimalDType, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::DecimalArray::patch(self, patches: &vortex_array::patches::Patches, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::DecimalData::new_handle(values: vortex_array::buffer::BufferHandle, values_type: vortex_array::dtype::DecimalType, decimal_dtype: vortex_array::dtype::DecimalDType, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::DecimalArray::precision(&self) -> u8 +pub unsafe fn vortex_array::arrays::DecimalData::new_unchecked(buffer: vortex_buffer::buffer::Buffer, decimal_dtype: vortex_array::dtype::DecimalDType, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::DecimalArray::scale(&self) -> i8 +pub unsafe fn vortex_array::arrays::DecimalData::new_unchecked_from_byte_buffer(byte_buffer: vortex_buffer::ByteBuffer, values_type: vortex_array::dtype::DecimalType, decimal_dtype: vortex_array::dtype::DecimalDType, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::DecimalArray::try_new(buffer: vortex_buffer::buffer::Buffer, decimal_dtype: vortex_array::dtype::DecimalDType, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult +pub unsafe fn vortex_array::arrays::DecimalData::new_unchecked_handle(values: vortex_array::buffer::BufferHandle, values_type: vortex_array::dtype::DecimalType, decimal_dtype: vortex_array::dtype::DecimalDType, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::DecimalArray::try_new_handle(values: vortex_array::buffer::BufferHandle, values_type: vortex_array::dtype::DecimalType, decimal_dtype: vortex_array::dtype::DecimalDType, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult +pub fn vortex_array::arrays::DecimalData::patch(self, patches: &vortex_array::patches::Patches, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult -pub fn vortex_array::arrays::DecimalArray::values_type(&self) -> vortex_array::dtype::DecimalType +pub fn vortex_array::arrays::DecimalData::precision(&self) -> u8 -impl vortex_array::arrays::DecimalArray +pub fn vortex_array::arrays::DecimalData::scale(&self) -> i8 -pub fn vortex_array::arrays::DecimalArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::DecimalData::try_new(buffer: vortex_buffer::buffer::Buffer, decimal_dtype: vortex_array::dtype::DecimalDType, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult -impl core::clone::Clone for vortex_array::arrays::DecimalArray +pub fn vortex_array::arrays::DecimalData::try_new_handle(values: vortex_array::buffer::BufferHandle, values_type: vortex_array::dtype::DecimalType, decimal_dtype: vortex_array::dtype::DecimalDType, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult -pub fn vortex_array::arrays::DecimalArray::clone(&self) -> vortex_array::arrays::DecimalArray +pub fn vortex_array::arrays::DecimalData::validity(&self) -> &vortex_array::validity::Validity -impl core::convert::AsRef for vortex_array::arrays::DecimalArray +pub fn vortex_array::arrays::DecimalData::validity_mask(&self) -> vortex_mask::Mask -pub fn vortex_array::arrays::DecimalArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub fn vortex_array::arrays::DecimalData::values_type(&self) -> vortex_array::dtype::DecimalType -impl core::convert::From for vortex_array::ArrayRef +impl core::clone::Clone for vortex_array::arrays::DecimalData -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::DecimalArray) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::DecimalData::clone(&self) -> vortex_array::arrays::DecimalData -impl core::fmt::Debug for vortex_array::arrays::DecimalArray +impl core::convert::From for vortex_array::ArrayRef -pub fn vortex_array::arrays::DecimalArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::DecimalData) -> vortex_array::ArrayRef -impl core::ops::deref::Deref for vortex_array::arrays::DecimalArray +impl core::fmt::Debug for vortex_array::arrays::DecimalData -pub type vortex_array::arrays::DecimalArray::Target = dyn vortex_array::DynArray +pub fn vortex_array::arrays::DecimalData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub fn vortex_array::arrays::DecimalArray::deref(&self) -> &Self::Target +impl vortex_array::IntoArray for vortex_array::arrays::DecimalData -impl vortex_array::Executable for vortex_array::arrays::DecimalArray +pub fn vortex_array::arrays::DecimalData::into_array(self) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::DecimalArray::execute(array: vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::DecimalData -impl vortex_array::IntoArray for vortex_array::arrays::DecimalArray - -pub fn vortex_array::arrays::DecimalArray::into_array(self) -> vortex_array::ArrayRef - -impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::DecimalArray - -pub fn vortex_array::arrays::DecimalArray::validity(&self) -> &vortex_array::validity::Validity +pub fn vortex_array::arrays::DecimalData::validity(&self) -> &vortex_array::validity::Validity pub struct vortex_array::arrays::Dict @@ -5752,43 +5476,43 @@ pub fn vortex_array::arrays::dict::Dict::fmt(&self, f: &mut core::fmt::Formatter impl vortex_array::arrays::dict::TakeExecute for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::take(array: &vortex_array::arrays::dict::DictArray, indices: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::filter::FilterReduce for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::filter(array: &vortex_array::arrays::dict::DictArray, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::filter(array: &vortex_array::vtable::Array, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::binary::CompareKernel for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::compare(lhs: &vortex_array::arrays::dict::DictArray, rhs: &vortex_array::ArrayRef, operator: vortex_array::scalar_fn::fns::operators::CompareOperator, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::compare(lhs: &vortex_array::vtable::Array, rhs: &vortex_array::ArrayRef, operator: vortex_array::scalar_fn::fns::operators::CompareOperator, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastReduce for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::cast(array: &vortex_array::arrays::dict::DictArray, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::fill_null::FillNullKernel for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::fill_null(array: &vortex_array::arrays::dict::DictArray, fill_value: &vortex_array::scalar::Scalar, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::fill_null(array: &vortex_array::vtable::Array, fill_value: &vortex_array::scalar::Scalar, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::like::LikeReduce for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::like(array: &vortex_array::arrays::dict::DictArray, pattern: &vortex_array::ArrayRef, options: vortex_array::scalar_fn::fns::like::LikeOptions) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::like(array: &vortex_array::vtable::Array, pattern: &vortex_array::ArrayRef, options: vortex_array::scalar_fn::fns::like::LikeOptions) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::mask(array: &vortex_array::arrays::dict::DictArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::scalar_at(array: &vortex_array::arrays::dict::DictArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::dict::Dict::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::dict::Dict -pub type vortex_array::arrays::dict::Dict::Array = vortex_array::arrays::dict::DictArray +pub type vortex_array::arrays::dict::Dict::Array = vortex_array::arrays::dict::DictData pub type vortex_array::arrays::dict::Dict::Metadata = vortex_array::ProstMetadata @@ -5796,25 +5520,25 @@ pub type vortex_array::arrays::dict::Dict::OperationsVTable = vortex_array::arra pub type vortex_array::arrays::dict::Dict::ValidityVTable = vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::dict::Dict::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::dict::Dict::array_eq(array: &vortex_array::arrays::dict::DictArray, other: &vortex_array::arrays::dict::DictArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::dict::Dict::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::dict::Dict::array_hash(array: &vortex_array::arrays::dict::DictArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::dict::Dict::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::dict::Dict::buffer(_array: &vortex_array::arrays::dict::DictArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::dict::Dict::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::dict::Dict::buffer_name(_array: &vortex_array::arrays::dict::DictArray, _idx: usize) -> core::option::Option +pub fn vortex_array::arrays::dict::Dict::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option -pub fn vortex_array::arrays::dict::Dict::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::dict::Dict::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::dict::Dict::child(array: &vortex_array::arrays::dict::DictArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::dict::Dict::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::dict::Dict::child_name(_array: &vortex_array::arrays::dict::DictArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::dict::Dict::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::dict::Dict::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::dict::Dict::dtype(array: &vortex_array::arrays::dict::DictArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::dict::Dict::dtype(array: &vortex_array::arrays::dict::DictData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::dict::Dict::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -5822,13 +5546,13 @@ pub fn vortex_array::arrays::dict::Dict::execute_parent(array: &vortex_array::vt pub fn vortex_array::arrays::dict::Dict::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::dict::Dict::len(array: &vortex_array::arrays::dict::DictArray) -> usize +pub fn vortex_array::arrays::dict::Dict::len(array: &vortex_array::arrays::dict::DictData) -> usize -pub fn vortex_array::arrays::dict::Dict::metadata(array: &vortex_array::arrays::dict::DictArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::dict::Dict::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::dict::Dict::nbuffers(_array: &vortex_array::arrays::dict::DictArray) -> usize +pub fn vortex_array::arrays::dict::Dict::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::dict::Dict::nchildren(_array: &vortex_array::arrays::dict::DictArray) -> usize +pub fn vortex_array::arrays::dict::Dict::nchildren(_array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::dict::Dict::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -5836,7 +5560,7 @@ pub fn vortex_array::arrays::dict::Dict::reduce_parent(array: &vortex_array::vta pub fn vortex_array::arrays::dict::Dict::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::dict::Dict::stats(array: &vortex_array::arrays::dict::DictArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::dict::Dict::stats(array: &vortex_array::arrays::dict::DictData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::dict::Dict::vtable(_array: &Self::Array) -> &Self @@ -5844,65 +5568,55 @@ pub fn vortex_array::arrays::dict::Dict::with_children(array: &mut Self::Array, impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::validity(array: &vortex_array::arrays::dict::DictArray) -> vortex_error::VortexResult - -pub struct vortex_array::arrays::DictArray - -impl vortex_array::arrays::dict::DictArray - -pub fn vortex_array::arrays::dict::DictArray::codes(&self) -> &vortex_array::ArrayRef - -pub fn vortex_array::arrays::dict::DictArray::compute_referenced_values_mask(&self, referenced: bool) -> vortex_error::VortexResult +pub fn vortex_array::arrays::dict::Dict::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::dict::DictArray::has_all_values_referenced(&self) -> bool +pub struct vortex_array::arrays::DictData -pub fn vortex_array::arrays::dict::DictArray::into_parts(self) -> vortex_array::arrays::dict::DictArrayParts +impl vortex_array::arrays::dict::DictData -pub fn vortex_array::arrays::dict::DictArray::new(codes: vortex_array::ArrayRef, values: vortex_array::ArrayRef) -> Self +pub fn vortex_array::arrays::dict::DictData::codes(&self) -> &vortex_array::ArrayRef -pub unsafe fn vortex_array::arrays::dict::DictArray::new_unchecked(codes: vortex_array::ArrayRef, values: vortex_array::ArrayRef) -> Self +pub fn vortex_array::arrays::dict::DictData::dtype(&self) -> &vortex_array::dtype::DType -pub unsafe fn vortex_array::arrays::dict::DictArray::set_all_values_referenced(self, all_values_referenced: bool) -> Self +pub fn vortex_array::arrays::dict::DictData::has_all_values_referenced(&self) -> bool -pub fn vortex_array::arrays::dict::DictArray::try_new(codes: vortex_array::ArrayRef, values: vortex_array::ArrayRef) -> vortex_error::VortexResult +pub fn vortex_array::arrays::dict::DictData::into_parts(self) -> vortex_array::arrays::dict::DictArrayParts -pub fn vortex_array::arrays::dict::DictArray::validate_all_values_referenced(&self) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::dict::DictData::is_empty(&self) -> bool -pub fn vortex_array::arrays::dict::DictArray::values(&self) -> &vortex_array::ArrayRef +pub fn vortex_array::arrays::dict::DictData::len(&self) -> usize -impl vortex_array::arrays::dict::DictArray +pub fn vortex_array::arrays::dict::DictData::new(codes: vortex_array::ArrayRef, values: vortex_array::ArrayRef) -> Self -pub fn vortex_array::arrays::dict::DictArray::to_array(&self) -> vortex_array::ArrayRef +pub unsafe fn vortex_array::arrays::dict::DictData::new_unchecked(codes: vortex_array::ArrayRef, values: vortex_array::ArrayRef) -> Self -impl core::clone::Clone for vortex_array::arrays::dict::DictArray +pub unsafe fn vortex_array::arrays::dict::DictData::set_all_values_referenced(self, all_values_referenced: bool) -> Self -pub fn vortex_array::arrays::dict::DictArray::clone(&self) -> vortex_array::arrays::dict::DictArray +pub fn vortex_array::arrays::dict::DictData::try_new(codes: vortex_array::ArrayRef, values: vortex_array::ArrayRef) -> vortex_error::VortexResult -impl core::convert::AsRef for vortex_array::arrays::dict::DictArray +pub fn vortex_array::arrays::dict::DictData::validate_all_values_referenced(&self) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::dict::DictArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub fn vortex_array::arrays::dict::DictData::values(&self) -> &vortex_array::ArrayRef -impl core::convert::From for vortex_array::ArrayRef +impl vortex_array::arrays::dict::DictData -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::dict::DictArray) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::dict::DictData::compute_referenced_values_mask(&self, referenced: bool) -> vortex_error::VortexResult -impl core::fmt::Debug for vortex_array::arrays::dict::DictArray +impl core::clone::Clone for vortex_array::arrays::dict::DictData -pub fn vortex_array::arrays::dict::DictArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_array::arrays::dict::DictData::clone(&self) -> vortex_array::arrays::dict::DictData -impl core::ops::deref::Deref for vortex_array::arrays::dict::DictArray +impl core::convert::From for vortex_array::ArrayRef -pub type vortex_array::arrays::dict::DictArray::Target = dyn vortex_array::DynArray +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::dict::DictData) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::dict::DictArray::deref(&self) -> &Self::Target +impl core::fmt::Debug for vortex_array::arrays::dict::DictData -impl vortex_array::IntoArray for vortex_array::arrays::dict::DictArray +pub fn vortex_array::arrays::dict::DictData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub fn vortex_array::arrays::dict::DictArray::into_array(self) -> vortex_array::ArrayRef +impl vortex_array::IntoArray for vortex_array::arrays::dict::DictData -impl vortex_array::arrow::FromArrowArray<&arrow_array::array::dictionary_array::DictionaryArray> for vortex_array::arrays::dict::DictArray - -pub fn vortex_array::arrays::dict::DictArray::from_arrow(array: &arrow_array::array::dictionary_array::DictionaryArray, nullable: bool) -> vortex_error::VortexResult +pub fn vortex_array::arrays::dict::DictData::into_array(self) -> vortex_array::ArrayRef pub struct vortex_array::arrays::Extension @@ -5920,35 +5634,35 @@ pub fn vortex_array::arrays::Extension::fmt(&self, f: &mut core::fmt::Formatter< impl vortex_array::arrays::dict::TakeExecute for vortex_array::arrays::Extension -pub fn vortex_array::arrays::Extension::take(array: &vortex_array::arrays::ExtensionArray, indices: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Extension::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::filter::FilterReduce for vortex_array::arrays::Extension -pub fn vortex_array::arrays::Extension::filter(array: &vortex_array::arrays::ExtensionArray, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Extension::filter(array: &vortex_array::vtable::Array, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::Extension -pub fn vortex_array::arrays::Extension::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Extension::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::binary::CompareKernel for vortex_array::arrays::Extension -pub fn vortex_array::arrays::Extension::compare(lhs: &vortex_array::arrays::ExtensionArray, rhs: &vortex_array::ArrayRef, operator: vortex_array::scalar_fn::fns::operators::CompareOperator, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Extension::compare(lhs: &vortex_array::vtable::Array, rhs: &vortex_array::ArrayRef, operator: vortex_array::scalar_fn::fns::operators::CompareOperator, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastReduce for vortex_array::arrays::Extension -pub fn vortex_array::arrays::Extension::cast(array: &vortex_array::arrays::ExtensionArray, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Extension::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::Extension -pub fn vortex_array::arrays::Extension::mask(array: &vortex_array::arrays::ExtensionArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Extension::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::Extension -pub fn vortex_array::arrays::Extension::scalar_at(array: &vortex_array::arrays::ExtensionArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Extension::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::Extension -pub type vortex_array::arrays::Extension::Array = vortex_array::arrays::ExtensionArray +pub type vortex_array::arrays::Extension::Array = vortex_array::arrays::ExtensionData pub type vortex_array::arrays::Extension::Metadata = vortex_array::EmptyMetadata @@ -5956,25 +5670,25 @@ pub type vortex_array::arrays::Extension::OperationsVTable = vortex_array::array pub type vortex_array::arrays::Extension::ValidityVTable = vortex_array::vtable::ValidityVTableFromChild -pub fn vortex_array::arrays::Extension::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Extension::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Extension::array_eq(array: &vortex_array::arrays::ExtensionArray, other: &vortex_array::arrays::ExtensionArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Extension::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Extension::array_hash(array: &vortex_array::arrays::ExtensionArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Extension::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Extension::buffer(_array: &vortex_array::arrays::ExtensionArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Extension::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Extension::buffer_name(_array: &vortex_array::arrays::ExtensionArray, _idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Extension::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Extension::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Extension::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Extension::child(array: &vortex_array::arrays::ExtensionArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Extension::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Extension::child_name(_array: &vortex_array::arrays::ExtensionArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Extension::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Extension::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Extension::dtype(array: &vortex_array::arrays::ExtensionArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Extension::dtype(array: &vortex_array::arrays::ExtensionData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Extension::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -5982,13 +5696,13 @@ pub fn vortex_array::arrays::Extension::execute_parent(array: &vortex_array::vta pub fn vortex_array::arrays::Extension::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Extension::len(array: &vortex_array::arrays::ExtensionArray) -> usize +pub fn vortex_array::arrays::Extension::len(array: &vortex_array::arrays::ExtensionData) -> usize -pub fn vortex_array::arrays::Extension::metadata(_array: &vortex_array::arrays::ExtensionArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Extension::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Extension::nbuffers(_array: &vortex_array::arrays::ExtensionArray) -> usize +pub fn vortex_array::arrays::Extension::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Extension::nchildren(_array: &vortex_array::arrays::ExtensionArray) -> usize +pub fn vortex_array::arrays::Extension::nchildren(_array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Extension::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -5996,7 +5710,7 @@ pub fn vortex_array::arrays::Extension::reduce_parent(array: &vortex_array::vtab pub fn vortex_array::arrays::Extension::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Extension::stats(array: &vortex_array::arrays::ExtensionArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Extension::stats(array: &vortex_array::arrays::ExtensionData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Extension::vtable(_array: &Self::Array) -> &Self @@ -6004,69 +5718,43 @@ pub fn vortex_array::arrays::Extension::with_children(array: &mut Self::Array, c impl vortex_array::vtable::ValidityChild for vortex_array::arrays::Extension -pub fn vortex_array::arrays::Extension::validity_child(array: &vortex_array::arrays::ExtensionArray) -> &vortex_array::ArrayRef - -pub struct vortex_array::arrays::ExtensionArray - -impl vortex_array::arrays::ExtensionArray - -pub fn vortex_array::arrays::ExtensionArray::ext_dtype(&self) -> &vortex_array::dtype::extension::ExtDTypeRef - -pub fn vortex_array::arrays::ExtensionArray::new(ext_dtype: vortex_array::dtype::extension::ExtDTypeRef, storage_array: vortex_array::ArrayRef) -> Self - -pub unsafe fn vortex_array::arrays::ExtensionArray::new_unchecked(ext_dtype: vortex_array::dtype::extension::ExtDTypeRef, storage_array: vortex_array::ArrayRef) -> Self +pub fn vortex_array::arrays::Extension::validity_child(array: &vortex_array::arrays::ExtensionData) -> &vortex_array::ArrayRef -pub fn vortex_array::arrays::ExtensionArray::storage_array(&self) -> &vortex_array::ArrayRef +pub struct vortex_array::arrays::ExtensionData -pub fn vortex_array::arrays::ExtensionArray::try_new(ext_dtype: vortex_array::dtype::extension::ExtDTypeRef, storage_array: vortex_array::ArrayRef) -> vortex_error::VortexResult +impl vortex_array::arrays::ExtensionData -impl vortex_array::arrays::ExtensionArray +pub fn vortex_array::arrays::ExtensionData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_array::arrays::ExtensionArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ExtensionData::ext_dtype(&self) -> &vortex_array::dtype::extension::ExtDTypeRef -impl core::clone::Clone for vortex_array::arrays::ExtensionArray +pub fn vortex_array::arrays::ExtensionData::is_empty(&self) -> bool -pub fn vortex_array::arrays::ExtensionArray::clone(&self) -> vortex_array::arrays::ExtensionArray +pub fn vortex_array::arrays::ExtensionData::len(&self) -> usize -impl core::convert::AsRef for vortex_array::arrays::ExtensionArray +pub fn vortex_array::arrays::ExtensionData::new(ext_dtype: vortex_array::dtype::extension::ExtDTypeRef, storage_array: vortex_array::ArrayRef) -> Self -pub fn vortex_array::arrays::ExtensionArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub unsafe fn vortex_array::arrays::ExtensionData::new_unchecked(ext_dtype: vortex_array::dtype::extension::ExtDTypeRef, storage_array: vortex_array::ArrayRef) -> Self -impl core::convert::From<&vortex_array::arrays::datetime::TemporalArray> for vortex_array::arrays::ExtensionArray +pub fn vortex_array::arrays::ExtensionData::storage_array(&self) -> &vortex_array::ArrayRef -pub fn vortex_array::arrays::ExtensionArray::from(value: &vortex_array::arrays::datetime::TemporalArray) -> Self +pub fn vortex_array::arrays::ExtensionData::try_new(ext_dtype: vortex_array::dtype::extension::ExtDTypeRef, storage_array: vortex_array::ArrayRef) -> vortex_error::VortexResult -impl core::convert::From for vortex_array::ArrayRef +impl core::clone::Clone for vortex_array::arrays::ExtensionData -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::ExtensionArray) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ExtensionData::clone(&self) -> vortex_array::arrays::ExtensionData -impl core::convert::From for vortex_array::arrays::ExtensionArray +impl core::convert::From for vortex_array::ArrayRef -pub fn vortex_array::arrays::ExtensionArray::from(value: vortex_array::arrays::datetime::TemporalArray) -> Self +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::ExtensionData) -> vortex_array::ArrayRef -impl core::convert::TryFrom for vortex_array::arrays::datetime::TemporalArray +impl core::fmt::Debug for vortex_array::arrays::ExtensionData -pub type vortex_array::arrays::datetime::TemporalArray::Error = vortex_error::VortexError +pub fn vortex_array::arrays::ExtensionData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub fn vortex_array::arrays::datetime::TemporalArray::try_from(ext: vortex_array::arrays::ExtensionArray) -> core::result::Result +impl vortex_array::IntoArray for vortex_array::arrays::ExtensionData -impl core::fmt::Debug for vortex_array::arrays::ExtensionArray - -pub fn vortex_array::arrays::ExtensionArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result - -impl core::ops::deref::Deref for vortex_array::arrays::ExtensionArray - -pub type vortex_array::arrays::ExtensionArray::Target = dyn vortex_array::DynArray - -pub fn vortex_array::arrays::ExtensionArray::deref(&self) -> &Self::Target - -impl vortex_array::Executable for vortex_array::arrays::ExtensionArray - -pub fn vortex_array::arrays::ExtensionArray::execute(array: vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult - -impl vortex_array::IntoArray for vortex_array::arrays::ExtensionArray - -pub fn vortex_array::arrays::ExtensionArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ExtensionData::into_array(self) -> vortex_array::ArrayRef pub struct vortex_array::arrays::Filter @@ -6084,11 +5772,11 @@ pub fn vortex_array::arrays::Filter::fmt(&self, f: &mut core::fmt::Formatter<'_> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::Filter -pub fn vortex_array::arrays::Filter::scalar_at(array: &vortex_array::arrays::FilterArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Filter::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::Filter -pub type vortex_array::arrays::Filter::Array = vortex_array::arrays::FilterArray +pub type vortex_array::arrays::Filter::Array = vortex_array::arrays::FilterData pub type vortex_array::arrays::Filter::Metadata = vortex_array::arrays::filter::vtable::FilterMetadata @@ -6096,25 +5784,25 @@ pub type vortex_array::arrays::Filter::OperationsVTable = vortex_array::arrays:: pub type vortex_array::arrays::Filter::ValidityVTable = vortex_array::arrays::Filter -pub fn vortex_array::arrays::Filter::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Filter::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Filter::array_eq(array: &vortex_array::arrays::FilterArray, other: &vortex_array::arrays::FilterArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Filter::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Filter::array_hash(array: &vortex_array::arrays::FilterArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Filter::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Filter::buffer(_array: &Self::Array, _idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Filter::buffer(_array: &vortex_array::vtable::Array, _idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Filter::buffer_name(_array: &Self::Array, _idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Filter::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Filter::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &vortex_array::arrays::filter::vtable::FilterMetadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Filter::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &vortex_array::arrays::filter::vtable::FilterMetadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Filter::child(array: &Self::Array, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Filter::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Filter::child_name(_array: &Self::Array, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Filter::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Filter::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Filter::dtype(array: &vortex_array::arrays::FilterArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Filter::dtype(array: &vortex_array::arrays::FilterData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Filter::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -6122,13 +5810,13 @@ pub fn vortex_array::arrays::Filter::execute_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Filter::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Filter::len(array: &vortex_array::arrays::FilterArray) -> usize +pub fn vortex_array::arrays::Filter::len(array: &vortex_array::arrays::FilterData) -> usize -pub fn vortex_array::arrays::Filter::metadata(array: &Self::Array) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Filter::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Filter::nbuffers(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::Filter::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Filter::nchildren(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::Filter::nchildren(_array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Filter::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -6136,59 +5824,53 @@ pub fn vortex_array::arrays::Filter::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::Filter::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Filter::stats(array: &vortex_array::arrays::FilterArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Filter::stats(array: &vortex_array::arrays::FilterData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Filter::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Filter::vtable(_array: &vortex_array::arrays::FilterData) -> &Self pub fn vortex_array::arrays::Filter::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Filter -pub fn vortex_array::arrays::Filter::validity(array: &vortex_array::arrays::FilterArray) -> vortex_error::VortexResult - -pub struct vortex_array::arrays::FilterArray +pub fn vortex_array::arrays::Filter::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -impl vortex_array::arrays::FilterArray +pub struct vortex_array::arrays::FilterData -pub fn vortex_array::arrays::FilterArray::child(&self) -> &vortex_array::ArrayRef +impl vortex_array::arrays::FilterData -pub fn vortex_array::arrays::FilterArray::filter_mask(&self) -> &vortex_mask::Mask +pub fn vortex_array::arrays::FilterData::child(&self) -> &vortex_array::ArrayRef -pub fn vortex_array::arrays::FilterArray::into_parts(self) -> vortex_array::arrays::filter::FilterArrayParts +pub fn vortex_array::arrays::FilterData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_array::arrays::FilterArray::new(array: vortex_array::ArrayRef, mask: vortex_mask::Mask) -> Self +pub fn vortex_array::arrays::FilterData::filter_mask(&self) -> &vortex_mask::Mask -pub fn vortex_array::arrays::FilterArray::try_new(array: vortex_array::ArrayRef, mask: vortex_mask::Mask) -> vortex_error::VortexResult +pub fn vortex_array::arrays::FilterData::is_empty(&self) -> bool -impl vortex_array::arrays::FilterArray +pub fn vortex_array::arrays::FilterData::len(&self) -> usize -pub fn vortex_array::arrays::FilterArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::FilterData::new(array: vortex_array::ArrayRef, mask: vortex_mask::Mask) -> Self -impl core::clone::Clone for vortex_array::arrays::FilterArray +pub fn vortex_array::arrays::FilterData::try_new(array: vortex_array::ArrayRef, mask: vortex_mask::Mask) -> vortex_error::VortexResult -pub fn vortex_array::arrays::FilterArray::clone(&self) -> vortex_array::arrays::FilterArray +impl vortex_array::arrays::FilterData -impl core::convert::AsRef for vortex_array::arrays::FilterArray +pub fn vortex_array::arrays::FilterData::into_parts(self) -> vortex_array::arrays::filter::FilterArrayParts -pub fn vortex_array::arrays::FilterArray::as_ref(&self) -> &dyn vortex_array::DynArray +impl core::clone::Clone for vortex_array::arrays::FilterData -impl core::convert::From for vortex_array::ArrayRef +pub fn vortex_array::arrays::FilterData::clone(&self) -> vortex_array::arrays::FilterData -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::FilterArray) -> vortex_array::ArrayRef +impl core::convert::From for vortex_array::ArrayRef -impl core::fmt::Debug for vortex_array::arrays::FilterArray +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::FilterData) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::FilterArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::fmt::Debug for vortex_array::arrays::FilterData -impl core::ops::deref::Deref for vortex_array::arrays::FilterArray +pub fn vortex_array::arrays::FilterData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub type vortex_array::arrays::FilterArray::Target = dyn vortex_array::DynArray +impl vortex_array::IntoArray for vortex_array::arrays::FilterData -pub fn vortex_array::arrays::FilterArray::deref(&self) -> &Self::Target - -impl vortex_array::IntoArray for vortex_array::arrays::FilterArray - -pub fn vortex_array::arrays::FilterArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::FilterData::into_array(self) -> vortex_array::ArrayRef pub struct vortex_array::arrays::FixedSizeList @@ -6206,27 +5888,27 @@ pub fn vortex_array::arrays::FixedSizeList::fmt(&self, f: &mut core::fmt::Format impl vortex_array::arrays::dict::TakeExecute for vortex_array::arrays::FixedSizeList -pub fn vortex_array::arrays::FixedSizeList::take(array: &vortex_array::arrays::FixedSizeListArray, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::FixedSizeList::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::FixedSizeList -pub fn vortex_array::arrays::FixedSizeList::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::FixedSizeList::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastReduce for vortex_array::arrays::FixedSizeList -pub fn vortex_array::arrays::FixedSizeList::cast(array: &vortex_array::arrays::FixedSizeListArray, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::FixedSizeList::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::FixedSizeList -pub fn vortex_array::arrays::FixedSizeList::mask(array: &vortex_array::arrays::FixedSizeListArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::FixedSizeList::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::FixedSizeList -pub fn vortex_array::arrays::FixedSizeList::scalar_at(array: &vortex_array::arrays::FixedSizeListArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::FixedSizeList::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::FixedSizeList -pub type vortex_array::arrays::FixedSizeList::Array = vortex_array::arrays::FixedSizeListArray +pub type vortex_array::arrays::FixedSizeList::Array = vortex_array::arrays::FixedSizeListData pub type vortex_array::arrays::FixedSizeList::Metadata = vortex_array::EmptyMetadata @@ -6234,25 +5916,25 @@ pub type vortex_array::arrays::FixedSizeList::OperationsVTable = vortex_array::a pub type vortex_array::arrays::FixedSizeList::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::FixedSizeList::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::FixedSizeList::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::FixedSizeList::array_eq(array: &vortex_array::arrays::FixedSizeListArray, other: &vortex_array::arrays::FixedSizeListArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::FixedSizeList::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::FixedSizeList::array_hash(array: &vortex_array::arrays::FixedSizeListArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::FixedSizeList::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::FixedSizeList::buffer(_array: &vortex_array::arrays::FixedSizeListArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::FixedSizeList::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::FixedSizeList::buffer_name(_array: &vortex_array::arrays::FixedSizeListArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::FixedSizeList::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::FixedSizeList::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::FixedSizeList::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::FixedSizeList::child(array: &vortex_array::arrays::FixedSizeListArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::FixedSizeList::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::FixedSizeList::child_name(_array: &vortex_array::arrays::FixedSizeListArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::FixedSizeList::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::FixedSizeList::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::FixedSizeList::dtype(array: &vortex_array::arrays::FixedSizeListArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::FixedSizeList::dtype(array: &vortex_array::arrays::FixedSizeListData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::FixedSizeList::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -6260,13 +5942,13 @@ pub fn vortex_array::arrays::FixedSizeList::execute_parent(array: &vortex_array: pub fn vortex_array::arrays::FixedSizeList::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::FixedSizeList::len(array: &vortex_array::arrays::FixedSizeListArray) -> usize +pub fn vortex_array::arrays::FixedSizeList::len(array: &vortex_array::arrays::FixedSizeListData) -> usize -pub fn vortex_array::arrays::FixedSizeList::metadata(_array: &vortex_array::arrays::FixedSizeListArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::FixedSizeList::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::FixedSizeList::nbuffers(_array: &vortex_array::arrays::FixedSizeListArray) -> usize +pub fn vortex_array::arrays::FixedSizeList::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::FixedSizeList::nchildren(array: &vortex_array::arrays::FixedSizeListArray) -> usize +pub fn vortex_array::arrays::FixedSizeList::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::FixedSizeList::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -6274,69 +5956,63 @@ pub fn vortex_array::arrays::FixedSizeList::reduce_parent(array: &vortex_array:: pub fn vortex_array::arrays::FixedSizeList::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::FixedSizeList::stats(array: &vortex_array::arrays::FixedSizeListArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::FixedSizeList::stats(array: &vortex_array::arrays::FixedSizeListData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::FixedSizeList::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::FixedSizeList::vtable(_array: &vortex_array::arrays::FixedSizeListData) -> &Self pub fn vortex_array::arrays::FixedSizeList::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> -pub struct vortex_array::arrays::FixedSizeListArray +pub struct vortex_array::arrays::FixedSizeListData -impl vortex_array::arrays::FixedSizeListArray +impl vortex_array::arrays::FixedSizeListData -pub fn vortex_array::arrays::FixedSizeListArray::elements(&self) -> &vortex_array::ArrayRef +pub fn vortex_array::arrays::FixedSizeListData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_array::arrays::FixedSizeListArray::fixed_size_list_elements_at(&self, index: usize) -> vortex_error::VortexResult +pub fn vortex_array::arrays::FixedSizeListData::elements(&self) -> &vortex_array::ArrayRef -pub fn vortex_array::arrays::FixedSizeListArray::into_parts(self) -> (vortex_array::ArrayRef, vortex_array::validity::Validity, vortex_array::dtype::DType) +pub fn vortex_array::arrays::FixedSizeListData::into_parts(self) -> (vortex_array::ArrayRef, vortex_array::validity::Validity, vortex_array::dtype::DType) -pub const fn vortex_array::arrays::FixedSizeListArray::list_size(&self) -> u32 +pub fn vortex_array::arrays::FixedSizeListData::is_empty(&self) -> bool -pub fn vortex_array::arrays::FixedSizeListArray::new(elements: vortex_array::ArrayRef, list_size: u32, validity: vortex_array::validity::Validity, len: usize) -> Self +pub fn vortex_array::arrays::FixedSizeListData::len(&self) -> usize -pub unsafe fn vortex_array::arrays::FixedSizeListArray::new_unchecked(elements: vortex_array::ArrayRef, list_size: u32, validity: vortex_array::validity::Validity, len: usize) -> Self +pub const fn vortex_array::arrays::FixedSizeListData::list_size(&self) -> u32 -pub fn vortex_array::arrays::FixedSizeListArray::try_new(elements: vortex_array::ArrayRef, list_size: u32, validity: vortex_array::validity::Validity, len: usize) -> vortex_error::VortexResult +pub fn vortex_array::arrays::FixedSizeListData::new(elements: vortex_array::ArrayRef, list_size: u32, validity: vortex_array::validity::Validity, len: usize) -> Self -pub fn vortex_array::arrays::FixedSizeListArray::validate(elements: &vortex_array::ArrayRef, len: usize, list_size: u32, validity: &vortex_array::validity::Validity) -> vortex_error::VortexResult<()> +pub unsafe fn vortex_array::arrays::FixedSizeListData::new_unchecked(elements: vortex_array::ArrayRef, list_size: u32, validity: vortex_array::validity::Validity, len: usize) -> Self -impl vortex_array::arrays::FixedSizeListArray +pub fn vortex_array::arrays::FixedSizeListData::try_new(elements: vortex_array::ArrayRef, list_size: u32, validity: vortex_array::validity::Validity, len: usize) -> vortex_error::VortexResult -pub fn vortex_array::arrays::FixedSizeListArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::FixedSizeListData::validate(elements: &vortex_array::ArrayRef, len: usize, list_size: u32, validity: &vortex_array::validity::Validity) -> vortex_error::VortexResult<()> -impl core::clone::Clone for vortex_array::arrays::FixedSizeListArray +pub fn vortex_array::arrays::FixedSizeListData::validity(&self) -> &vortex_array::validity::Validity -pub fn vortex_array::arrays::FixedSizeListArray::clone(&self) -> vortex_array::arrays::FixedSizeListArray +pub fn vortex_array::arrays::FixedSizeListData::validity_mask(&self) -> vortex_mask::Mask -impl core::convert::AsRef for vortex_array::arrays::FixedSizeListArray +impl vortex_array::arrays::FixedSizeListData -pub fn vortex_array::arrays::FixedSizeListArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub fn vortex_array::arrays::FixedSizeListData::fixed_size_list_elements_at(&self, index: usize) -> vortex_error::VortexResult -impl core::convert::From for vortex_array::ArrayRef +impl core::clone::Clone for vortex_array::arrays::FixedSizeListData -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::FixedSizeListArray) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::FixedSizeListData::clone(&self) -> vortex_array::arrays::FixedSizeListData -impl core::fmt::Debug for vortex_array::arrays::FixedSizeListArray +impl core::convert::From for vortex_array::ArrayRef -pub fn vortex_array::arrays::FixedSizeListArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::FixedSizeListData) -> vortex_array::ArrayRef -impl core::ops::deref::Deref for vortex_array::arrays::FixedSizeListArray +impl core::fmt::Debug for vortex_array::arrays::FixedSizeListData -pub type vortex_array::arrays::FixedSizeListArray::Target = dyn vortex_array::DynArray +pub fn vortex_array::arrays::FixedSizeListData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub fn vortex_array::arrays::FixedSizeListArray::deref(&self) -> &Self::Target +impl vortex_array::IntoArray for vortex_array::arrays::FixedSizeListData -impl vortex_array::Executable for vortex_array::arrays::FixedSizeListArray +pub fn vortex_array::arrays::FixedSizeListData::into_array(self) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::FixedSizeListArray::execute(array: vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::FixedSizeListData -impl vortex_array::IntoArray for vortex_array::arrays::FixedSizeListArray - -pub fn vortex_array::arrays::FixedSizeListArray::into_array(self) -> vortex_array::ArrayRef - -impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::FixedSizeListArray - -pub fn vortex_array::arrays::FixedSizeListArray::validity(&self) -> &vortex_array::validity::Validity +pub fn vortex_array::arrays::FixedSizeListData::validity(&self) -> &vortex_array::validity::Validity pub struct vortex_array::arrays::List @@ -6354,31 +6030,31 @@ pub fn vortex_array::arrays::List::fmt(&self, f: &mut core::fmt::Formatter<'_>) impl vortex_array::arrays::dict::TakeExecute for vortex_array::arrays::List -pub fn vortex_array::arrays::List::take(array: &vortex_array::arrays::ListArray, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::List::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::filter::FilterKernel for vortex_array::arrays::List -pub fn vortex_array::arrays::List::filter(array: &vortex_array::arrays::ListArray, mask: &vortex_mask::Mask, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::List::filter(array: &vortex_array::vtable::Array, mask: &vortex_mask::Mask, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::List -pub fn vortex_array::arrays::List::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::List::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastReduce for vortex_array::arrays::List -pub fn vortex_array::arrays::List::cast(array: &vortex_array::arrays::ListArray, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::List::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::List -pub fn vortex_array::arrays::List::mask(array: &vortex_array::arrays::ListArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::List::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::List -pub fn vortex_array::arrays::List::scalar_at(array: &vortex_array::arrays::ListArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::List::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::List -pub type vortex_array::arrays::List::Array = vortex_array::arrays::ListArray +pub type vortex_array::arrays::List::Array = vortex_array::arrays::ListData pub type vortex_array::arrays::List::Metadata = vortex_array::ProstMetadata @@ -6386,25 +6062,25 @@ pub type vortex_array::arrays::List::OperationsVTable = vortex_array::arrays::Li pub type vortex_array::arrays::List::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::List::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::List::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::List::array_eq(array: &vortex_array::arrays::ListArray, other: &vortex_array::arrays::ListArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::List::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::List::array_hash(array: &vortex_array::arrays::ListArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::List::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::List::buffer(_array: &vortex_array::arrays::ListArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::List::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::List::buffer_name(_array: &vortex_array::arrays::ListArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::List::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::List::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::List::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::List::child(array: &vortex_array::arrays::ListArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::List::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::List::child_name(_array: &vortex_array::arrays::ListArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::List::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::List::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::List::dtype(array: &vortex_array::arrays::ListArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::List::dtype(array: &vortex_array::arrays::ListData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::List::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -6412,13 +6088,13 @@ pub fn vortex_array::arrays::List::execute_parent(array: &vortex_array::vtable:: pub fn vortex_array::arrays::List::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::List::len(array: &vortex_array::arrays::ListArray) -> usize +pub fn vortex_array::arrays::List::len(array: &vortex_array::arrays::ListData) -> usize -pub fn vortex_array::arrays::List::metadata(array: &vortex_array::arrays::ListArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::List::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::List::nbuffers(_array: &vortex_array::arrays::ListArray) -> usize +pub fn vortex_array::arrays::List::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::List::nchildren(array: &vortex_array::arrays::ListArray) -> usize +pub fn vortex_array::arrays::List::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::List::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -6426,73 +6102,71 @@ pub fn vortex_array::arrays::List::reduce_parent(array: &vortex_array::vtable::A pub fn vortex_array::arrays::List::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::List::stats(array: &vortex_array::arrays::ListArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::List::stats(array: &vortex_array::arrays::ListData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::List::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::List::vtable(_array: &vortex_array::arrays::ListData) -> &Self pub fn vortex_array::arrays::List::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> -pub struct vortex_array::arrays::ListArray - -impl vortex_array::arrays::ListArray +pub struct vortex_array::arrays::ListData -pub fn vortex_array::arrays::ListArray::element_dtype(&self) -> &alloc::sync::Arc +impl vortex_array::arrays::ListData -pub fn vortex_array::arrays::ListArray::elements(&self) -> &vortex_array::ArrayRef +pub fn vortex_array::arrays::ListData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_array::arrays::ListArray::into_parts(self) -> vortex_array::arrays::list::ListArrayParts +pub fn vortex_array::arrays::ListData::element_dtype(&self) -> &alloc::sync::Arc -pub fn vortex_array::arrays::ListArray::list_elements_at(&self, index: usize) -> vortex_error::VortexResult +pub fn vortex_array::arrays::ListData::elements(&self) -> &vortex_array::ArrayRef -pub fn vortex_array::arrays::ListArray::new(elements: vortex_array::ArrayRef, offsets: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> Self +pub fn vortex_array::arrays::ListData::into_parts(self) -> vortex_array::arrays::list::ListArrayParts -pub unsafe fn vortex_array::arrays::ListArray::new_unchecked(elements: vortex_array::ArrayRef, offsets: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> Self +pub fn vortex_array::arrays::ListData::is_empty(&self) -> bool -pub fn vortex_array::arrays::ListArray::offset_at(&self, index: usize) -> vortex_error::VortexResult +pub fn vortex_array::arrays::ListData::len(&self) -> usize -pub fn vortex_array::arrays::ListArray::offsets(&self) -> &vortex_array::ArrayRef +pub fn vortex_array::arrays::ListData::list_elements_at(&self, index: usize) -> vortex_error::VortexResult -pub fn vortex_array::arrays::ListArray::reset_offsets(&self, recurse: bool) -> vortex_error::VortexResult +pub fn vortex_array::arrays::ListData::new(elements: vortex_array::ArrayRef, offsets: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::ListArray::sliced_elements(&self) -> vortex_error::VortexResult +pub unsafe fn vortex_array::arrays::ListData::new_unchecked(elements: vortex_array::ArrayRef, offsets: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::ListArray::try_new(elements: vortex_array::ArrayRef, offsets: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult +pub fn vortex_array::arrays::ListData::offset_at(&self, index: usize) -> vortex_error::VortexResult -pub fn vortex_array::arrays::ListArray::validate(elements: &vortex_array::ArrayRef, offsets: &vortex_array::ArrayRef, validity: &vortex_array::validity::Validity) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::ListData::offsets(&self) -> &vortex_array::ArrayRef -impl vortex_array::arrays::ListArray +pub fn vortex_array::arrays::ListData::sliced_elements(&self) -> vortex_error::VortexResult -pub fn vortex_array::arrays::ListArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ListData::try_new(elements: vortex_array::ArrayRef, offsets: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult -impl core::clone::Clone for vortex_array::arrays::ListArray +pub fn vortex_array::arrays::ListData::validate(elements: &vortex_array::ArrayRef, offsets: &vortex_array::ArrayRef, validity: &vortex_array::validity::Validity) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::ListArray::clone(&self) -> vortex_array::arrays::ListArray +pub fn vortex_array::arrays::ListData::validity(&self) -> &vortex_array::validity::Validity -impl core::convert::AsRef for vortex_array::arrays::ListArray +pub fn vortex_array::arrays::ListData::validity_mask(&self) -> vortex_mask::Mask -pub fn vortex_array::arrays::ListArray::as_ref(&self) -> &dyn vortex_array::DynArray +impl vortex_array::arrays::ListData -impl core::convert::From for vortex_array::ArrayRef +pub fn vortex_array::arrays::ListData::reset_offsets(&self, recurse: bool) -> vortex_error::VortexResult -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::ListArray) -> vortex_array::ArrayRef +impl core::clone::Clone for vortex_array::arrays::ListData -impl core::fmt::Debug for vortex_array::arrays::ListArray +pub fn vortex_array::arrays::ListData::clone(&self) -> vortex_array::arrays::ListData -pub fn vortex_array::arrays::ListArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::convert::From for vortex_array::ArrayRef -impl core::ops::deref::Deref for vortex_array::arrays::ListArray +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::ListData) -> vortex_array::ArrayRef -pub type vortex_array::arrays::ListArray::Target = dyn vortex_array::DynArray +impl core::fmt::Debug for vortex_array::arrays::ListData -pub fn vortex_array::arrays::ListArray::deref(&self) -> &Self::Target +pub fn vortex_array::arrays::ListData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -impl vortex_array::IntoArray for vortex_array::arrays::ListArray +impl vortex_array::IntoArray for vortex_array::arrays::ListData -pub fn vortex_array::arrays::ListArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ListData::into_array(self) -> vortex_array::ArrayRef -impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::ListArray +impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::ListData -pub fn vortex_array::arrays::ListArray::validity(&self) -> &vortex_array::validity::Validity +pub fn vortex_array::arrays::ListData::validity(&self) -> &vortex_array::validity::Validity pub struct vortex_array::arrays::ListView @@ -6510,27 +6184,27 @@ pub fn vortex_array::arrays::ListView::fmt(&self, f: &mut core::fmt::Formatter<' impl vortex_array::arrays::dict::TakeReduce for vortex_array::arrays::ListView -pub fn vortex_array::arrays::ListView::take(array: &vortex_array::arrays::ListViewArray, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::ListView::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::ListView -pub fn vortex_array::arrays::ListView::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::ListView::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastReduce for vortex_array::arrays::ListView -pub fn vortex_array::arrays::ListView::cast(array: &vortex_array::arrays::ListViewArray, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::ListView::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::ListView -pub fn vortex_array::arrays::ListView::mask(array: &vortex_array::arrays::ListViewArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::ListView::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::ListView -pub fn vortex_array::arrays::ListView::scalar_at(array: &vortex_array::arrays::ListViewArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::ListView::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::ListView -pub type vortex_array::arrays::ListView::Array = vortex_array::arrays::ListViewArray +pub type vortex_array::arrays::ListView::Array = vortex_array::arrays::ListViewData pub type vortex_array::arrays::ListView::Metadata = vortex_array::ProstMetadata @@ -6538,25 +6212,25 @@ pub type vortex_array::arrays::ListView::OperationsVTable = vortex_array::arrays pub type vortex_array::arrays::ListView::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::ListView::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::ListView::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::ListView::array_eq(array: &vortex_array::arrays::ListViewArray, other: &vortex_array::arrays::ListViewArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::ListView::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::ListView::array_hash(array: &vortex_array::arrays::ListViewArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::ListView::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::ListView::buffer(_array: &vortex_array::arrays::ListViewArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::ListView::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::ListView::buffer_name(_array: &vortex_array::arrays::ListViewArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::ListView::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::ListView::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::ListView::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::ListView::child(array: &vortex_array::arrays::ListViewArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ListView::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::ListView::child_name(_array: &vortex_array::arrays::ListViewArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::ListView::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::ListView::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::ListView::dtype(array: &vortex_array::arrays::ListViewArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::ListView::dtype(array: &vortex_array::arrays::ListViewData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::ListView::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -6564,13 +6238,13 @@ pub fn vortex_array::arrays::ListView::execute_parent(array: &vortex_array::vtab pub fn vortex_array::arrays::ListView::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::ListView::len(array: &vortex_array::arrays::ListViewArray) -> usize +pub fn vortex_array::arrays::ListView::len(array: &vortex_array::arrays::ListViewData) -> usize -pub fn vortex_array::arrays::ListView::metadata(array: &vortex_array::arrays::ListViewArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::ListView::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::ListView::nbuffers(_array: &vortex_array::arrays::ListViewArray) -> usize +pub fn vortex_array::arrays::ListView::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::ListView::nchildren(array: &vortex_array::arrays::ListViewArray) -> usize +pub fn vortex_array::arrays::ListView::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::ListView::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -6578,85 +6252,73 @@ pub fn vortex_array::arrays::ListView::reduce_parent(array: &vortex_array::vtabl pub fn vortex_array::arrays::ListView::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::ListView::stats(array: &vortex_array::arrays::ListViewArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::ListView::stats(array: &vortex_array::arrays::ListViewData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::ListView::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::ListView::vtable(_array: &vortex_array::arrays::ListViewData) -> &Self pub fn vortex_array::arrays::ListView::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> -pub struct vortex_array::arrays::ListViewArray - -impl vortex_array::arrays::ListViewArray - -pub fn vortex_array::arrays::ListViewArray::elements(&self) -> &vortex_array::ArrayRef - -pub fn vortex_array::arrays::ListViewArray::into_parts(self) -> vortex_array::arrays::listview::ListViewArrayParts +pub struct vortex_array::arrays::ListViewData -pub fn vortex_array::arrays::ListViewArray::is_zero_copy_to_list(&self) -> bool +impl vortex_array::arrays::ListViewData -pub fn vortex_array::arrays::ListViewArray::list_elements_at(&self, index: usize) -> vortex_error::VortexResult +pub fn vortex_array::arrays::ListViewData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_array::arrays::ListViewArray::new(elements: vortex_array::ArrayRef, offsets: vortex_array::ArrayRef, sizes: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> Self +pub fn vortex_array::arrays::ListViewData::elements(&self) -> &vortex_array::ArrayRef -pub unsafe fn vortex_array::arrays::ListViewArray::new_unchecked(elements: vortex_array::ArrayRef, offsets: vortex_array::ArrayRef, sizes: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> Self +pub fn vortex_array::arrays::ListViewData::into_parts(self) -> vortex_array::arrays::listview::ListViewArrayParts -pub fn vortex_array::arrays::ListViewArray::offset_at(&self, index: usize) -> usize +pub fn vortex_array::arrays::ListViewData::is_empty(&self) -> bool -pub fn vortex_array::arrays::ListViewArray::offsets(&self) -> &vortex_array::ArrayRef +pub fn vortex_array::arrays::ListViewData::is_zero_copy_to_list(&self) -> bool -pub fn vortex_array::arrays::ListViewArray::size_at(&self, index: usize) -> usize +pub fn vortex_array::arrays::ListViewData::len(&self) -> usize -pub fn vortex_array::arrays::ListViewArray::sizes(&self) -> &vortex_array::ArrayRef +pub fn vortex_array::arrays::ListViewData::list_elements_at(&self, index: usize) -> vortex_error::VortexResult -pub fn vortex_array::arrays::ListViewArray::try_new(elements: vortex_array::ArrayRef, offsets: vortex_array::ArrayRef, sizes: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult +pub fn vortex_array::arrays::ListViewData::new(elements: vortex_array::ArrayRef, offsets: vortex_array::ArrayRef, sizes: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::ListViewArray::validate(elements: &vortex_array::ArrayRef, offsets: &vortex_array::ArrayRef, sizes: &vortex_array::ArrayRef, validity: &vortex_array::validity::Validity) -> vortex_error::VortexResult<()> +pub unsafe fn vortex_array::arrays::ListViewData::new_unchecked(elements: vortex_array::ArrayRef, offsets: vortex_array::ArrayRef, sizes: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::ListViewArray::verify_is_zero_copy_to_list(&self) -> bool +pub fn vortex_array::arrays::ListViewData::offset_at(&self, index: usize) -> usize -pub unsafe fn vortex_array::arrays::ListViewArray::with_zero_copy_to_list(self, is_zctl: bool) -> Self +pub fn vortex_array::arrays::ListViewData::offsets(&self) -> &vortex_array::ArrayRef -impl vortex_array::arrays::ListViewArray +pub fn vortex_array::arrays::ListViewData::size_at(&self, index: usize) -> usize -pub fn vortex_array::arrays::ListViewArray::rebuild(&self, mode: vortex_array::arrays::listview::ListViewRebuildMode) -> vortex_error::VortexResult +pub fn vortex_array::arrays::ListViewData::sizes(&self) -> &vortex_array::ArrayRef -impl vortex_array::arrays::ListViewArray +pub fn vortex_array::arrays::ListViewData::try_new(elements: vortex_array::ArrayRef, offsets: vortex_array::ArrayRef, sizes: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult -pub fn vortex_array::arrays::ListViewArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ListViewData::validate(elements: &vortex_array::ArrayRef, offsets: &vortex_array::ArrayRef, sizes: &vortex_array::ArrayRef, validity: &vortex_array::validity::Validity) -> vortex_error::VortexResult<()> -impl core::clone::Clone for vortex_array::arrays::ListViewArray +pub fn vortex_array::arrays::ListViewData::validity(&self) -> &vortex_array::validity::Validity -pub fn vortex_array::arrays::ListViewArray::clone(&self) -> vortex_array::arrays::ListViewArray +pub fn vortex_array::arrays::ListViewData::validity_mask(&self) -> vortex_mask::Mask -impl core::convert::AsRef for vortex_array::arrays::ListViewArray +pub fn vortex_array::arrays::ListViewData::verify_is_zero_copy_to_list(&self) -> bool -pub fn vortex_array::arrays::ListViewArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub unsafe fn vortex_array::arrays::ListViewData::with_zero_copy_to_list(self, is_zctl: bool) -> Self -impl core::convert::From for vortex_array::ArrayRef +impl core::clone::Clone for vortex_array::arrays::ListViewData -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::ListViewArray) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ListViewData::clone(&self) -> vortex_array::arrays::ListViewData -impl core::fmt::Debug for vortex_array::arrays::ListViewArray +impl core::convert::From for vortex_array::ArrayRef -pub fn vortex_array::arrays::ListViewArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::ListViewData) -> vortex_array::ArrayRef -impl core::ops::deref::Deref for vortex_array::arrays::ListViewArray +impl core::fmt::Debug for vortex_array::arrays::ListViewData -pub type vortex_array::arrays::ListViewArray::Target = dyn vortex_array::DynArray +pub fn vortex_array::arrays::ListViewData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub fn vortex_array::arrays::ListViewArray::deref(&self) -> &Self::Target +impl vortex_array::IntoArray for vortex_array::arrays::ListViewData -impl vortex_array::Executable for vortex_array::arrays::ListViewArray - -pub fn vortex_array::arrays::ListViewArray::execute(array: vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult - -impl vortex_array::IntoArray for vortex_array::arrays::ListViewArray +pub fn vortex_array::arrays::ListViewData::into_array(self) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::ListViewArray::into_array(self) -> vortex_array::ArrayRef +impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::ListViewData -impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::ListViewArray - -pub fn vortex_array::arrays::ListViewArray::validity(&self) -> &vortex_array::validity::Validity +pub fn vortex_array::arrays::ListViewData::validity(&self) -> &vortex_array::validity::Validity pub struct vortex_array::arrays::Masked @@ -6674,27 +6336,27 @@ pub fn vortex_array::arrays::Masked::fmt(&self, f: &mut core::fmt::Formatter<'_> impl vortex_array::arrays::dict::TakeReduce for vortex_array::arrays::Masked -pub fn vortex_array::arrays::Masked::take(array: &vortex_array::arrays::MaskedArray, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Masked::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::arrays::filter::FilterReduce for vortex_array::arrays::Masked -pub fn vortex_array::arrays::Masked::filter(array: &vortex_array::arrays::MaskedArray, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Masked::filter(array: &vortex_array::vtable::Array, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::Masked -pub fn vortex_array::arrays::Masked::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Masked::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::Masked -pub fn vortex_array::arrays::Masked::mask(array: &vortex_array::arrays::MaskedArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Masked::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::Masked -pub fn vortex_array::arrays::Masked::scalar_at(array: &vortex_array::arrays::MaskedArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Masked::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::Masked -pub type vortex_array::arrays::Masked::Array = vortex_array::arrays::MaskedArray +pub type vortex_array::arrays::Masked::Array = vortex_array::arrays::MaskedData pub type vortex_array::arrays::Masked::Metadata = vortex_array::EmptyMetadata @@ -6702,25 +6364,25 @@ pub type vortex_array::arrays::Masked::OperationsVTable = vortex_array::arrays:: pub type vortex_array::arrays::Masked::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::Masked::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Masked::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Masked::array_eq(array: &vortex_array::arrays::MaskedArray, other: &vortex_array::arrays::MaskedArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Masked::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Masked::array_hash(array: &vortex_array::arrays::MaskedArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Masked::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Masked::buffer(_array: &Self::Array, _idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Masked::buffer(_array: &vortex_array::vtable::Array, _idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Masked::buffer_name(_array: &Self::Array, _idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Masked::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Masked::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Masked::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Masked::child(array: &Self::Array, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Masked::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Masked::child_name(_array: &Self::Array, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Masked::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Masked::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Masked::dtype(array: &vortex_array::arrays::MaskedArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Masked::dtype(array: &vortex_array::arrays::MaskedData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Masked::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -6728,13 +6390,13 @@ pub fn vortex_array::arrays::Masked::execute_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Masked::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Masked::len(array: &vortex_array::arrays::MaskedArray) -> usize +pub fn vortex_array::arrays::Masked::len(array: &vortex_array::arrays::MaskedData) -> usize -pub fn vortex_array::arrays::Masked::metadata(_array: &vortex_array::arrays::MaskedArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Masked::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Masked::nbuffers(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::Masked::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Masked::nchildren(array: &Self::Array) -> usize +pub fn vortex_array::arrays::Masked::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Masked::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -6742,53 +6404,49 @@ pub fn vortex_array::arrays::Masked::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::Masked::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Masked::stats(array: &vortex_array::arrays::MaskedArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Masked::stats(array: &vortex_array::arrays::MaskedData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Masked::vtable(_array: &Self::Array) -> &Self pub fn vortex_array::arrays::Masked::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> -pub struct vortex_array::arrays::MaskedArray - -impl vortex_array::arrays::MaskedArray +pub struct vortex_array::arrays::MaskedData -pub fn vortex_array::arrays::MaskedArray::child(&self) -> &vortex_array::ArrayRef +impl vortex_array::arrays::MaskedData -pub fn vortex_array::arrays::MaskedArray::try_new(child: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult +pub fn vortex_array::arrays::MaskedData::child(&self) -> &vortex_array::ArrayRef -impl vortex_array::arrays::MaskedArray +pub fn vortex_array::arrays::MaskedData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_array::arrays::MaskedArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::MaskedData::is_empty(&self) -> bool -impl core::clone::Clone for vortex_array::arrays::MaskedArray +pub fn vortex_array::arrays::MaskedData::len(&self) -> usize -pub fn vortex_array::arrays::MaskedArray::clone(&self) -> vortex_array::arrays::MaskedArray +pub fn vortex_array::arrays::MaskedData::try_new(child: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult -impl core::convert::AsRef for vortex_array::arrays::MaskedArray +pub fn vortex_array::arrays::MaskedData::validity(&self) -> &vortex_array::validity::Validity -pub fn vortex_array::arrays::MaskedArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub fn vortex_array::arrays::MaskedData::validity_mask(&self) -> vortex_mask::Mask -impl core::convert::From for vortex_array::ArrayRef +impl core::clone::Clone for vortex_array::arrays::MaskedData -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::MaskedArray) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::MaskedData::clone(&self) -> vortex_array::arrays::MaskedData -impl core::fmt::Debug for vortex_array::arrays::MaskedArray +impl core::convert::From for vortex_array::ArrayRef -pub fn vortex_array::arrays::MaskedArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::MaskedData) -> vortex_array::ArrayRef -impl core::ops::deref::Deref for vortex_array::arrays::MaskedArray +impl core::fmt::Debug for vortex_array::arrays::MaskedData -pub type vortex_array::arrays::MaskedArray::Target = dyn vortex_array::DynArray +pub fn vortex_array::arrays::MaskedData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub fn vortex_array::arrays::MaskedArray::deref(&self) -> &Self::Target +impl vortex_array::IntoArray for vortex_array::arrays::MaskedData -impl vortex_array::IntoArray for vortex_array::arrays::MaskedArray +pub fn vortex_array::arrays::MaskedData::into_array(self) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::MaskedArray::into_array(self) -> vortex_array::ArrayRef +impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::MaskedData -impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::MaskedArray - -pub fn vortex_array::arrays::MaskedArray::validity(&self) -> &vortex_array::validity::Validity +pub fn vortex_array::arrays::MaskedData::validity(&self) -> &vortex_array::validity::Validity pub struct vortex_array::arrays::Null @@ -6810,31 +6468,31 @@ pub fn vortex_array::arrays::null::Null::fmt(&self, f: &mut core::fmt::Formatter impl vortex_array::arrays::dict::TakeReduce for vortex_array::arrays::null::Null -pub fn vortex_array::arrays::null::Null::take(array: &vortex_array::arrays::null::NullArray, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::null::Null::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::arrays::filter::FilterReduce for vortex_array::arrays::null::Null -pub fn vortex_array::arrays::null::Null::filter(_array: &vortex_array::arrays::null::NullArray, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::null::Null::filter(_array: &vortex_array::vtable::Array, mask: &vortex_mask::Mask) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::null::Null -pub fn vortex_array::arrays::null::Null::slice(_array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::null::Null::slice(_array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastReduce for vortex_array::arrays::null::Null -pub fn vortex_array::arrays::null::Null::cast(array: &vortex_array::arrays::null::NullArray, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::null::Null::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::null::Null -pub fn vortex_array::arrays::null::Null::mask(array: &vortex_array::arrays::null::NullArray, _mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::null::Null::mask(array: &vortex_array::vtable::Array, _mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::null::Null -pub fn vortex_array::arrays::null::Null::scalar_at(_array: &vortex_array::arrays::null::NullArray, _index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::null::Null::scalar_at(_array: &vortex_array::vtable::Array, _index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::null::Null -pub type vortex_array::arrays::null::Null::Array = vortex_array::arrays::null::NullArray +pub type vortex_array::arrays::null::Null::Array = vortex_array::arrays::null::NullData pub type vortex_array::arrays::null::Null::Metadata = vortex_array::EmptyMetadata @@ -6842,25 +6500,25 @@ pub type vortex_array::arrays::null::Null::OperationsVTable = vortex_array::arra pub type vortex_array::arrays::null::Null::ValidityVTable = vortex_array::arrays::null::Null -pub fn vortex_array::arrays::null::Null::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::null::Null::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::null::Null::array_eq(array: &vortex_array::arrays::null::NullArray, other: &vortex_array::arrays::null::NullArray, _precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::null::Null::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, _precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::null::Null::array_hash(array: &vortex_array::arrays::null::NullArray, state: &mut H, _precision: vortex_array::Precision) +pub fn vortex_array::arrays::null::Null::array_hash(array: &vortex_array::vtable::Array, state: &mut H, _precision: vortex_array::Precision) -pub fn vortex_array::arrays::null::Null::buffer(_array: &vortex_array::arrays::null::NullArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::null::Null::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::null::Null::buffer_name(_array: &vortex_array::arrays::null::NullArray, _idx: usize) -> core::option::Option +pub fn vortex_array::arrays::null::Null::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option -pub fn vortex_array::arrays::null::Null::build(_dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], _children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::null::Null::build(_dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], _children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::null::Null::child(_array: &vortex_array::arrays::null::NullArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::null::Null::child(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::null::Null::child_name(_array: &vortex_array::arrays::null::NullArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::null::Null::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::null::Null::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::null::Null::dtype(_array: &vortex_array::arrays::null::NullArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::null::Null::dtype(_array: &vortex_array::arrays::null::NullData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::null::Null::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -6868,13 +6526,13 @@ pub fn vortex_array::arrays::null::Null::execute_parent(array: &vortex_array::vt pub fn vortex_array::arrays::null::Null::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::null::Null::len(array: &vortex_array::arrays::null::NullArray) -> usize +pub fn vortex_array::arrays::null::Null::len(array: &vortex_array::arrays::null::NullData) -> usize -pub fn vortex_array::arrays::null::Null::metadata(_array: &vortex_array::arrays::null::NullArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::null::Null::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::null::Null::nbuffers(_array: &vortex_array::arrays::null::NullArray) -> usize +pub fn vortex_array::arrays::null::Null::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::null::Null::nchildren(_array: &vortex_array::arrays::null::NullArray) -> usize +pub fn vortex_array::arrays::null::Null::nchildren(_array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::null::Null::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -6882,7 +6540,7 @@ pub fn vortex_array::arrays::null::Null::reduce_parent(array: &vortex_array::vta pub fn vortex_array::arrays::null::Null::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::null::Null::stats(array: &vortex_array::arrays::null::NullArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::null::Null::stats(array: &vortex_array::arrays::null::NullData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::null::Null::vtable(_array: &Self::Array) -> &Self @@ -6890,47 +6548,35 @@ pub fn vortex_array::arrays::null::Null::with_children(_array: &mut Self::Array, impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::null::Null -pub fn vortex_array::arrays::null::Null::validity(_array: &vortex_array::arrays::null::NullArray) -> vortex_error::VortexResult - -pub struct vortex_array::arrays::NullArray +pub fn vortex_array::arrays::null::Null::validity(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -impl vortex_array::arrays::null::NullArray +pub struct vortex_array::arrays::NullData -pub fn vortex_array::arrays::null::NullArray::new(len: usize) -> Self +impl vortex_array::arrays::null::NullData -impl vortex_array::arrays::null::NullArray +pub fn vortex_array::arrays::null::NullData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_array::arrays::null::NullArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::null::NullData::is_empty(&self) -> bool -impl core::clone::Clone for vortex_array::arrays::null::NullArray +pub fn vortex_array::arrays::null::NullData::len(&self) -> usize -pub fn vortex_array::arrays::null::NullArray::clone(&self) -> vortex_array::arrays::null::NullArray +pub fn vortex_array::arrays::null::NullData::new(len: usize) -> Self -impl core::convert::AsRef for vortex_array::arrays::null::NullArray +impl core::clone::Clone for vortex_array::arrays::null::NullData -pub fn vortex_array::arrays::null::NullArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub fn vortex_array::arrays::null::NullData::clone(&self) -> vortex_array::arrays::null::NullData -impl core::convert::From for vortex_array::ArrayRef +impl core::convert::From for vortex_array::ArrayRef -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::null::NullArray) -> vortex_array::ArrayRef +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::null::NullData) -> vortex_array::ArrayRef -impl core::fmt::Debug for vortex_array::arrays::null::NullArray +impl core::fmt::Debug for vortex_array::arrays::null::NullData -pub fn vortex_array::arrays::null::NullArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result - -impl core::ops::deref::Deref for vortex_array::arrays::null::NullArray - -pub type vortex_array::arrays::null::NullArray::Target = dyn vortex_array::DynArray - -pub fn vortex_array::arrays::null::NullArray::deref(&self) -> &Self::Target - -impl vortex_array::Executable for vortex_array::arrays::null::NullArray - -pub fn vortex_array::arrays::null::NullArray::execute(array: vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::null::NullData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -impl vortex_array::IntoArray for vortex_array::arrays::null::NullArray +impl vortex_array::IntoArray for vortex_array::arrays::null::NullData -pub fn vortex_array::arrays::null::NullArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::null::NullData::into_array(self) -> vortex_array::ArrayRef pub struct vortex_array::arrays::Primitive @@ -6948,41 +6594,41 @@ pub fn vortex_array::arrays::Primitive::fmt(&self, f: &mut core::fmt::Formatter< impl vortex_array::arrays::dict::TakeExecute for vortex_array::arrays::Primitive -pub fn vortex_array::arrays::Primitive::take(array: &vortex_array::arrays::PrimitiveArray, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Primitive::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::Primitive -pub fn vortex_array::arrays::Primitive::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Primitive::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_array::arrays::primitive::PrimitiveMaskedValidityRule pub type vortex_array::arrays::primitive::PrimitiveMaskedValidityRule::Parent = vortex_array::arrays::Masked -pub fn vortex_array::arrays::primitive::PrimitiveMaskedValidityRule::reduce_parent(&self, array: &vortex_array::arrays::PrimitiveArray, parent: &vortex_array::arrays::MaskedArray, _child_idx: usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::primitive::PrimitiveMaskedValidityRule::reduce_parent(&self, array: &vortex_array::vtable::Array, parent: &vortex_array::arrays::MaskedArray, _child_idx: usize) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::between::BetweenKernel for vortex_array::arrays::Primitive -pub fn vortex_array::arrays::Primitive::between(arr: &vortex_array::arrays::PrimitiveArray, lower: &vortex_array::ArrayRef, upper: &vortex_array::ArrayRef, options: &vortex_array::scalar_fn::fns::between::BetweenOptions, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Primitive::between(arr: &vortex_array::vtable::Array, lower: &vortex_array::ArrayRef, upper: &vortex_array::ArrayRef, options: &vortex_array::scalar_fn::fns::between::BetweenOptions, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastKernel for vortex_array::arrays::Primitive -pub fn vortex_array::arrays::Primitive::cast(array: &vortex_array::arrays::PrimitiveArray, dtype: &vortex_array::dtype::DType, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Primitive::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::fill_null::FillNullKernel for vortex_array::arrays::Primitive -pub fn vortex_array::arrays::Primitive::fill_null(array: &vortex_array::arrays::PrimitiveArray, fill_value: &vortex_array::scalar::Scalar, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Primitive::fill_null(array: &vortex_array::vtable::Array, fill_value: &vortex_array::scalar::Scalar, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::Primitive -pub fn vortex_array::arrays::Primitive::mask(array: &vortex_array::arrays::PrimitiveArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Primitive::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::Primitive -pub fn vortex_array::arrays::Primitive::scalar_at(array: &vortex_array::arrays::PrimitiveArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Primitive::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::Primitive -pub type vortex_array::arrays::Primitive::Array = vortex_array::arrays::PrimitiveArray +pub type vortex_array::arrays::Primitive::Array = vortex_array::arrays::PrimitiveData pub type vortex_array::arrays::Primitive::Metadata = vortex_array::EmptyMetadata @@ -6990,25 +6636,25 @@ pub type vortex_array::arrays::Primitive::OperationsVTable = vortex_array::array pub type vortex_array::arrays::Primitive::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::Primitive::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Primitive::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Primitive::array_eq(array: &vortex_array::arrays::PrimitiveArray, other: &vortex_array::arrays::PrimitiveArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Primitive::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Primitive::array_hash(array: &vortex_array::arrays::PrimitiveArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Primitive::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Primitive::buffer(array: &vortex_array::arrays::PrimitiveArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Primitive::buffer(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Primitive::buffer_name(_array: &vortex_array::arrays::PrimitiveArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Primitive::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Primitive::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Primitive::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Primitive::child(array: &vortex_array::arrays::PrimitiveArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Primitive::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Primitive::child_name(_array: &vortex_array::arrays::PrimitiveArray, _idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Primitive::child_name(_array: &vortex_array::vtable::Array, _idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Primitive::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Primitive::dtype(array: &vortex_array::arrays::PrimitiveArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Primitive::dtype(array: &vortex_array::arrays::PrimitiveData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Primitive::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -7016,13 +6662,13 @@ pub fn vortex_array::arrays::Primitive::execute_parent(array: &vortex_array::vta pub fn vortex_array::arrays::Primitive::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Primitive::len(array: &vortex_array::arrays::PrimitiveArray) -> usize +pub fn vortex_array::arrays::Primitive::len(array: &vortex_array::arrays::PrimitiveData) -> usize -pub fn vortex_array::arrays::Primitive::metadata(_array: &vortex_array::arrays::PrimitiveArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Primitive::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Primitive::nbuffers(_array: &vortex_array::arrays::PrimitiveArray) -> usize +pub fn vortex_array::arrays::Primitive::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Primitive::nchildren(array: &vortex_array::arrays::PrimitiveArray) -> usize +pub fn vortex_array::arrays::Primitive::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Primitive::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -7030,173 +6676,129 @@ pub fn vortex_array::arrays::Primitive::reduce_parent(array: &vortex_array::vtab pub fn vortex_array::arrays::Primitive::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Primitive::stats(array: &vortex_array::arrays::PrimitiveArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Primitive::stats(array: &vortex_array::arrays::PrimitiveData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Primitive::vtable(_array: &Self::Array) -> &Self pub fn vortex_array::arrays::Primitive::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> -pub struct vortex_array::arrays::PrimitiveArray +pub struct vortex_array::arrays::PrimitiveData -impl vortex_array::arrays::PrimitiveArray +impl vortex_array::arrays::PrimitiveData -pub fn vortex_array::arrays::PrimitiveArray::as_slice(&self) -> &[T] +pub fn vortex_array::arrays::PrimitiveData::buffer_handle(&self) -> &vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::PrimitiveArray::narrow(&self) -> vortex_error::VortexResult +pub fn vortex_array::arrays::PrimitiveData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_array::arrays::PrimitiveArray::reinterpret_cast(&self, ptype: vortex_array::dtype::PType) -> Self +pub fn vortex_array::arrays::PrimitiveData::from_buffer_handle(handle: vortex_array::buffer::BufferHandle, ptype: vortex_array::dtype::PType, validity: vortex_array::validity::Validity) -> Self -impl vortex_array::arrays::PrimitiveArray +pub fn vortex_array::arrays::PrimitiveData::from_byte_buffer(buffer: vortex_buffer::ByteBuffer, ptype: vortex_array::dtype::PType, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::PrimitiveArray::buffer_handle(&self) -> &vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::PrimitiveData::from_values_byte_buffer(valid_elems_buffer: vortex_buffer::ByteBuffer, ptype: vortex_array::dtype::PType, validity: vortex_array::validity::Validity, n_rows: usize) -> Self -pub fn vortex_array::arrays::PrimitiveArray::from_buffer_handle(handle: vortex_array::buffer::BufferHandle, ptype: vortex_array::dtype::PType, validity: vortex_array::validity::Validity) -> Self +pub fn vortex_array::arrays::PrimitiveData::into_buffer(self) -> vortex_buffer::buffer::Buffer -pub fn vortex_array::arrays::PrimitiveArray::from_byte_buffer(buffer: vortex_buffer::ByteBuffer, ptype: vortex_array::dtype::PType, validity: vortex_array::validity::Validity) -> Self +pub fn vortex_array::arrays::PrimitiveData::into_buffer_mut(self) -> vortex_buffer::buffer_mut::BufferMut -pub fn vortex_array::arrays::PrimitiveArray::from_values_byte_buffer(valid_elems_buffer: vortex_buffer::ByteBuffer, ptype: vortex_array::dtype::PType, validity: vortex_array::validity::Validity, n_rows: usize) -> Self +pub fn vortex_array::arrays::PrimitiveData::is_empty(&self) -> bool -pub fn vortex_array::arrays::PrimitiveArray::map_each(self, f: F) -> vortex_array::arrays::PrimitiveArray where T: vortex_array::dtype::NativePType, R: vortex_array::dtype::NativePType, F: core::ops::function::FnMut(T) -> R +pub fn vortex_array::arrays::PrimitiveData::len(&self) -> usize -pub fn vortex_array::arrays::PrimitiveArray::map_each_with_validity(self, f: F) -> vortex_error::VortexResult where T: vortex_array::dtype::NativePType, R: vortex_array::dtype::NativePType, F: core::ops::function::FnMut((T, bool)) -> R +pub fn vortex_array::arrays::PrimitiveData::map_each(self, f: F) -> Self where T: vortex_array::dtype::NativePType, R: vortex_array::dtype::NativePType, F: core::ops::function::FnMut(T) -> R -pub fn vortex_array::arrays::PrimitiveArray::ptype(&self) -> vortex_array::dtype::PType +pub fn vortex_array::arrays::PrimitiveData::map_each_with_validity(self, f: F) -> vortex_error::VortexResult where T: vortex_array::dtype::NativePType, R: vortex_array::dtype::NativePType, F: core::ops::function::FnMut((T, bool)) -> R -impl vortex_array::arrays::PrimitiveArray +pub fn vortex_array::arrays::PrimitiveData::ptype(&self) -> vortex_array::dtype::PType -pub fn vortex_array::arrays::PrimitiveArray::empty(nullability: vortex_array::dtype::Nullability) -> Self +pub fn vortex_array::arrays::PrimitiveData::to_buffer(&self) -> vortex_buffer::buffer::Buffer -pub fn vortex_array::arrays::PrimitiveArray::new(buffer: impl core::convert::Into>, validity: vortex_array::validity::Validity) -> Self +pub fn vortex_array::arrays::PrimitiveData::try_into_buffer_mut(self) -> core::result::Result, vortex_buffer::buffer::Buffer> -pub unsafe fn vortex_array::arrays::PrimitiveArray::new_unchecked(buffer: vortex_buffer::buffer::Buffer, validity: vortex_array::validity::Validity) -> Self +pub fn vortex_array::arrays::PrimitiveData::validity(&self) -> &vortex_array::validity::Validity -pub unsafe fn vortex_array::arrays::PrimitiveArray::new_unchecked_from_handle(handle: vortex_array::buffer::BufferHandle, ptype: vortex_array::dtype::PType, validity: vortex_array::validity::Validity) -> Self +pub fn vortex_array::arrays::PrimitiveData::validity_mask(&self) -> vortex_mask::Mask -pub fn vortex_array::arrays::PrimitiveArray::try_new(buffer: vortex_buffer::buffer::Buffer, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult +impl vortex_array::arrays::PrimitiveData -pub fn vortex_array::arrays::PrimitiveArray::validate(buffer: &vortex_buffer::buffer::Buffer, validity: &vortex_array::validity::Validity) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::PrimitiveData::empty(nullability: vortex_array::dtype::Nullability) -> Self -impl vortex_array::arrays::PrimitiveArray +pub fn vortex_array::arrays::PrimitiveData::new(buffer: impl core::convert::Into>, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::PrimitiveArray::from_option_iter>>(iter: I) -> Self +pub unsafe fn vortex_array::arrays::PrimitiveData::new_unchecked(buffer: vortex_buffer::buffer::Buffer, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::PrimitiveArray::into_buffer(self) -> vortex_buffer::buffer::Buffer +pub unsafe fn vortex_array::arrays::PrimitiveData::new_unchecked_from_handle(handle: vortex_array::buffer::BufferHandle, ptype: vortex_array::dtype::PType, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::PrimitiveArray::into_buffer_mut(self) -> vortex_buffer::buffer_mut::BufferMut +pub fn vortex_array::arrays::PrimitiveData::try_new(buffer: vortex_buffer::buffer::Buffer, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult -pub fn vortex_array::arrays::PrimitiveArray::to_buffer(&self) -> vortex_buffer::buffer::Buffer +pub fn vortex_array::arrays::PrimitiveData::validate(buffer: &vortex_buffer::buffer::Buffer, validity: &vortex_array::validity::Validity) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::PrimitiveArray::try_into_buffer_mut(self) -> core::result::Result, vortex_buffer::buffer::Buffer> +impl vortex_array::arrays::PrimitiveData -impl vortex_array::arrays::PrimitiveArray +pub fn vortex_array::arrays::PrimitiveData::into_parts(self) -> vortex_array::arrays::primitive::PrimitiveArrayParts -pub fn vortex_array::arrays::PrimitiveArray::into_parts(self) -> vortex_array::arrays::primitive::PrimitiveArrayParts +impl core::clone::Clone for vortex_array::arrays::PrimitiveData -impl vortex_array::arrays::PrimitiveArray +pub fn vortex_array::arrays::PrimitiveData::clone(&self) -> vortex_array::arrays::PrimitiveData -pub fn vortex_array::arrays::PrimitiveArray::patch(self, patches: &vortex_array::patches::Patches, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +impl core::convert::From for vortex_array::ArrayRef -impl vortex_array::arrays::PrimitiveArray +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::PrimitiveData) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::PrimitiveArray::to_array(&self) -> vortex_array::ArrayRef +impl core::fmt::Debug for vortex_array::arrays::PrimitiveData -impl vortex_array::arrays::PrimitiveArray +pub fn vortex_array::arrays::PrimitiveData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub fn vortex_array::arrays::PrimitiveArray::top_value(&self) -> vortex_error::VortexResult> +impl vortex_array::IntoArray for vortex_array::arrays::PrimitiveData -impl core::clone::Clone for vortex_array::arrays::PrimitiveArray +pub fn vortex_array::arrays::PrimitiveData::into_array(self) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::PrimitiveArray::clone(&self) -> vortex_array::arrays::PrimitiveArray +impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::PrimitiveData -impl core::convert::AsRef for vortex_array::arrays::PrimitiveArray +pub fn vortex_array::arrays::PrimitiveData::validity(&self) -> &vortex_array::validity::Validity -pub fn vortex_array::arrays::PrimitiveArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub struct vortex_array::arrays::ScalarFnData -impl core::convert::From for vortex_array::ArrayRef +impl vortex_array::arrays::ScalarFnData -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::PrimitiveArray) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ScalarFnData::children(&self) -> &[vortex_array::ArrayRef] -impl core::fmt::Debug for vortex_array::arrays::PrimitiveArray +pub fn vortex_array::arrays::ScalarFnData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_array::arrays::PrimitiveArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_array::arrays::ScalarFnData::is_empty(&self) -> bool -impl core::ops::deref::Deref for vortex_array::arrays::PrimitiveArray +pub fn vortex_array::arrays::ScalarFnData::len(&self) -> usize -pub type vortex_array::arrays::PrimitiveArray::Target = dyn vortex_array::DynArray +pub fn vortex_array::arrays::ScalarFnData::scalar_fn(&self) -> &vortex_array::scalar_fn::ScalarFnRef -pub fn vortex_array::arrays::PrimitiveArray::deref(&self) -> &Self::Target +pub fn vortex_array::arrays::ScalarFnData::try_new(scalar_fn: vortex_array::scalar_fn::ScalarFnRef, children: alloc::vec::Vec, len: usize) -> vortex_error::VortexResult -impl vortex_array::Executable for vortex_array::arrays::PrimitiveArray - -pub fn vortex_array::arrays::PrimitiveArray::execute(array: vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult - -impl vortex_array::IntoArray for vortex_array::arrays::PrimitiveArray - -pub fn vortex_array::arrays::PrimitiveArray::into_array(self) -> vortex_array::ArrayRef - -impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::PrimitiveArray - -pub fn vortex_array::arrays::PrimitiveArray::validity(&self) -> &vortex_array::validity::Validity - -impl core::iter::traits::collect::FromIterator for vortex_array::arrays::PrimitiveArray - -pub fn vortex_array::arrays::PrimitiveArray::from_iter>(iter: I) -> Self - -impl vortex_array::accessor::ArrayAccessor for vortex_array::arrays::PrimitiveArray - -pub fn vortex_array::arrays::PrimitiveArray::with_iterator(&self, f: F) -> R where F: for<'a> core::ops::function::FnOnce(&mut dyn core::iter::traits::iterator::Iterator>) -> R - -pub struct vortex_array::arrays::ScalarFnArray - -impl vortex_array::arrays::scalar_fn::ScalarFnArray +impl core::clone::Clone for vortex_array::arrays::ScalarFnData -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::children(&self) -> &[vortex_array::ArrayRef] +pub fn vortex_array::arrays::ScalarFnData::clone(&self) -> vortex_array::arrays::ScalarFnData -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::scalar_fn(&self) -> &vortex_array::scalar_fn::ScalarFnRef +impl core::convert::From for vortex_array::ArrayRef -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::try_new(scalar_fn: vortex_array::scalar_fn::ScalarFnRef, children: alloc::vec::Vec, len: usize) -> vortex_error::VortexResult +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::ScalarFnData) -> vortex_array::ArrayRef -impl vortex_array::arrays::scalar_fn::ScalarFnArray +impl core::fmt::Debug for vortex_array::arrays::ScalarFnData -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ScalarFnData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -impl core::clone::Clone for vortex_array::arrays::scalar_fn::ScalarFnArray +impl vortex_array::IntoArray for vortex_array::arrays::ScalarFnData -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::clone(&self) -> vortex_array::arrays::scalar_fn::ScalarFnArray +pub fn vortex_array::arrays::ScalarFnData::into_array(self) -> vortex_array::ArrayRef -impl core::convert::AsRef for vortex_array::arrays::scalar_fn::ScalarFnArray +impl vortex_array::scalar_fn::ReduceNode for vortex_array::arrays::ScalarFnData -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub fn vortex_array::arrays::ScalarFnData::as_any(&self) -> &dyn core::any::Any -impl core::convert::From for vortex_array::ArrayRef +pub fn vortex_array::arrays::ScalarFnData::child(&self, idx: usize) -> vortex_array::scalar_fn::ReduceNodeRef -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::scalar_fn::ScalarFnArray) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ScalarFnData::child_count(&self) -> usize -impl core::fmt::Debug for vortex_array::arrays::scalar_fn::ScalarFnArray +pub fn vortex_array::arrays::ScalarFnData::node_dtype(&self) -> vortex_error::VortexResult -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result - -impl core::ops::deref::Deref for vortex_array::arrays::scalar_fn::ScalarFnArray - -pub type vortex_array::arrays::scalar_fn::ScalarFnArray::Target = dyn vortex_array::DynArray - -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::deref(&self) -> &Self::Target - -impl vortex_array::IntoArray for vortex_array::arrays::scalar_fn::ScalarFnArray - -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::into_array(self) -> vortex_array::ArrayRef - -impl vortex_array::scalar_fn::ReduceNode for vortex_array::arrays::scalar_fn::ScalarFnArray - -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::as_any(&self) -> &dyn core::any::Any - -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::child(&self, idx: usize) -> vortex_array::scalar_fn::ReduceNodeRef - -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::child_count(&self) -> usize - -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::node_dtype(&self) -> vortex_error::VortexResult - -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::scalar_fn(&self) -> core::option::Option<&vortex_array::scalar_fn::ScalarFnRef> +pub fn vortex_array::arrays::ScalarFnData::scalar_fn(&self) -> core::option::Option<&vortex_array::scalar_fn::ScalarFnRef> pub struct vortex_array::arrays::ScalarFnVTable @@ -7210,11 +6812,11 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::fmt(&self, f: &mut core: impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::scalar_fn::ScalarFnVTable -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::scalar_at(array: &vortex_array::arrays::scalar_fn::ScalarFnArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::scalar_fn::ScalarFnVTable -pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::Array = vortex_array::arrays::scalar_fn::ScalarFnArray +pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::Array = vortex_array::arrays::ScalarFnData pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::Metadata = vortex_array::arrays::scalar_fn::metadata::ScalarFnMetadata @@ -7222,25 +6824,25 @@ pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::OperationsVTable = vor pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::ValidityVTable = vortex_array::arrays::scalar_fn::ScalarFnVTable -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::array_eq(array: &vortex_array::arrays::scalar_fn::ScalarFnArray, other: &vortex_array::arrays::scalar_fn::ScalarFnArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::array_hash(array: &vortex_array::arrays::scalar_fn::ScalarFnArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::buffer(_array: &vortex_array::arrays::scalar_fn::ScalarFnArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::buffer_name(_array: &vortex_array::arrays::scalar_fn::ScalarFnArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &vortex_array::arrays::scalar_fn::metadata::ScalarFnMetadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::child(array: &vortex_array::arrays::scalar_fn::ScalarFnArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::child_name(array: &vortex_array::arrays::scalar_fn::ScalarFnArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::child_name(array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::dtype(array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::dtype(array: &vortex_array::arrays::ScalarFnData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -7248,13 +6850,13 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::execute_parent(array: &v pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::len(array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> usize +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::len(array: &vortex_array::arrays::ScalarFnData) -> usize -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::metadata(array: &Self::Array) -> vortex_error::VortexResult +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::nbuffers(_array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> usize +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::nchildren(array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> usize +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -7262,15 +6864,15 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::reduce_parent(array: &vo pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::stats(array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::stats(array: &vortex_array::arrays::ScalarFnData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::vtable(array: &Self::Array) -> &Self +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::vtable(array: &vortex_array::arrays::ScalarFnData) -> &Self pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::scalar_fn::ScalarFnVTable -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::validity(array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult pub struct vortex_array::arrays::Shared @@ -7288,11 +6890,11 @@ pub fn vortex_array::arrays::Shared::fmt(&self, f: &mut core::fmt::Formatter<'_> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::Shared -pub fn vortex_array::arrays::Shared::scalar_at(array: &vortex_array::arrays::SharedArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Shared::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::Shared -pub type vortex_array::arrays::Shared::Array = vortex_array::arrays::SharedArray +pub type vortex_array::arrays::Shared::Array = vortex_array::arrays::SharedData pub type vortex_array::arrays::Shared::Metadata = vortex_array::EmptyMetadata @@ -7300,25 +6902,25 @@ pub type vortex_array::arrays::Shared::OperationsVTable = vortex_array::arrays:: pub type vortex_array::arrays::Shared::ValidityVTable = vortex_array::arrays::Shared -pub fn vortex_array::arrays::Shared::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Shared::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Shared::array_eq(array: &vortex_array::arrays::SharedArray, other: &vortex_array::arrays::SharedArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Shared::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Shared::array_hash(array: &vortex_array::arrays::SharedArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Shared::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Shared::buffer(_array: &Self::Array, _idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Shared::buffer(_array: &vortex_array::vtable::Array, _idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Shared::buffer_name(_array: &Self::Array, _idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Shared::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Shared::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Shared::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Shared::child(array: &Self::Array, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Shared::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Shared::child_name(_array: &Self::Array, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Shared::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Shared::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Shared::dtype(array: &vortex_array::arrays::SharedArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Shared::dtype(array: &vortex_array::arrays::SharedData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Shared::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -7326,13 +6928,13 @@ pub fn vortex_array::arrays::Shared::execute_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Shared::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Shared::len(array: &vortex_array::arrays::SharedArray) -> usize +pub fn vortex_array::arrays::Shared::len(array: &vortex_array::arrays::SharedData) -> usize -pub fn vortex_array::arrays::Shared::metadata(_array: &Self::Array) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Shared::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Shared::nbuffers(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::Shared::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Shared::nchildren(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::Shared::nchildren(_array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Shared::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -7340,55 +6942,47 @@ pub fn vortex_array::arrays::Shared::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::Shared::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Shared::stats(array: &vortex_array::arrays::SharedArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Shared::stats(array: &vortex_array::arrays::SharedData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Shared::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Shared::vtable(_array: &vortex_array::arrays::SharedData) -> &Self pub fn vortex_array::arrays::Shared::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Shared -pub fn vortex_array::arrays::Shared::validity(array: &vortex_array::arrays::SharedArray) -> vortex_error::VortexResult - -pub struct vortex_array::arrays::SharedArray - -impl vortex_array::arrays::SharedArray - -pub fn vortex_array::arrays::SharedArray::get_or_compute(&self, f: impl core::ops::function::FnOnce(&vortex_array::ArrayRef) -> vortex_error::VortexResult) -> vortex_error::VortexResult - -pub async fn vortex_array::arrays::SharedArray::get_or_compute_async(&self, f: F) -> vortex_error::VortexResult where F: core::ops::function::FnOnce(vortex_array::ArrayRef) -> Fut, Fut: core::future::future::Future> +pub fn vortex_array::arrays::Shared::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::SharedArray::new(source: vortex_array::ArrayRef) -> Self +pub struct vortex_array::arrays::SharedData -impl vortex_array::arrays::SharedArray +impl vortex_array::arrays::SharedData -pub fn vortex_array::arrays::SharedArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::SharedData::dtype(&self) -> &vortex_array::dtype::DType -impl core::clone::Clone for vortex_array::arrays::SharedArray +pub fn vortex_array::arrays::SharedData::get_or_compute(&self, f: impl core::ops::function::FnOnce(&vortex_array::ArrayRef) -> vortex_error::VortexResult) -> vortex_error::VortexResult -pub fn vortex_array::arrays::SharedArray::clone(&self) -> vortex_array::arrays::SharedArray +pub async fn vortex_array::arrays::SharedData::get_or_compute_async(&self, f: F) -> vortex_error::VortexResult where F: core::ops::function::FnOnce(vortex_array::ArrayRef) -> Fut, Fut: core::future::future::Future> -impl core::convert::AsRef for vortex_array::arrays::SharedArray +pub fn vortex_array::arrays::SharedData::is_empty(&self) -> bool -pub fn vortex_array::arrays::SharedArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub fn vortex_array::arrays::SharedData::len(&self) -> usize -impl core::convert::From for vortex_array::ArrayRef +pub fn vortex_array::arrays::SharedData::new(source: vortex_array::ArrayRef) -> Self -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::SharedArray) -> vortex_array::ArrayRef +impl core::clone::Clone for vortex_array::arrays::SharedData -impl core::fmt::Debug for vortex_array::arrays::SharedArray +pub fn vortex_array::arrays::SharedData::clone(&self) -> vortex_array::arrays::SharedData -pub fn vortex_array::arrays::SharedArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::convert::From for vortex_array::ArrayRef -impl core::ops::deref::Deref for vortex_array::arrays::SharedArray +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::SharedData) -> vortex_array::ArrayRef -pub type vortex_array::arrays::SharedArray::Target = dyn vortex_array::DynArray +impl core::fmt::Debug for vortex_array::arrays::SharedData -pub fn vortex_array::arrays::SharedArray::deref(&self) -> &Self::Target +pub fn vortex_array::arrays::SharedData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -impl vortex_array::IntoArray for vortex_array::arrays::SharedArray +impl vortex_array::IntoArray for vortex_array::arrays::SharedData -pub fn vortex_array::arrays::SharedArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::SharedData::into_array(self) -> vortex_array::ArrayRef pub struct vortex_array::arrays::Slice @@ -7406,15 +7000,15 @@ pub fn vortex_array::arrays::slice::Slice::fmt(&self, f: &mut core::fmt::Formatt impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::slice::Slice -pub fn vortex_array::arrays::slice::Slice::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::slice::Slice::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::slice::Slice -pub fn vortex_array::arrays::slice::Slice::scalar_at(array: &vortex_array::arrays::slice::SliceArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::slice::Slice::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::slice::Slice -pub type vortex_array::arrays::slice::Slice::Array = vortex_array::arrays::slice::SliceArray +pub type vortex_array::arrays::slice::Slice::Array = vortex_array::arrays::SliceData pub type vortex_array::arrays::slice::Slice::Metadata = vortex_array::arrays::slice::SliceMetadata @@ -7422,25 +7016,25 @@ pub type vortex_array::arrays::slice::Slice::OperationsVTable = vortex_array::ar pub type vortex_array::arrays::slice::Slice::ValidityVTable = vortex_array::arrays::slice::Slice -pub fn vortex_array::arrays::slice::Slice::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::slice::Slice::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::slice::Slice::array_eq(array: &vortex_array::arrays::slice::SliceArray, other: &vortex_array::arrays::slice::SliceArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::slice::Slice::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::slice::Slice::array_hash(array: &vortex_array::arrays::slice::SliceArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::slice::Slice::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::slice::Slice::buffer(_array: &Self::Array, _idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::slice::Slice::buffer(_array: &vortex_array::vtable::Array, _idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::slice::Slice::buffer_name(_array: &Self::Array, _idx: usize) -> core::option::Option +pub fn vortex_array::arrays::slice::Slice::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option pub fn vortex_array::arrays::slice::Slice::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &vortex_array::arrays::slice::SliceMetadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::slice::Slice::child(array: &Self::Array, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::slice::Slice::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::slice::Slice::child_name(_array: &Self::Array, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::slice::Slice::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::slice::Slice::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::slice::Slice::dtype(array: &vortex_array::arrays::slice::SliceArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::slice::Slice::dtype(array: &vortex_array::arrays::SliceData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::slice::Slice::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -7448,13 +7042,13 @@ pub fn vortex_array::arrays::slice::Slice::execute_parent(array: &vortex_array:: pub fn vortex_array::arrays::slice::Slice::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::slice::Slice::len(array: &vortex_array::arrays::slice::SliceArray) -> usize +pub fn vortex_array::arrays::slice::Slice::len(array: &vortex_array::arrays::SliceData) -> usize -pub fn vortex_array::arrays::slice::Slice::metadata(array: &Self::Array) -> vortex_error::VortexResult +pub fn vortex_array::arrays::slice::Slice::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::slice::Slice::nbuffers(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::slice::Slice::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::slice::Slice::nchildren(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::slice::Slice::nchildren(_array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::slice::Slice::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -7462,59 +7056,53 @@ pub fn vortex_array::arrays::slice::Slice::reduce_parent(array: &vortex_array::v pub fn vortex_array::arrays::slice::Slice::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::slice::Slice::stats(array: &vortex_array::arrays::slice::SliceArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::slice::Slice::stats(array: &vortex_array::arrays::SliceData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::slice::Slice::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::slice::Slice::vtable(_array: &vortex_array::arrays::SliceData) -> &Self pub fn vortex_array::arrays::slice::Slice::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::slice::Slice -pub fn vortex_array::arrays::slice::Slice::validity(array: &vortex_array::arrays::slice::SliceArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::slice::Slice::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub struct vortex_array::arrays::SliceArray +pub struct vortex_array::arrays::SliceData -impl vortex_array::arrays::slice::SliceArray +impl vortex_array::arrays::SliceData -pub fn vortex_array::arrays::slice::SliceArray::child(&self) -> &vortex_array::ArrayRef +pub fn vortex_array::arrays::SliceData::child(&self) -> &vortex_array::ArrayRef -pub fn vortex_array::arrays::slice::SliceArray::into_parts(self) -> vortex_array::arrays::slice::SliceArrayParts +pub fn vortex_array::arrays::SliceData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_array::arrays::slice::SliceArray::new(child: vortex_array::ArrayRef, range: core::ops::range::Range) -> Self +pub fn vortex_array::arrays::SliceData::is_empty(&self) -> bool -pub fn vortex_array::arrays::slice::SliceArray::slice_range(&self) -> &core::ops::range::Range +pub fn vortex_array::arrays::SliceData::len(&self) -> usize -pub fn vortex_array::arrays::slice::SliceArray::try_new(child: vortex_array::ArrayRef, range: core::ops::range::Range) -> vortex_error::VortexResult +pub fn vortex_array::arrays::SliceData::new(child: vortex_array::ArrayRef, range: core::ops::range::Range) -> Self -impl vortex_array::arrays::slice::SliceArray +pub fn vortex_array::arrays::SliceData::slice_range(&self) -> &core::ops::range::Range -pub fn vortex_array::arrays::slice::SliceArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::SliceData::try_new(child: vortex_array::ArrayRef, range: core::ops::range::Range) -> vortex_error::VortexResult -impl core::clone::Clone for vortex_array::arrays::slice::SliceArray +impl vortex_array::arrays::SliceData -pub fn vortex_array::arrays::slice::SliceArray::clone(&self) -> vortex_array::arrays::slice::SliceArray +pub fn vortex_array::arrays::SliceData::into_parts(self) -> vortex_array::arrays::slice::SliceArrayParts -impl core::convert::AsRef for vortex_array::arrays::slice::SliceArray +impl core::clone::Clone for vortex_array::arrays::SliceData -pub fn vortex_array::arrays::slice::SliceArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub fn vortex_array::arrays::SliceData::clone(&self) -> vortex_array::arrays::SliceData -impl core::convert::From for vortex_array::ArrayRef +impl core::convert::From for vortex_array::ArrayRef -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::slice::SliceArray) -> vortex_array::ArrayRef +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::SliceData) -> vortex_array::ArrayRef -impl core::fmt::Debug for vortex_array::arrays::slice::SliceArray +impl core::fmt::Debug for vortex_array::arrays::SliceData -pub fn vortex_array::arrays::slice::SliceArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_array::arrays::SliceData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -impl core::ops::deref::Deref for vortex_array::arrays::slice::SliceArray +impl vortex_array::IntoArray for vortex_array::arrays::SliceData -pub type vortex_array::arrays::slice::SliceArray::Target = dyn vortex_array::DynArray - -pub fn vortex_array::arrays::slice::SliceArray::deref(&self) -> &Self::Target - -impl vortex_array::IntoArray for vortex_array::arrays::slice::SliceArray - -pub fn vortex_array::arrays::slice::SliceArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::SliceData::into_array(self) -> vortex_array::ArrayRef pub struct vortex_array::arrays::Struct @@ -7532,31 +7120,31 @@ pub fn vortex_array::arrays::Struct::fmt(&self, f: &mut core::fmt::Formatter<'_> impl vortex_array::arrays::dict::TakeReduce for vortex_array::arrays::Struct -pub fn vortex_array::arrays::Struct::take(array: &vortex_array::arrays::StructArray, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Struct::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::Struct -pub fn vortex_array::arrays::Struct::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Struct::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastKernel for vortex_array::arrays::Struct -pub fn vortex_array::arrays::Struct::cast(array: &vortex_array::arrays::StructArray, dtype: &vortex_array::dtype::DType, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Struct::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::Struct -pub fn vortex_array::arrays::Struct::mask(array: &vortex_array::arrays::StructArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Struct::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::zip::ZipKernel for vortex_array::arrays::Struct -pub fn vortex_array::arrays::Struct::zip(if_true: &vortex_array::arrays::StructArray, if_false: &vortex_array::ArrayRef, mask: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Struct::zip(if_true: &vortex_array::vtable::Array, if_false: &vortex_array::ArrayRef, mask: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::Struct -pub fn vortex_array::arrays::Struct::scalar_at(array: &vortex_array::arrays::StructArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Struct::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::Struct -pub type vortex_array::arrays::Struct::Array = vortex_array::arrays::StructArray +pub type vortex_array::arrays::Struct::Array = vortex_array::arrays::StructData pub type vortex_array::arrays::Struct::Metadata = vortex_array::EmptyMetadata @@ -7564,25 +7152,25 @@ pub type vortex_array::arrays::Struct::OperationsVTable = vortex_array::arrays:: pub type vortex_array::arrays::Struct::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::Struct::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Struct::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Struct::array_eq(array: &vortex_array::arrays::StructArray, other: &vortex_array::arrays::StructArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Struct::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Struct::array_hash(array: &vortex_array::arrays::StructArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Struct::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Struct::buffer(_array: &vortex_array::arrays::StructArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Struct::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Struct::buffer_name(_array: &vortex_array::arrays::StructArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Struct::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Struct::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Struct::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Struct::child(array: &vortex_array::arrays::StructArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Struct::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Struct::child_name(array: &vortex_array::arrays::StructArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Struct::child_name(array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Struct::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Struct::dtype(array: &vortex_array::arrays::StructArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Struct::dtype(array: &vortex_array::arrays::StructData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Struct::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -7590,13 +7178,13 @@ pub fn vortex_array::arrays::Struct::execute_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Struct::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Struct::len(array: &vortex_array::arrays::StructArray) -> usize +pub fn vortex_array::arrays::Struct::len(array: &vortex_array::arrays::StructData) -> usize -pub fn vortex_array::arrays::Struct::metadata(_array: &vortex_array::arrays::StructArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Struct::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Struct::nbuffers(_array: &vortex_array::arrays::StructArray) -> usize +pub fn vortex_array::arrays::Struct::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Struct::nchildren(array: &vortex_array::arrays::StructArray) -> usize +pub fn vortex_array::arrays::Struct::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Struct::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -7604,155 +7192,143 @@ pub fn vortex_array::arrays::Struct::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::Struct::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Struct::stats(array: &vortex_array::arrays::StructArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Struct::stats(array: &vortex_array::arrays::StructData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Struct::vtable(_array: &Self::Array) -> &Self pub fn vortex_array::arrays::Struct::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> -pub struct vortex_array::arrays::StructArray - -impl vortex_array::arrays::StructArray - -pub fn vortex_array::arrays::StructArray::from_fields>(items: &[(N, vortex_array::ArrayRef)]) -> vortex_error::VortexResult - -pub fn vortex_array::arrays::StructArray::into_fields(self) -> alloc::vec::Vec - -pub fn vortex_array::arrays::StructArray::into_parts(self) -> vortex_array::arrays::struct_::StructArrayParts - -pub fn vortex_array::arrays::StructArray::names(&self) -> &vortex_array::dtype::FieldNames +pub struct vortex_array::arrays::StructData -pub fn vortex_array::arrays::StructArray::new(names: vortex_array::dtype::FieldNames, fields: impl core::convert::Into>, length: usize, validity: vortex_array::validity::Validity) -> Self +impl vortex_array::arrays::StructData -pub fn vortex_array::arrays::StructArray::new_fieldless_with_len(len: usize) -> Self +pub fn vortex_array::arrays::StructData::dtype(&self) -> &vortex_array::dtype::DType -pub unsafe fn vortex_array::arrays::StructArray::new_unchecked(fields: impl core::convert::Into>, dtype: vortex_array::dtype::StructFields, length: usize, validity: vortex_array::validity::Validity) -> Self +pub fn vortex_array::arrays::StructData::from_fields>(items: &[(N, vortex_array::ArrayRef)]) -> vortex_error::VortexResult -pub fn vortex_array::arrays::StructArray::project(&self, projection: &[vortex_array::dtype::FieldName]) -> vortex_error::VortexResult +pub fn vortex_array::arrays::StructData::into_fields(self) -> alloc::vec::Vec -pub fn vortex_array::arrays::StructArray::remove_column(&mut self, name: impl core::convert::Into) -> core::option::Option +pub fn vortex_array::arrays::StructData::into_parts(self) -> vortex_array::arrays::struct_::StructArrayParts -pub fn vortex_array::arrays::StructArray::struct_fields(&self) -> &vortex_array::dtype::StructFields +pub fn vortex_array::arrays::StructData::is_empty(&self) -> bool -pub fn vortex_array::arrays::StructArray::try_from_iter, A: vortex_array::IntoArray, T: core::iter::traits::collect::IntoIterator>(iter: T) -> vortex_error::VortexResult +pub fn vortex_array::arrays::StructData::len(&self) -> usize -pub fn vortex_array::arrays::StructArray::try_from_iter_with_validity, A: vortex_array::IntoArray, T: core::iter::traits::collect::IntoIterator>(iter: T, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult +pub fn vortex_array::arrays::StructData::names(&self) -> &vortex_array::dtype::FieldNames -pub fn vortex_array::arrays::StructArray::try_new(names: vortex_array::dtype::FieldNames, fields: impl core::convert::Into>, length: usize, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult +pub fn vortex_array::arrays::StructData::new(names: vortex_array::dtype::FieldNames, fields: impl core::convert::Into>, length: usize, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::StructArray::try_new_with_dtype(fields: impl core::convert::Into>, dtype: vortex_array::dtype::StructFields, length: usize, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult +pub fn vortex_array::arrays::StructData::new_fieldless_with_len(len: usize) -> Self -pub fn vortex_array::arrays::StructArray::unmasked_field_by_name(&self, name: impl core::convert::AsRef) -> vortex_error::VortexResult<&vortex_array::ArrayRef> +pub unsafe fn vortex_array::arrays::StructData::new_unchecked(fields: impl core::convert::Into>, dtype: vortex_array::dtype::StructFields, length: usize, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::StructArray::unmasked_field_by_name_opt(&self, name: impl core::convert::AsRef) -> core::option::Option<&vortex_array::ArrayRef> +pub fn vortex_array::arrays::StructData::project(&self, projection: &[vortex_array::dtype::FieldName]) -> vortex_error::VortexResult -pub fn vortex_array::arrays::StructArray::unmasked_fields(&self) -> &alloc::sync::Arc<[vortex_array::ArrayRef]> +pub fn vortex_array::arrays::StructData::remove_column(&mut self, name: impl core::convert::Into) -> core::option::Option -pub fn vortex_array::arrays::StructArray::validate(fields: &[vortex_array::ArrayRef], dtype: &vortex_array::dtype::StructFields, length: usize, validity: &vortex_array::validity::Validity) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::StructData::struct_fields(&self) -> &vortex_array::dtype::StructFields -pub fn vortex_array::arrays::StructArray::with_column(&self, name: impl core::convert::Into, array: vortex_array::ArrayRef) -> vortex_error::VortexResult +pub fn vortex_array::arrays::StructData::try_from_iter, A: vortex_array::IntoArray, T: core::iter::traits::collect::IntoIterator>(iter: T) -> vortex_error::VortexResult -impl vortex_array::arrays::StructArray +pub fn vortex_array::arrays::StructData::try_from_iter_with_validity, A: vortex_array::IntoArray, T: core::iter::traits::collect::IntoIterator>(iter: T, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult -pub fn vortex_array::arrays::StructArray::into_record_batch_with_schema(self, schema: impl core::convert::AsRef) -> vortex_error::VortexResult +pub fn vortex_array::arrays::StructData::try_new(names: vortex_array::dtype::FieldNames, fields: impl core::convert::Into>, length: usize, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult -impl vortex_array::arrays::StructArray +pub fn vortex_array::arrays::StructData::try_new_with_dtype(fields: impl core::convert::Into>, dtype: vortex_array::dtype::StructFields, length: usize, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult -pub fn vortex_array::arrays::StructArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::StructData::unmasked_field_by_name(&self, name: impl core::convert::AsRef) -> vortex_error::VortexResult<&vortex_array::ArrayRef> -impl core::clone::Clone for vortex_array::arrays::StructArray +pub fn vortex_array::arrays::StructData::unmasked_field_by_name_opt(&self, name: impl core::convert::AsRef) -> core::option::Option<&vortex_array::ArrayRef> -pub fn vortex_array::arrays::StructArray::clone(&self) -> vortex_array::arrays::StructArray +pub fn vortex_array::arrays::StructData::unmasked_fields(&self) -> &alloc::sync::Arc<[vortex_array::ArrayRef]> -impl core::convert::AsRef for vortex_array::arrays::StructArray +pub fn vortex_array::arrays::StructData::validate(fields: &[vortex_array::ArrayRef], dtype: &vortex_array::dtype::StructFields, length: usize, validity: &vortex_array::validity::Validity) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::StructArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub fn vortex_array::arrays::StructData::validity(&self) -> &vortex_array::validity::Validity -impl core::convert::From for vortex_array::ArrayRef +pub fn vortex_array::arrays::StructData::validity_mask(&self) -> vortex_mask::Mask -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::StructArray) -> vortex_array::ArrayRef +impl vortex_array::arrays::StructData -impl core::fmt::Debug for vortex_array::arrays::StructArray +pub fn vortex_array::arrays::StructData::with_column(&self, name: impl core::convert::Into, array: vortex_array::ArrayRef) -> vortex_error::VortexResult -pub fn vortex_array::arrays::StructArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::clone::Clone for vortex_array::arrays::StructData -impl core::ops::deref::Deref for vortex_array::arrays::StructArray +pub fn vortex_array::arrays::StructData::clone(&self) -> vortex_array::arrays::StructData -pub type vortex_array::arrays::StructArray::Target = dyn vortex_array::DynArray +impl core::convert::From for vortex_array::ArrayRef -pub fn vortex_array::arrays::StructArray::deref(&self) -> &Self::Target +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::StructData) -> vortex_array::ArrayRef -impl vortex_array::Executable for vortex_array::arrays::StructArray - -pub fn vortex_array::arrays::StructArray::execute(array: vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +impl core::fmt::Debug for vortex_array::arrays::StructData -impl vortex_array::IntoArray for vortex_array::arrays::StructArray +pub fn vortex_array::arrays::StructData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub fn vortex_array::arrays::StructArray::into_array(self) -> vortex_array::ArrayRef +impl vortex_array::IntoArray for vortex_array::arrays::StructData -impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::StructArray +pub fn vortex_array::arrays::StructData::into_array(self) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::StructArray::validity(&self) -> &vortex_array::validity::Validity +impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::StructData -pub struct vortex_array::arrays::TemporalArray +pub fn vortex_array::arrays::StructData::validity(&self) -> &vortex_array::validity::Validity -impl vortex_array::arrays::datetime::TemporalArray +pub struct vortex_array::arrays::TemporalData -pub fn vortex_array::arrays::datetime::TemporalArray::dtype(&self) -> &vortex_array::dtype::DType +impl vortex_array::arrays::datetime::TemporalData -pub fn vortex_array::arrays::datetime::TemporalArray::ext_dtype(&self) -> vortex_array::dtype::extension::ExtDTypeRef +pub fn vortex_array::arrays::datetime::TemporalData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_array::arrays::datetime::TemporalArray::temporal_metadata(&self) -> vortex_array::extension::datetime::TemporalMetadata<'_> +pub fn vortex_array::arrays::datetime::TemporalData::ext_dtype(&self) -> vortex_array::dtype::extension::ExtDTypeRef -pub fn vortex_array::arrays::datetime::TemporalArray::temporal_values(&self) -> &vortex_array::ArrayRef +pub fn vortex_array::arrays::datetime::TemporalData::temporal_metadata(&self) -> vortex_array::extension::datetime::TemporalMetadata<'_> -impl vortex_array::arrays::datetime::TemporalArray +pub fn vortex_array::arrays::datetime::TemporalData::temporal_values(&self) -> &vortex_array::ArrayRef -pub fn vortex_array::arrays::datetime::TemporalArray::new_date(array: vortex_array::ArrayRef, time_unit: vortex_array::extension::datetime::TimeUnit) -> Self +pub fn vortex_array::arrays::datetime::TemporalData::to_array_ref(&self) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::datetime::TemporalArray::new_time(array: vortex_array::ArrayRef, time_unit: vortex_array::extension::datetime::TimeUnit) -> Self +impl vortex_array::arrays::datetime::TemporalData -pub fn vortex_array::arrays::datetime::TemporalArray::new_timestamp(array: vortex_array::ArrayRef, time_unit: vortex_array::extension::datetime::TimeUnit, time_zone: core::option::Option>) -> Self +pub fn vortex_array::arrays::datetime::TemporalData::new_date(array: vortex_array::ArrayRef, time_unit: vortex_array::extension::datetime::TimeUnit) -> Self -impl core::clone::Clone for vortex_array::arrays::datetime::TemporalArray +pub fn vortex_array::arrays::datetime::TemporalData::new_time(array: vortex_array::ArrayRef, time_unit: vortex_array::extension::datetime::TimeUnit) -> Self -pub fn vortex_array::arrays::datetime::TemporalArray::clone(&self) -> vortex_array::arrays::datetime::TemporalArray +pub fn vortex_array::arrays::datetime::TemporalData::new_timestamp(array: vortex_array::ArrayRef, time_unit: vortex_array::extension::datetime::TimeUnit, time_zone: core::option::Option>) -> Self -impl core::convert::AsRef for vortex_array::arrays::datetime::TemporalArray +impl core::clone::Clone for vortex_array::arrays::datetime::TemporalData -pub fn vortex_array::arrays::datetime::TemporalArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub fn vortex_array::arrays::datetime::TemporalData::clone(&self) -> vortex_array::arrays::datetime::TemporalData -impl core::convert::From<&vortex_array::arrays::datetime::TemporalArray> for vortex_array::arrays::ExtensionArray +impl core::convert::From<&vortex_array::arrays::datetime::TemporalData> for vortex_array::arrays::ExtensionArray -pub fn vortex_array::arrays::ExtensionArray::from(value: &vortex_array::arrays::datetime::TemporalArray) -> Self +pub fn vortex_array::arrays::ExtensionArray::from(value: &vortex_array::arrays::datetime::TemporalData) -> Self -impl core::convert::From for vortex_array::ArrayRef +impl core::convert::From for vortex_array::ArrayRef -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::datetime::TemporalArray) -> Self +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::datetime::TemporalData) -> Self -impl core::convert::From for vortex_array::arrays::ExtensionArray +impl core::convert::From for vortex_array::arrays::ExtensionArray -pub fn vortex_array::arrays::ExtensionArray::from(value: vortex_array::arrays::datetime::TemporalArray) -> Self +pub fn vortex_array::arrays::ExtensionArray::from(value: vortex_array::arrays::datetime::TemporalData) -> Self -impl core::convert::TryFrom> for vortex_array::arrays::datetime::TemporalArray +impl core::convert::TryFrom> for vortex_array::arrays::datetime::TemporalData -pub type vortex_array::arrays::datetime::TemporalArray::Error = vortex_error::VortexError +pub type vortex_array::arrays::datetime::TemporalData::Error = vortex_error::VortexError -pub fn vortex_array::arrays::datetime::TemporalArray::try_from(value: vortex_array::ArrayRef) -> core::result::Result +pub fn vortex_array::arrays::datetime::TemporalData::try_from(value: vortex_array::ArrayRef) -> core::result::Result -impl core::convert::TryFrom for vortex_array::arrays::datetime::TemporalArray +impl core::convert::TryFrom> for vortex_array::arrays::datetime::TemporalData -pub type vortex_array::arrays::datetime::TemporalArray::Error = vortex_error::VortexError +pub type vortex_array::arrays::datetime::TemporalData::Error = vortex_error::VortexError -pub fn vortex_array::arrays::datetime::TemporalArray::try_from(ext: vortex_array::arrays::ExtensionArray) -> core::result::Result +pub fn vortex_array::arrays::datetime::TemporalData::try_from(ext: vortex_array::arrays::ExtensionArray) -> core::result::Result -impl core::fmt::Debug for vortex_array::arrays::datetime::TemporalArray +impl core::fmt::Debug for vortex_array::arrays::datetime::TemporalData -pub fn vortex_array::arrays::datetime::TemporalArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_array::arrays::datetime::TemporalData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -impl vortex_array::IntoArray for vortex_array::arrays::datetime::TemporalArray +impl vortex_array::IntoArray for vortex_array::arrays::datetime::TemporalData -pub fn vortex_array::arrays::datetime::TemporalArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::datetime::TemporalData::into_array(self) -> vortex_array::ArrayRef pub struct vortex_array::arrays::VarBin @@ -7762,7 +7338,7 @@ pub const vortex_array::arrays::VarBin::ID: vortex_array::vtable::ArrayId impl vortex_array::arrays::VarBin -pub fn vortex_array::arrays::VarBin::_slice(array: &vortex_array::arrays::VarBinArray, range: core::ops::range::Range) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBin::_slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult impl core::clone::Clone for vortex_array::arrays::VarBin @@ -7774,35 +7350,35 @@ pub fn vortex_array::arrays::VarBin::fmt(&self, f: &mut core::fmt::Formatter<'_> impl vortex_array::arrays::dict::TakeExecute for vortex_array::arrays::VarBin -pub fn vortex_array::arrays::VarBin::take(array: &vortex_array::arrays::VarBinArray, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBin::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::filter::FilterKernel for vortex_array::arrays::VarBin -pub fn vortex_array::arrays::VarBin::filter(array: &vortex_array::arrays::VarBinArray, mask: &vortex_mask::Mask, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBin::filter(array: &vortex_array::vtable::Array, mask: &vortex_mask::Mask, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::VarBin -pub fn vortex_array::arrays::VarBin::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBin::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::binary::CompareKernel for vortex_array::arrays::VarBin -pub fn vortex_array::arrays::VarBin::compare(lhs: &vortex_array::arrays::VarBinArray, rhs: &vortex_array::ArrayRef, operator: vortex_array::scalar_fn::fns::operators::CompareOperator, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBin::compare(lhs: &vortex_array::vtable::Array, rhs: &vortex_array::ArrayRef, operator: vortex_array::scalar_fn::fns::operators::CompareOperator, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastReduce for vortex_array::arrays::VarBin -pub fn vortex_array::arrays::VarBin::cast(array: &vortex_array::arrays::VarBinArray, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBin::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::VarBin -pub fn vortex_array::arrays::VarBin::mask(array: &vortex_array::arrays::VarBinArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBin::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::VarBin -pub fn vortex_array::arrays::VarBin::scalar_at(array: &vortex_array::arrays::VarBinArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBin::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::VarBin -pub type vortex_array::arrays::VarBin::Array = vortex_array::arrays::VarBinArray +pub type vortex_array::arrays::VarBin::Array = vortex_array::arrays::VarBinData pub type vortex_array::arrays::VarBin::Metadata = vortex_array::ProstMetadata @@ -7810,25 +7386,25 @@ pub type vortex_array::arrays::VarBin::OperationsVTable = vortex_array::arrays:: pub type vortex_array::arrays::VarBin::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::VarBin::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::VarBin::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::VarBin::array_eq(array: &vortex_array::arrays::VarBinArray, other: &vortex_array::arrays::VarBinArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::VarBin::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::VarBin::array_hash(array: &vortex_array::arrays::VarBinArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::VarBin::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::VarBin::buffer(array: &vortex_array::arrays::VarBinArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::VarBin::buffer(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::VarBin::buffer_name(_array: &vortex_array::arrays::VarBinArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::VarBin::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::VarBin::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBin::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::VarBin::child(array: &vortex_array::arrays::VarBinArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::VarBin::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::VarBin::child_name(_array: &vortex_array::arrays::VarBinArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::VarBin::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::VarBin::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::VarBin::dtype(array: &vortex_array::arrays::VarBinArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::VarBin::dtype(array: &vortex_array::arrays::VarBinData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::VarBin::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -7836,13 +7412,13 @@ pub fn vortex_array::arrays::VarBin::execute_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::VarBin::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::VarBin::len(array: &vortex_array::arrays::VarBinArray) -> usize +pub fn vortex_array::arrays::VarBin::len(array: &vortex_array::arrays::VarBinData) -> usize -pub fn vortex_array::arrays::VarBin::metadata(array: &vortex_array::arrays::VarBinArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBin::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::VarBin::nbuffers(_array: &vortex_array::arrays::VarBinArray) -> usize +pub fn vortex_array::arrays::VarBin::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::VarBin::nchildren(array: &vortex_array::arrays::VarBinArray) -> usize +pub fn vortex_array::arrays::VarBin::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::VarBin::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -7850,139 +7426,129 @@ pub fn vortex_array::arrays::VarBin::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::VarBin::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::VarBin::stats(array: &vortex_array::arrays::VarBinArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::VarBin::stats(array: &vortex_array::arrays::VarBinData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::VarBin::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::VarBin::vtable(_array: &vortex_array::arrays::VarBinData) -> &Self pub fn vortex_array::arrays::VarBin::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> -pub struct vortex_array::arrays::VarBinArray - -impl vortex_array::arrays::VarBinArray +pub struct vortex_array::arrays::VarBinData -pub fn vortex_array::arrays::VarBinArray::bytes(&self) -> &vortex_buffer::ByteBuffer +impl vortex_array::arrays::VarBinData -pub fn vortex_array::arrays::VarBinArray::bytes_at(&self, index: usize) -> vortex_buffer::ByteBuffer +pub fn vortex_array::arrays::VarBinData::bytes(&self) -> &vortex_buffer::ByteBuffer -pub fn vortex_array::arrays::VarBinArray::bytes_handle(&self) -> &vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::VarBinData::bytes_handle(&self) -> &vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::VarBinArray::from_iter, I: core::iter::traits::collect::IntoIterator>>(iter: I, dtype: vortex_array::dtype::DType) -> Self +pub fn vortex_array::arrays::VarBinData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_array::arrays::VarBinArray::from_iter_nonnull, I: core::iter::traits::collect::IntoIterator>(iter: I, dtype: vortex_array::dtype::DType) -> Self +pub fn vortex_array::arrays::VarBinData::from_iter, I: core::iter::traits::collect::IntoIterator>>(iter: I, dtype: vortex_array::dtype::DType) -> Self -pub fn vortex_array::arrays::VarBinArray::from_vec>(vec: alloc::vec::Vec, dtype: vortex_array::dtype::DType) -> Self +pub fn vortex_array::arrays::VarBinData::from_iter_nonnull, I: core::iter::traits::collect::IntoIterator>(iter: I, dtype: vortex_array::dtype::DType) -> Self -pub fn vortex_array::arrays::VarBinArray::into_parts(self) -> (vortex_array::dtype::DType, vortex_array::buffer::BufferHandle, vortex_array::ArrayRef, vortex_array::validity::Validity) +pub fn vortex_array::arrays::VarBinData::from_vec>(vec: alloc::vec::Vec, dtype: vortex_array::dtype::DType) -> Self -pub fn vortex_array::arrays::VarBinArray::new(offsets: vortex_array::ArrayRef, bytes: vortex_buffer::ByteBuffer, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self +pub fn vortex_array::arrays::VarBinData::is_empty(&self) -> bool -pub fn vortex_array::arrays::VarBinArray::new_from_handle(offset: vortex_array::ArrayRef, bytes: vortex_array::buffer::BufferHandle, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self +pub fn vortex_array::arrays::VarBinData::len(&self) -> usize -pub unsafe fn vortex_array::arrays::VarBinArray::new_unchecked(offsets: vortex_array::ArrayRef, bytes: vortex_buffer::ByteBuffer, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self +pub fn vortex_array::arrays::VarBinData::new(offsets: vortex_array::ArrayRef, bytes: vortex_buffer::ByteBuffer, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self -pub unsafe fn vortex_array::arrays::VarBinArray::new_unchecked_from_handle(offsets: vortex_array::ArrayRef, bytes: vortex_array::buffer::BufferHandle, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self +pub fn vortex_array::arrays::VarBinData::new_from_handle(offset: vortex_array::ArrayRef, bytes: vortex_array::buffer::BufferHandle, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::VarBinArray::offset_at(&self, index: usize) -> usize +pub unsafe fn vortex_array::arrays::VarBinData::new_unchecked(offsets: vortex_array::ArrayRef, bytes: vortex_buffer::ByteBuffer, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::VarBinArray::offsets(&self) -> &vortex_array::ArrayRef +pub unsafe fn vortex_array::arrays::VarBinData::new_unchecked_from_handle(offsets: vortex_array::ArrayRef, bytes: vortex_array::buffer::BufferHandle, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::VarBinArray::sliced_bytes(&self) -> vortex_buffer::ByteBuffer +pub fn vortex_array::arrays::VarBinData::offsets(&self) -> &vortex_array::ArrayRef -pub fn vortex_array::arrays::VarBinArray::try_new(offsets: vortex_array::ArrayRef, bytes: vortex_buffer::ByteBuffer, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBinData::sliced_bytes(&self) -> vortex_buffer::ByteBuffer -pub fn vortex_array::arrays::VarBinArray::try_new_from_handle(offsets: vortex_array::ArrayRef, bytes: vortex_array::buffer::BufferHandle, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBinData::try_new(offsets: vortex_array::ArrayRef, bytes: vortex_buffer::ByteBuffer, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult -pub fn vortex_array::arrays::VarBinArray::validate(offsets: &vortex_array::ArrayRef, bytes: &vortex_array::buffer::BufferHandle, dtype: &vortex_array::dtype::DType, validity: &vortex_array::validity::Validity) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::VarBinData::try_new_from_handle(offsets: vortex_array::ArrayRef, bytes: vortex_array::buffer::BufferHandle, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult -impl vortex_array::arrays::VarBinArray +pub fn vortex_array::arrays::VarBinData::validate(offsets: &vortex_array::ArrayRef, bytes: &vortex_array::buffer::BufferHandle, dtype: &vortex_array::dtype::DType, validity: &vortex_array::validity::Validity) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::VarBinArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::VarBinData::validity(&self) -> &vortex_array::validity::Validity -impl core::clone::Clone for vortex_array::arrays::VarBinArray +pub fn vortex_array::arrays::VarBinData::validity_mask(&self) -> vortex_mask::Mask -pub fn vortex_array::arrays::VarBinArray::clone(&self) -> vortex_array::arrays::VarBinArray +impl vortex_array::arrays::VarBinData -impl core::convert::AsRef for vortex_array::arrays::VarBinArray +pub fn vortex_array::arrays::VarBinData::bytes_at(&self, index: usize) -> vortex_buffer::ByteBuffer -pub fn vortex_array::arrays::VarBinArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub fn vortex_array::arrays::VarBinData::into_parts(self) -> (vortex_array::dtype::DType, vortex_array::buffer::BufferHandle, vortex_array::ArrayRef, vortex_array::validity::Validity) -impl core::convert::From> for vortex_array::arrays::VarBinArray +pub fn vortex_array::arrays::VarBinData::offset_at(&self, index: usize) -> usize -pub fn vortex_array::arrays::VarBinArray::from(value: alloc::vec::Vec<&[u8]>) -> Self +impl core::clone::Clone for vortex_array::arrays::VarBinData -impl core::convert::From> for vortex_array::arrays::VarBinArray +pub fn vortex_array::arrays::VarBinData::clone(&self) -> vortex_array::arrays::VarBinData -pub fn vortex_array::arrays::VarBinArray::from(value: alloc::vec::Vec<&str>) -> Self +impl core::convert::From> for vortex_array::arrays::VarBinData -impl core::convert::From> for vortex_array::arrays::VarBinArray +pub fn vortex_array::arrays::VarBinData::from(value: alloc::vec::Vec<&[u8]>) -> Self -pub fn vortex_array::arrays::VarBinArray::from(value: alloc::vec::Vec) -> Self +impl core::convert::From> for vortex_array::arrays::VarBinData -impl core::convert::From>> for vortex_array::arrays::VarBinArray +pub fn vortex_array::arrays::VarBinData::from(value: alloc::vec::Vec<&str>) -> Self -pub fn vortex_array::arrays::VarBinArray::from(value: alloc::vec::Vec>) -> Self +impl core::convert::From> for vortex_array::arrays::VarBinData -impl core::convert::From>> for vortex_array::arrays::VarBinArray +pub fn vortex_array::arrays::VarBinData::from(value: alloc::vec::Vec) -> Self -pub fn vortex_array::arrays::VarBinArray::from(value: alloc::vec::Vec>) -> Self +impl core::convert::From>> for vortex_array::arrays::VarBinData -impl core::convert::From>> for vortex_array::arrays::VarBinArray +pub fn vortex_array::arrays::VarBinData::from(value: alloc::vec::Vec>) -> Self -pub fn vortex_array::arrays::VarBinArray::from(value: alloc::vec::Vec>) -> Self +impl core::convert::From>> for vortex_array::arrays::VarBinData -impl core::convert::From>> for vortex_array::arrays::VarBinArray +pub fn vortex_array::arrays::VarBinData::from(value: alloc::vec::Vec>) -> Self -pub fn vortex_array::arrays::VarBinArray::from(value: alloc::vec::Vec>) -> Self +impl core::convert::From>> for vortex_array::arrays::VarBinData -impl core::convert::From>>> for vortex_array::arrays::VarBinArray +pub fn vortex_array::arrays::VarBinData::from(value: alloc::vec::Vec>) -> Self -pub fn vortex_array::arrays::VarBinArray::from(value: alloc::vec::Vec>>) -> Self +impl core::convert::From>> for vortex_array::arrays::VarBinData -impl core::convert::From for vortex_array::ArrayRef +pub fn vortex_array::arrays::VarBinData::from(value: alloc::vec::Vec>) -> Self -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::VarBinArray) -> vortex_array::ArrayRef +impl core::convert::From>>> for vortex_array::arrays::VarBinData -impl core::fmt::Debug for vortex_array::arrays::VarBinArray +pub fn vortex_array::arrays::VarBinData::from(value: alloc::vec::Vec>>) -> Self -pub fn vortex_array::arrays::VarBinArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::convert::From for vortex_array::ArrayRef -impl core::iter::traits::collect::FromIterator> for vortex_array::arrays::VarBinArray +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::VarBinData) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::VarBinArray::from_iter>>(iter: T) -> Self +impl core::fmt::Debug for vortex_array::arrays::VarBinData -impl core::iter::traits::collect::FromIterator>> for vortex_array::arrays::VarBinArray +pub fn vortex_array::arrays::VarBinData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub fn vortex_array::arrays::VarBinArray::from_iter>>>(iter: T) -> Self +impl core::iter::traits::collect::FromIterator> for vortex_array::arrays::VarBinData -impl core::ops::deref::Deref for vortex_array::arrays::VarBinArray +pub fn vortex_array::arrays::VarBinData::from_iter>>(iter: T) -> Self -pub type vortex_array::arrays::VarBinArray::Target = dyn vortex_array::DynArray +impl core::iter::traits::collect::FromIterator>> for vortex_array::arrays::VarBinData -pub fn vortex_array::arrays::VarBinArray::deref(&self) -> &Self::Target +pub fn vortex_array::arrays::VarBinData::from_iter>>>(iter: T) -> Self -impl vortex_array::IntoArray for vortex_array::arrays::VarBinArray +impl vortex_array::IntoArray for vortex_array::arrays::VarBinData -pub fn vortex_array::arrays::VarBinArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::VarBinData::into_array(self) -> vortex_array::ArrayRef -impl vortex_array::accessor::ArrayAccessor<[u8]> for &vortex_array::arrays::VarBinArray +impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::VarBinData -pub fn &vortex_array::arrays::VarBinArray::with_iterator(&self, f: F) -> R where F: for<'a> core::ops::function::FnOnce(&mut dyn core::iter::traits::iterator::Iterator>) -> R +pub fn vortex_array::arrays::VarBinData::validity(&self) -> &vortex_array::validity::Validity -impl vortex_array::accessor::ArrayAccessor<[u8]> for vortex_array::arrays::VarBinArray +impl<'a> core::iter::traits::collect::FromIterator> for vortex_array::arrays::VarBinData -pub fn vortex_array::arrays::VarBinArray::with_iterator(&self, f: F) -> R where F: for<'a> core::ops::function::FnOnce(&mut dyn core::iter::traits::iterator::Iterator>) -> R +pub fn vortex_array::arrays::VarBinData::from_iter>>(iter: T) -> Self -impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::VarBinArray +impl<'a> core::iter::traits::collect::FromIterator> for vortex_array::arrays::VarBinData -pub fn vortex_array::arrays::VarBinArray::validity(&self) -> &vortex_array::validity::Validity - -impl<'a> core::iter::traits::collect::FromIterator> for vortex_array::arrays::VarBinArray - -pub fn vortex_array::arrays::VarBinArray::from_iter>>(iter: T) -> Self - -impl<'a> core::iter::traits::collect::FromIterator> for vortex_array::arrays::VarBinArray - -pub fn vortex_array::arrays::VarBinArray::from_iter>>(iter: T) -> Self +pub fn vortex_array::arrays::VarBinData::from_iter>>(iter: T) -> Self pub struct vortex_array::arrays::VarBinView @@ -8000,31 +7566,31 @@ pub fn vortex_array::arrays::VarBinView::fmt(&self, f: &mut core::fmt::Formatter impl vortex_array::arrays::dict::TakeExecute for vortex_array::arrays::VarBinView -pub fn vortex_array::arrays::VarBinView::take(array: &vortex_array::arrays::VarBinViewArray, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBinView::take(array: &vortex_array::vtable::Array, indices: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::arrays::slice::SliceReduce for vortex_array::arrays::VarBinView -pub fn vortex_array::arrays::VarBinView::slice(array: &Self::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBinView::slice(array: &vortex_array::vtable::Array, range: core::ops::range::Range) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastReduce for vortex_array::arrays::VarBinView -pub fn vortex_array::arrays::VarBinView::cast(array: &vortex_array::arrays::VarBinViewArray, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBinView::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::VarBinView -pub fn vortex_array::arrays::VarBinView::mask(array: &vortex_array::arrays::VarBinViewArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBinView::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::zip::ZipKernel for vortex_array::arrays::VarBinView -pub fn vortex_array::arrays::VarBinView::zip(if_true: &vortex_array::arrays::VarBinViewArray, if_false: &vortex_array::ArrayRef, mask: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBinView::zip(if_true: &vortex_array::vtable::Array, if_false: &vortex_array::ArrayRef, mask: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::VarBinView -pub fn vortex_array::arrays::VarBinView::scalar_at(array: &vortex_array::arrays::VarBinViewArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBinView::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::VarBinView -pub type vortex_array::arrays::VarBinView::Array = vortex_array::arrays::VarBinViewArray +pub type vortex_array::arrays::VarBinView::Array = vortex_array::arrays::VarBinViewData pub type vortex_array::arrays::VarBinView::Metadata = vortex_array::EmptyMetadata @@ -8032,25 +7598,25 @@ pub type vortex_array::arrays::VarBinView::OperationsVTable = vortex_array::arra pub type vortex_array::arrays::VarBinView::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::VarBinView::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::VarBinView::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::VarBinView::array_eq(array: &vortex_array::arrays::VarBinViewArray, other: &vortex_array::arrays::VarBinViewArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::VarBinView::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::VarBinView::array_hash(array: &vortex_array::arrays::VarBinViewArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::VarBinView::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::VarBinView::buffer(array: &vortex_array::arrays::VarBinViewArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::VarBinView::buffer(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::VarBinView::buffer_name(array: &vortex_array::arrays::VarBinViewArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::VarBinView::buffer_name(array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::VarBinView::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBinView::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::VarBinView::child(array: &vortex_array::arrays::VarBinViewArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::VarBinView::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::VarBinView::child_name(_array: &vortex_array::arrays::VarBinViewArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::VarBinView::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::VarBinView::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::VarBinView::dtype(array: &vortex_array::arrays::VarBinViewArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::VarBinView::dtype(array: &vortex_array::arrays::VarBinViewData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::VarBinView::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -8058,13 +7624,13 @@ pub fn vortex_array::arrays::VarBinView::execute_parent(array: &vortex_array::vt pub fn vortex_array::arrays::VarBinView::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::VarBinView::len(array: &vortex_array::arrays::VarBinViewArray) -> usize +pub fn vortex_array::arrays::VarBinView::len(array: &vortex_array::arrays::VarBinViewData) -> usize -pub fn vortex_array::arrays::VarBinView::metadata(_array: &vortex_array::arrays::VarBinViewArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBinView::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::VarBinView::nbuffers(array: &vortex_array::arrays::VarBinViewArray) -> usize +pub fn vortex_array::arrays::VarBinView::nbuffers(array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::VarBinView::nchildren(array: &vortex_array::arrays::VarBinViewArray) -> usize +pub fn vortex_array::arrays::VarBinView::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::VarBinView::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -8072,121 +7638,99 @@ pub fn vortex_array::arrays::VarBinView::reduce_parent(array: &vortex_array::vta pub fn vortex_array::arrays::VarBinView::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::VarBinView::stats(array: &vortex_array::arrays::VarBinViewArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::VarBinView::stats(array: &vortex_array::arrays::VarBinViewData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::VarBinView::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::VarBinView::vtable(_array: &vortex_array::arrays::VarBinViewData) -> &Self pub fn vortex_array::arrays::VarBinView::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> -pub struct vortex_array::arrays::VarBinViewArray +pub struct vortex_array::arrays::VarBinViewData -impl vortex_array::arrays::VarBinViewArray +impl vortex_array::arrays::VarBinViewData -pub fn vortex_array::arrays::VarBinViewArray::buffer(&self, idx: usize) -> &vortex_buffer::ByteBuffer +pub fn vortex_array::arrays::VarBinViewData::buffer(&self, idx: usize) -> &vortex_buffer::ByteBuffer -pub fn vortex_array::arrays::VarBinViewArray::buffers(&self) -> &alloc::sync::Arc<[vortex_array::buffer::BufferHandle]> +pub fn vortex_array::arrays::VarBinViewData::buffers(&self) -> &alloc::sync::Arc<[vortex_array::buffer::BufferHandle]> -pub fn vortex_array::arrays::VarBinViewArray::bytes_at(&self, index: usize) -> vortex_buffer::ByteBuffer +pub fn vortex_array::arrays::VarBinViewData::bytes_at(&self, index: usize) -> vortex_buffer::ByteBuffer -pub fn vortex_array::arrays::VarBinViewArray::from_iter, I: core::iter::traits::collect::IntoIterator>>(iter: I, dtype: vortex_array::dtype::DType) -> Self +pub fn vortex_array::arrays::VarBinViewData::dtype(&self) -> &vortex_array::dtype::DType -pub fn vortex_array::arrays::VarBinViewArray::from_iter_bin, I: core::iter::traits::collect::IntoIterator>(iter: I) -> Self +pub fn vortex_array::arrays::VarBinViewData::from_iter, I: core::iter::traits::collect::IntoIterator>>(iter: I, dtype: vortex_array::dtype::DType) -> Self -pub fn vortex_array::arrays::VarBinViewArray::from_iter_nullable_bin, I: core::iter::traits::collect::IntoIterator>>(iter: I) -> Self +pub fn vortex_array::arrays::VarBinViewData::from_iter_bin, I: core::iter::traits::collect::IntoIterator>(iter: I) -> Self -pub fn vortex_array::arrays::VarBinViewArray::from_iter_nullable_str, I: core::iter::traits::collect::IntoIterator>>(iter: I) -> Self +pub fn vortex_array::arrays::VarBinViewData::from_iter_nullable_bin, I: core::iter::traits::collect::IntoIterator>>(iter: I) -> Self -pub fn vortex_array::arrays::VarBinViewArray::from_iter_str, I: core::iter::traits::collect::IntoIterator>(iter: I) -> Self +pub fn vortex_array::arrays::VarBinViewData::from_iter_nullable_str, I: core::iter::traits::collect::IntoIterator>>(iter: I) -> Self -pub fn vortex_array::arrays::VarBinViewArray::into_parts(self) -> vortex_array::arrays::varbinview::VarBinViewArrayParts +pub fn vortex_array::arrays::VarBinViewData::from_iter_str, I: core::iter::traits::collect::IntoIterator>(iter: I) -> Self -pub fn vortex_array::arrays::VarBinViewArray::nbuffers(&self) -> usize +pub fn vortex_array::arrays::VarBinViewData::into_parts(self) -> vortex_array::arrays::varbinview::VarBinViewArrayParts -pub fn vortex_array::arrays::VarBinViewArray::new(views: vortex_buffer::buffer::Buffer, buffers: alloc::sync::Arc<[vortex_buffer::ByteBuffer]>, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self +pub fn vortex_array::arrays::VarBinViewData::is_empty(&self) -> bool -pub fn vortex_array::arrays::VarBinViewArray::new_handle(views: vortex_array::buffer::BufferHandle, buffers: alloc::sync::Arc<[vortex_array::buffer::BufferHandle]>, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self +pub fn vortex_array::arrays::VarBinViewData::len(&self) -> usize -pub unsafe fn vortex_array::arrays::VarBinViewArray::new_handle_unchecked(views: vortex_array::buffer::BufferHandle, buffers: alloc::sync::Arc<[vortex_array::buffer::BufferHandle]>, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self +pub fn vortex_array::arrays::VarBinViewData::nbuffers(&self) -> usize -pub unsafe fn vortex_array::arrays::VarBinViewArray::new_unchecked(views: vortex_buffer::buffer::Buffer, buffers: alloc::sync::Arc<[vortex_buffer::ByteBuffer]>, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self +pub fn vortex_array::arrays::VarBinViewData::new(views: vortex_buffer::buffer::Buffer, buffers: alloc::sync::Arc<[vortex_buffer::ByteBuffer]>, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::VarBinViewArray::try_new(views: vortex_buffer::buffer::Buffer, buffers: alloc::sync::Arc<[vortex_buffer::ByteBuffer]>, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBinViewData::new_handle(views: vortex_array::buffer::BufferHandle, buffers: alloc::sync::Arc<[vortex_array::buffer::BufferHandle]>, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::VarBinViewArray::try_new_handle(views: vortex_array::buffer::BufferHandle, buffers: alloc::sync::Arc<[vortex_array::buffer::BufferHandle]>, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult +pub unsafe fn vortex_array::arrays::VarBinViewData::new_handle_unchecked(views: vortex_array::buffer::BufferHandle, buffers: alloc::sync::Arc<[vortex_array::buffer::BufferHandle]>, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::VarBinViewArray::validate(views: &vortex_buffer::buffer::Buffer, buffers: &alloc::sync::Arc<[vortex_buffer::ByteBuffer]>, dtype: &vortex_array::dtype::DType, validity: &vortex_array::validity::Validity) -> vortex_error::VortexResult<()> +pub unsafe fn vortex_array::arrays::VarBinViewData::new_unchecked(views: vortex_buffer::buffer::Buffer, buffers: alloc::sync::Arc<[vortex_buffer::ByteBuffer]>, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::arrays::VarBinViewArray::views(&self) -> &[vortex_array::arrays::varbinview::BinaryView] +pub fn vortex_array::arrays::VarBinViewData::try_new(views: vortex_buffer::buffer::Buffer, buffers: alloc::sync::Arc<[vortex_buffer::ByteBuffer]>, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult -pub fn vortex_array::arrays::VarBinViewArray::views_handle(&self) -> &vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::VarBinViewData::try_new_handle(views: vortex_array::buffer::BufferHandle, buffers: alloc::sync::Arc<[vortex_array::buffer::BufferHandle]>, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult -impl vortex_array::arrays::VarBinViewArray +pub fn vortex_array::arrays::VarBinViewData::validate(views: &vortex_buffer::buffer::Buffer, buffers: &alloc::sync::Arc<[vortex_buffer::ByteBuffer]>, dtype: &vortex_array::dtype::DType, validity: &vortex_array::validity::Validity) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::VarBinViewArray::compact_buffers(&self) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBinViewData::validity(&self) -> &vortex_array::validity::Validity -pub fn vortex_array::arrays::VarBinViewArray::compact_with_threshold(&self, buffer_utilization_threshold: f64) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBinViewData::validity_mask(&self) -> vortex_mask::Mask -impl vortex_array::arrays::VarBinViewArray +pub fn vortex_array::arrays::VarBinViewData::views(&self) -> &[vortex_array::arrays::varbinview::BinaryView] -pub fn vortex_array::arrays::VarBinViewArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::VarBinViewData::views_handle(&self) -> &vortex_array::buffer::BufferHandle -impl core::clone::Clone for vortex_array::arrays::VarBinViewArray +impl core::clone::Clone for vortex_array::arrays::VarBinViewData -pub fn vortex_array::arrays::VarBinViewArray::clone(&self) -> vortex_array::arrays::VarBinViewArray +pub fn vortex_array::arrays::VarBinViewData::clone(&self) -> vortex_array::arrays::VarBinViewData -impl core::convert::AsRef for vortex_array::arrays::VarBinViewArray +impl core::convert::From for vortex_array::ArrayRef -pub fn vortex_array::arrays::VarBinViewArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::VarBinViewData) -> vortex_array::ArrayRef -impl core::convert::From for vortex_array::ArrayRef +impl core::fmt::Debug for vortex_array::arrays::VarBinViewData -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::VarBinViewArray) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::VarBinViewData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -impl core::fmt::Debug for vortex_array::arrays::VarBinViewArray +impl core::iter::traits::collect::FromIterator> for vortex_array::arrays::VarBinViewData -pub fn vortex_array::arrays::VarBinViewArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_array::arrays::VarBinViewData::from_iter>>(iter: T) -> Self -impl core::iter::traits::collect::FromIterator> for vortex_array::arrays::VarBinViewArray +impl core::iter::traits::collect::FromIterator>> for vortex_array::arrays::VarBinViewData -pub fn vortex_array::arrays::VarBinViewArray::from_iter>>(iter: T) -> Self +pub fn vortex_array::arrays::VarBinViewData::from_iter>>>(iter: T) -> Self -impl core::iter::traits::collect::FromIterator>> for vortex_array::arrays::VarBinViewArray +impl vortex_array::IntoArray for vortex_array::arrays::VarBinViewData -pub fn vortex_array::arrays::VarBinViewArray::from_iter>>>(iter: T) -> Self +pub fn vortex_array::arrays::VarBinViewData::into_array(self) -> vortex_array::ArrayRef -impl core::ops::deref::Deref for vortex_array::arrays::VarBinViewArray +impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::VarBinViewData -pub type vortex_array::arrays::VarBinViewArray::Target = dyn vortex_array::DynArray +pub fn vortex_array::arrays::VarBinViewData::validity(&self) -> &vortex_array::validity::Validity -pub fn vortex_array::arrays::VarBinViewArray::deref(&self) -> &Self::Target - -impl vortex_array::Executable for vortex_array::arrays::VarBinViewArray - -pub fn vortex_array::arrays::VarBinViewArray::execute(array: vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +impl<'a> core::iter::traits::collect::FromIterator> for vortex_array::arrays::VarBinViewData -impl vortex_array::IntoArray for vortex_array::arrays::VarBinViewArray +pub fn vortex_array::arrays::VarBinViewData::from_iter>>(iter: T) -> Self -pub fn vortex_array::arrays::VarBinViewArray::into_array(self) -> vortex_array::ArrayRef +impl<'a> core::iter::traits::collect::FromIterator> for vortex_array::arrays::VarBinViewData -impl vortex_array::accessor::ArrayAccessor<[u8]> for &vortex_array::arrays::VarBinViewArray - -pub fn &vortex_array::arrays::VarBinViewArray::with_iterator(&self, f: F) -> R where F: for<'a> core::ops::function::FnOnce(&mut dyn core::iter::traits::iterator::Iterator>) -> R - -impl vortex_array::accessor::ArrayAccessor<[u8]> for vortex_array::arrays::VarBinViewArray - -pub fn vortex_array::arrays::VarBinViewArray::with_iterator core::ops::function::FnOnce(&mut dyn core::iter::traits::iterator::Iterator>) -> R, R>(&self, f: F) -> R - -impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::VarBinViewArray - -pub fn vortex_array::arrays::VarBinViewArray::validity(&self) -> &vortex_array::validity::Validity - -impl<'a> core::iter::traits::collect::FromIterator> for vortex_array::arrays::VarBinViewArray - -pub fn vortex_array::arrays::VarBinViewArray::from_iter>>(iter: T) -> Self - -impl<'a> core::iter::traits::collect::FromIterator> for vortex_array::arrays::VarBinViewArray - -pub fn vortex_array::arrays::VarBinViewArray::from_iter>>(iter: T) -> Self +pub fn vortex_array::arrays::VarBinViewData::from_iter>>(iter: T) -> Self pub struct vortex_array::arrays::Variant @@ -8204,11 +7748,11 @@ pub fn vortex_array::arrays::Variant::fmt(&self, f: &mut core::fmt::Formatter<'_ impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::Variant -pub fn vortex_array::arrays::Variant::scalar_at(array: &::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Variant::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::VTable for vortex_array::arrays::Variant -pub type vortex_array::arrays::Variant::Array = vortex_array::arrays::variant::VariantArray +pub type vortex_array::arrays::Variant::Array = vortex_array::arrays::variant::VariantData pub type vortex_array::arrays::Variant::Metadata = vortex_array::EmptyMetadata @@ -8216,21 +7760,21 @@ pub type vortex_array::arrays::Variant::OperationsVTable = vortex_array::arrays: pub type vortex_array::arrays::Variant::ValidityVTable = vortex_array::arrays::Variant -pub fn vortex_array::arrays::Variant::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Variant::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Variant::array_eq(array: &Self::Array, other: &Self::Array, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Variant::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Variant::array_hash(array: &Self::Array, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Variant::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Variant::buffer(_array: &Self::Array, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Variant::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Variant::buffer_name(_array: &Self::Array, _idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Variant::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option pub fn vortex_array::arrays::Variant::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Variant::child(array: &Self::Array, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Variant::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Variant::child_name(_array: &Self::Array, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Variant::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Variant::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult @@ -8244,11 +7788,11 @@ pub fn vortex_array::arrays::Variant::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Variant::len(array: &Self::Array) -> usize -pub fn vortex_array::arrays::Variant::metadata(_array: &Self::Array) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Variant::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Variant::nbuffers(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::Variant::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Variant::nchildren(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::Variant::nchildren(_array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Variant::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -8264,45 +7808,79 @@ pub fn vortex_array::arrays::Variant::with_children(array: &mut Self::Array, chi impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Variant -pub fn vortex_array::arrays::Variant::validity(array: &::Array) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Variant::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult + +pub struct vortex_array::arrays::VariantData + +impl vortex_array::arrays::variant::VariantData + +pub fn vortex_array::arrays::variant::VariantData::child(&self) -> &vortex_array::ArrayRef + +pub fn vortex_array::arrays::variant::VariantData::dtype(&self) -> &vortex_array::dtype::DType + +pub fn vortex_array::arrays::variant::VariantData::is_empty(&self) -> bool + +pub fn vortex_array::arrays::variant::VariantData::len(&self) -> usize + +pub fn vortex_array::arrays::variant::VariantData::new(child: vortex_array::ArrayRef) -> Self + +impl core::clone::Clone for vortex_array::arrays::variant::VariantData + +pub fn vortex_array::arrays::variant::VariantData::clone(&self) -> vortex_array::arrays::variant::VariantData -pub struct vortex_array::arrays::VariantArray +impl core::convert::From for vortex_array::ArrayRef -impl vortex_array::arrays::variant::VariantArray +pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::variant::VariantData) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::variant::VariantArray::child(&self) -> &vortex_array::ArrayRef +impl core::fmt::Debug for vortex_array::arrays::variant::VariantData -pub fn vortex_array::arrays::variant::VariantArray::new(child: vortex_array::ArrayRef) -> Self +pub fn vortex_array::arrays::variant::VariantData::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -impl vortex_array::arrays::variant::VariantArray +impl vortex_array::IntoArray for vortex_array::arrays::variant::VariantData -pub fn vortex_array::arrays::variant::VariantArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::variant::VariantData::into_array(self) -> vortex_array::ArrayRef -impl core::clone::Clone for vortex_array::arrays::variant::VariantArray +pub type vortex_array::arrays::BoolArray = vortex_array::vtable::Array -pub fn vortex_array::arrays::variant::VariantArray::clone(&self) -> vortex_array::arrays::variant::VariantArray +pub type vortex_array::arrays::ChunkedArray = vortex_array::vtable::Array -impl core::convert::AsRef for vortex_array::arrays::variant::VariantArray +pub type vortex_array::arrays::ConstantArray = vortex_array::vtable::Array -pub fn vortex_array::arrays::variant::VariantArray::as_ref(&self) -> &dyn vortex_array::DynArray +pub type vortex_array::arrays::DecimalArray = vortex_array::vtable::Array -impl core::convert::From for vortex_array::ArrayRef +pub type vortex_array::arrays::DictArray = vortex_array::vtable::Array -pub fn vortex_array::ArrayRef::from(value: vortex_array::arrays::variant::VariantArray) -> vortex_array::ArrayRef +pub type vortex_array::arrays::ExtensionArray = vortex_array::vtable::Array -impl core::fmt::Debug for vortex_array::arrays::variant::VariantArray +pub type vortex_array::arrays::FilterArray = vortex_array::vtable::Array -pub fn vortex_array::arrays::variant::VariantArray::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub type vortex_array::arrays::FixedSizeListArray = vortex_array::vtable::Array -impl core::ops::deref::Deref for vortex_array::arrays::variant::VariantArray +pub type vortex_array::arrays::ListArray = vortex_array::vtable::Array -pub type vortex_array::arrays::variant::VariantArray::Target = dyn vortex_array::DynArray +pub type vortex_array::arrays::ListViewArray = vortex_array::vtable::Array -pub fn vortex_array::arrays::variant::VariantArray::deref(&self) -> &Self::Target +pub type vortex_array::arrays::MaskedArray = vortex_array::vtable::Array -impl vortex_array::IntoArray for vortex_array::arrays::variant::VariantArray +pub type vortex_array::arrays::NullArray = vortex_array::vtable::Array -pub fn vortex_array::arrays::variant::VariantArray::into_array(self) -> vortex_array::ArrayRef +pub type vortex_array::arrays::PrimitiveArray = vortex_array::vtable::Array + +pub type vortex_array::arrays::ScalarFnArray = vortex_array::vtable::Array + +pub type vortex_array::arrays::SharedArray = vortex_array::vtable::Array + +pub type vortex_array::arrays::SliceArray = vortex_array::vtable::Array + +pub type vortex_array::arrays::StructArray = vortex_array::vtable::Array + +pub type vortex_array::arrays::TemporalArray = vortex_array::arrays::datetime::TemporalData + +pub type vortex_array::arrays::VarBinArray = vortex_array::vtable::Array + +pub type vortex_array::arrays::VarBinViewArray = vortex_array::vtable::Array + +pub type vortex_array::arrays::VariantArray = vortex_array::vtable::Array pub mod vortex_array::arrow @@ -14640,7 +14218,7 @@ pub fn vortex_array::kernel::ParentKernelAdapter::fmt(&self, f: &mut core: impl> vortex_array::kernel::DynParentKernel for vortex_array::kernel::ParentKernelAdapter -pub fn vortex_array::kernel::ParentKernelAdapter::execute_parent(&self, child: &::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::kernel::ParentKernelAdapter::execute_parent(&self, child: &vortex_array::vtable::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> pub fn vortex_array::kernel::ParentKernelAdapter::matches(&self, parent: &vortex_array::ArrayRef) -> bool @@ -14648,7 +14226,7 @@ pub struct vortex_array::kernel::ParentKernelSet vortex_array::kernel::ParentKernelSet -pub fn vortex_array::kernel::ParentKernelSet::execute(&self, child: &::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::kernel::ParentKernelSet::execute(&self, child: &vortex_array::vtable::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> pub const fn vortex_array::kernel::ParentKernelSet::lift>(kernel: &'static K) -> &'static dyn vortex_array::kernel::DynParentKernel @@ -14656,13 +14234,13 @@ pub const fn vortex_array::kernel::ParentKernelSet::new(kernels: &'static [&' pub trait vortex_array::kernel::DynParentKernel: core::marker::Send + core::marker::Sync -pub fn vortex_array::kernel::DynParentKernel::execute_parent(&self, child: &::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::kernel::DynParentKernel::execute_parent(&self, child: &vortex_array::vtable::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> pub fn vortex_array::kernel::DynParentKernel::matches(&self, parent: &vortex_array::ArrayRef) -> bool impl> vortex_array::kernel::DynParentKernel for vortex_array::kernel::ParentKernelAdapter -pub fn vortex_array::kernel::ParentKernelAdapter::execute_parent(&self, child: &::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::kernel::ParentKernelAdapter::execute_parent(&self, child: &vortex_array::vtable::Array, parent: &vortex_array::ArrayRef, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> pub fn vortex_array::kernel::ParentKernelAdapter::matches(&self, parent: &vortex_array::ArrayRef) -> bool @@ -14670,79 +14248,79 @@ pub trait vortex_array::kernel::ExecuteParentKernel::Array, parent: ::Match, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::kernel::ExecuteParentKernel::execute_parent(&self, array: &vortex_array::vtable::Array, parent: ::Match, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::kernel::ExecuteParentKernel for vortex_array::arrays::dict::TakeExecuteAdaptor where V: vortex_array::arrays::dict::TakeExecute pub type vortex_array::arrays::dict::TakeExecuteAdaptor::Parent = vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::TakeExecuteAdaptor::execute_parent(&self, array: &::Array, parent: ::Match, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::TakeExecuteAdaptor::execute_parent(&self, array: &vortex_array::vtable::Array, parent: ::Match, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::kernel::ExecuteParentKernel for vortex_array::arrays::filter::FilterExecuteAdaptor where V: vortex_array::arrays::filter::FilterKernel pub type vortex_array::arrays::filter::FilterExecuteAdaptor::Parent = vortex_array::arrays::Filter -pub fn vortex_array::arrays::filter::FilterExecuteAdaptor::execute_parent(&self, array: &::Array, parent: ::Match, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::filter::FilterExecuteAdaptor::execute_parent(&self, array: &vortex_array::vtable::Array, parent: ::Match, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::kernel::ExecuteParentKernel for vortex_array::arrays::slice::SliceExecuteAdaptor where V: vortex_array::arrays::slice::SliceKernel pub type vortex_array::arrays::slice::SliceExecuteAdaptor::Parent = vortex_array::arrays::slice::Slice -pub fn vortex_array::arrays::slice::SliceExecuteAdaptor::execute_parent(&self, array: &::Array, parent: ::Match, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::slice::SliceExecuteAdaptor::execute_parent(&self, array: &vortex_array::vtable::Array, parent: ::Match, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::kernel::ExecuteParentKernel for vortex_array::scalar_fn::fns::between::BetweenExecuteAdaptor where V: vortex_array::scalar_fn::fns::between::BetweenKernel pub type vortex_array::scalar_fn::fns::between::BetweenExecuteAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::between::BetweenExecuteAdaptor::execute_parent(&self, array: &::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::between::Between>, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::between::BetweenExecuteAdaptor::execute_parent(&self, array: &vortex_array::vtable::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::between::Between>, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::kernel::ExecuteParentKernel for vortex_array::scalar_fn::fns::binary::CompareExecuteAdaptor where V: vortex_array::scalar_fn::fns::binary::CompareKernel pub type vortex_array::scalar_fn::fns::binary::CompareExecuteAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::binary::CompareExecuteAdaptor::execute_parent(&self, array: &::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::binary::Binary>, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::binary::CompareExecuteAdaptor::execute_parent(&self, array: &vortex_array::vtable::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::binary::Binary>, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::kernel::ExecuteParentKernel for vortex_array::scalar_fn::fns::cast::CastExecuteAdaptor where V: vortex_array::scalar_fn::fns::cast::CastKernel pub type vortex_array::scalar_fn::fns::cast::CastExecuteAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::cast::CastExecuteAdaptor::execute_parent(&self, array: &::Array, parent: ::Match, _child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::cast::CastExecuteAdaptor::execute_parent(&self, array: &vortex_array::vtable::Array, parent: ::Match, _child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::kernel::ExecuteParentKernel for vortex_array::scalar_fn::fns::fill_null::FillNullExecuteAdaptor where V: vortex_array::scalar_fn::fns::fill_null::FillNullKernel pub type vortex_array::scalar_fn::fns::fill_null::FillNullExecuteAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::fill_null::FillNullExecuteAdaptor::execute_parent(&self, array: &::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::fill_null::FillNull>, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::fill_null::FillNullExecuteAdaptor::execute_parent(&self, array: &vortex_array::vtable::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::fill_null::FillNull>, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::kernel::ExecuteParentKernel for vortex_array::scalar_fn::fns::like::LikeExecuteAdaptor where V: vortex_array::scalar_fn::fns::like::LikeKernel pub type vortex_array::scalar_fn::fns::like::LikeExecuteAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::like::LikeExecuteAdaptor::execute_parent(&self, array: &::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::like::Like>, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::like::LikeExecuteAdaptor::execute_parent(&self, array: &vortex_array::vtable::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::like::Like>, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::kernel::ExecuteParentKernel for vortex_array::scalar_fn::fns::list_contains::ListContainsElementExecuteAdaptor where V: vortex_array::scalar_fn::fns::list_contains::ListContainsElementKernel pub type vortex_array::scalar_fn::fns::list_contains::ListContainsElementExecuteAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::list_contains::ListContainsElementExecuteAdaptor::execute_parent(&self, array: &::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::list_contains::ListContains>, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::list_contains::ListContainsElementExecuteAdaptor::execute_parent(&self, array: &vortex_array::vtable::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::list_contains::ListContains>, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::kernel::ExecuteParentKernel for vortex_array::scalar_fn::fns::mask::MaskExecuteAdaptor where V: vortex_array::scalar_fn::fns::mask::MaskKernel pub type vortex_array::scalar_fn::fns::mask::MaskExecuteAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::mask::MaskExecuteAdaptor::execute_parent(&self, array: &::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::mask::Mask>, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::mask::MaskExecuteAdaptor::execute_parent(&self, array: &vortex_array::vtable::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::mask::Mask>, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::kernel::ExecuteParentKernel for vortex_array::scalar_fn::fns::not::NotExecuteAdaptor where V: vortex_array::scalar_fn::fns::not::NotKernel pub type vortex_array::scalar_fn::fns::not::NotExecuteAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::not::NotExecuteAdaptor::execute_parent(&self, array: &::Array, _parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::not::Not>, _child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::not::NotExecuteAdaptor::execute_parent(&self, array: &vortex_array::vtable::Array, _parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::not::Not>, _child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::kernel::ExecuteParentKernel for vortex_array::scalar_fn::fns::zip::ZipExecuteAdaptor where V: vortex_array::scalar_fn::fns::zip::ZipKernel pub type vortex_array::scalar_fn::fns::zip::ZipExecuteAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::zip::ZipExecuteAdaptor::execute_parent(&self, array: &::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::zip::Zip>, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::zip::ZipExecuteAdaptor::execute_parent(&self, array: &vortex_array::vtable::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::zip::Zip>, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> pub mod vortex_array::mask @@ -14788,7 +14366,7 @@ pub fn vortex_array::AnyColumnar::try_match<'a>(array: &'a dyn vortex_array::Dyn impl vortex_array::matcher::Matcher for vortex_array::arrays::scalar_fn::AnyScalarFn -pub type vortex_array::arrays::scalar_fn::AnyScalarFn::Match<'a> = &'a vortex_array::arrays::scalar_fn::ScalarFnArray +pub type vortex_array::arrays::scalar_fn::AnyScalarFn::Match<'a> = &'a vortex_array::vtable::Array pub fn vortex_array::arrays::scalar_fn::AnyScalarFn::matches(array: &dyn vortex_array::DynArray) -> bool @@ -14812,7 +14390,7 @@ pub fn vortex_array::arrays::scalar_fn::ExactScalarFn::try_match(array: &dyn impl vortex_array::matcher::Matcher for V -pub type V::Match<'a> = &'a ::Array +pub type V::Match<'a> = &'a vortex_array::vtable::Array pub fn V::matches(array: &dyn vortex_array::DynArray) -> bool @@ -14840,7 +14418,7 @@ impl::matches(&self, parent: &vortex_array::ArrayRef) -> bool -pub fn vortex_array::optimizer::rules::ParentReduceRuleAdapter::reduce_parent(&self, child: &::Array, parent: &vortex_array::ArrayRef, child_idx: usize) -> vortex_error::VortexResult> +pub fn vortex_array::optimizer::rules::ParentReduceRuleAdapter::reduce_parent(&self, child: &vortex_array::vtable::Array, parent: &vortex_array::ArrayRef, child_idx: usize) -> vortex_error::VortexResult> impl> core::fmt::Debug for vortex_array::optimizer::rules::ParentReduceRuleAdapter @@ -14850,7 +14428,7 @@ pub struct vortex_array::optimizer::rules::ParentRuleSet vortex_array::optimizer::rules::ParentRuleSet -pub fn vortex_array::optimizer::rules::ParentRuleSet::evaluate(&self, child: &::Array, parent: &vortex_array::ArrayRef, child_idx: usize) -> vortex_error::VortexResult> +pub fn vortex_array::optimizer::rules::ParentRuleSet::evaluate(&self, child: &vortex_array::vtable::Array, parent: &vortex_array::ArrayRef, child_idx: usize) -> vortex_error::VortexResult> pub const fn vortex_array::optimizer::rules::ParentRuleSet::lift>(rule: &'static R) -> &'static dyn vortex_array::optimizer::rules::DynArrayParentReduceRule @@ -14860,7 +14438,7 @@ pub struct vortex_array::optimizer::rules::ReduceRuleSet vortex_array::optimizer::rules::ReduceRuleSet -pub fn vortex_array::optimizer::rules::ReduceRuleSet::evaluate(&self, array: &::Array) -> vortex_error::VortexResult> +pub fn vortex_array::optimizer::rules::ReduceRuleSet::evaluate(&self, array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> pub const fn vortex_array::optimizer::rules::ReduceRuleSet::new(rules: &'static [&'static dyn vortex_array::optimizer::rules::ArrayReduceRule]) -> Self @@ -14868,7 +14446,7 @@ pub trait vortex_array::optimizer::rules::ArrayParentReduceRule::Array, parent: ::Match, child_idx: usize) -> vortex_error::VortexResult> +pub fn vortex_array::optimizer::rules::ArrayParentReduceRule::reduce_parent(&self, array: &vortex_array::vtable::Array, parent: ::Match, child_idx: usize) -> vortex_error::VortexResult> impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_array::arrays::bool::BoolMaskedValidityRule @@ -14880,95 +14458,95 @@ impl vortex_array::optimizer::rules::ArrayParentReduceRule vortex_error::VortexResult> +pub fn vortex_array::arrays::decimal::DecimalMaskedValidityRule::reduce_parent(&self, array: &vortex_array::vtable::Array, parent: &vortex_array::arrays::MaskedArray, _child_idx: usize) -> vortex_error::VortexResult> impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_array::arrays::primitive::PrimitiveMaskedValidityRule pub type vortex_array::arrays::primitive::PrimitiveMaskedValidityRule::Parent = vortex_array::arrays::Masked -pub fn vortex_array::arrays::primitive::PrimitiveMaskedValidityRule::reduce_parent(&self, array: &vortex_array::arrays::PrimitiveArray, parent: &vortex_array::arrays::MaskedArray, _child_idx: usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::primitive::PrimitiveMaskedValidityRule::reduce_parent(&self, array: &vortex_array::vtable::Array, parent: &vortex_array::arrays::MaskedArray, _child_idx: usize) -> vortex_error::VortexResult> impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_array::arrays::dict::TakeReduceAdaptor where V: vortex_array::arrays::dict::TakeReduce pub type vortex_array::arrays::dict::TakeReduceAdaptor::Parent = vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::TakeReduceAdaptor::reduce_parent(&self, array: &::Array, parent: &vortex_array::arrays::dict::DictArray, child_idx: usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::TakeReduceAdaptor::reduce_parent(&self, array: &vortex_array::vtable::Array, parent: &vortex_array::arrays::dict::DictArray, child_idx: usize) -> vortex_error::VortexResult> impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_array::arrays::filter::FilterReduceAdaptor where V: vortex_array::arrays::filter::FilterReduce pub type vortex_array::arrays::filter::FilterReduceAdaptor::Parent = vortex_array::arrays::Filter -pub fn vortex_array::arrays::filter::FilterReduceAdaptor::reduce_parent(&self, array: &::Array, parent: &vortex_array::arrays::FilterArray, child_idx: usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::filter::FilterReduceAdaptor::reduce_parent(&self, array: &vortex_array::vtable::Array, parent: &vortex_array::arrays::FilterArray, child_idx: usize) -> vortex_error::VortexResult> impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_array::arrays::slice::SliceReduceAdaptor where V: vortex_array::arrays::slice::SliceReduce pub type vortex_array::arrays::slice::SliceReduceAdaptor::Parent = vortex_array::arrays::slice::Slice -pub fn vortex_array::arrays::slice::SliceReduceAdaptor::reduce_parent(&self, array: &::Array, parent: ::Match, child_idx: usize) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::slice::SliceReduceAdaptor::reduce_parent(&self, array: &vortex_array::vtable::Array, parent: ::Match, child_idx: usize) -> vortex_error::VortexResult> impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_array::scalar_fn::fns::between::BetweenReduceAdaptor where V: vortex_array::scalar_fn::fns::between::BetweenReduce pub type vortex_array::scalar_fn::fns::between::BetweenReduceAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::between::BetweenReduceAdaptor::reduce_parent(&self, array: &::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::between::Between>, child_idx: usize) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::between::BetweenReduceAdaptor::reduce_parent(&self, array: &vortex_array::vtable::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::between::Between>, child_idx: usize) -> vortex_error::VortexResult> impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_array::scalar_fn::fns::cast::CastReduceAdaptor where V: vortex_array::scalar_fn::fns::cast::CastReduce pub type vortex_array::scalar_fn::fns::cast::CastReduceAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::cast::CastReduceAdaptor::reduce_parent(&self, array: &::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::cast::Cast>, _child_idx: usize) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::cast::CastReduceAdaptor::reduce_parent(&self, array: &vortex_array::vtable::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::cast::Cast>, _child_idx: usize) -> vortex_error::VortexResult> impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_array::scalar_fn::fns::fill_null::FillNullReduceAdaptor where V: vortex_array::scalar_fn::fns::fill_null::FillNullReduce pub type vortex_array::scalar_fn::fns::fill_null::FillNullReduceAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::fill_null::FillNullReduceAdaptor::reduce_parent(&self, array: &::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::fill_null::FillNull>, child_idx: usize) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::fill_null::FillNullReduceAdaptor::reduce_parent(&self, array: &vortex_array::vtable::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::fill_null::FillNull>, child_idx: usize) -> vortex_error::VortexResult> impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_array::scalar_fn::fns::like::LikeReduceAdaptor where V: vortex_array::scalar_fn::fns::like::LikeReduce pub type vortex_array::scalar_fn::fns::like::LikeReduceAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::like::LikeReduceAdaptor::reduce_parent(&self, array: &::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::like::Like>, child_idx: usize) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::like::LikeReduceAdaptor::reduce_parent(&self, array: &vortex_array::vtable::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::like::Like>, child_idx: usize) -> vortex_error::VortexResult> impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_array::scalar_fn::fns::list_contains::ListContainsElementReduceAdaptor where V: vortex_array::scalar_fn::fns::list_contains::ListContainsElementReduce pub type vortex_array::scalar_fn::fns::list_contains::ListContainsElementReduceAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::list_contains::ListContainsElementReduceAdaptor::reduce_parent(&self, array: &::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::list_contains::ListContains>, child_idx: usize) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::list_contains::ListContainsElementReduceAdaptor::reduce_parent(&self, array: &vortex_array::vtable::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::list_contains::ListContains>, child_idx: usize) -> vortex_error::VortexResult> impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_array::scalar_fn::fns::mask::MaskReduceAdaptor where V: vortex_array::scalar_fn::fns::mask::MaskReduce pub type vortex_array::scalar_fn::fns::mask::MaskReduceAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::mask::MaskReduceAdaptor::reduce_parent(&self, array: &::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::mask::Mask>, child_idx: usize) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::mask::MaskReduceAdaptor::reduce_parent(&self, array: &vortex_array::vtable::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::mask::Mask>, child_idx: usize) -> vortex_error::VortexResult> impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_array::scalar_fn::fns::not::NotReduceAdaptor where V: vortex_array::scalar_fn::fns::not::NotReduce pub type vortex_array::scalar_fn::fns::not::NotReduceAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::not::NotReduceAdaptor::reduce_parent(&self, array: &::Array, _parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::not::Not>, _child_idx: usize) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::not::NotReduceAdaptor::reduce_parent(&self, array: &vortex_array::vtable::Array, _parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::not::Not>, _child_idx: usize) -> vortex_error::VortexResult> impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_array::scalar_fn::fns::zip::ZipReduceAdaptor where V: vortex_array::scalar_fn::fns::zip::ZipReduce pub type vortex_array::scalar_fn::fns::zip::ZipReduceAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::zip::ZipReduceAdaptor::reduce_parent(&self, array: &::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::zip::Zip>, child_idx: usize) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::zip::ZipReduceAdaptor::reduce_parent(&self, array: &vortex_array::vtable::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::zip::Zip>, child_idx: usize) -> vortex_error::VortexResult> pub trait vortex_array::optimizer::rules::ArrayReduceRule: core::fmt::Debug + core::marker::Send + core::marker::Sync + 'static -pub fn vortex_array::optimizer::rules::ArrayReduceRule::reduce(&self, array: &::Array) -> vortex_error::VortexResult> +pub fn vortex_array::optimizer::rules::ArrayReduceRule::reduce(&self, array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> pub trait vortex_array::optimizer::rules::DynArrayParentReduceRule: core::fmt::Debug + core::marker::Send + core::marker::Sync pub fn vortex_array::optimizer::rules::DynArrayParentReduceRule::matches(&self, parent: &vortex_array::ArrayRef) -> bool -pub fn vortex_array::optimizer::rules::DynArrayParentReduceRule::reduce_parent(&self, array: &::Array, parent: &vortex_array::ArrayRef, child_idx: usize) -> vortex_error::VortexResult> +pub fn vortex_array::optimizer::rules::DynArrayParentReduceRule::reduce_parent(&self, array: &vortex_array::vtable::Array, parent: &vortex_array::ArrayRef, child_idx: usize) -> vortex_error::VortexResult> impl> vortex_array::optimizer::rules::DynArrayParentReduceRule for vortex_array::optimizer::rules::ParentReduceRuleAdapter pub fn vortex_array::optimizer::rules::ParentReduceRuleAdapter::matches(&self, parent: &vortex_array::ArrayRef) -> bool -pub fn vortex_array::optimizer::rules::ParentReduceRuleAdapter::reduce_parent(&self, child: &::Array, parent: &vortex_array::ArrayRef, child_idx: usize) -> vortex_error::VortexResult> +pub fn vortex_array::optimizer::rules::ParentReduceRuleAdapter::reduce_parent(&self, child: &vortex_array::vtable::Array, parent: &vortex_array::ArrayRef, child_idx: usize) -> vortex_error::VortexResult> pub trait vortex_array::optimizer::ArrayOptimizer @@ -17112,7 +16690,7 @@ impl vortex_array::kernel::ExecuteParentKernel for vortex_array::scalar_fn pub type vortex_array::scalar_fn::fns::between::BetweenExecuteAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::between::BetweenExecuteAdaptor::execute_parent(&self, array: &::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::between::Between>, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::between::BetweenExecuteAdaptor::execute_parent(&self, array: &vortex_array::vtable::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::between::Between>, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> pub struct vortex_array::scalar_fn::fns::between::BetweenOptions @@ -17162,27 +16740,27 @@ impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_arra pub type vortex_array::scalar_fn::fns::between::BetweenReduceAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::between::BetweenReduceAdaptor::reduce_parent(&self, array: &::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::between::Between>, child_idx: usize) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::between::BetweenReduceAdaptor::reduce_parent(&self, array: &vortex_array::vtable::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::between::Between>, child_idx: usize) -> vortex_error::VortexResult> pub trait vortex_array::scalar_fn::fns::between::BetweenKernel: vortex_array::vtable::VTable -pub fn vortex_array::scalar_fn::fns::between::BetweenKernel::between(array: &Self::Array, lower: &vortex_array::ArrayRef, upper: &vortex_array::ArrayRef, options: &vortex_array::scalar_fn::fns::between::BetweenOptions, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::between::BetweenKernel::between(array: &vortex_array::vtable::Array, lower: &vortex_array::ArrayRef, upper: &vortex_array::ArrayRef, options: &vortex_array::scalar_fn::fns::between::BetweenOptions, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::between::BetweenKernel for vortex_array::arrays::Decimal -pub fn vortex_array::arrays::Decimal::between(arr: &vortex_array::arrays::DecimalArray, lower: &vortex_array::ArrayRef, upper: &vortex_array::ArrayRef, options: &vortex_array::scalar_fn::fns::between::BetweenOptions, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Decimal::between(arr: &vortex_array::vtable::Array, lower: &vortex_array::ArrayRef, upper: &vortex_array::ArrayRef, options: &vortex_array::scalar_fn::fns::between::BetweenOptions, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::between::BetweenKernel for vortex_array::arrays::Primitive -pub fn vortex_array::arrays::Primitive::between(arr: &vortex_array::arrays::PrimitiveArray, lower: &vortex_array::ArrayRef, upper: &vortex_array::ArrayRef, options: &vortex_array::scalar_fn::fns::between::BetweenOptions, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Primitive::between(arr: &vortex_array::vtable::Array, lower: &vortex_array::ArrayRef, upper: &vortex_array::ArrayRef, options: &vortex_array::scalar_fn::fns::between::BetweenOptions, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> pub trait vortex_array::scalar_fn::fns::between::BetweenReduce: vortex_array::vtable::VTable -pub fn vortex_array::scalar_fn::fns::between::BetweenReduce::between(array: &Self::Array, lower: &vortex_array::ArrayRef, upper: &vortex_array::ArrayRef, options: &vortex_array::scalar_fn::fns::between::BetweenOptions) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::between::BetweenReduce::between(array: &vortex_array::vtable::Array, lower: &vortex_array::ArrayRef, upper: &vortex_array::ArrayRef, options: &vortex_array::scalar_fn::fns::between::BetweenOptions) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::between::BetweenReduce for vortex_array::arrays::Constant -pub fn vortex_array::arrays::Constant::between(array: &vortex_array::arrays::ConstantArray, lower: &vortex_array::ArrayRef, upper: &vortex_array::ArrayRef, options: &vortex_array::scalar_fn::fns::between::BetweenOptions) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Constant::between(array: &vortex_array::vtable::Array, lower: &vortex_array::ArrayRef, upper: &vortex_array::ArrayRef, options: &vortex_array::scalar_fn::fns::between::BetweenOptions) -> vortex_error::VortexResult> pub mod vortex_array::scalar_fn::fns::binary @@ -17244,23 +16822,23 @@ impl vortex_array::kernel::ExecuteParentKernel for vortex_array::scalar_fn pub type vortex_array::scalar_fn::fns::binary::CompareExecuteAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::binary::CompareExecuteAdaptor::execute_parent(&self, array: &::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::binary::Binary>, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::binary::CompareExecuteAdaptor::execute_parent(&self, array: &vortex_array::vtable::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::binary::Binary>, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> pub trait vortex_array::scalar_fn::fns::binary::CompareKernel: vortex_array::vtable::VTable -pub fn vortex_array::scalar_fn::fns::binary::CompareKernel::compare(lhs: &Self::Array, rhs: &vortex_array::ArrayRef, operator: vortex_array::scalar_fn::fns::operators::CompareOperator, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::binary::CompareKernel::compare(lhs: &vortex_array::vtable::Array, rhs: &vortex_array::ArrayRef, operator: vortex_array::scalar_fn::fns::operators::CompareOperator, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::binary::CompareKernel for vortex_array::arrays::Extension -pub fn vortex_array::arrays::Extension::compare(lhs: &vortex_array::arrays::ExtensionArray, rhs: &vortex_array::ArrayRef, operator: vortex_array::scalar_fn::fns::operators::CompareOperator, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Extension::compare(lhs: &vortex_array::vtable::Array, rhs: &vortex_array::ArrayRef, operator: vortex_array::scalar_fn::fns::operators::CompareOperator, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::binary::CompareKernel for vortex_array::arrays::VarBin -pub fn vortex_array::arrays::VarBin::compare(lhs: &vortex_array::arrays::VarBinArray, rhs: &vortex_array::ArrayRef, operator: vortex_array::scalar_fn::fns::operators::CompareOperator, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBin::compare(lhs: &vortex_array::vtable::Array, rhs: &vortex_array::ArrayRef, operator: vortex_array::scalar_fn::fns::operators::CompareOperator, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::binary::CompareKernel for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::compare(lhs: &vortex_array::arrays::dict::DictArray, rhs: &vortex_array::ArrayRef, operator: vortex_array::scalar_fn::fns::operators::CompareOperator, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::compare(lhs: &vortex_array::vtable::Array, rhs: &vortex_array::ArrayRef, operator: vortex_array::scalar_fn::fns::operators::CompareOperator, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> pub fn vortex_array::scalar_fn::fns::binary::and_kleene(lhs: &vortex_array::ArrayRef, rhs: &vortex_array::ArrayRef) -> vortex_error::VortexResult @@ -17412,7 +16990,7 @@ impl vortex_array::kernel::ExecuteParentKernel for vortex_array::scalar_fn pub type vortex_array::scalar_fn::fns::cast::CastExecuteAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::cast::CastExecuteAdaptor::execute_parent(&self, array: &::Array, parent: ::Match, _child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::cast::CastExecuteAdaptor::execute_parent(&self, array: &vortex_array::vtable::Array, parent: ::Match, _child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> pub struct vortex_array::scalar_fn::fns::cast::CastReduceAdaptor(pub V) @@ -17428,27 +17006,27 @@ impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_arra pub type vortex_array::scalar_fn::fns::cast::CastReduceAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::cast::CastReduceAdaptor::reduce_parent(&self, array: &::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::cast::Cast>, _child_idx: usize) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::cast::CastReduceAdaptor::reduce_parent(&self, array: &vortex_array::vtable::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::cast::Cast>, _child_idx: usize) -> vortex_error::VortexResult> pub trait vortex_array::scalar_fn::fns::cast::CastKernel: vortex_array::vtable::VTable -pub fn vortex_array::scalar_fn::fns::cast::CastKernel::cast(array: &Self::Array, dtype: &vortex_array::dtype::DType, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::cast::CastKernel::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastKernel for vortex_array::arrays::Decimal -pub fn vortex_array::arrays::Decimal::cast(array: &vortex_array::arrays::DecimalArray, dtype: &vortex_array::dtype::DType, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Decimal::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastKernel for vortex_array::arrays::Primitive -pub fn vortex_array::arrays::Primitive::cast(array: &vortex_array::arrays::PrimitiveArray, dtype: &vortex_array::dtype::DType, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Primitive::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastKernel for vortex_array::arrays::Struct -pub fn vortex_array::arrays::Struct::cast(array: &vortex_array::arrays::StructArray, dtype: &vortex_array::dtype::DType, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Struct::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> pub trait vortex_array::scalar_fn::fns::cast::CastReduce: vortex_array::vtable::VTable -pub fn vortex_array::scalar_fn::fns::cast::CastReduce::cast(array: &Self::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::cast::CastReduce::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastReduce for vortex_array::arrays::Bool @@ -17456,43 +17034,43 @@ pub fn vortex_array::arrays::Bool::cast(array: &vortex_array::arrays::BoolArray, impl vortex_array::scalar_fn::fns::cast::CastReduce for vortex_array::arrays::Chunked -pub fn vortex_array::arrays::Chunked::cast(array: &vortex_array::arrays::ChunkedArray, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Chunked::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastReduce for vortex_array::arrays::Constant -pub fn vortex_array::arrays::Constant::cast(array: &vortex_array::arrays::ConstantArray, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Constant::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastReduce for vortex_array::arrays::Extension -pub fn vortex_array::arrays::Extension::cast(array: &vortex_array::arrays::ExtensionArray, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Extension::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastReduce for vortex_array::arrays::FixedSizeList -pub fn vortex_array::arrays::FixedSizeList::cast(array: &vortex_array::arrays::FixedSizeListArray, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::FixedSizeList::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastReduce for vortex_array::arrays::List -pub fn vortex_array::arrays::List::cast(array: &vortex_array::arrays::ListArray, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::List::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastReduce for vortex_array::arrays::ListView -pub fn vortex_array::arrays::ListView::cast(array: &vortex_array::arrays::ListViewArray, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::ListView::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastReduce for vortex_array::arrays::VarBin -pub fn vortex_array::arrays::VarBin::cast(array: &vortex_array::arrays::VarBinArray, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBin::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastReduce for vortex_array::arrays::VarBinView -pub fn vortex_array::arrays::VarBinView::cast(array: &vortex_array::arrays::VarBinViewArray, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBinView::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastReduce for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::cast(array: &vortex_array::arrays::dict::DictArray, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::cast::CastReduce for vortex_array::arrays::null::Null -pub fn vortex_array::arrays::null::Null::cast(array: &vortex_array::arrays::null::NullArray, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::null::Null::cast(array: &vortex_array::vtable::Array, dtype: &vortex_array::dtype::DType) -> vortex_error::VortexResult> pub mod vortex_array::scalar_fn::fns::dynamic @@ -17636,7 +17214,7 @@ impl vortex_array::kernel::ExecuteParentKernel for vortex_array::scalar_fn pub type vortex_array::scalar_fn::fns::fill_null::FillNullExecuteAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::fill_null::FillNullExecuteAdaptor::execute_parent(&self, array: &::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::fill_null::FillNull>, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::fill_null::FillNullExecuteAdaptor::execute_parent(&self, array: &vortex_array::vtable::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::fill_null::FillNull>, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> pub struct vortex_array::scalar_fn::fns::fill_null::FillNullReduceAdaptor(pub V) @@ -17652,11 +17230,11 @@ impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_arra pub type vortex_array::scalar_fn::fns::fill_null::FillNullReduceAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::fill_null::FillNullReduceAdaptor::reduce_parent(&self, array: &::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::fill_null::FillNull>, child_idx: usize) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::fill_null::FillNullReduceAdaptor::reduce_parent(&self, array: &vortex_array::vtable::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::fill_null::FillNull>, child_idx: usize) -> vortex_error::VortexResult> pub trait vortex_array::scalar_fn::fns::fill_null::FillNullKernel: vortex_array::vtable::VTable -pub fn vortex_array::scalar_fn::fns::fill_null::FillNullKernel::fill_null(array: &Self::Array, fill_value: &vortex_array::scalar::Scalar, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::fill_null::FillNullKernel::fill_null(array: &vortex_array::vtable::Array, fill_value: &vortex_array::scalar::Scalar, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::fill_null::FillNullKernel for vortex_array::arrays::Bool @@ -17664,27 +17242,27 @@ pub fn vortex_array::arrays::Bool::fill_null(array: &vortex_array::arrays::BoolA impl vortex_array::scalar_fn::fns::fill_null::FillNullKernel for vortex_array::arrays::Decimal -pub fn vortex_array::arrays::Decimal::fill_null(array: &vortex_array::arrays::DecimalArray, fill_value: &vortex_array::scalar::Scalar, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Decimal::fill_null(array: &vortex_array::vtable::Array, fill_value: &vortex_array::scalar::Scalar, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::fill_null::FillNullKernel for vortex_array::arrays::Primitive -pub fn vortex_array::arrays::Primitive::fill_null(array: &vortex_array::arrays::PrimitiveArray, fill_value: &vortex_array::scalar::Scalar, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Primitive::fill_null(array: &vortex_array::vtable::Array, fill_value: &vortex_array::scalar::Scalar, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::fill_null::FillNullKernel for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::fill_null(array: &vortex_array::arrays::dict::DictArray, fill_value: &vortex_array::scalar::Scalar, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::fill_null(array: &vortex_array::vtable::Array, fill_value: &vortex_array::scalar::Scalar, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> pub trait vortex_array::scalar_fn::fns::fill_null::FillNullReduce: vortex_array::vtable::VTable -pub fn vortex_array::scalar_fn::fns::fill_null::FillNullReduce::fill_null(array: &Self::Array, fill_value: &vortex_array::scalar::Scalar) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::fill_null::FillNullReduce::fill_null(array: &vortex_array::vtable::Array, fill_value: &vortex_array::scalar::Scalar) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::fill_null::FillNullReduce for vortex_array::arrays::Chunked -pub fn vortex_array::arrays::Chunked::fill_null(array: &vortex_array::arrays::ChunkedArray, fill_value: &vortex_array::scalar::Scalar) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Chunked::fill_null(array: &vortex_array::vtable::Array, fill_value: &vortex_array::scalar::Scalar) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::fill_null::FillNullReduce for vortex_array::arrays::Constant -pub fn vortex_array::arrays::Constant::fill_null(array: &vortex_array::arrays::ConstantArray, fill_value: &vortex_array::scalar::Scalar) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Constant::fill_null(array: &vortex_array::vtable::Array, fill_value: &vortex_array::scalar::Scalar) -> vortex_error::VortexResult> pub mod vortex_array::scalar_fn::fns::get_item @@ -17838,7 +17416,7 @@ impl vortex_array::kernel::ExecuteParentKernel for vortex_array::scalar_fn pub type vortex_array::scalar_fn::fns::like::LikeExecuteAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::like::LikeExecuteAdaptor::execute_parent(&self, array: &::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::like::Like>, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::like::LikeExecuteAdaptor::execute_parent(&self, array: &vortex_array::vtable::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::like::Like>, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> pub struct vortex_array::scalar_fn::fns::like::LikeOptions @@ -17890,19 +17468,19 @@ impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_arra pub type vortex_array::scalar_fn::fns::like::LikeReduceAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::like::LikeReduceAdaptor::reduce_parent(&self, array: &::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::like::Like>, child_idx: usize) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::like::LikeReduceAdaptor::reduce_parent(&self, array: &vortex_array::vtable::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::like::Like>, child_idx: usize) -> vortex_error::VortexResult> pub trait vortex_array::scalar_fn::fns::like::LikeKernel: vortex_array::vtable::VTable -pub fn vortex_array::scalar_fn::fns::like::LikeKernel::like(array: &Self::Array, pattern: &vortex_array::ArrayRef, options: vortex_array::scalar_fn::fns::like::LikeOptions, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::like::LikeKernel::like(array: &vortex_array::vtable::Array, pattern: &vortex_array::ArrayRef, options: vortex_array::scalar_fn::fns::like::LikeOptions, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> pub trait vortex_array::scalar_fn::fns::like::LikeReduce: vortex_array::vtable::VTable -pub fn vortex_array::scalar_fn::fns::like::LikeReduce::like(array: &Self::Array, pattern: &vortex_array::ArrayRef, options: vortex_array::scalar_fn::fns::like::LikeOptions) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::like::LikeReduce::like(array: &vortex_array::vtable::Array, pattern: &vortex_array::ArrayRef, options: vortex_array::scalar_fn::fns::like::LikeOptions) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::like::LikeReduce for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::like(array: &vortex_array::arrays::dict::DictArray, pattern: &vortex_array::ArrayRef, options: vortex_array::scalar_fn::fns::like::LikeOptions) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::like(array: &vortex_array::vtable::Array, pattern: &vortex_array::ArrayRef, options: vortex_array::scalar_fn::fns::like::LikeOptions) -> vortex_error::VortexResult> pub mod vortex_array::scalar_fn::fns::list_contains @@ -17964,7 +17542,7 @@ impl vortex_array::kernel::ExecuteParentKernel for vortex_array::scalar_fn pub type vortex_array::scalar_fn::fns::list_contains::ListContainsElementExecuteAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::list_contains::ListContainsElementExecuteAdaptor::execute_parent(&self, array: &::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::list_contains::ListContains>, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::list_contains::ListContainsElementExecuteAdaptor::execute_parent(&self, array: &vortex_array::vtable::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::list_contains::ListContains>, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> pub struct vortex_array::scalar_fn::fns::list_contains::ListContainsElementReduceAdaptor(pub V) @@ -17980,15 +17558,15 @@ impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_arra pub type vortex_array::scalar_fn::fns::list_contains::ListContainsElementReduceAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::list_contains::ListContainsElementReduceAdaptor::reduce_parent(&self, array: &::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::list_contains::ListContains>, child_idx: usize) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::list_contains::ListContainsElementReduceAdaptor::reduce_parent(&self, array: &vortex_array::vtable::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::list_contains::ListContains>, child_idx: usize) -> vortex_error::VortexResult> pub trait vortex_array::scalar_fn::fns::list_contains::ListContainsElementKernel: vortex_array::vtable::VTable -pub fn vortex_array::scalar_fn::fns::list_contains::ListContainsElementKernel::list_contains(list: &vortex_array::ArrayRef, element: &Self::Array, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::list_contains::ListContainsElementKernel::list_contains(list: &vortex_array::ArrayRef, element: &vortex_array::vtable::Array, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> pub trait vortex_array::scalar_fn::fns::list_contains::ListContainsElementReduce: vortex_array::vtable::VTable -pub fn vortex_array::scalar_fn::fns::list_contains::ListContainsElementReduce::list_contains(list: &vortex_array::ArrayRef, element: &Self::Array) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::list_contains::ListContainsElementReduce::list_contains(list: &vortex_array::ArrayRef, element: &vortex_array::vtable::Array) -> vortex_error::VortexResult> pub mod vortex_array::scalar_fn::fns::literal @@ -18096,7 +17674,7 @@ impl vortex_array::kernel::ExecuteParentKernel for vortex_array::scalar_fn pub type vortex_array::scalar_fn::fns::mask::MaskExecuteAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::mask::MaskExecuteAdaptor::execute_parent(&self, array: &::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::mask::Mask>, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::mask::MaskExecuteAdaptor::execute_parent(&self, array: &vortex_array::vtable::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::mask::Mask>, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> pub struct vortex_array::scalar_fn::fns::mask::MaskReduceAdaptor(pub V) @@ -18112,19 +17690,19 @@ impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_arra pub type vortex_array::scalar_fn::fns::mask::MaskReduceAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::mask::MaskReduceAdaptor::reduce_parent(&self, array: &::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::mask::Mask>, child_idx: usize) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::mask::MaskReduceAdaptor::reduce_parent(&self, array: &vortex_array::vtable::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::mask::Mask>, child_idx: usize) -> vortex_error::VortexResult> pub trait vortex_array::scalar_fn::fns::mask::MaskKernel: vortex_array::vtable::VTable -pub fn vortex_array::scalar_fn::fns::mask::MaskKernel::mask(array: &Self::Array, mask: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::mask::MaskKernel::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskKernel for vortex_array::arrays::Chunked -pub fn vortex_array::arrays::Chunked::mask(array: &vortex_array::arrays::ChunkedArray, mask: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Chunked::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> pub trait vortex_array::scalar_fn::fns::mask::MaskReduce: vortex_array::vtable::VTable -pub fn vortex_array::scalar_fn::fns::mask::MaskReduce::mask(array: &Self::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::mask::MaskReduce::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::Bool @@ -18132,51 +17710,51 @@ pub fn vortex_array::arrays::Bool::mask(array: &vortex_array::arrays::BoolArray, impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::Decimal -pub fn vortex_array::arrays::Decimal::mask(array: &vortex_array::arrays::DecimalArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Decimal::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::Extension -pub fn vortex_array::arrays::Extension::mask(array: &vortex_array::arrays::ExtensionArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Extension::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::FixedSizeList -pub fn vortex_array::arrays::FixedSizeList::mask(array: &vortex_array::arrays::FixedSizeListArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::FixedSizeList::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::List -pub fn vortex_array::arrays::List::mask(array: &vortex_array::arrays::ListArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::List::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::ListView -pub fn vortex_array::arrays::ListView::mask(array: &vortex_array::arrays::ListViewArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::ListView::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::Masked -pub fn vortex_array::arrays::Masked::mask(array: &vortex_array::arrays::MaskedArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Masked::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::Primitive -pub fn vortex_array::arrays::Primitive::mask(array: &vortex_array::arrays::PrimitiveArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Primitive::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::Struct -pub fn vortex_array::arrays::Struct::mask(array: &vortex_array::arrays::StructArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Struct::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::VarBin -pub fn vortex_array::arrays::VarBin::mask(array: &vortex_array::arrays::VarBinArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBin::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::VarBinView -pub fn vortex_array::arrays::VarBinView::mask(array: &vortex_array::arrays::VarBinViewArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBinView::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::mask(array: &vortex_array::arrays::dict::DictArray, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::dict::Dict::mask(array: &vortex_array::vtable::Array, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::mask::MaskReduce for vortex_array::arrays::null::Null -pub fn vortex_array::arrays::null::Null::mask(array: &vortex_array::arrays::null::NullArray, _mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::null::Null::mask(array: &vortex_array::vtable::Array, _mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> pub mod vortex_array::scalar_fn::fns::merge @@ -18320,7 +17898,7 @@ impl vortex_array::kernel::ExecuteParentKernel for vortex_array::scalar_fn pub type vortex_array::scalar_fn::fns::not::NotExecuteAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::not::NotExecuteAdaptor::execute_parent(&self, array: &::Array, _parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::not::Not>, _child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::not::NotExecuteAdaptor::execute_parent(&self, array: &vortex_array::vtable::Array, _parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::not::Not>, _child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> pub struct vortex_array::scalar_fn::fns::not::NotReduceAdaptor(pub V) @@ -18336,19 +17914,19 @@ impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_arra pub type vortex_array::scalar_fn::fns::not::NotReduceAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::not::NotReduceAdaptor::reduce_parent(&self, array: &::Array, _parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::not::Not>, _child_idx: usize) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::not::NotReduceAdaptor::reduce_parent(&self, array: &vortex_array::vtable::Array, _parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::not::Not>, _child_idx: usize) -> vortex_error::VortexResult> pub trait vortex_array::scalar_fn::fns::not::NotKernel: vortex_array::vtable::VTable -pub fn vortex_array::scalar_fn::fns::not::NotKernel::invert(array: &Self::Array, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::not::NotKernel::invert(array: &vortex_array::vtable::Array, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> pub trait vortex_array::scalar_fn::fns::not::NotReduce: vortex_array::vtable::VTable -pub fn vortex_array::scalar_fn::fns::not::NotReduce::invert(array: &Self::Array) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::not::NotReduce::invert(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::not::NotReduce for vortex_array::arrays::Constant -pub fn vortex_array::arrays::Constant::invert(array: &vortex_array::arrays::ConstantArray) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Constant::invert(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> pub mod vortex_array::scalar_fn::fns::operators @@ -18784,7 +18362,7 @@ impl vortex_array::kernel::ExecuteParentKernel for vortex_array::scalar_fn pub type vortex_array::scalar_fn::fns::zip::ZipExecuteAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::zip::ZipExecuteAdaptor::execute_parent(&self, array: &::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::zip::Zip>, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::zip::ZipExecuteAdaptor::execute_parent(&self, array: &vortex_array::vtable::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::zip::Zip>, child_idx: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> pub struct vortex_array::scalar_fn::fns::zip::ZipReduceAdaptor(pub V) @@ -18800,27 +18378,27 @@ impl vortex_array::optimizer::rules::ArrayParentReduceRule for vortex_arra pub type vortex_array::scalar_fn::fns::zip::ZipReduceAdaptor::Parent = vortex_array::arrays::scalar_fn::ExactScalarFn -pub fn vortex_array::scalar_fn::fns::zip::ZipReduceAdaptor::reduce_parent(&self, array: &::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::zip::Zip>, child_idx: usize) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::zip::ZipReduceAdaptor::reduce_parent(&self, array: &vortex_array::vtable::Array, parent: vortex_array::arrays::scalar_fn::ScalarFnArrayView<'_, vortex_array::scalar_fn::fns::zip::Zip>, child_idx: usize) -> vortex_error::VortexResult> pub trait vortex_array::scalar_fn::fns::zip::ZipKernel: vortex_array::vtable::VTable -pub fn vortex_array::scalar_fn::fns::zip::ZipKernel::zip(array: &Self::Array, if_false: &vortex_array::ArrayRef, mask: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::zip::ZipKernel::zip(array: &vortex_array::vtable::Array, if_false: &vortex_array::ArrayRef, mask: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::zip::ZipKernel for vortex_array::arrays::Chunked -pub fn vortex_array::arrays::Chunked::zip(if_true: &vortex_array::arrays::ChunkedArray, if_false: &vortex_array::ArrayRef, mask: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Chunked::zip(if_true: &vortex_array::vtable::Array, if_false: &vortex_array::ArrayRef, mask: &vortex_array::ArrayRef, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::zip::ZipKernel for vortex_array::arrays::Struct -pub fn vortex_array::arrays::Struct::zip(if_true: &vortex_array::arrays::StructArray, if_false: &vortex_array::ArrayRef, mask: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::Struct::zip(if_true: &vortex_array::vtable::Array, if_false: &vortex_array::ArrayRef, mask: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> impl vortex_array::scalar_fn::fns::zip::ZipKernel for vortex_array::arrays::VarBinView -pub fn vortex_array::arrays::VarBinView::zip(if_true: &vortex_array::arrays::VarBinViewArray, if_false: &vortex_array::ArrayRef, mask: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> +pub fn vortex_array::arrays::VarBinView::zip(if_true: &vortex_array::vtable::Array, if_false: &vortex_array::ArrayRef, mask: &vortex_array::ArrayRef, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult> pub trait vortex_array::scalar_fn::fns::zip::ZipReduce: vortex_array::vtable::VTable -pub fn vortex_array::scalar_fn::fns::zip::ZipReduce::zip(array: &Self::Array, if_false: &vortex_array::ArrayRef, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> +pub fn vortex_array::scalar_fn::fns::zip::ZipReduce::zip(array: &vortex_array::vtable::Array, if_false: &vortex_array::ArrayRef, mask: &vortex_array::ArrayRef) -> vortex_error::VortexResult> pub mod vortex_array::scalar_fn::session @@ -19076,29 +18654,17 @@ pub fn vortex_array::ArrayRef::node_dtype(&self) -> vortex_error::VortexResult core::option::Option<&vortex_array::scalar_fn::ScalarFnRef> -impl vortex_array::scalar_fn::ReduceNode for vortex_array::arrays::scalar_fn::ScalarFnArray +impl vortex_array::scalar_fn::ReduceNode for vortex_array::arrays::ScalarFnData -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::as_any(&self) -> &dyn core::any::Any +pub fn vortex_array::arrays::ScalarFnData::as_any(&self) -> &dyn core::any::Any -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::child(&self, idx: usize) -> vortex_array::scalar_fn::ReduceNodeRef +pub fn vortex_array::arrays::ScalarFnData::child(&self, idx: usize) -> vortex_array::scalar_fn::ReduceNodeRef -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::child_count(&self) -> usize +pub fn vortex_array::arrays::ScalarFnData::child_count(&self) -> usize -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::node_dtype(&self) -> vortex_error::VortexResult +pub fn vortex_array::arrays::ScalarFnData::node_dtype(&self) -> vortex_error::VortexResult -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::scalar_fn(&self) -> core::option::Option<&vortex_array::scalar_fn::ScalarFnRef> - -impl vortex_array::scalar_fn::ReduceNode for vortex_array::ArrayAdapter - -pub fn vortex_array::ArrayAdapter::as_any(&self) -> &dyn core::any::Any - -pub fn vortex_array::ArrayAdapter::child(&self, idx: usize) -> vortex_array::scalar_fn::ReduceNodeRef - -pub fn vortex_array::ArrayAdapter::child_count(&self) -> usize - -pub fn vortex_array::ArrayAdapter::node_dtype(&self) -> vortex_error::VortexResult - -pub fn vortex_array::ArrayAdapter::scalar_fn(&self) -> core::option::Option<&vortex_array::scalar_fn::ScalarFnRef> +pub fn vortex_array::arrays::ScalarFnData::scalar_fn(&self) -> core::option::Option<&vortex_array::scalar_fn::ScalarFnRef> impl vortex_array::scalar_fn::ReduceNode for vortex_array::vtable::Array @@ -20362,273 +19928,633 @@ pub struct vortex_array::stats::TypedStatsSetRef<'a, 'b> pub vortex_array::stats::TypedStatsSetRef::dtype: &'b vortex_array::dtype::DType -pub vortex_array::stats::TypedStatsSetRef::values: &'a vortex_array::stats::StatsSet +pub vortex_array::stats::TypedStatsSetRef::values: &'a vortex_array::stats::StatsSet + +impl vortex_array::expr::stats::StatsProvider for vortex_array::stats::TypedStatsSetRef<'_, '_> + +pub fn vortex_array::stats::TypedStatsSetRef<'_, '_>::get(&self, stat: vortex_array::expr::stats::Stat) -> core::option::Option> + +pub fn vortex_array::stats::TypedStatsSetRef<'_, '_>::is_empty(&self) -> bool + +pub fn vortex_array::stats::TypedStatsSetRef<'_, '_>::len(&self) -> usize + +pub const vortex_array::stats::PRUNING_STATS: &[vortex_array::expr::stats::Stat] + +pub fn vortex_array::stats::as_stat_bitset_bytes(stats: &[vortex_array::expr::stats::Stat]) -> alloc::vec::Vec + +pub fn vortex_array::stats::stats_from_bitset_bytes(bytes: &[u8]) -> alloc::vec::Vec + +pub mod vortex_array::stream + +pub struct vortex_array::stream::ArrayStreamAdapter + +impl vortex_array::stream::ArrayStreamAdapter where S: futures_core::stream::Stream> + +pub fn vortex_array::stream::ArrayStreamAdapter::new(dtype: vortex_array::dtype::DType, inner: S) -> Self + +impl<'__pin, S> core::marker::Unpin for vortex_array::stream::ArrayStreamAdapter where pin_project_lite::__private::PinnedFieldsOf<__Origin<'__pin, S>>: core::marker::Unpin + +impl futures_core::stream::Stream for vortex_array::stream::ArrayStreamAdapter where S: futures_core::stream::Stream> + +pub type vortex_array::stream::ArrayStreamAdapter::Item = core::result::Result, vortex_error::VortexError> + +pub fn vortex_array::stream::ArrayStreamAdapter::poll_next(self: core::pin::Pin<&mut Self>, cx: &mut core::task::wake::Context<'_>) -> core::task::poll::Poll> + +pub fn vortex_array::stream::ArrayStreamAdapter::size_hint(&self) -> (usize, core::option::Option) + +impl vortex_array::stream::ArrayStream for vortex_array::stream::ArrayStreamAdapter where S: futures_core::stream::Stream> + +pub fn vortex_array::stream::ArrayStreamAdapter::dtype(&self) -> &vortex_array::dtype::DType + +pub trait vortex_array::stream::ArrayStream: futures_core::stream::Stream> + +pub fn vortex_array::stream::ArrayStream::dtype(&self) -> &vortex_array::dtype::DType + +impl vortex_array::stream::ArrayStream for vortex_array::stream::SendableArrayStream + +pub fn vortex_array::stream::SendableArrayStream::dtype(&self) -> &vortex_array::dtype::DType + +impl vortex_array::stream::ArrayStream for vortex_array::stream::ArrayStreamAdapter where S: futures_core::stream::Stream> + +pub fn vortex_array::stream::ArrayStreamAdapter::dtype(&self) -> &vortex_array::dtype::DType + +pub trait vortex_array::stream::ArrayStreamExt: vortex_array::stream::ArrayStream + +pub fn vortex_array::stream::ArrayStreamExt::boxed(self) -> vortex_array::stream::SendableArrayStream where Self: core::marker::Sized + core::marker::Send + 'static + +pub fn vortex_array::stream::ArrayStreamExt::read_all(self) -> impl core::future::future::Future> where Self: core::marker::Sized + +impl vortex_array::stream::ArrayStreamExt for S + +pub fn S::boxed(self) -> vortex_array::stream::SendableArrayStream where Self: core::marker::Sized + core::marker::Send + 'static + +pub fn S::read_all(self) -> impl core::future::future::Future> where Self: core::marker::Sized + +pub type vortex_array::stream::SendableArrayStream = core::pin::Pin> + +pub mod vortex_array::validity + +pub enum vortex_array::validity::Validity + +pub vortex_array::validity::Validity::AllInvalid + +pub vortex_array::validity::Validity::AllValid + +pub vortex_array::validity::Validity::Array(vortex_array::ArrayRef) + +pub vortex_array::validity::Validity::NonNullable + +impl vortex_array::validity::Validity + +pub const vortex_array::validity::Validity::DTYPE: vortex_array::dtype::DType + +pub fn vortex_array::validity::Validity::and(self, rhs: vortex_array::validity::Validity) -> vortex_error::VortexResult + +pub fn vortex_array::validity::Validity::as_array(&self) -> core::option::Option<&vortex_array::ArrayRef> + +pub fn vortex_array::validity::Validity::cast_nullability(self, nullability: vortex_array::dtype::Nullability, len: usize) -> vortex_error::VortexResult + +pub fn vortex_array::validity::Validity::copy_from_array(array: &vortex_array::ArrayRef) -> vortex_error::VortexResult + +pub fn vortex_array::validity::Validity::execute_mask(&self, length: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult + +pub fn vortex_array::validity::Validity::filter(&self, mask: &vortex_mask::Mask) -> vortex_error::VortexResult + +pub fn vortex_array::validity::Validity::into_array(self) -> core::option::Option + +pub fn vortex_array::validity::Validity::into_non_nullable(self, len: usize) -> core::option::Option + +pub fn vortex_array::validity::Validity::into_nullable(self) -> vortex_array::validity::Validity + +pub fn vortex_array::validity::Validity::is_null(&self, index: usize) -> vortex_error::VortexResult + +pub fn vortex_array::validity::Validity::is_valid(&self, index: usize) -> vortex_error::VortexResult + +pub fn vortex_array::validity::Validity::mask_eq(&self, other: &vortex_array::validity::Validity, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult + +pub fn vortex_array::validity::Validity::maybe_len(&self) -> core::option::Option + +pub fn vortex_array::validity::Validity::not(&self) -> vortex_error::VortexResult + +pub fn vortex_array::validity::Validity::nullability(&self) -> vortex_array::dtype::Nullability + +pub fn vortex_array::validity::Validity::patch(self, len: usize, indices_offset: usize, indices: &vortex_array::ArrayRef, patches: &vortex_array::validity::Validity, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult + +pub fn vortex_array::validity::Validity::slice(&self, range: core::ops::range::Range) -> vortex_error::VortexResult + +pub fn vortex_array::validity::Validity::take(&self, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult + +pub fn vortex_array::validity::Validity::to_array(&self, len: usize) -> vortex_array::ArrayRef + +pub fn vortex_array::validity::Validity::to_mask(&self, length: usize) -> vortex_mask::Mask + +pub fn vortex_array::validity::Validity::uncompressed_size(&self) -> usize + +pub fn vortex_array::validity::Validity::union_nullability(self, nullability: vortex_array::dtype::Nullability) -> Self + +impl vortex_array::validity::Validity + +pub fn vortex_array::validity::Validity::execute(self, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult + +impl vortex_array::validity::Validity + +pub fn vortex_array::validity::Validity::from_bit_buffer(buffer: vortex_buffer::bit::buf::BitBuffer, nullability: vortex_array::dtype::Nullability) -> Self + +pub fn vortex_array::validity::Validity::from_mask(mask: vortex_mask::Mask, nullability: vortex_array::dtype::Nullability) -> Self + +impl core::clone::Clone for vortex_array::validity::Validity + +pub fn vortex_array::validity::Validity::clone(&self) -> vortex_array::validity::Validity + +impl core::convert::From<&vortex_array::dtype::Nullability> for vortex_array::validity::Validity + +pub fn vortex_array::validity::Validity::from(value: &vortex_array::dtype::Nullability) -> Self + +impl core::convert::From for vortex_array::validity::Validity + +pub fn vortex_array::validity::Validity::from(value: vortex_array::dtype::Nullability) -> Self + +impl core::convert::From for vortex_array::validity::Validity + +pub fn vortex_array::validity::Validity::from(value: vortex_buffer::bit::buf::BitBuffer) -> Self + +impl core::fmt::Debug for vortex_array::validity::Validity + +pub fn vortex_array::validity::Validity::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result + +impl core::iter::traits::collect::FromIterator for vortex_array::validity::Validity + +pub fn vortex_array::validity::Validity::from_iter>(iter: T) -> Self + +impl core::iter::traits::collect::FromIterator for vortex_array::validity::Validity + +pub fn vortex_array::validity::Validity::from_iter>(iter: T) -> Self + +impl vortex_array::ArrayEq for vortex_array::validity::Validity + +pub fn vortex_array::validity::Validity::array_eq(&self, other: &Self, precision: vortex_array::Precision) -> bool + +impl vortex_array::ArrayHash for vortex_array::validity::Validity + +pub fn vortex_array::validity::Validity::array_hash(&self, state: &mut H, precision: vortex_array::Precision) + +pub mod vortex_array::variants + +pub struct vortex_array::variants::BinaryTyped<'a>(_) + +pub struct vortex_array::variants::BoolTyped<'a>(_) + +impl vortex_array::variants::BoolTyped<'_> + +pub fn vortex_array::variants::BoolTyped<'_>::true_count(&self) -> vortex_error::VortexResult + +pub struct vortex_array::variants::DecimalTyped<'a>(_) + +pub struct vortex_array::variants::ExtensionTyped<'a>(_) + +impl vortex_array::variants::ExtensionTyped<'_> + +pub fn vortex_array::variants::ExtensionTyped<'_>::ext_dtype(&self) -> &vortex_array::dtype::extension::ExtDTypeRef + +pub struct vortex_array::variants::ListTyped<'a>(_) + +pub struct vortex_array::variants::NullTyped<'a>(_) + +pub struct vortex_array::variants::PrimitiveTyped<'a>(_) + +impl vortex_array::variants::PrimitiveTyped<'_> + +pub fn vortex_array::variants::PrimitiveTyped<'_>::ptype(&self) -> vortex_array::dtype::PType + +pub fn vortex_array::variants::PrimitiveTyped<'_>::value(&self, idx: usize) -> vortex_error::VortexResult> + +pub fn vortex_array::variants::PrimitiveTyped<'_>::value_unchecked(&self, idx: usize) -> vortex_error::VortexResult + +impl vortex_array::search_sorted::IndexOrd> for vortex_array::variants::PrimitiveTyped<'_> + +pub fn vortex_array::variants::PrimitiveTyped<'_>::index_cmp(&self, idx: usize, elem: &core::option::Option) -> vortex_error::VortexResult> + +pub fn vortex_array::variants::PrimitiveTyped<'_>::index_ge(&self, idx: usize, elem: &V) -> vortex_error::VortexResult + +pub fn vortex_array::variants::PrimitiveTyped<'_>::index_gt(&self, idx: usize, elem: &V) -> vortex_error::VortexResult + +pub fn vortex_array::variants::PrimitiveTyped<'_>::index_le(&self, idx: usize, elem: &V) -> vortex_error::VortexResult + +pub fn vortex_array::variants::PrimitiveTyped<'_>::index_len(&self) -> usize + +pub fn vortex_array::variants::PrimitiveTyped<'_>::index_lt(&self, idx: usize, elem: &V) -> vortex_error::VortexResult + +impl vortex_array::search_sorted::IndexOrd for vortex_array::variants::PrimitiveTyped<'_> + +pub fn vortex_array::variants::PrimitiveTyped<'_>::index_cmp(&self, idx: usize, elem: &vortex_array::scalar::PValue) -> vortex_error::VortexResult> + +pub fn vortex_array::variants::PrimitiveTyped<'_>::index_ge(&self, idx: usize, elem: &V) -> vortex_error::VortexResult + +pub fn vortex_array::variants::PrimitiveTyped<'_>::index_gt(&self, idx: usize, elem: &V) -> vortex_error::VortexResult + +pub fn vortex_array::variants::PrimitiveTyped<'_>::index_le(&self, idx: usize, elem: &V) -> vortex_error::VortexResult + +pub fn vortex_array::variants::PrimitiveTyped<'_>::index_len(&self) -> usize + +pub fn vortex_array::variants::PrimitiveTyped<'_>::index_lt(&self, idx: usize, elem: &V) -> vortex_error::VortexResult + +pub struct vortex_array::variants::StructTyped<'a>(_) + +impl vortex_array::variants::StructTyped<'_> + +pub fn vortex_array::variants::StructTyped<'_>::dtypes(&self) -> alloc::vec::Vec + +pub fn vortex_array::variants::StructTyped<'_>::names(&self) -> &vortex_array::dtype::FieldNames + +pub fn vortex_array::variants::StructTyped<'_>::nfields(&self) -> usize + +pub struct vortex_array::variants::Utf8Typed<'a>(_) + +pub mod vortex_array::vtable + +pub struct vortex_array::vtable::Array + +impl vortex_array::vtable::Array + +pub fn vortex_array::vtable::Array::from_indices>(length: usize, indices: I, validity: vortex_array::validity::Validity) -> Self + +pub fn vortex_array::vtable::Array::into_bit_buffer(self) -> vortex_buffer::bit::buf::BitBuffer + +pub fn vortex_array::vtable::Array::into_parts(self) -> vortex_array::arrays::bool::BoolArrayParts + +pub fn vortex_array::vtable::Array::new(bits: vortex_buffer::bit::buf::BitBuffer, validity: vortex_array::validity::Validity) -> Self + +pub fn vortex_array::vtable::Array::new_handle(handle: vortex_array::buffer::BufferHandle, offset: usize, len: usize, validity: vortex_array::validity::Validity) -> Self + +pub unsafe fn vortex_array::vtable::Array::new_unchecked(bits: vortex_buffer::bit::buf::BitBuffer, validity: vortex_array::validity::Validity) -> Self + +pub fn vortex_array::vtable::Array::try_new(bits: vortex_buffer::bit::buf::BitBuffer, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult + +pub fn vortex_array::vtable::Array::try_new_from_handle(bits: vortex_array::buffer::BufferHandle, offset: usize, len: usize, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult + +pub fn vortex_array::vtable::Array::validate(bits: &vortex_buffer::bit::buf::BitBuffer, validity: &vortex_array::validity::Validity) -> vortex_error::VortexResult<()> + +impl vortex_array::vtable::Array + +pub fn vortex_array::vtable::Array::patch(self, patches: &vortex_array::patches::Patches, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult + +impl vortex_array::vtable::Array + +pub unsafe fn vortex_array::vtable::Array::new_unchecked(chunks: alloc::vec::Vec, dtype: vortex_array::dtype::DType) -> Self + +pub fn vortex_array::vtable::Array::try_new(chunks: alloc::vec::Vec, dtype: vortex_array::dtype::DType) -> vortex_error::VortexResult + +impl vortex_array::vtable::Array + +pub fn vortex_array::vtable::Array::new(scalar: S, len: usize) -> Self where S: core::convert::Into + +impl vortex_array::vtable::Array + +pub fn vortex_array::vtable::Array::from_iter>(iter: I, decimal_dtype: vortex_array::dtype::DecimalDType) -> Self + +pub fn vortex_array::vtable::Array::from_option_iter>>(iter: I, decimal_dtype: vortex_array::dtype::DecimalDType) -> Self + +pub fn vortex_array::vtable::Array::new(buffer: vortex_buffer::buffer::Buffer, decimal_dtype: vortex_array::dtype::DecimalDType, validity: vortex_array::validity::Validity) -> Self + +pub fn vortex_array::vtable::Array::new_handle(values: vortex_array::buffer::BufferHandle, values_type: vortex_array::dtype::DecimalType, decimal_dtype: vortex_array::dtype::DecimalDType, validity: vortex_array::validity::Validity) -> Self + +pub unsafe fn vortex_array::vtable::Array::new_unchecked(buffer: vortex_buffer::buffer::Buffer, decimal_dtype: vortex_array::dtype::DecimalDType, validity: vortex_array::validity::Validity) -> Self + +pub unsafe fn vortex_array::vtable::Array::new_unchecked_handle(values: vortex_array::buffer::BufferHandle, values_type: vortex_array::dtype::DecimalType, decimal_dtype: vortex_array::dtype::DecimalDType, validity: vortex_array::validity::Validity) -> Self + +pub fn vortex_array::vtable::Array::try_new(buffer: vortex_buffer::buffer::Buffer, decimal_dtype: vortex_array::dtype::DecimalDType, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult + +impl vortex_array::vtable::Array + +pub fn vortex_array::vtable::Array::new(ext_dtype: vortex_array::dtype::extension::ExtDTypeRef, storage_array: vortex_array::ArrayRef) -> Self + +pub fn vortex_array::vtable::Array::try_new(ext_dtype: vortex_array::dtype::extension::ExtDTypeRef, storage_array: vortex_array::ArrayRef) -> vortex_error::VortexResult + +impl vortex_array::vtable::Array + +pub fn vortex_array::vtable::Array::new(array: vortex_array::ArrayRef, mask: vortex_mask::Mask) -> Self + +pub fn vortex_array::vtable::Array::try_new(array: vortex_array::ArrayRef, mask: vortex_mask::Mask) -> vortex_error::VortexResult + +impl vortex_array::vtable::Array + +pub fn vortex_array::vtable::Array::new(elements: vortex_array::ArrayRef, list_size: u32, validity: vortex_array::validity::Validity, len: usize) -> Self + +pub unsafe fn vortex_array::vtable::Array::new_unchecked(elements: vortex_array::ArrayRef, list_size: u32, validity: vortex_array::validity::Validity, len: usize) -> Self + +pub fn vortex_array::vtable::Array::try_new(elements: vortex_array::ArrayRef, list_size: u32, validity: vortex_array::validity::Validity, len: usize) -> vortex_error::VortexResult + +impl vortex_array::vtable::Array + +pub fn vortex_array::vtable::Array::new(elements: vortex_array::ArrayRef, offsets: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> Self + +pub unsafe fn vortex_array::vtable::Array::new_unchecked(elements: vortex_array::ArrayRef, offsets: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> Self + +pub fn vortex_array::vtable::Array::try_new(elements: vortex_array::ArrayRef, offsets: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult + +impl vortex_array::vtable::Array + +pub fn vortex_array::vtable::Array::new(elements: vortex_array::ArrayRef, offsets: vortex_array::ArrayRef, sizes: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> Self + +pub unsafe fn vortex_array::vtable::Array::new_unchecked(elements: vortex_array::ArrayRef, offsets: vortex_array::ArrayRef, sizes: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> Self + +pub fn vortex_array::vtable::Array::try_new(elements: vortex_array::ArrayRef, offsets: vortex_array::ArrayRef, sizes: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult + +pub unsafe fn vortex_array::vtable::Array::with_zero_copy_to_list(self, is_zctl: bool) -> Self + +impl vortex_array::vtable::Array + +pub fn vortex_array::vtable::Array::rebuild(&self, mode: vortex_array::arrays::listview::ListViewRebuildMode) -> vortex_error::VortexResult + +impl vortex_array::vtable::Array + +pub fn vortex_array::vtable::Array::try_new(child: vortex_array::ArrayRef, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult + +impl vortex_array::vtable::Array + +pub fn vortex_array::vtable::Array::as_slice(&self) -> &[T] + +pub fn vortex_array::vtable::Array::narrow(&self) -> vortex_error::VortexResult + +pub fn vortex_array::vtable::Array::reinterpret_cast(&self, ptype: vortex_array::dtype::PType) -> Self + +impl vortex_array::vtable::Array + +pub fn vortex_array::vtable::Array::empty(nullability: vortex_array::dtype::Nullability) -> Self + +pub fn vortex_array::vtable::Array::from_buffer_handle(handle: vortex_array::buffer::BufferHandle, ptype: vortex_array::dtype::PType, validity: vortex_array::validity::Validity) -> Self + +pub fn vortex_array::vtable::Array::from_byte_buffer(buffer: vortex_buffer::ByteBuffer, ptype: vortex_array::dtype::PType, validity: vortex_array::validity::Validity) -> Self + +pub fn vortex_array::vtable::Array::from_values_byte_buffer(valid_elems_buffer: vortex_buffer::ByteBuffer, ptype: vortex_array::dtype::PType, validity: vortex_array::validity::Validity, n_rows: usize) -> Self + +pub fn vortex_array::vtable::Array::new(buffer: impl core::convert::Into>, validity: vortex_array::validity::Validity) -> Self -impl vortex_array::expr::stats::StatsProvider for vortex_array::stats::TypedStatsSetRef<'_, '_> +pub unsafe fn vortex_array::vtable::Array::new_unchecked(buffer: vortex_buffer::buffer::Buffer, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::stats::TypedStatsSetRef<'_, '_>::get(&self, stat: vortex_array::expr::stats::Stat) -> core::option::Option> +pub unsafe fn vortex_array::vtable::Array::new_unchecked_from_handle(handle: vortex_array::buffer::BufferHandle, ptype: vortex_array::dtype::PType, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::stats::TypedStatsSetRef<'_, '_>::is_empty(&self) -> bool +pub fn vortex_array::vtable::Array::try_new(buffer: vortex_buffer::buffer::Buffer, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult -pub fn vortex_array::stats::TypedStatsSetRef<'_, '_>::len(&self) -> usize +pub fn vortex_array::vtable::Array::validate(buffer: &vortex_buffer::buffer::Buffer, validity: &vortex_array::validity::Validity) -> vortex_error::VortexResult<()> -pub const vortex_array::stats::PRUNING_STATS: &[vortex_array::expr::stats::Stat] +impl vortex_array::vtable::Array -pub fn vortex_array::stats::as_stat_bitset_bytes(stats: &[vortex_array::expr::stats::Stat]) -> alloc::vec::Vec +pub fn vortex_array::vtable::Array::from_option_iter>>(iter: I) -> Self -pub fn vortex_array::stats::stats_from_bitset_bytes(bytes: &[u8]) -> alloc::vec::Vec +pub fn vortex_array::vtable::Array::into_buffer(self) -> vortex_buffer::buffer::Buffer -pub mod vortex_array::stream +pub fn vortex_array::vtable::Array::into_buffer_mut(self) -> vortex_buffer::buffer_mut::BufferMut -pub struct vortex_array::stream::ArrayStreamAdapter +pub fn vortex_array::vtable::Array::to_buffer(&self) -> vortex_buffer::buffer::Buffer -impl vortex_array::stream::ArrayStreamAdapter where S: futures_core::stream::Stream> +pub fn vortex_array::vtable::Array::try_into_buffer_mut(self) -> core::result::Result, vortex_buffer::buffer::Buffer> -pub fn vortex_array::stream::ArrayStreamAdapter::new(dtype: vortex_array::dtype::DType, inner: S) -> Self +impl vortex_array::vtable::Array -impl<'__pin, S> core::marker::Unpin for vortex_array::stream::ArrayStreamAdapter where pin_project_lite::__private::PinnedFieldsOf<__Origin<'__pin, S>>: core::marker::Unpin +pub fn vortex_array::vtable::Array::patch(self, patches: &vortex_array::patches::Patches, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult -impl futures_core::stream::Stream for vortex_array::stream::ArrayStreamAdapter where S: futures_core::stream::Stream> +impl vortex_array::vtable::Array -pub type vortex_array::stream::ArrayStreamAdapter::Item = core::result::Result, vortex_error::VortexError> +pub fn vortex_array::vtable::Array::top_value(&self) -> vortex_error::VortexResult> -pub fn vortex_array::stream::ArrayStreamAdapter::poll_next(self: core::pin::Pin<&mut Self>, cx: &mut core::task::wake::Context<'_>) -> core::task::poll::Poll> +impl vortex_array::vtable::Array -pub fn vortex_array::stream::ArrayStreamAdapter::size_hint(&self) -> (usize, core::option::Option) +pub fn vortex_array::vtable::Array::new(source: vortex_array::ArrayRef) -> Self -impl vortex_array::stream::ArrayStream for vortex_array::stream::ArrayStreamAdapter where S: futures_core::stream::Stream> +impl vortex_array::vtable::Array -pub fn vortex_array::stream::ArrayStreamAdapter::dtype(&self) -> &vortex_array::dtype::DType +pub fn vortex_array::vtable::Array::from_fields>(items: &[(N, vortex_array::ArrayRef)]) -> vortex_error::VortexResult -pub trait vortex_array::stream::ArrayStream: futures_core::stream::Stream> +pub fn vortex_array::vtable::Array::into_parts(self) -> vortex_array::arrays::struct_::StructArrayParts -pub fn vortex_array::stream::ArrayStream::dtype(&self) -> &vortex_array::dtype::DType +pub fn vortex_array::vtable::Array::new(names: vortex_array::dtype::FieldNames, fields: impl core::convert::Into>, length: usize, validity: vortex_array::validity::Validity) -> Self -impl vortex_array::stream::ArrayStream for vortex_array::stream::SendableArrayStream +pub fn vortex_array::vtable::Array::new_fieldless_with_len(len: usize) -> Self -pub fn vortex_array::stream::SendableArrayStream::dtype(&self) -> &vortex_array::dtype::DType +pub unsafe fn vortex_array::vtable::Array::new_unchecked(fields: impl core::convert::Into>, dtype: vortex_array::dtype::StructFields, length: usize, validity: vortex_array::validity::Validity) -> Self -impl vortex_array::stream::ArrayStream for vortex_array::stream::ArrayStreamAdapter where S: futures_core::stream::Stream> +pub fn vortex_array::vtable::Array::try_from_iter, A: vortex_array::IntoArray, T: core::iter::traits::collect::IntoIterator>(iter: T) -> vortex_error::VortexResult -pub fn vortex_array::stream::ArrayStreamAdapter::dtype(&self) -> &vortex_array::dtype::DType +pub fn vortex_array::vtable::Array::try_from_iter_with_validity, A: vortex_array::IntoArray, T: core::iter::traits::collect::IntoIterator>(iter: T, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult -pub trait vortex_array::stream::ArrayStreamExt: vortex_array::stream::ArrayStream +pub fn vortex_array::vtable::Array::try_new(names: vortex_array::dtype::FieldNames, fields: impl core::convert::Into>, length: usize, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult -pub fn vortex_array::stream::ArrayStreamExt::boxed(self) -> vortex_array::stream::SendableArrayStream where Self: core::marker::Sized + core::marker::Send + 'static +pub fn vortex_array::vtable::Array::try_new_with_dtype(fields: impl core::convert::Into>, dtype: vortex_array::dtype::StructFields, length: usize, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult -pub fn vortex_array::stream::ArrayStreamExt::read_all(self) -> impl core::future::future::Future> where Self: core::marker::Sized +impl vortex_array::vtable::Array -impl vortex_array::stream::ArrayStreamExt for S +pub fn vortex_array::vtable::Array::into_record_batch_with_schema(self, schema: impl core::convert::AsRef) -> vortex_error::VortexResult -pub fn S::boxed(self) -> vortex_array::stream::SendableArrayStream where Self: core::marker::Sized + core::marker::Send + 'static +impl vortex_array::vtable::Array -pub fn S::read_all(self) -> impl core::future::future::Future> where Self: core::marker::Sized +pub fn vortex_array::vtable::Array::from_bytes(value: alloc::vec::Vec<&[u8]>) -> Self -pub type vortex_array::stream::SendableArrayStream = core::pin::Pin> +pub fn vortex_array::vtable::Array::from_iter, I: core::iter::traits::collect::IntoIterator>>(iter: I, dtype: vortex_array::dtype::DType) -> Self -pub mod vortex_array::validity +pub fn vortex_array::vtable::Array::from_iter_nonnull, I: core::iter::traits::collect::IntoIterator>(iter: I, dtype: vortex_array::dtype::DType) -> Self -pub enum vortex_array::validity::Validity +pub fn vortex_array::vtable::Array::from_nullable_bytes(value: alloc::vec::Vec>) -> Self -pub vortex_array::validity::Validity::AllInvalid +pub fn vortex_array::vtable::Array::from_nullable_strs(value: alloc::vec::Vec>) -> Self -pub vortex_array::validity::Validity::AllValid +pub fn vortex_array::vtable::Array::from_strs(value: alloc::vec::Vec<&str>) -> Self -pub vortex_array::validity::Validity::Array(vortex_array::ArrayRef) +pub fn vortex_array::vtable::Array::from_vec>(vec: alloc::vec::Vec, dtype: vortex_array::dtype::DType) -> Self -pub vortex_array::validity::Validity::NonNullable +impl vortex_array::vtable::Array -impl vortex_array::validity::Validity +pub fn vortex_array::vtable::Array::new(offsets: vortex_array::ArrayRef, bytes: vortex_buffer::ByteBuffer, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self -pub const vortex_array::validity::Validity::DTYPE: vortex_array::dtype::DType +pub unsafe fn vortex_array::vtable::Array::new_unchecked(offsets: vortex_array::ArrayRef, bytes: vortex_buffer::ByteBuffer, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::validity::Validity::and(self, rhs: vortex_array::validity::Validity) -> vortex_error::VortexResult +pub unsafe fn vortex_array::vtable::Array::new_unchecked_from_handle(offsets: vortex_array::ArrayRef, bytes: vortex_array::buffer::BufferHandle, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::validity::Validity::as_array(&self) -> core::option::Option<&vortex_array::ArrayRef> +pub fn vortex_array::vtable::Array::try_new(offsets: vortex_array::ArrayRef, bytes: vortex_buffer::ByteBuffer, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult -pub fn vortex_array::validity::Validity::cast_nullability(self, nullability: vortex_array::dtype::Nullability, len: usize) -> vortex_error::VortexResult +impl vortex_array::vtable::Array -pub fn vortex_array::validity::Validity::copy_from_array(array: &vortex_array::ArrayRef) -> vortex_error::VortexResult +pub fn vortex_array::vtable::Array::compact_buffers(&self) -> vortex_error::VortexResult -pub fn vortex_array::validity::Validity::execute_mask(&self, length: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::vtable::Array::compact_with_threshold(&self, buffer_utilization_threshold: f64) -> vortex_error::VortexResult -pub fn vortex_array::validity::Validity::filter(&self, mask: &vortex_mask::Mask) -> vortex_error::VortexResult +impl vortex_array::vtable::Array -pub fn vortex_array::validity::Validity::into_array(self) -> core::option::Option +pub fn vortex_array::vtable::Array::from_iter, I: core::iter::traits::collect::IntoIterator>>(iter: I, dtype: vortex_array::dtype::DType) -> Self -pub fn vortex_array::validity::Validity::into_non_nullable(self, len: usize) -> core::option::Option +pub fn vortex_array::vtable::Array::from_iter_bin, I: core::iter::traits::collect::IntoIterator>(iter: I) -> Self -pub fn vortex_array::validity::Validity::into_nullable(self) -> vortex_array::validity::Validity +pub fn vortex_array::vtable::Array::from_iter_nullable_bin, I: core::iter::traits::collect::IntoIterator>>(iter: I) -> Self -pub fn vortex_array::validity::Validity::is_null(&self, index: usize) -> vortex_error::VortexResult +pub fn vortex_array::vtable::Array::from_iter_nullable_str, I: core::iter::traits::collect::IntoIterator>>(iter: I) -> Self -pub fn vortex_array::validity::Validity::is_valid(&self, index: usize) -> vortex_error::VortexResult +pub fn vortex_array::vtable::Array::from_iter_str, I: core::iter::traits::collect::IntoIterator>(iter: I) -> Self -pub fn vortex_array::validity::Validity::mask_eq(&self, other: &vortex_array::validity::Validity, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::vtable::Array::new_handle(views: vortex_array::buffer::BufferHandle, buffers: alloc::sync::Arc<[vortex_array::buffer::BufferHandle]>, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::validity::Validity::maybe_len(&self) -> core::option::Option +pub unsafe fn vortex_array::vtable::Array::new_handle_unchecked(views: vortex_array::buffer::BufferHandle, buffers: alloc::sync::Arc<[vortex_array::buffer::BufferHandle]>, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::validity::Validity::not(&self) -> vortex_error::VortexResult +pub unsafe fn vortex_array::vtable::Array::new_unchecked(views: vortex_buffer::buffer::Buffer, buffers: alloc::sync::Arc<[vortex_buffer::ByteBuffer]>, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self -pub fn vortex_array::validity::Validity::nullability(&self) -> vortex_array::dtype::Nullability +pub fn vortex_array::vtable::Array::try_new(views: vortex_buffer::buffer::Buffer, buffers: alloc::sync::Arc<[vortex_buffer::ByteBuffer]>, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> vortex_error::VortexResult -pub fn vortex_array::validity::Validity::patch(self, len: usize, indices_offset: usize, indices: &vortex_array::ArrayRef, patches: &vortex_array::validity::Validity, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +impl vortex_array::vtable::Array -pub fn vortex_array::validity::Validity::slice(&self, range: core::ops::range::Range) -> vortex_error::VortexResult +pub fn vortex_array::vtable::Array::new(child: vortex_array::ArrayRef) -> Self -pub fn vortex_array::validity::Validity::take(&self, indices: &vortex_array::ArrayRef) -> vortex_error::VortexResult +impl vortex_array::vtable::Array -pub fn vortex_array::validity::Validity::to_array(&self, len: usize) -> vortex_array::ArrayRef +pub fn vortex_array::vtable::Array::new(codes: vortex_array::ArrayRef, values: vortex_array::ArrayRef) -> Self -pub fn vortex_array::validity::Validity::uncompressed_size(&self) -> usize +pub unsafe fn vortex_array::vtable::Array::new_unchecked(codes: vortex_array::ArrayRef, values: vortex_array::ArrayRef) -> Self -pub fn vortex_array::validity::Validity::union_nullability(self, nullability: vortex_array::dtype::Nullability) -> Self +pub unsafe fn vortex_array::vtable::Array::set_all_values_referenced(self, all_values_referenced: bool) -> Self -impl vortex_array::validity::Validity +pub fn vortex_array::vtable::Array::try_new(codes: vortex_array::ArrayRef, values: vortex_array::ArrayRef) -> vortex_error::VortexResult -pub fn vortex_array::validity::Validity::execute(self, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +impl vortex_array::vtable::Array -impl vortex_array::validity::Validity +pub fn vortex_array::vtable::Array::new(len: usize) -> Self -pub fn vortex_array::validity::Validity::from_bit_buffer(buffer: vortex_buffer::bit::buf::BitBuffer, nullability: vortex_array::dtype::Nullability) -> Self +impl vortex_array::vtable::Array -pub fn vortex_array::validity::Validity::from_mask(mask: vortex_mask::Mask, nullability: vortex_array::dtype::Nullability) -> Self +pub fn vortex_array::vtable::Array::children(&self) -> &[vortex_array::ArrayRef] -impl core::clone::Clone for vortex_array::validity::Validity +pub fn vortex_array::vtable::Array::scalar_fn(&self) -> &vortex_array::scalar_fn::ScalarFnRef -pub fn vortex_array::validity::Validity::clone(&self) -> vortex_array::validity::Validity +pub fn vortex_array::vtable::Array::try_new(scalar_fn: vortex_array::scalar_fn::ScalarFnRef, children: alloc::vec::Vec, len: usize) -> vortex_error::VortexResult -impl core::convert::From<&vortex_array::dtype::Nullability> for vortex_array::validity::Validity +impl vortex_array::vtable::Array -pub fn vortex_array::validity::Validity::from(value: &vortex_array::dtype::Nullability) -> Self +pub fn vortex_array::vtable::Array::new(child: vortex_array::ArrayRef, range: core::ops::range::Range) -> Self -impl core::convert::From for vortex_array::validity::Validity +pub fn vortex_array::vtable::Array::try_new(child: vortex_array::ArrayRef, range: core::ops::range::Range) -> vortex_error::VortexResult -pub fn vortex_array::validity::Validity::from(value: vortex_array::dtype::Nullability) -> Self +impl vortex_array::vtable::Array where ::Array: vortex_array::vtable::ValidityHelper -impl core::convert::From for vortex_array::validity::Validity +pub fn vortex_array::vtable::Array::validity(&self) -> &vortex_array::validity::Validity -pub fn vortex_array::validity::Validity::from(value: vortex_buffer::bit::buf::BitBuffer) -> Self +pub fn vortex_array::vtable::Array::validity_mask(&self) -> vortex_mask::Mask -impl core::fmt::Debug for vortex_array::validity::Validity +impl vortex_array::vtable::Array -pub fn vortex_array::validity::Validity::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub fn vortex_array::vtable::Array::all_invalid(&self) -> vortex_error::VortexResult -impl core::iter::traits::collect::FromIterator for vortex_array::validity::Validity +pub fn vortex_array::vtable::Array::all_valid(&self) -> vortex_error::VortexResult -pub fn vortex_array::validity::Validity::from_iter>(iter: T) -> Self +pub fn vortex_array::vtable::Array::filter(&self, mask: vortex_mask::Mask) -> vortex_error::VortexResult -impl core::iter::traits::collect::FromIterator for vortex_array::validity::Validity +pub fn vortex_array::vtable::Array::is_invalid(&self, index: usize) -> vortex_error::VortexResult -pub fn vortex_array::validity::Validity::from_iter>(iter: T) -> Self +pub fn vortex_array::vtable::Array::is_valid(&self, index: usize) -> vortex_error::VortexResult -impl vortex_array::ArrayEq for vortex_array::validity::Validity +pub fn vortex_array::vtable::Array::scalar_at(&self, index: usize) -> vortex_error::VortexResult -pub fn vortex_array::validity::Validity::array_eq(&self, other: &Self, precision: vortex_array::Precision) -> bool +pub fn vortex_array::vtable::Array::slice(&self, range: core::ops::range::Range) -> vortex_error::VortexResult -impl vortex_array::ArrayHash for vortex_array::validity::Validity +pub fn vortex_array::vtable::Array::take(&self, indices: vortex_array::ArrayRef) -> vortex_error::VortexResult -pub fn vortex_array::validity::Validity::array_hash(&self, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::vtable::Array::to_canonical(&self) -> vortex_error::VortexResult -pub mod vortex_array::variants +impl vortex_array::vtable::Array -pub struct vortex_array::variants::BinaryTyped<'a>(_) +pub fn vortex_array::vtable::Array::array_stats(&self) -> &vortex_array::stats::ArrayStats -pub struct vortex_array::variants::BoolTyped<'a>(_) +pub fn vortex_array::vtable::Array::dtype(&self) -> &vortex_array::dtype::DType -impl vortex_array::variants::BoolTyped<'_> +pub fn vortex_array::vtable::Array::encoding_id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::variants::BoolTyped<'_>::true_count(&self) -> vortex_error::VortexResult +pub fn vortex_array::vtable::Array::from_inner(array: ::Array) -> Self -pub struct vortex_array::variants::DecimalTyped<'a>(_) +pub unsafe fn vortex_array::vtable::Array::from_parts_unchecked(vtable: V, dtype: vortex_array::dtype::DType, len: usize, array: ::Array, stats: vortex_array::stats::ArrayStats) -> Self -pub struct vortex_array::variants::ExtensionTyped<'a>(_) +pub fn vortex_array::vtable::Array::inner(&self) -> &::Array -impl vortex_array::variants::ExtensionTyped<'_> +pub fn vortex_array::vtable::Array::into_inner(self) -> ::Array -pub fn vortex_array::variants::ExtensionTyped<'_>::ext_dtype(&self) -> &vortex_array::dtype::extension::ExtDTypeRef +pub fn vortex_array::vtable::Array::is_empty(&self) -> bool -pub struct vortex_array::variants::ListTyped<'a>(_) +pub fn vortex_array::vtable::Array::len(&self) -> usize -pub struct vortex_array::variants::NullTyped<'a>(_) +pub fn vortex_array::vtable::Array::statistics(&self) -> vortex_array::stats::StatsSetRef<'_> -pub struct vortex_array::variants::PrimitiveTyped<'a>(_) +pub fn vortex_array::vtable::Array::to_array_ref(&self) -> vortex_array::ArrayRef -impl vortex_array::variants::PrimitiveTyped<'_> +pub fn vortex_array::vtable::Array::typed_vtable(&self) -> &V -pub fn vortex_array::variants::PrimitiveTyped<'_>::ptype(&self) -> vortex_array::dtype::PType +impl core::convert::From> for vortex_array::vtable::Array -pub fn vortex_array::variants::PrimitiveTyped<'_>::value(&self, idx: usize) -> vortex_error::VortexResult> +pub fn vortex_array::vtable::Array::from(value: alloc::vec::Vec<&[u8]>) -> Self -pub fn vortex_array::variants::PrimitiveTyped<'_>::value_unchecked(&self, idx: usize) -> vortex_error::VortexResult +impl core::convert::From> for vortex_array::vtable::Array -impl vortex_array::search_sorted::IndexOrd> for vortex_array::variants::PrimitiveTyped<'_> +pub fn vortex_array::vtable::Array::from(value: alloc::vec::Vec<&str>) -> Self -pub fn vortex_array::variants::PrimitiveTyped<'_>::index_cmp(&self, idx: usize, elem: &core::option::Option) -> vortex_error::VortexResult> +impl core::convert::From> for vortex_array::vtable::Array -pub fn vortex_array::variants::PrimitiveTyped<'_>::index_ge(&self, idx: usize, elem: &V) -> vortex_error::VortexResult +pub fn vortex_array::vtable::Array::from(value: alloc::vec::Vec) -> Self -pub fn vortex_array::variants::PrimitiveTyped<'_>::index_gt(&self, idx: usize, elem: &V) -> vortex_error::VortexResult +impl core::convert::From>> for vortex_array::vtable::Array -pub fn vortex_array::variants::PrimitiveTyped<'_>::index_le(&self, idx: usize, elem: &V) -> vortex_error::VortexResult +pub fn vortex_array::vtable::Array::from(value: alloc::vec::Vec>) -> Self -pub fn vortex_array::variants::PrimitiveTyped<'_>::index_len(&self) -> usize +impl core::convert::From>> for vortex_array::vtable::Array -pub fn vortex_array::variants::PrimitiveTyped<'_>::index_lt(&self, idx: usize, elem: &V) -> vortex_error::VortexResult +pub fn vortex_array::vtable::Array::from(value: alloc::vec::Vec>) -> Self -impl vortex_array::search_sorted::IndexOrd for vortex_array::variants::PrimitiveTyped<'_> +impl core::convert::From>> for vortex_array::vtable::Array -pub fn vortex_array::variants::PrimitiveTyped<'_>::index_cmp(&self, idx: usize, elem: &vortex_array::scalar::PValue) -> vortex_error::VortexResult> +pub fn vortex_array::vtable::Array::from(value: alloc::vec::Vec>) -> Self -pub fn vortex_array::variants::PrimitiveTyped<'_>::index_ge(&self, idx: usize, elem: &V) -> vortex_error::VortexResult +impl core::convert::From>> for vortex_array::vtable::Array -pub fn vortex_array::variants::PrimitiveTyped<'_>::index_gt(&self, idx: usize, elem: &V) -> vortex_error::VortexResult +pub fn vortex_array::vtable::Array::from(value: alloc::vec::Vec>) -> Self -pub fn vortex_array::variants::PrimitiveTyped<'_>::index_le(&self, idx: usize, elem: &V) -> vortex_error::VortexResult +impl core::convert::From>>> for vortex_array::vtable::Array -pub fn vortex_array::variants::PrimitiveTyped<'_>::index_len(&self) -> usize +pub fn vortex_array::vtable::Array::from(value: alloc::vec::Vec>>) -> Self -pub fn vortex_array::variants::PrimitiveTyped<'_>::index_lt(&self, idx: usize, elem: &V) -> vortex_error::VortexResult +impl core::convert::TryFrom> for vortex_array::arrays::datetime::TemporalData -pub struct vortex_array::variants::StructTyped<'a>(_) +pub type vortex_array::arrays::datetime::TemporalData::Error = vortex_error::VortexError -impl vortex_array::variants::StructTyped<'_> +pub fn vortex_array::arrays::datetime::TemporalData::try_from(ext: vortex_array::arrays::ExtensionArray) -> core::result::Result -pub fn vortex_array::variants::StructTyped<'_>::dtypes(&self) -> alloc::vec::Vec +impl core::iter::traits::collect::FromIterator> for vortex_array::vtable::Array -pub fn vortex_array::variants::StructTyped<'_>::names(&self) -> &vortex_array::dtype::FieldNames +pub fn vortex_array::vtable::Array::from_iter>(iter: T) -> Self -pub fn vortex_array::variants::StructTyped<'_>::nfields(&self) -> usize +impl core::iter::traits::collect::FromIterator> for vortex_array::vtable::Array -pub struct vortex_array::variants::Utf8Typed<'a>(_) +pub fn vortex_array::vtable::Array::from_iter>>(iter: T) -> Self -pub mod vortex_array::vtable +impl core::iter::traits::collect::FromIterator> for vortex_array::vtable::Array -pub struct vortex_array::vtable::Array +pub fn vortex_array::vtable::Array::from_iter>>(iter: T) -> Self -impl vortex_array::vtable::Array +impl core::iter::traits::collect::FromIterator>> for vortex_array::vtable::Array -pub fn vortex_array::vtable::Array::array_stats(&self) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::vtable::Array::from_iter>>>(iter: T) -> Self -pub fn vortex_array::vtable::Array::dtype(&self) -> &vortex_array::dtype::DType +impl core::iter::traits::collect::FromIterator>> for vortex_array::vtable::Array -pub fn vortex_array::vtable::Array::encoding_id(&self) -> vortex_array::vtable::ArrayId +pub fn vortex_array::vtable::Array::from_iter>>>(iter: T) -> Self -pub fn vortex_array::vtable::Array::inner(&self) -> &::Array +impl<'a> core::iter::traits::collect::FromIterator> for vortex_array::vtable::Array -pub fn vortex_array::vtable::Array::into_inner(self) -> ::Array +pub fn vortex_array::vtable::Array::from_iter>>(iter: T) -> Self -pub fn vortex_array::vtable::Array::is_empty(&self) -> bool +impl<'a> core::iter::traits::collect::FromIterator> for vortex_array::vtable::Array -pub fn vortex_array::vtable::Array::len(&self) -> usize +pub fn vortex_array::vtable::Array::from_iter>>(iter: T) -> Self -pub unsafe fn vortex_array::vtable::Array::new_unchecked(vtable: V, dtype: vortex_array::dtype::DType, len: usize, array: ::Array, stats: vortex_array::stats::ArrayStats) -> Self +impl<'a> core::iter::traits::collect::FromIterator> for vortex_array::vtable::Array -pub fn vortex_array::vtable::Array::statistics(&self) -> vortex_array::stats::StatsSetRef<'_> +pub fn vortex_array::vtable::Array::from_iter>>(iter: T) -> Self -pub fn vortex_array::vtable::Array::to_array_ref(&self) -> vortex_array::ArrayRef +impl<'a> core::iter::traits::collect::FromIterator> for vortex_array::vtable::Array -pub fn vortex_array::vtable::Array::typed_vtable(&self) -> &V +pub fn vortex_array::vtable::Array::from_iter>>(iter: T) -> Self impl core::clone::Clone for vortex_array::vtable::Array @@ -20648,6 +20574,10 @@ pub type vortex_array::vtable::Array::Target = ::deref(&self) -> &::Array +impl core::ops::deref::DerefMut for vortex_array::vtable::Array + +pub fn vortex_array::vtable::Array::deref_mut(&mut self) -> &mut ::Array + impl vortex_array::ArrayEq for vortex_array::vtable::Array pub fn vortex_array::vtable::Array::array_eq(&self, other: &Self, precision: vortex_array::Precision) -> bool @@ -20754,35 +20684,35 @@ pub struct vortex_array::vtable::NotSupported impl vortex_array::vtable::OperationsVTable for vortex_array::vtable::NotSupported -pub fn vortex_array::vtable::NotSupported::scalar_at(array: &::Array, _index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::vtable::NotSupported::scalar_at(array: &vortex_array::vtable::Array, _index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult pub struct vortex_array::vtable::ValidityVTableFromChild impl vortex_array::vtable::ValidityVTable for vortex_array::vtable::ValidityVTableFromChild where V: vortex_array::vtable::ValidityChild + vortex_array::vtable::VTable -pub fn vortex_array::vtable::ValidityVTableFromChild::validity(array: &::Array) -> vortex_error::VortexResult +pub fn vortex_array::vtable::ValidityVTableFromChild::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult pub struct vortex_array::vtable::ValidityVTableFromChildSliceHelper impl vortex_array::vtable::ValidityVTable for vortex_array::vtable::ValidityVTableFromChildSliceHelper where ::Array: vortex_array::vtable::ValidityChildSliceHelper -pub fn vortex_array::vtable::ValidityVTableFromChildSliceHelper::validity(array: &::Array) -> vortex_error::VortexResult +pub fn vortex_array::vtable::ValidityVTableFromChildSliceHelper::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult pub struct vortex_array::vtable::ValidityVTableFromValidityHelper impl vortex_array::vtable::ValidityVTable for vortex_array::vtable::ValidityVTableFromValidityHelper where ::Array: vortex_array::vtable::ValidityHelper -pub fn vortex_array::vtable::ValidityVTableFromValidityHelper::validity(array: &::Array) -> vortex_error::VortexResult +pub fn vortex_array::vtable::ValidityVTableFromValidityHelper::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult pub struct vortex_array::vtable::ValidityVTableFromValiditySliceHelper impl vortex_array::vtable::ValidityVTable for vortex_array::vtable::ValidityVTableFromValiditySliceHelper where ::Array: vortex_array::vtable::ValiditySliceHelper -pub fn vortex_array::vtable::ValidityVTableFromValiditySliceHelper::validity(array: &::Array) -> vortex_error::VortexResult +pub fn vortex_array::vtable::ValidityVTableFromValiditySliceHelper::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult pub trait vortex_array::vtable::ArrayVTable: 'static + core::clone::Clone + core::marker::Sized + core::marker::Send + core::marker::Sync + core::fmt::Debug -pub type vortex_array::vtable::ArrayVTable::Array: 'static + core::marker::Send + core::marker::Sync + core::clone::Clone + core::fmt::Debug + core::ops::deref::Deref + vortex_array::IntoArray +pub type vortex_array::vtable::ArrayVTable::Array: 'static + core::marker::Send + core::marker::Sync + core::clone::Clone + core::fmt::Debug + vortex_array::IntoArray pub type vortex_array::vtable::ArrayVTable::Metadata: core::fmt::Debug @@ -20790,21 +20720,21 @@ pub type vortex_array::vtable::ArrayVTable::OperationsVTable: vortex_array::vtab pub type vortex_array::vtable::ArrayVTable::ValidityVTable: vortex_array::vtable::ValidityVTable -pub fn vortex_array::vtable::ArrayVTable::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::vtable::ArrayVTable::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::vtable::ArrayVTable::array_eq(array: &Self::Array, other: &Self::Array, precision: vortex_array::Precision) -> bool +pub fn vortex_array::vtable::ArrayVTable::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::vtable::ArrayVTable::array_hash(array: &Self::Array, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::vtable::ArrayVTable::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::vtable::ArrayVTable::buffer(array: &Self::Array, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::vtable::ArrayVTable::buffer(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::vtable::ArrayVTable::buffer_name(array: &Self::Array, idx: usize) -> core::option::Option +pub fn vortex_array::vtable::ArrayVTable::buffer_name(array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option pub fn vortex_array::vtable::ArrayVTable::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::vtable::ArrayVTable::child(array: &Self::Array, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::vtable::ArrayVTable::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::vtable::ArrayVTable::child_name(array: &Self::Array, idx: usize) -> alloc::string::String +pub fn vortex_array::vtable::ArrayVTable::child_name(array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::vtable::ArrayVTable::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult @@ -20818,11 +20748,11 @@ pub fn vortex_array::vtable::ArrayVTable::id(&self) -> vortex_array::vtable::Arr pub fn vortex_array::vtable::ArrayVTable::len(array: &Self::Array) -> usize -pub fn vortex_array::vtable::ArrayVTable::metadata(array: &Self::Array) -> vortex_error::VortexResult +pub fn vortex_array::vtable::ArrayVTable::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::vtable::ArrayVTable::nbuffers(array: &Self::Array) -> usize +pub fn vortex_array::vtable::ArrayVTable::nbuffers(array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::vtable::ArrayVTable::nchildren(array: &Self::Array) -> usize +pub fn vortex_array::vtable::ArrayVTable::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::vtable::ArrayVTable::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -20838,7 +20768,7 @@ pub fn vortex_array::vtable::ArrayVTable::with_children(array: &mut Self::Array, impl vortex_array::vtable::VTable for vortex_array::arrays::Bool -pub type vortex_array::arrays::Bool::Array = vortex_array::arrays::BoolArray +pub type vortex_array::arrays::Bool::Array = vortex_array::arrays::BoolData pub type vortex_array::arrays::Bool::Metadata = vortex_array::ProstMetadata @@ -20846,25 +20776,25 @@ pub type vortex_array::arrays::Bool::OperationsVTable = vortex_array::arrays::Bo pub type vortex_array::arrays::Bool::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::Bool::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Bool::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Bool::array_eq(array: &vortex_array::arrays::BoolArray, other: &vortex_array::arrays::BoolArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Bool::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Bool::array_hash(array: &vortex_array::arrays::BoolArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Bool::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Bool::buffer(array: &vortex_array::arrays::BoolArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Bool::buffer(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Bool::buffer_name(_array: &vortex_array::arrays::BoolArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Bool::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Bool::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Bool::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Bool::child(array: &vortex_array::arrays::BoolArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Bool::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Bool::child_name(_array: &vortex_array::arrays::BoolArray, _idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Bool::child_name(_array: &vortex_array::vtable::Array, _idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Bool::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Bool::dtype(array: &vortex_array::arrays::BoolArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Bool::dtype(array: &vortex_array::arrays::BoolData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Bool::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -20872,13 +20802,13 @@ pub fn vortex_array::arrays::Bool::execute_parent(array: &vortex_array::vtable:: pub fn vortex_array::arrays::Bool::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Bool::len(array: &vortex_array::arrays::BoolArray) -> usize +pub fn vortex_array::arrays::Bool::len(array: &vortex_array::arrays::BoolData) -> usize -pub fn vortex_array::arrays::Bool::metadata(array: &vortex_array::arrays::BoolArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Bool::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Bool::nbuffers(_array: &vortex_array::arrays::BoolArray) -> usize +pub fn vortex_array::arrays::Bool::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Bool::nchildren(array: &vortex_array::arrays::BoolArray) -> usize +pub fn vortex_array::arrays::Bool::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Bool::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -20886,7 +20816,7 @@ pub fn vortex_array::arrays::Bool::reduce_parent(array: &vortex_array::vtable::A pub fn vortex_array::arrays::Bool::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Bool::stats(array: &vortex_array::arrays::BoolArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Bool::stats(array: &vortex_array::arrays::BoolData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Bool::vtable(_array: &Self::Array) -> &Self @@ -20894,7 +20824,7 @@ pub fn vortex_array::arrays::Bool::with_children(array: &mut Self::Array, childr impl vortex_array::vtable::VTable for vortex_array::arrays::Chunked -pub type vortex_array::arrays::Chunked::Array = vortex_array::arrays::ChunkedArray +pub type vortex_array::arrays::Chunked::Array = vortex_array::arrays::ChunkedData pub type vortex_array::arrays::Chunked::Metadata = vortex_array::EmptyMetadata @@ -20902,25 +20832,25 @@ pub type vortex_array::arrays::Chunked::OperationsVTable = vortex_array::arrays: pub type vortex_array::arrays::Chunked::ValidityVTable = vortex_array::arrays::Chunked -pub fn vortex_array::arrays::Chunked::append_to_builder(array: &vortex_array::arrays::ChunkedArray, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Chunked::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Chunked::array_eq(array: &vortex_array::arrays::ChunkedArray, other: &vortex_array::arrays::ChunkedArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Chunked::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Chunked::array_hash(array: &vortex_array::arrays::ChunkedArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Chunked::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Chunked::buffer(_array: &vortex_array::arrays::ChunkedArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Chunked::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Chunked::buffer_name(_array: &vortex_array::arrays::ChunkedArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Chunked::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Chunked::build(dtype: &vortex_array::dtype::DType, _len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Chunked::build(dtype: &vortex_array::dtype::DType, _len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Chunked::child(array: &vortex_array::arrays::ChunkedArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Chunked::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Chunked::child_name(_array: &vortex_array::arrays::ChunkedArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Chunked::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Chunked::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Chunked::dtype(array: &vortex_array::arrays::ChunkedArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Chunked::dtype(array: &vortex_array::arrays::ChunkedData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Chunked::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -20928,13 +20858,13 @@ pub fn vortex_array::arrays::Chunked::execute_parent(array: &vortex_array::vtabl pub fn vortex_array::arrays::Chunked::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Chunked::len(array: &vortex_array::arrays::ChunkedArray) -> usize +pub fn vortex_array::arrays::Chunked::len(array: &vortex_array::arrays::ChunkedData) -> usize -pub fn vortex_array::arrays::Chunked::metadata(_array: &vortex_array::arrays::ChunkedArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Chunked::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Chunked::nbuffers(_array: &vortex_array::arrays::ChunkedArray) -> usize +pub fn vortex_array::arrays::Chunked::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Chunked::nchildren(array: &vortex_array::arrays::ChunkedArray) -> usize +pub fn vortex_array::arrays::Chunked::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Chunked::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -20942,7 +20872,7 @@ pub fn vortex_array::arrays::Chunked::reduce_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Chunked::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Chunked::stats(array: &vortex_array::arrays::ChunkedArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Chunked::stats(array: &vortex_array::arrays::ChunkedData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Chunked::vtable(_array: &Self::Array) -> &Self @@ -20950,7 +20880,7 @@ pub fn vortex_array::arrays::Chunked::with_children(array: &mut Self::Array, chi impl vortex_array::vtable::VTable for vortex_array::arrays::Constant -pub type vortex_array::arrays::Constant::Array = vortex_array::arrays::ConstantArray +pub type vortex_array::arrays::Constant::Array = vortex_array::arrays::ConstantData pub type vortex_array::arrays::Constant::Metadata = vortex_array::scalar::Scalar @@ -20958,25 +20888,25 @@ pub type vortex_array::arrays::Constant::OperationsVTable = vortex_array::arrays pub type vortex_array::arrays::Constant::ValidityVTable = vortex_array::arrays::Constant -pub fn vortex_array::arrays::Constant::append_to_builder(array: &vortex_array::arrays::ConstantArray, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Constant::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Constant::array_eq(array: &vortex_array::arrays::ConstantArray, other: &vortex_array::arrays::ConstantArray, _precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Constant::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, _precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Constant::array_hash(array: &vortex_array::arrays::ConstantArray, state: &mut H, _precision: vortex_array::Precision) +pub fn vortex_array::arrays::Constant::array_hash(array: &vortex_array::vtable::Array, state: &mut H, _precision: vortex_array::Precision) -pub fn vortex_array::arrays::Constant::buffer(array: &vortex_array::arrays::ConstantArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Constant::buffer(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Constant::buffer_name(_array: &vortex_array::arrays::ConstantArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Constant::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Constant::build(_dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], _children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Constant::build(_dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], _children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Constant::child(_array: &vortex_array::arrays::ConstantArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Constant::child(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Constant::child_name(_array: &vortex_array::arrays::ConstantArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Constant::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Constant::deserialize(_bytes: &[u8], dtype: &vortex_array::dtype::DType, _len: usize, buffers: &[vortex_array::buffer::BufferHandle], session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Constant::dtype(array: &vortex_array::arrays::ConstantArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Constant::dtype(array: &vortex_array::arrays::ConstantData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Constant::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -20984,13 +20914,13 @@ pub fn vortex_array::arrays::Constant::execute_parent(array: &vortex_array::vtab pub fn vortex_array::arrays::Constant::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Constant::len(array: &vortex_array::arrays::ConstantArray) -> usize +pub fn vortex_array::arrays::Constant::len(array: &vortex_array::arrays::ConstantData) -> usize -pub fn vortex_array::arrays::Constant::metadata(array: &vortex_array::arrays::ConstantArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Constant::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Constant::nbuffers(_array: &vortex_array::arrays::ConstantArray) -> usize +pub fn vortex_array::arrays::Constant::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Constant::nchildren(_array: &vortex_array::arrays::ConstantArray) -> usize +pub fn vortex_array::arrays::Constant::nchildren(_array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Constant::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -20998,7 +20928,7 @@ pub fn vortex_array::arrays::Constant::reduce_parent(array: &vortex_array::vtabl pub fn vortex_array::arrays::Constant::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Constant::stats(array: &vortex_array::arrays::ConstantArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Constant::stats(array: &vortex_array::arrays::ConstantData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Constant::vtable(_array: &Self::Array) -> &Self @@ -21006,7 +20936,7 @@ pub fn vortex_array::arrays::Constant::with_children(_array: &mut Self::Array, c impl vortex_array::vtable::VTable for vortex_array::arrays::Decimal -pub type vortex_array::arrays::Decimal::Array = vortex_array::arrays::DecimalArray +pub type vortex_array::arrays::Decimal::Array = vortex_array::arrays::DecimalData pub type vortex_array::arrays::Decimal::Metadata = vortex_array::ProstMetadata @@ -21014,25 +20944,25 @@ pub type vortex_array::arrays::Decimal::OperationsVTable = vortex_array::arrays: pub type vortex_array::arrays::Decimal::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::Decimal::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Decimal::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Decimal::array_eq(array: &vortex_array::arrays::DecimalArray, other: &vortex_array::arrays::DecimalArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Decimal::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Decimal::array_hash(array: &vortex_array::arrays::DecimalArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Decimal::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Decimal::buffer(array: &vortex_array::arrays::DecimalArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Decimal::buffer(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Decimal::buffer_name(_array: &vortex_array::arrays::DecimalArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Decimal::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Decimal::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Decimal::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Decimal::child(array: &vortex_array::arrays::DecimalArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Decimal::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Decimal::child_name(_array: &vortex_array::arrays::DecimalArray, _idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Decimal::child_name(_array: &vortex_array::vtable::Array, _idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Decimal::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Decimal::dtype(array: &vortex_array::arrays::DecimalArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Decimal::dtype(array: &vortex_array::arrays::DecimalData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Decimal::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -21040,13 +20970,13 @@ pub fn vortex_array::arrays::Decimal::execute_parent(array: &vortex_array::vtabl pub fn vortex_array::arrays::Decimal::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Decimal::len(array: &vortex_array::arrays::DecimalArray) -> usize +pub fn vortex_array::arrays::Decimal::len(array: &vortex_array::arrays::DecimalData) -> usize -pub fn vortex_array::arrays::Decimal::metadata(array: &vortex_array::arrays::DecimalArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Decimal::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Decimal::nbuffers(_array: &vortex_array::arrays::DecimalArray) -> usize +pub fn vortex_array::arrays::Decimal::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Decimal::nchildren(array: &vortex_array::arrays::DecimalArray) -> usize +pub fn vortex_array::arrays::Decimal::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Decimal::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -21054,7 +20984,7 @@ pub fn vortex_array::arrays::Decimal::reduce_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Decimal::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Decimal::stats(array: &vortex_array::arrays::DecimalArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Decimal::stats(array: &vortex_array::arrays::DecimalData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Decimal::vtable(_array: &Self::Array) -> &Self @@ -21062,7 +20992,7 @@ pub fn vortex_array::arrays::Decimal::with_children(array: &mut Self::Array, chi impl vortex_array::vtable::VTable for vortex_array::arrays::Extension -pub type vortex_array::arrays::Extension::Array = vortex_array::arrays::ExtensionArray +pub type vortex_array::arrays::Extension::Array = vortex_array::arrays::ExtensionData pub type vortex_array::arrays::Extension::Metadata = vortex_array::EmptyMetadata @@ -21070,25 +21000,25 @@ pub type vortex_array::arrays::Extension::OperationsVTable = vortex_array::array pub type vortex_array::arrays::Extension::ValidityVTable = vortex_array::vtable::ValidityVTableFromChild -pub fn vortex_array::arrays::Extension::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Extension::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Extension::array_eq(array: &vortex_array::arrays::ExtensionArray, other: &vortex_array::arrays::ExtensionArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Extension::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Extension::array_hash(array: &vortex_array::arrays::ExtensionArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Extension::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Extension::buffer(_array: &vortex_array::arrays::ExtensionArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Extension::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Extension::buffer_name(_array: &vortex_array::arrays::ExtensionArray, _idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Extension::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Extension::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Extension::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Extension::child(array: &vortex_array::arrays::ExtensionArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Extension::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Extension::child_name(_array: &vortex_array::arrays::ExtensionArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Extension::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Extension::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Extension::dtype(array: &vortex_array::arrays::ExtensionArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Extension::dtype(array: &vortex_array::arrays::ExtensionData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Extension::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -21096,13 +21026,13 @@ pub fn vortex_array::arrays::Extension::execute_parent(array: &vortex_array::vta pub fn vortex_array::arrays::Extension::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Extension::len(array: &vortex_array::arrays::ExtensionArray) -> usize +pub fn vortex_array::arrays::Extension::len(array: &vortex_array::arrays::ExtensionData) -> usize -pub fn vortex_array::arrays::Extension::metadata(_array: &vortex_array::arrays::ExtensionArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Extension::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Extension::nbuffers(_array: &vortex_array::arrays::ExtensionArray) -> usize +pub fn vortex_array::arrays::Extension::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Extension::nchildren(_array: &vortex_array::arrays::ExtensionArray) -> usize +pub fn vortex_array::arrays::Extension::nchildren(_array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Extension::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -21110,7 +21040,7 @@ pub fn vortex_array::arrays::Extension::reduce_parent(array: &vortex_array::vtab pub fn vortex_array::arrays::Extension::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Extension::stats(array: &vortex_array::arrays::ExtensionArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Extension::stats(array: &vortex_array::arrays::ExtensionData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Extension::vtable(_array: &Self::Array) -> &Self @@ -21118,7 +21048,7 @@ pub fn vortex_array::arrays::Extension::with_children(array: &mut Self::Array, c impl vortex_array::vtable::VTable for vortex_array::arrays::Filter -pub type vortex_array::arrays::Filter::Array = vortex_array::arrays::FilterArray +pub type vortex_array::arrays::Filter::Array = vortex_array::arrays::FilterData pub type vortex_array::arrays::Filter::Metadata = vortex_array::arrays::filter::vtable::FilterMetadata @@ -21126,25 +21056,25 @@ pub type vortex_array::arrays::Filter::OperationsVTable = vortex_array::arrays:: pub type vortex_array::arrays::Filter::ValidityVTable = vortex_array::arrays::Filter -pub fn vortex_array::arrays::Filter::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Filter::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Filter::array_eq(array: &vortex_array::arrays::FilterArray, other: &vortex_array::arrays::FilterArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Filter::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Filter::array_hash(array: &vortex_array::arrays::FilterArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Filter::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Filter::buffer(_array: &Self::Array, _idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Filter::buffer(_array: &vortex_array::vtable::Array, _idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Filter::buffer_name(_array: &Self::Array, _idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Filter::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Filter::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &vortex_array::arrays::filter::vtable::FilterMetadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Filter::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &vortex_array::arrays::filter::vtable::FilterMetadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Filter::child(array: &Self::Array, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Filter::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Filter::child_name(_array: &Self::Array, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Filter::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Filter::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Filter::dtype(array: &vortex_array::arrays::FilterArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Filter::dtype(array: &vortex_array::arrays::FilterData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Filter::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -21152,13 +21082,13 @@ pub fn vortex_array::arrays::Filter::execute_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Filter::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Filter::len(array: &vortex_array::arrays::FilterArray) -> usize +pub fn vortex_array::arrays::Filter::len(array: &vortex_array::arrays::FilterData) -> usize -pub fn vortex_array::arrays::Filter::metadata(array: &Self::Array) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Filter::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Filter::nbuffers(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::Filter::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Filter::nchildren(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::Filter::nchildren(_array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Filter::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -21166,15 +21096,15 @@ pub fn vortex_array::arrays::Filter::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::Filter::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Filter::stats(array: &vortex_array::arrays::FilterArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Filter::stats(array: &vortex_array::arrays::FilterData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Filter::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Filter::vtable(_array: &vortex_array::arrays::FilterData) -> &Self pub fn vortex_array::arrays::Filter::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::FixedSizeList -pub type vortex_array::arrays::FixedSizeList::Array = vortex_array::arrays::FixedSizeListArray +pub type vortex_array::arrays::FixedSizeList::Array = vortex_array::arrays::FixedSizeListData pub type vortex_array::arrays::FixedSizeList::Metadata = vortex_array::EmptyMetadata @@ -21182,25 +21112,25 @@ pub type vortex_array::arrays::FixedSizeList::OperationsVTable = vortex_array::a pub type vortex_array::arrays::FixedSizeList::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::FixedSizeList::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::FixedSizeList::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::FixedSizeList::array_eq(array: &vortex_array::arrays::FixedSizeListArray, other: &vortex_array::arrays::FixedSizeListArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::FixedSizeList::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::FixedSizeList::array_hash(array: &vortex_array::arrays::FixedSizeListArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::FixedSizeList::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::FixedSizeList::buffer(_array: &vortex_array::arrays::FixedSizeListArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::FixedSizeList::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::FixedSizeList::buffer_name(_array: &vortex_array::arrays::FixedSizeListArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::FixedSizeList::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::FixedSizeList::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::FixedSizeList::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::FixedSizeList::child(array: &vortex_array::arrays::FixedSizeListArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::FixedSizeList::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::FixedSizeList::child_name(_array: &vortex_array::arrays::FixedSizeListArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::FixedSizeList::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::FixedSizeList::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::FixedSizeList::dtype(array: &vortex_array::arrays::FixedSizeListArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::FixedSizeList::dtype(array: &vortex_array::arrays::FixedSizeListData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::FixedSizeList::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -21208,13 +21138,13 @@ pub fn vortex_array::arrays::FixedSizeList::execute_parent(array: &vortex_array: pub fn vortex_array::arrays::FixedSizeList::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::FixedSizeList::len(array: &vortex_array::arrays::FixedSizeListArray) -> usize +pub fn vortex_array::arrays::FixedSizeList::len(array: &vortex_array::arrays::FixedSizeListData) -> usize -pub fn vortex_array::arrays::FixedSizeList::metadata(_array: &vortex_array::arrays::FixedSizeListArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::FixedSizeList::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::FixedSizeList::nbuffers(_array: &vortex_array::arrays::FixedSizeListArray) -> usize +pub fn vortex_array::arrays::FixedSizeList::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::FixedSizeList::nchildren(array: &vortex_array::arrays::FixedSizeListArray) -> usize +pub fn vortex_array::arrays::FixedSizeList::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::FixedSizeList::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -21222,15 +21152,15 @@ pub fn vortex_array::arrays::FixedSizeList::reduce_parent(array: &vortex_array:: pub fn vortex_array::arrays::FixedSizeList::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::FixedSizeList::stats(array: &vortex_array::arrays::FixedSizeListArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::FixedSizeList::stats(array: &vortex_array::arrays::FixedSizeListData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::FixedSizeList::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::FixedSizeList::vtable(_array: &vortex_array::arrays::FixedSizeListData) -> &Self pub fn vortex_array::arrays::FixedSizeList::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::List -pub type vortex_array::arrays::List::Array = vortex_array::arrays::ListArray +pub type vortex_array::arrays::List::Array = vortex_array::arrays::ListData pub type vortex_array::arrays::List::Metadata = vortex_array::ProstMetadata @@ -21238,25 +21168,25 @@ pub type vortex_array::arrays::List::OperationsVTable = vortex_array::arrays::Li pub type vortex_array::arrays::List::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::List::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::List::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::List::array_eq(array: &vortex_array::arrays::ListArray, other: &vortex_array::arrays::ListArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::List::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::List::array_hash(array: &vortex_array::arrays::ListArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::List::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::List::buffer(_array: &vortex_array::arrays::ListArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::List::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::List::buffer_name(_array: &vortex_array::arrays::ListArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::List::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::List::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::List::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::List::child(array: &vortex_array::arrays::ListArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::List::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::List::child_name(_array: &vortex_array::arrays::ListArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::List::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::List::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::List::dtype(array: &vortex_array::arrays::ListArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::List::dtype(array: &vortex_array::arrays::ListData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::List::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -21264,13 +21194,13 @@ pub fn vortex_array::arrays::List::execute_parent(array: &vortex_array::vtable:: pub fn vortex_array::arrays::List::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::List::len(array: &vortex_array::arrays::ListArray) -> usize +pub fn vortex_array::arrays::List::len(array: &vortex_array::arrays::ListData) -> usize -pub fn vortex_array::arrays::List::metadata(array: &vortex_array::arrays::ListArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::List::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::List::nbuffers(_array: &vortex_array::arrays::ListArray) -> usize +pub fn vortex_array::arrays::List::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::List::nchildren(array: &vortex_array::arrays::ListArray) -> usize +pub fn vortex_array::arrays::List::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::List::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -21278,15 +21208,15 @@ pub fn vortex_array::arrays::List::reduce_parent(array: &vortex_array::vtable::A pub fn vortex_array::arrays::List::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::List::stats(array: &vortex_array::arrays::ListArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::List::stats(array: &vortex_array::arrays::ListData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::List::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::List::vtable(_array: &vortex_array::arrays::ListData) -> &Self pub fn vortex_array::arrays::List::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::ListView -pub type vortex_array::arrays::ListView::Array = vortex_array::arrays::ListViewArray +pub type vortex_array::arrays::ListView::Array = vortex_array::arrays::ListViewData pub type vortex_array::arrays::ListView::Metadata = vortex_array::ProstMetadata @@ -21294,25 +21224,25 @@ pub type vortex_array::arrays::ListView::OperationsVTable = vortex_array::arrays pub type vortex_array::arrays::ListView::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::ListView::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::ListView::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::ListView::array_eq(array: &vortex_array::arrays::ListViewArray, other: &vortex_array::arrays::ListViewArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::ListView::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::ListView::array_hash(array: &vortex_array::arrays::ListViewArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::ListView::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::ListView::buffer(_array: &vortex_array::arrays::ListViewArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::ListView::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::ListView::buffer_name(_array: &vortex_array::arrays::ListViewArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::ListView::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::ListView::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::ListView::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::ListView::child(array: &vortex_array::arrays::ListViewArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ListView::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::ListView::child_name(_array: &vortex_array::arrays::ListViewArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::ListView::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::ListView::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::ListView::dtype(array: &vortex_array::arrays::ListViewArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::ListView::dtype(array: &vortex_array::arrays::ListViewData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::ListView::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -21320,13 +21250,13 @@ pub fn vortex_array::arrays::ListView::execute_parent(array: &vortex_array::vtab pub fn vortex_array::arrays::ListView::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::ListView::len(array: &vortex_array::arrays::ListViewArray) -> usize +pub fn vortex_array::arrays::ListView::len(array: &vortex_array::arrays::ListViewData) -> usize -pub fn vortex_array::arrays::ListView::metadata(array: &vortex_array::arrays::ListViewArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::ListView::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::ListView::nbuffers(_array: &vortex_array::arrays::ListViewArray) -> usize +pub fn vortex_array::arrays::ListView::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::ListView::nchildren(array: &vortex_array::arrays::ListViewArray) -> usize +pub fn vortex_array::arrays::ListView::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::ListView::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -21334,15 +21264,15 @@ pub fn vortex_array::arrays::ListView::reduce_parent(array: &vortex_array::vtabl pub fn vortex_array::arrays::ListView::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::ListView::stats(array: &vortex_array::arrays::ListViewArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::ListView::stats(array: &vortex_array::arrays::ListViewData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::ListView::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::ListView::vtable(_array: &vortex_array::arrays::ListViewData) -> &Self pub fn vortex_array::arrays::ListView::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Masked -pub type vortex_array::arrays::Masked::Array = vortex_array::arrays::MaskedArray +pub type vortex_array::arrays::Masked::Array = vortex_array::arrays::MaskedData pub type vortex_array::arrays::Masked::Metadata = vortex_array::EmptyMetadata @@ -21350,25 +21280,25 @@ pub type vortex_array::arrays::Masked::OperationsVTable = vortex_array::arrays:: pub type vortex_array::arrays::Masked::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::Masked::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Masked::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Masked::array_eq(array: &vortex_array::arrays::MaskedArray, other: &vortex_array::arrays::MaskedArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Masked::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Masked::array_hash(array: &vortex_array::arrays::MaskedArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Masked::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Masked::buffer(_array: &Self::Array, _idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Masked::buffer(_array: &vortex_array::vtable::Array, _idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Masked::buffer_name(_array: &Self::Array, _idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Masked::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Masked::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Masked::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Masked::child(array: &Self::Array, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Masked::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Masked::child_name(_array: &Self::Array, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Masked::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Masked::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Masked::dtype(array: &vortex_array::arrays::MaskedArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Masked::dtype(array: &vortex_array::arrays::MaskedData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Masked::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -21376,13 +21306,13 @@ pub fn vortex_array::arrays::Masked::execute_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Masked::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Masked::len(array: &vortex_array::arrays::MaskedArray) -> usize +pub fn vortex_array::arrays::Masked::len(array: &vortex_array::arrays::MaskedData) -> usize -pub fn vortex_array::arrays::Masked::metadata(_array: &vortex_array::arrays::MaskedArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Masked::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Masked::nbuffers(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::Masked::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Masked::nchildren(array: &Self::Array) -> usize +pub fn vortex_array::arrays::Masked::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Masked::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -21390,7 +21320,7 @@ pub fn vortex_array::arrays::Masked::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::Masked::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Masked::stats(array: &vortex_array::arrays::MaskedArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Masked::stats(array: &vortex_array::arrays::MaskedData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Masked::vtable(_array: &Self::Array) -> &Self @@ -21398,7 +21328,7 @@ pub fn vortex_array::arrays::Masked::with_children(array: &mut Self::Array, chil impl vortex_array::vtable::VTable for vortex_array::arrays::Primitive -pub type vortex_array::arrays::Primitive::Array = vortex_array::arrays::PrimitiveArray +pub type vortex_array::arrays::Primitive::Array = vortex_array::arrays::PrimitiveData pub type vortex_array::arrays::Primitive::Metadata = vortex_array::EmptyMetadata @@ -21406,25 +21336,25 @@ pub type vortex_array::arrays::Primitive::OperationsVTable = vortex_array::array pub type vortex_array::arrays::Primitive::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::Primitive::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Primitive::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Primitive::array_eq(array: &vortex_array::arrays::PrimitiveArray, other: &vortex_array::arrays::PrimitiveArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Primitive::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Primitive::array_hash(array: &vortex_array::arrays::PrimitiveArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Primitive::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Primitive::buffer(array: &vortex_array::arrays::PrimitiveArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Primitive::buffer(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Primitive::buffer_name(_array: &vortex_array::arrays::PrimitiveArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Primitive::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Primitive::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Primitive::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Primitive::child(array: &vortex_array::arrays::PrimitiveArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Primitive::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Primitive::child_name(_array: &vortex_array::arrays::PrimitiveArray, _idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Primitive::child_name(_array: &vortex_array::vtable::Array, _idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Primitive::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Primitive::dtype(array: &vortex_array::arrays::PrimitiveArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Primitive::dtype(array: &vortex_array::arrays::PrimitiveData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Primitive::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -21432,13 +21362,13 @@ pub fn vortex_array::arrays::Primitive::execute_parent(array: &vortex_array::vta pub fn vortex_array::arrays::Primitive::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Primitive::len(array: &vortex_array::arrays::PrimitiveArray) -> usize +pub fn vortex_array::arrays::Primitive::len(array: &vortex_array::arrays::PrimitiveData) -> usize -pub fn vortex_array::arrays::Primitive::metadata(_array: &vortex_array::arrays::PrimitiveArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Primitive::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Primitive::nbuffers(_array: &vortex_array::arrays::PrimitiveArray) -> usize +pub fn vortex_array::arrays::Primitive::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Primitive::nchildren(array: &vortex_array::arrays::PrimitiveArray) -> usize +pub fn vortex_array::arrays::Primitive::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Primitive::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -21446,7 +21376,7 @@ pub fn vortex_array::arrays::Primitive::reduce_parent(array: &vortex_array::vtab pub fn vortex_array::arrays::Primitive::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Primitive::stats(array: &vortex_array::arrays::PrimitiveArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Primitive::stats(array: &vortex_array::arrays::PrimitiveData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Primitive::vtable(_array: &Self::Array) -> &Self @@ -21454,7 +21384,7 @@ pub fn vortex_array::arrays::Primitive::with_children(array: &mut Self::Array, c impl vortex_array::vtable::VTable for vortex_array::arrays::Shared -pub type vortex_array::arrays::Shared::Array = vortex_array::arrays::SharedArray +pub type vortex_array::arrays::Shared::Array = vortex_array::arrays::SharedData pub type vortex_array::arrays::Shared::Metadata = vortex_array::EmptyMetadata @@ -21462,25 +21392,25 @@ pub type vortex_array::arrays::Shared::OperationsVTable = vortex_array::arrays:: pub type vortex_array::arrays::Shared::ValidityVTable = vortex_array::arrays::Shared -pub fn vortex_array::arrays::Shared::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Shared::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Shared::array_eq(array: &vortex_array::arrays::SharedArray, other: &vortex_array::arrays::SharedArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Shared::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Shared::array_hash(array: &vortex_array::arrays::SharedArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Shared::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Shared::buffer(_array: &Self::Array, _idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Shared::buffer(_array: &vortex_array::vtable::Array, _idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Shared::buffer_name(_array: &Self::Array, _idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Shared::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Shared::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Shared::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Shared::child(array: &Self::Array, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Shared::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Shared::child_name(_array: &Self::Array, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Shared::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Shared::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Shared::dtype(array: &vortex_array::arrays::SharedArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Shared::dtype(array: &vortex_array::arrays::SharedData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Shared::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -21488,13 +21418,13 @@ pub fn vortex_array::arrays::Shared::execute_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Shared::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Shared::len(array: &vortex_array::arrays::SharedArray) -> usize +pub fn vortex_array::arrays::Shared::len(array: &vortex_array::arrays::SharedData) -> usize -pub fn vortex_array::arrays::Shared::metadata(_array: &Self::Array) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Shared::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Shared::nbuffers(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::Shared::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Shared::nchildren(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::Shared::nchildren(_array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Shared::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -21502,15 +21432,15 @@ pub fn vortex_array::arrays::Shared::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::Shared::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Shared::stats(array: &vortex_array::arrays::SharedArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Shared::stats(array: &vortex_array::arrays::SharedData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Shared::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Shared::vtable(_array: &vortex_array::arrays::SharedData) -> &Self pub fn vortex_array::arrays::Shared::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Struct -pub type vortex_array::arrays::Struct::Array = vortex_array::arrays::StructArray +pub type vortex_array::arrays::Struct::Array = vortex_array::arrays::StructData pub type vortex_array::arrays::Struct::Metadata = vortex_array::EmptyMetadata @@ -21518,25 +21448,25 @@ pub type vortex_array::arrays::Struct::OperationsVTable = vortex_array::arrays:: pub type vortex_array::arrays::Struct::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::Struct::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Struct::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Struct::array_eq(array: &vortex_array::arrays::StructArray, other: &vortex_array::arrays::StructArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Struct::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Struct::array_hash(array: &vortex_array::arrays::StructArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Struct::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Struct::buffer(_array: &vortex_array::arrays::StructArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Struct::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Struct::buffer_name(_array: &vortex_array::arrays::StructArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Struct::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Struct::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Struct::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Struct::child(array: &vortex_array::arrays::StructArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Struct::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Struct::child_name(array: &vortex_array::arrays::StructArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Struct::child_name(array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Struct::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Struct::dtype(array: &vortex_array::arrays::StructArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Struct::dtype(array: &vortex_array::arrays::StructData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Struct::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -21544,13 +21474,13 @@ pub fn vortex_array::arrays::Struct::execute_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Struct::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Struct::len(array: &vortex_array::arrays::StructArray) -> usize +pub fn vortex_array::arrays::Struct::len(array: &vortex_array::arrays::StructData) -> usize -pub fn vortex_array::arrays::Struct::metadata(_array: &vortex_array::arrays::StructArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Struct::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Struct::nbuffers(_array: &vortex_array::arrays::StructArray) -> usize +pub fn vortex_array::arrays::Struct::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Struct::nchildren(array: &vortex_array::arrays::StructArray) -> usize +pub fn vortex_array::arrays::Struct::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Struct::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -21558,7 +21488,7 @@ pub fn vortex_array::arrays::Struct::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::Struct::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Struct::stats(array: &vortex_array::arrays::StructArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Struct::stats(array: &vortex_array::arrays::StructData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Struct::vtable(_array: &Self::Array) -> &Self @@ -21566,7 +21496,7 @@ pub fn vortex_array::arrays::Struct::with_children(array: &mut Self::Array, chil impl vortex_array::vtable::VTable for vortex_array::arrays::VarBin -pub type vortex_array::arrays::VarBin::Array = vortex_array::arrays::VarBinArray +pub type vortex_array::arrays::VarBin::Array = vortex_array::arrays::VarBinData pub type vortex_array::arrays::VarBin::Metadata = vortex_array::ProstMetadata @@ -21574,25 +21504,25 @@ pub type vortex_array::arrays::VarBin::OperationsVTable = vortex_array::arrays:: pub type vortex_array::arrays::VarBin::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::VarBin::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::VarBin::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::VarBin::array_eq(array: &vortex_array::arrays::VarBinArray, other: &vortex_array::arrays::VarBinArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::VarBin::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::VarBin::array_hash(array: &vortex_array::arrays::VarBinArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::VarBin::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::VarBin::buffer(array: &vortex_array::arrays::VarBinArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::VarBin::buffer(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::VarBin::buffer_name(_array: &vortex_array::arrays::VarBinArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::VarBin::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::VarBin::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBin::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::VarBin::child(array: &vortex_array::arrays::VarBinArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::VarBin::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::VarBin::child_name(_array: &vortex_array::arrays::VarBinArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::VarBin::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::VarBin::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::VarBin::dtype(array: &vortex_array::arrays::VarBinArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::VarBin::dtype(array: &vortex_array::arrays::VarBinData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::VarBin::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -21600,13 +21530,13 @@ pub fn vortex_array::arrays::VarBin::execute_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::VarBin::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::VarBin::len(array: &vortex_array::arrays::VarBinArray) -> usize +pub fn vortex_array::arrays::VarBin::len(array: &vortex_array::arrays::VarBinData) -> usize -pub fn vortex_array::arrays::VarBin::metadata(array: &vortex_array::arrays::VarBinArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBin::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::VarBin::nbuffers(_array: &vortex_array::arrays::VarBinArray) -> usize +pub fn vortex_array::arrays::VarBin::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::VarBin::nchildren(array: &vortex_array::arrays::VarBinArray) -> usize +pub fn vortex_array::arrays::VarBin::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::VarBin::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -21614,15 +21544,15 @@ pub fn vortex_array::arrays::VarBin::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::VarBin::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::VarBin::stats(array: &vortex_array::arrays::VarBinArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::VarBin::stats(array: &vortex_array::arrays::VarBinData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::VarBin::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::VarBin::vtable(_array: &vortex_array::arrays::VarBinData) -> &Self pub fn vortex_array::arrays::VarBin::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::VarBinView -pub type vortex_array::arrays::VarBinView::Array = vortex_array::arrays::VarBinViewArray +pub type vortex_array::arrays::VarBinView::Array = vortex_array::arrays::VarBinViewData pub type vortex_array::arrays::VarBinView::Metadata = vortex_array::EmptyMetadata @@ -21630,25 +21560,25 @@ pub type vortex_array::arrays::VarBinView::OperationsVTable = vortex_array::arra pub type vortex_array::arrays::VarBinView::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::VarBinView::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::VarBinView::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::VarBinView::array_eq(array: &vortex_array::arrays::VarBinViewArray, other: &vortex_array::arrays::VarBinViewArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::VarBinView::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::VarBinView::array_hash(array: &vortex_array::arrays::VarBinViewArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::VarBinView::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::VarBinView::buffer(array: &vortex_array::arrays::VarBinViewArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::VarBinView::buffer(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::VarBinView::buffer_name(array: &vortex_array::arrays::VarBinViewArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::VarBinView::buffer_name(array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::VarBinView::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBinView::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::VarBinView::child(array: &vortex_array::arrays::VarBinViewArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::VarBinView::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::VarBinView::child_name(_array: &vortex_array::arrays::VarBinViewArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::VarBinView::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::VarBinView::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::VarBinView::dtype(array: &vortex_array::arrays::VarBinViewArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::VarBinView::dtype(array: &vortex_array::arrays::VarBinViewData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::VarBinView::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -21656,13 +21586,13 @@ pub fn vortex_array::arrays::VarBinView::execute_parent(array: &vortex_array::vt pub fn vortex_array::arrays::VarBinView::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::VarBinView::len(array: &vortex_array::arrays::VarBinViewArray) -> usize +pub fn vortex_array::arrays::VarBinView::len(array: &vortex_array::arrays::VarBinViewData) -> usize -pub fn vortex_array::arrays::VarBinView::metadata(_array: &vortex_array::arrays::VarBinViewArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBinView::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::VarBinView::nbuffers(array: &vortex_array::arrays::VarBinViewArray) -> usize +pub fn vortex_array::arrays::VarBinView::nbuffers(array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::VarBinView::nchildren(array: &vortex_array::arrays::VarBinViewArray) -> usize +pub fn vortex_array::arrays::VarBinView::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::VarBinView::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -21670,15 +21600,15 @@ pub fn vortex_array::arrays::VarBinView::reduce_parent(array: &vortex_array::vta pub fn vortex_array::arrays::VarBinView::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::VarBinView::stats(array: &vortex_array::arrays::VarBinViewArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::VarBinView::stats(array: &vortex_array::arrays::VarBinViewData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::VarBinView::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::VarBinView::vtable(_array: &vortex_array::arrays::VarBinViewData) -> &Self pub fn vortex_array::arrays::VarBinView::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Variant -pub type vortex_array::arrays::Variant::Array = vortex_array::arrays::variant::VariantArray +pub type vortex_array::arrays::Variant::Array = vortex_array::arrays::variant::VariantData pub type vortex_array::arrays::Variant::Metadata = vortex_array::EmptyMetadata @@ -21686,21 +21616,21 @@ pub type vortex_array::arrays::Variant::OperationsVTable = vortex_array::arrays: pub type vortex_array::arrays::Variant::ValidityVTable = vortex_array::arrays::Variant -pub fn vortex_array::arrays::Variant::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Variant::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Variant::array_eq(array: &Self::Array, other: &Self::Array, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Variant::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Variant::array_hash(array: &Self::Array, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Variant::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Variant::buffer(_array: &Self::Array, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Variant::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Variant::buffer_name(_array: &Self::Array, _idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Variant::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option pub fn vortex_array::arrays::Variant::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Variant::child(array: &Self::Array, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Variant::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Variant::child_name(_array: &Self::Array, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Variant::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Variant::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult @@ -21714,11 +21644,11 @@ pub fn vortex_array::arrays::Variant::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Variant::len(array: &Self::Array) -> usize -pub fn vortex_array::arrays::Variant::metadata(_array: &Self::Array) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Variant::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Variant::nbuffers(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::Variant::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Variant::nchildren(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::Variant::nchildren(_array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Variant::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -21734,7 +21664,7 @@ pub fn vortex_array::arrays::Variant::with_children(array: &mut Self::Array, chi impl vortex_array::vtable::VTable for vortex_array::arrays::dict::Dict -pub type vortex_array::arrays::dict::Dict::Array = vortex_array::arrays::dict::DictArray +pub type vortex_array::arrays::dict::Dict::Array = vortex_array::arrays::dict::DictData pub type vortex_array::arrays::dict::Dict::Metadata = vortex_array::ProstMetadata @@ -21742,25 +21672,25 @@ pub type vortex_array::arrays::dict::Dict::OperationsVTable = vortex_array::arra pub type vortex_array::arrays::dict::Dict::ValidityVTable = vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::dict::Dict::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::dict::Dict::array_eq(array: &vortex_array::arrays::dict::DictArray, other: &vortex_array::arrays::dict::DictArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::dict::Dict::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::dict::Dict::array_hash(array: &vortex_array::arrays::dict::DictArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::dict::Dict::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::dict::Dict::buffer(_array: &vortex_array::arrays::dict::DictArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::dict::Dict::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::dict::Dict::buffer_name(_array: &vortex_array::arrays::dict::DictArray, _idx: usize) -> core::option::Option +pub fn vortex_array::arrays::dict::Dict::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option -pub fn vortex_array::arrays::dict::Dict::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::dict::Dict::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::dict::Dict::child(array: &vortex_array::arrays::dict::DictArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::dict::Dict::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::dict::Dict::child_name(_array: &vortex_array::arrays::dict::DictArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::dict::Dict::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::dict::Dict::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::dict::Dict::dtype(array: &vortex_array::arrays::dict::DictArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::dict::Dict::dtype(array: &vortex_array::arrays::dict::DictData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::dict::Dict::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -21768,13 +21698,13 @@ pub fn vortex_array::arrays::dict::Dict::execute_parent(array: &vortex_array::vt pub fn vortex_array::arrays::dict::Dict::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::dict::Dict::len(array: &vortex_array::arrays::dict::DictArray) -> usize +pub fn vortex_array::arrays::dict::Dict::len(array: &vortex_array::arrays::dict::DictData) -> usize -pub fn vortex_array::arrays::dict::Dict::metadata(array: &vortex_array::arrays::dict::DictArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::dict::Dict::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::dict::Dict::nbuffers(_array: &vortex_array::arrays::dict::DictArray) -> usize +pub fn vortex_array::arrays::dict::Dict::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::dict::Dict::nchildren(_array: &vortex_array::arrays::dict::DictArray) -> usize +pub fn vortex_array::arrays::dict::Dict::nchildren(_array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::dict::Dict::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -21782,7 +21712,7 @@ pub fn vortex_array::arrays::dict::Dict::reduce_parent(array: &vortex_array::vta pub fn vortex_array::arrays::dict::Dict::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::dict::Dict::stats(array: &vortex_array::arrays::dict::DictArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::dict::Dict::stats(array: &vortex_array::arrays::dict::DictData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::dict::Dict::vtable(_array: &Self::Array) -> &Self @@ -21790,7 +21720,7 @@ pub fn vortex_array::arrays::dict::Dict::with_children(array: &mut Self::Array, impl vortex_array::vtable::VTable for vortex_array::arrays::null::Null -pub type vortex_array::arrays::null::Null::Array = vortex_array::arrays::null::NullArray +pub type vortex_array::arrays::null::Null::Array = vortex_array::arrays::null::NullData pub type vortex_array::arrays::null::Null::Metadata = vortex_array::EmptyMetadata @@ -21798,25 +21728,25 @@ pub type vortex_array::arrays::null::Null::OperationsVTable = vortex_array::arra pub type vortex_array::arrays::null::Null::ValidityVTable = vortex_array::arrays::null::Null -pub fn vortex_array::arrays::null::Null::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::null::Null::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::null::Null::array_eq(array: &vortex_array::arrays::null::NullArray, other: &vortex_array::arrays::null::NullArray, _precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::null::Null::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, _precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::null::Null::array_hash(array: &vortex_array::arrays::null::NullArray, state: &mut H, _precision: vortex_array::Precision) +pub fn vortex_array::arrays::null::Null::array_hash(array: &vortex_array::vtable::Array, state: &mut H, _precision: vortex_array::Precision) -pub fn vortex_array::arrays::null::Null::buffer(_array: &vortex_array::arrays::null::NullArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::null::Null::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::null::Null::buffer_name(_array: &vortex_array::arrays::null::NullArray, _idx: usize) -> core::option::Option +pub fn vortex_array::arrays::null::Null::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option -pub fn vortex_array::arrays::null::Null::build(_dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], _children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::null::Null::build(_dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], _children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::null::Null::child(_array: &vortex_array::arrays::null::NullArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::null::Null::child(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::null::Null::child_name(_array: &vortex_array::arrays::null::NullArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::null::Null::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::null::Null::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::null::Null::dtype(_array: &vortex_array::arrays::null::NullArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::null::Null::dtype(_array: &vortex_array::arrays::null::NullData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::null::Null::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -21824,13 +21754,13 @@ pub fn vortex_array::arrays::null::Null::execute_parent(array: &vortex_array::vt pub fn vortex_array::arrays::null::Null::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::null::Null::len(array: &vortex_array::arrays::null::NullArray) -> usize +pub fn vortex_array::arrays::null::Null::len(array: &vortex_array::arrays::null::NullData) -> usize -pub fn vortex_array::arrays::null::Null::metadata(_array: &vortex_array::arrays::null::NullArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::null::Null::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::null::Null::nbuffers(_array: &vortex_array::arrays::null::NullArray) -> usize +pub fn vortex_array::arrays::null::Null::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::null::Null::nchildren(_array: &vortex_array::arrays::null::NullArray) -> usize +pub fn vortex_array::arrays::null::Null::nchildren(_array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::null::Null::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -21838,7 +21768,7 @@ pub fn vortex_array::arrays::null::Null::reduce_parent(array: &vortex_array::vta pub fn vortex_array::arrays::null::Null::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::null::Null::stats(array: &vortex_array::arrays::null::NullArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::null::Null::stats(array: &vortex_array::arrays::null::NullData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::null::Null::vtable(_array: &Self::Array) -> &Self @@ -21846,7 +21776,7 @@ pub fn vortex_array::arrays::null::Null::with_children(_array: &mut Self::Array, impl vortex_array::vtable::VTable for vortex_array::arrays::scalar_fn::ScalarFnVTable -pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::Array = vortex_array::arrays::scalar_fn::ScalarFnArray +pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::Array = vortex_array::arrays::ScalarFnData pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::Metadata = vortex_array::arrays::scalar_fn::metadata::ScalarFnMetadata @@ -21854,25 +21784,25 @@ pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::OperationsVTable = vor pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::ValidityVTable = vortex_array::arrays::scalar_fn::ScalarFnVTable -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::array_eq(array: &vortex_array::arrays::scalar_fn::ScalarFnArray, other: &vortex_array::arrays::scalar_fn::ScalarFnArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::array_hash(array: &vortex_array::arrays::scalar_fn::ScalarFnArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::buffer(_array: &vortex_array::arrays::scalar_fn::ScalarFnArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::buffer_name(_array: &vortex_array::arrays::scalar_fn::ScalarFnArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &vortex_array::arrays::scalar_fn::metadata::ScalarFnMetadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::child(array: &vortex_array::arrays::scalar_fn::ScalarFnArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::child_name(array: &vortex_array::arrays::scalar_fn::ScalarFnArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::child_name(array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::dtype(array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::dtype(array: &vortex_array::arrays::ScalarFnData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -21880,13 +21810,13 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::execute_parent(array: &v pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::len(array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> usize +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::len(array: &vortex_array::arrays::ScalarFnData) -> usize -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::metadata(array: &Self::Array) -> vortex_error::VortexResult +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::nbuffers(_array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> usize +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::nchildren(array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> usize +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -21894,15 +21824,15 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::reduce_parent(array: &vo pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::stats(array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::stats(array: &vortex_array::arrays::ScalarFnData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::vtable(array: &Self::Array) -> &Self +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::vtable(array: &vortex_array::arrays::ScalarFnData) -> &Self pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::slice::Slice -pub type vortex_array::arrays::slice::Slice::Array = vortex_array::arrays::slice::SliceArray +pub type vortex_array::arrays::slice::Slice::Array = vortex_array::arrays::SliceData pub type vortex_array::arrays::slice::Slice::Metadata = vortex_array::arrays::slice::SliceMetadata @@ -21910,25 +21840,25 @@ pub type vortex_array::arrays::slice::Slice::OperationsVTable = vortex_array::ar pub type vortex_array::arrays::slice::Slice::ValidityVTable = vortex_array::arrays::slice::Slice -pub fn vortex_array::arrays::slice::Slice::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::slice::Slice::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::slice::Slice::array_eq(array: &vortex_array::arrays::slice::SliceArray, other: &vortex_array::arrays::slice::SliceArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::slice::Slice::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::slice::Slice::array_hash(array: &vortex_array::arrays::slice::SliceArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::slice::Slice::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::slice::Slice::buffer(_array: &Self::Array, _idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::slice::Slice::buffer(_array: &vortex_array::vtable::Array, _idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::slice::Slice::buffer_name(_array: &Self::Array, _idx: usize) -> core::option::Option +pub fn vortex_array::arrays::slice::Slice::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option pub fn vortex_array::arrays::slice::Slice::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &vortex_array::arrays::slice::SliceMetadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::slice::Slice::child(array: &Self::Array, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::slice::Slice::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::slice::Slice::child_name(_array: &Self::Array, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::slice::Slice::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::slice::Slice::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::slice::Slice::dtype(array: &vortex_array::arrays::slice::SliceArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::slice::Slice::dtype(array: &vortex_array::arrays::SliceData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::slice::Slice::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -21936,13 +21866,13 @@ pub fn vortex_array::arrays::slice::Slice::execute_parent(array: &vortex_array:: pub fn vortex_array::arrays::slice::Slice::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::slice::Slice::len(array: &vortex_array::arrays::slice::SliceArray) -> usize +pub fn vortex_array::arrays::slice::Slice::len(array: &vortex_array::arrays::SliceData) -> usize -pub fn vortex_array::arrays::slice::Slice::metadata(array: &Self::Array) -> vortex_error::VortexResult +pub fn vortex_array::arrays::slice::Slice::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::slice::Slice::nbuffers(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::slice::Slice::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::slice::Slice::nchildren(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::slice::Slice::nchildren(_array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::slice::Slice::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -21950,9 +21880,9 @@ pub fn vortex_array::arrays::slice::Slice::reduce_parent(array: &vortex_array::v pub fn vortex_array::arrays::slice::Slice::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::slice::Slice::stats(array: &vortex_array::arrays::slice::SliceArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::slice::Slice::stats(array: &vortex_array::arrays::SliceData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::slice::Slice::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::slice::Slice::vtable(_array: &vortex_array::arrays::SliceData) -> &Self pub fn vortex_array::arrays::slice::Slice::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> @@ -21990,95 +21920,95 @@ pub fn V::with_children(&self, array: &vortex_array::ArrayRef, children: alloc:: pub trait vortex_array::vtable::OperationsVTable -pub fn vortex_array::vtable::OperationsVTable::scalar_at(array: &::Array, index: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::vtable::OperationsVTable::scalar_at(array: &vortex_array::vtable::Array, index: usize, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::Bool -pub fn vortex_array::arrays::Bool::scalar_at(array: &vortex_array::arrays::BoolArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Bool::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::Chunked -pub fn vortex_array::arrays::Chunked::scalar_at(array: &vortex_array::arrays::ChunkedArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Chunked::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::Constant -pub fn vortex_array::arrays::Constant::scalar_at(array: &vortex_array::arrays::ConstantArray, _index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Constant::scalar_at(array: &vortex_array::vtable::Array, _index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::Decimal -pub fn vortex_array::arrays::Decimal::scalar_at(array: &vortex_array::arrays::DecimalArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Decimal::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::Extension -pub fn vortex_array::arrays::Extension::scalar_at(array: &vortex_array::arrays::ExtensionArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Extension::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::Filter -pub fn vortex_array::arrays::Filter::scalar_at(array: &vortex_array::arrays::FilterArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Filter::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::FixedSizeList -pub fn vortex_array::arrays::FixedSizeList::scalar_at(array: &vortex_array::arrays::FixedSizeListArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::FixedSizeList::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::List -pub fn vortex_array::arrays::List::scalar_at(array: &vortex_array::arrays::ListArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::List::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::ListView -pub fn vortex_array::arrays::ListView::scalar_at(array: &vortex_array::arrays::ListViewArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::ListView::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::Masked -pub fn vortex_array::arrays::Masked::scalar_at(array: &vortex_array::arrays::MaskedArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Masked::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::Primitive -pub fn vortex_array::arrays::Primitive::scalar_at(array: &vortex_array::arrays::PrimitiveArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Primitive::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::Shared -pub fn vortex_array::arrays::Shared::scalar_at(array: &vortex_array::arrays::SharedArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Shared::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::Struct -pub fn vortex_array::arrays::Struct::scalar_at(array: &vortex_array::arrays::StructArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Struct::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::VarBin -pub fn vortex_array::arrays::VarBin::scalar_at(array: &vortex_array::arrays::VarBinArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBin::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::VarBinView -pub fn vortex_array::arrays::VarBinView::scalar_at(array: &vortex_array::arrays::VarBinViewArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBinView::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::Variant -pub fn vortex_array::arrays::Variant::scalar_at(array: &::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Variant::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::scalar_at(array: &vortex_array::arrays::dict::DictArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::dict::Dict::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::null::Null -pub fn vortex_array::arrays::null::Null::scalar_at(_array: &vortex_array::arrays::null::NullArray, _index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::null::Null::scalar_at(_array: &vortex_array::vtable::Array, _index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::scalar_fn::ScalarFnVTable -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::scalar_at(array: &vortex_array::arrays::scalar_fn::ScalarFnArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::OperationsVTable for vortex_array::arrays::slice::Slice -pub fn vortex_array::arrays::slice::Slice::scalar_at(array: &vortex_array::arrays::slice::SliceArray, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::slice::Slice::scalar_at(array: &vortex_array::vtable::Array, index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::vtable::OperationsVTable for vortex_array::vtable::NotSupported -pub fn vortex_array::vtable::NotSupported::scalar_at(array: &::Array, _index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::vtable::NotSupported::scalar_at(array: &vortex_array::vtable::Array, _index: usize, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult pub trait vortex_array::vtable::VTable: 'static + core::clone::Clone + core::marker::Sized + core::marker::Send + core::marker::Sync + core::fmt::Debug -pub type vortex_array::vtable::VTable::Array: 'static + core::marker::Send + core::marker::Sync + core::clone::Clone + core::fmt::Debug + core::ops::deref::Deref + vortex_array::IntoArray +pub type vortex_array::vtable::VTable::Array: 'static + core::marker::Send + core::marker::Sync + core::clone::Clone + core::fmt::Debug + vortex_array::IntoArray pub type vortex_array::vtable::VTable::Metadata: core::fmt::Debug @@ -22086,21 +22016,21 @@ pub type vortex_array::vtable::VTable::OperationsVTable: vortex_array::vtable::O pub type vortex_array::vtable::VTable::ValidityVTable: vortex_array::vtable::ValidityVTable -pub fn vortex_array::vtable::VTable::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::vtable::VTable::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::vtable::VTable::array_eq(array: &Self::Array, other: &Self::Array, precision: vortex_array::Precision) -> bool +pub fn vortex_array::vtable::VTable::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::vtable::VTable::array_hash(array: &Self::Array, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::vtable::VTable::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::vtable::VTable::buffer(array: &Self::Array, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::vtable::VTable::buffer(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::vtable::VTable::buffer_name(array: &Self::Array, idx: usize) -> core::option::Option +pub fn vortex_array::vtable::VTable::buffer_name(array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option pub fn vortex_array::vtable::VTable::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::vtable::VTable::child(array: &Self::Array, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::vtable::VTable::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::vtable::VTable::child_name(array: &Self::Array, idx: usize) -> alloc::string::String +pub fn vortex_array::vtable::VTable::child_name(array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::vtable::VTable::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult @@ -22114,11 +22044,11 @@ pub fn vortex_array::vtable::VTable::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::vtable::VTable::len(array: &Self::Array) -> usize -pub fn vortex_array::vtable::VTable::metadata(array: &Self::Array) -> vortex_error::VortexResult +pub fn vortex_array::vtable::VTable::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::vtable::VTable::nbuffers(array: &Self::Array) -> usize +pub fn vortex_array::vtable::VTable::nbuffers(array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::vtable::VTable::nchildren(array: &Self::Array) -> usize +pub fn vortex_array::vtable::VTable::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::vtable::VTable::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -22134,7 +22064,7 @@ pub fn vortex_array::vtable::VTable::with_children(array: &mut Self::Array, chil impl vortex_array::vtable::VTable for vortex_array::arrays::Bool -pub type vortex_array::arrays::Bool::Array = vortex_array::arrays::BoolArray +pub type vortex_array::arrays::Bool::Array = vortex_array::arrays::BoolData pub type vortex_array::arrays::Bool::Metadata = vortex_array::ProstMetadata @@ -22142,25 +22072,25 @@ pub type vortex_array::arrays::Bool::OperationsVTable = vortex_array::arrays::Bo pub type vortex_array::arrays::Bool::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::Bool::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Bool::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Bool::array_eq(array: &vortex_array::arrays::BoolArray, other: &vortex_array::arrays::BoolArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Bool::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Bool::array_hash(array: &vortex_array::arrays::BoolArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Bool::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Bool::buffer(array: &vortex_array::arrays::BoolArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Bool::buffer(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Bool::buffer_name(_array: &vortex_array::arrays::BoolArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Bool::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Bool::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Bool::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Bool::child(array: &vortex_array::arrays::BoolArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Bool::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Bool::child_name(_array: &vortex_array::arrays::BoolArray, _idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Bool::child_name(_array: &vortex_array::vtable::Array, _idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Bool::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Bool::dtype(array: &vortex_array::arrays::BoolArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Bool::dtype(array: &vortex_array::arrays::BoolData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Bool::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -22168,13 +22098,13 @@ pub fn vortex_array::arrays::Bool::execute_parent(array: &vortex_array::vtable:: pub fn vortex_array::arrays::Bool::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Bool::len(array: &vortex_array::arrays::BoolArray) -> usize +pub fn vortex_array::arrays::Bool::len(array: &vortex_array::arrays::BoolData) -> usize -pub fn vortex_array::arrays::Bool::metadata(array: &vortex_array::arrays::BoolArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Bool::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Bool::nbuffers(_array: &vortex_array::arrays::BoolArray) -> usize +pub fn vortex_array::arrays::Bool::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Bool::nchildren(array: &vortex_array::arrays::BoolArray) -> usize +pub fn vortex_array::arrays::Bool::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Bool::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -22182,7 +22112,7 @@ pub fn vortex_array::arrays::Bool::reduce_parent(array: &vortex_array::vtable::A pub fn vortex_array::arrays::Bool::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Bool::stats(array: &vortex_array::arrays::BoolArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Bool::stats(array: &vortex_array::arrays::BoolData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Bool::vtable(_array: &Self::Array) -> &Self @@ -22190,7 +22120,7 @@ pub fn vortex_array::arrays::Bool::with_children(array: &mut Self::Array, childr impl vortex_array::vtable::VTable for vortex_array::arrays::Chunked -pub type vortex_array::arrays::Chunked::Array = vortex_array::arrays::ChunkedArray +pub type vortex_array::arrays::Chunked::Array = vortex_array::arrays::ChunkedData pub type vortex_array::arrays::Chunked::Metadata = vortex_array::EmptyMetadata @@ -22198,25 +22128,25 @@ pub type vortex_array::arrays::Chunked::OperationsVTable = vortex_array::arrays: pub type vortex_array::arrays::Chunked::ValidityVTable = vortex_array::arrays::Chunked -pub fn vortex_array::arrays::Chunked::append_to_builder(array: &vortex_array::arrays::ChunkedArray, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Chunked::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Chunked::array_eq(array: &vortex_array::arrays::ChunkedArray, other: &vortex_array::arrays::ChunkedArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Chunked::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Chunked::array_hash(array: &vortex_array::arrays::ChunkedArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Chunked::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Chunked::buffer(_array: &vortex_array::arrays::ChunkedArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Chunked::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Chunked::buffer_name(_array: &vortex_array::arrays::ChunkedArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Chunked::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Chunked::build(dtype: &vortex_array::dtype::DType, _len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Chunked::build(dtype: &vortex_array::dtype::DType, _len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Chunked::child(array: &vortex_array::arrays::ChunkedArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Chunked::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Chunked::child_name(_array: &vortex_array::arrays::ChunkedArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Chunked::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Chunked::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Chunked::dtype(array: &vortex_array::arrays::ChunkedArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Chunked::dtype(array: &vortex_array::arrays::ChunkedData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Chunked::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -22224,13 +22154,13 @@ pub fn vortex_array::arrays::Chunked::execute_parent(array: &vortex_array::vtabl pub fn vortex_array::arrays::Chunked::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Chunked::len(array: &vortex_array::arrays::ChunkedArray) -> usize +pub fn vortex_array::arrays::Chunked::len(array: &vortex_array::arrays::ChunkedData) -> usize -pub fn vortex_array::arrays::Chunked::metadata(_array: &vortex_array::arrays::ChunkedArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Chunked::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Chunked::nbuffers(_array: &vortex_array::arrays::ChunkedArray) -> usize +pub fn vortex_array::arrays::Chunked::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Chunked::nchildren(array: &vortex_array::arrays::ChunkedArray) -> usize +pub fn vortex_array::arrays::Chunked::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Chunked::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -22238,7 +22168,7 @@ pub fn vortex_array::arrays::Chunked::reduce_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Chunked::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Chunked::stats(array: &vortex_array::arrays::ChunkedArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Chunked::stats(array: &vortex_array::arrays::ChunkedData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Chunked::vtable(_array: &Self::Array) -> &Self @@ -22246,7 +22176,7 @@ pub fn vortex_array::arrays::Chunked::with_children(array: &mut Self::Array, chi impl vortex_array::vtable::VTable for vortex_array::arrays::Constant -pub type vortex_array::arrays::Constant::Array = vortex_array::arrays::ConstantArray +pub type vortex_array::arrays::Constant::Array = vortex_array::arrays::ConstantData pub type vortex_array::arrays::Constant::Metadata = vortex_array::scalar::Scalar @@ -22254,25 +22184,25 @@ pub type vortex_array::arrays::Constant::OperationsVTable = vortex_array::arrays pub type vortex_array::arrays::Constant::ValidityVTable = vortex_array::arrays::Constant -pub fn vortex_array::arrays::Constant::append_to_builder(array: &vortex_array::arrays::ConstantArray, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Constant::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Constant::array_eq(array: &vortex_array::arrays::ConstantArray, other: &vortex_array::arrays::ConstantArray, _precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Constant::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, _precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Constant::array_hash(array: &vortex_array::arrays::ConstantArray, state: &mut H, _precision: vortex_array::Precision) +pub fn vortex_array::arrays::Constant::array_hash(array: &vortex_array::vtable::Array, state: &mut H, _precision: vortex_array::Precision) -pub fn vortex_array::arrays::Constant::buffer(array: &vortex_array::arrays::ConstantArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Constant::buffer(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Constant::buffer_name(_array: &vortex_array::arrays::ConstantArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Constant::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Constant::build(_dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], _children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Constant::build(_dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], _children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Constant::child(_array: &vortex_array::arrays::ConstantArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Constant::child(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Constant::child_name(_array: &vortex_array::arrays::ConstantArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Constant::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Constant::deserialize(_bytes: &[u8], dtype: &vortex_array::dtype::DType, _len: usize, buffers: &[vortex_array::buffer::BufferHandle], session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Constant::dtype(array: &vortex_array::arrays::ConstantArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Constant::dtype(array: &vortex_array::arrays::ConstantData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Constant::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -22280,13 +22210,13 @@ pub fn vortex_array::arrays::Constant::execute_parent(array: &vortex_array::vtab pub fn vortex_array::arrays::Constant::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Constant::len(array: &vortex_array::arrays::ConstantArray) -> usize +pub fn vortex_array::arrays::Constant::len(array: &vortex_array::arrays::ConstantData) -> usize -pub fn vortex_array::arrays::Constant::metadata(array: &vortex_array::arrays::ConstantArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Constant::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Constant::nbuffers(_array: &vortex_array::arrays::ConstantArray) -> usize +pub fn vortex_array::arrays::Constant::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Constant::nchildren(_array: &vortex_array::arrays::ConstantArray) -> usize +pub fn vortex_array::arrays::Constant::nchildren(_array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Constant::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -22294,7 +22224,7 @@ pub fn vortex_array::arrays::Constant::reduce_parent(array: &vortex_array::vtabl pub fn vortex_array::arrays::Constant::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Constant::stats(array: &vortex_array::arrays::ConstantArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Constant::stats(array: &vortex_array::arrays::ConstantData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Constant::vtable(_array: &Self::Array) -> &Self @@ -22302,7 +22232,7 @@ pub fn vortex_array::arrays::Constant::with_children(_array: &mut Self::Array, c impl vortex_array::vtable::VTable for vortex_array::arrays::Decimal -pub type vortex_array::arrays::Decimal::Array = vortex_array::arrays::DecimalArray +pub type vortex_array::arrays::Decimal::Array = vortex_array::arrays::DecimalData pub type vortex_array::arrays::Decimal::Metadata = vortex_array::ProstMetadata @@ -22310,25 +22240,25 @@ pub type vortex_array::arrays::Decimal::OperationsVTable = vortex_array::arrays: pub type vortex_array::arrays::Decimal::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::Decimal::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Decimal::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Decimal::array_eq(array: &vortex_array::arrays::DecimalArray, other: &vortex_array::arrays::DecimalArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Decimal::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Decimal::array_hash(array: &vortex_array::arrays::DecimalArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Decimal::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Decimal::buffer(array: &vortex_array::arrays::DecimalArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Decimal::buffer(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Decimal::buffer_name(_array: &vortex_array::arrays::DecimalArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Decimal::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Decimal::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Decimal::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Decimal::child(array: &vortex_array::arrays::DecimalArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Decimal::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Decimal::child_name(_array: &vortex_array::arrays::DecimalArray, _idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Decimal::child_name(_array: &vortex_array::vtable::Array, _idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Decimal::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Decimal::dtype(array: &vortex_array::arrays::DecimalArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Decimal::dtype(array: &vortex_array::arrays::DecimalData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Decimal::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -22336,13 +22266,13 @@ pub fn vortex_array::arrays::Decimal::execute_parent(array: &vortex_array::vtabl pub fn vortex_array::arrays::Decimal::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Decimal::len(array: &vortex_array::arrays::DecimalArray) -> usize +pub fn vortex_array::arrays::Decimal::len(array: &vortex_array::arrays::DecimalData) -> usize -pub fn vortex_array::arrays::Decimal::metadata(array: &vortex_array::arrays::DecimalArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Decimal::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Decimal::nbuffers(_array: &vortex_array::arrays::DecimalArray) -> usize +pub fn vortex_array::arrays::Decimal::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Decimal::nchildren(array: &vortex_array::arrays::DecimalArray) -> usize +pub fn vortex_array::arrays::Decimal::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Decimal::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -22350,7 +22280,7 @@ pub fn vortex_array::arrays::Decimal::reduce_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Decimal::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Decimal::stats(array: &vortex_array::arrays::DecimalArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Decimal::stats(array: &vortex_array::arrays::DecimalData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Decimal::vtable(_array: &Self::Array) -> &Self @@ -22358,7 +22288,7 @@ pub fn vortex_array::arrays::Decimal::with_children(array: &mut Self::Array, chi impl vortex_array::vtable::VTable for vortex_array::arrays::Extension -pub type vortex_array::arrays::Extension::Array = vortex_array::arrays::ExtensionArray +pub type vortex_array::arrays::Extension::Array = vortex_array::arrays::ExtensionData pub type vortex_array::arrays::Extension::Metadata = vortex_array::EmptyMetadata @@ -22366,25 +22296,25 @@ pub type vortex_array::arrays::Extension::OperationsVTable = vortex_array::array pub type vortex_array::arrays::Extension::ValidityVTable = vortex_array::vtable::ValidityVTableFromChild -pub fn vortex_array::arrays::Extension::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Extension::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Extension::array_eq(array: &vortex_array::arrays::ExtensionArray, other: &vortex_array::arrays::ExtensionArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Extension::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Extension::array_hash(array: &vortex_array::arrays::ExtensionArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Extension::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Extension::buffer(_array: &vortex_array::arrays::ExtensionArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Extension::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Extension::buffer_name(_array: &vortex_array::arrays::ExtensionArray, _idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Extension::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Extension::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Extension::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Extension::child(array: &vortex_array::arrays::ExtensionArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Extension::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Extension::child_name(_array: &vortex_array::arrays::ExtensionArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Extension::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Extension::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Extension::dtype(array: &vortex_array::arrays::ExtensionArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Extension::dtype(array: &vortex_array::arrays::ExtensionData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Extension::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -22392,13 +22322,13 @@ pub fn vortex_array::arrays::Extension::execute_parent(array: &vortex_array::vta pub fn vortex_array::arrays::Extension::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Extension::len(array: &vortex_array::arrays::ExtensionArray) -> usize +pub fn vortex_array::arrays::Extension::len(array: &vortex_array::arrays::ExtensionData) -> usize -pub fn vortex_array::arrays::Extension::metadata(_array: &vortex_array::arrays::ExtensionArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Extension::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Extension::nbuffers(_array: &vortex_array::arrays::ExtensionArray) -> usize +pub fn vortex_array::arrays::Extension::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Extension::nchildren(_array: &vortex_array::arrays::ExtensionArray) -> usize +pub fn vortex_array::arrays::Extension::nchildren(_array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Extension::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -22406,7 +22336,7 @@ pub fn vortex_array::arrays::Extension::reduce_parent(array: &vortex_array::vtab pub fn vortex_array::arrays::Extension::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Extension::stats(array: &vortex_array::arrays::ExtensionArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Extension::stats(array: &vortex_array::arrays::ExtensionData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Extension::vtable(_array: &Self::Array) -> &Self @@ -22414,7 +22344,7 @@ pub fn vortex_array::arrays::Extension::with_children(array: &mut Self::Array, c impl vortex_array::vtable::VTable for vortex_array::arrays::Filter -pub type vortex_array::arrays::Filter::Array = vortex_array::arrays::FilterArray +pub type vortex_array::arrays::Filter::Array = vortex_array::arrays::FilterData pub type vortex_array::arrays::Filter::Metadata = vortex_array::arrays::filter::vtable::FilterMetadata @@ -22422,25 +22352,25 @@ pub type vortex_array::arrays::Filter::OperationsVTable = vortex_array::arrays:: pub type vortex_array::arrays::Filter::ValidityVTable = vortex_array::arrays::Filter -pub fn vortex_array::arrays::Filter::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Filter::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Filter::array_eq(array: &vortex_array::arrays::FilterArray, other: &vortex_array::arrays::FilterArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Filter::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Filter::array_hash(array: &vortex_array::arrays::FilterArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Filter::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Filter::buffer(_array: &Self::Array, _idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Filter::buffer(_array: &vortex_array::vtable::Array, _idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Filter::buffer_name(_array: &Self::Array, _idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Filter::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Filter::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &vortex_array::arrays::filter::vtable::FilterMetadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Filter::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &vortex_array::arrays::filter::vtable::FilterMetadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Filter::child(array: &Self::Array, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Filter::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Filter::child_name(_array: &Self::Array, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Filter::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Filter::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Filter::dtype(array: &vortex_array::arrays::FilterArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Filter::dtype(array: &vortex_array::arrays::FilterData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Filter::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -22448,13 +22378,13 @@ pub fn vortex_array::arrays::Filter::execute_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Filter::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Filter::len(array: &vortex_array::arrays::FilterArray) -> usize +pub fn vortex_array::arrays::Filter::len(array: &vortex_array::arrays::FilterData) -> usize -pub fn vortex_array::arrays::Filter::metadata(array: &Self::Array) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Filter::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Filter::nbuffers(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::Filter::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Filter::nchildren(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::Filter::nchildren(_array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Filter::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -22462,15 +22392,15 @@ pub fn vortex_array::arrays::Filter::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::Filter::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Filter::stats(array: &vortex_array::arrays::FilterArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Filter::stats(array: &vortex_array::arrays::FilterData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Filter::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Filter::vtable(_array: &vortex_array::arrays::FilterData) -> &Self pub fn vortex_array::arrays::Filter::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::FixedSizeList -pub type vortex_array::arrays::FixedSizeList::Array = vortex_array::arrays::FixedSizeListArray +pub type vortex_array::arrays::FixedSizeList::Array = vortex_array::arrays::FixedSizeListData pub type vortex_array::arrays::FixedSizeList::Metadata = vortex_array::EmptyMetadata @@ -22478,25 +22408,25 @@ pub type vortex_array::arrays::FixedSizeList::OperationsVTable = vortex_array::a pub type vortex_array::arrays::FixedSizeList::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::FixedSizeList::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::FixedSizeList::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::FixedSizeList::array_eq(array: &vortex_array::arrays::FixedSizeListArray, other: &vortex_array::arrays::FixedSizeListArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::FixedSizeList::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::FixedSizeList::array_hash(array: &vortex_array::arrays::FixedSizeListArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::FixedSizeList::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::FixedSizeList::buffer(_array: &vortex_array::arrays::FixedSizeListArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::FixedSizeList::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::FixedSizeList::buffer_name(_array: &vortex_array::arrays::FixedSizeListArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::FixedSizeList::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::FixedSizeList::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::FixedSizeList::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::FixedSizeList::child(array: &vortex_array::arrays::FixedSizeListArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::FixedSizeList::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::FixedSizeList::child_name(_array: &vortex_array::arrays::FixedSizeListArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::FixedSizeList::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::FixedSizeList::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::FixedSizeList::dtype(array: &vortex_array::arrays::FixedSizeListArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::FixedSizeList::dtype(array: &vortex_array::arrays::FixedSizeListData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::FixedSizeList::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -22504,13 +22434,13 @@ pub fn vortex_array::arrays::FixedSizeList::execute_parent(array: &vortex_array: pub fn vortex_array::arrays::FixedSizeList::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::FixedSizeList::len(array: &vortex_array::arrays::FixedSizeListArray) -> usize +pub fn vortex_array::arrays::FixedSizeList::len(array: &vortex_array::arrays::FixedSizeListData) -> usize -pub fn vortex_array::arrays::FixedSizeList::metadata(_array: &vortex_array::arrays::FixedSizeListArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::FixedSizeList::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::FixedSizeList::nbuffers(_array: &vortex_array::arrays::FixedSizeListArray) -> usize +pub fn vortex_array::arrays::FixedSizeList::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::FixedSizeList::nchildren(array: &vortex_array::arrays::FixedSizeListArray) -> usize +pub fn vortex_array::arrays::FixedSizeList::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::FixedSizeList::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -22518,15 +22448,15 @@ pub fn vortex_array::arrays::FixedSizeList::reduce_parent(array: &vortex_array:: pub fn vortex_array::arrays::FixedSizeList::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::FixedSizeList::stats(array: &vortex_array::arrays::FixedSizeListArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::FixedSizeList::stats(array: &vortex_array::arrays::FixedSizeListData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::FixedSizeList::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::FixedSizeList::vtable(_array: &vortex_array::arrays::FixedSizeListData) -> &Self pub fn vortex_array::arrays::FixedSizeList::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::List -pub type vortex_array::arrays::List::Array = vortex_array::arrays::ListArray +pub type vortex_array::arrays::List::Array = vortex_array::arrays::ListData pub type vortex_array::arrays::List::Metadata = vortex_array::ProstMetadata @@ -22534,25 +22464,25 @@ pub type vortex_array::arrays::List::OperationsVTable = vortex_array::arrays::Li pub type vortex_array::arrays::List::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::List::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::List::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::List::array_eq(array: &vortex_array::arrays::ListArray, other: &vortex_array::arrays::ListArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::List::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::List::array_hash(array: &vortex_array::arrays::ListArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::List::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::List::buffer(_array: &vortex_array::arrays::ListArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::List::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::List::buffer_name(_array: &vortex_array::arrays::ListArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::List::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::List::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::List::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::List::child(array: &vortex_array::arrays::ListArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::List::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::List::child_name(_array: &vortex_array::arrays::ListArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::List::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::List::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::List::dtype(array: &vortex_array::arrays::ListArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::List::dtype(array: &vortex_array::arrays::ListData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::List::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -22560,13 +22490,13 @@ pub fn vortex_array::arrays::List::execute_parent(array: &vortex_array::vtable:: pub fn vortex_array::arrays::List::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::List::len(array: &vortex_array::arrays::ListArray) -> usize +pub fn vortex_array::arrays::List::len(array: &vortex_array::arrays::ListData) -> usize -pub fn vortex_array::arrays::List::metadata(array: &vortex_array::arrays::ListArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::List::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::List::nbuffers(_array: &vortex_array::arrays::ListArray) -> usize +pub fn vortex_array::arrays::List::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::List::nchildren(array: &vortex_array::arrays::ListArray) -> usize +pub fn vortex_array::arrays::List::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::List::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -22574,15 +22504,15 @@ pub fn vortex_array::arrays::List::reduce_parent(array: &vortex_array::vtable::A pub fn vortex_array::arrays::List::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::List::stats(array: &vortex_array::arrays::ListArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::List::stats(array: &vortex_array::arrays::ListData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::List::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::List::vtable(_array: &vortex_array::arrays::ListData) -> &Self pub fn vortex_array::arrays::List::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::ListView -pub type vortex_array::arrays::ListView::Array = vortex_array::arrays::ListViewArray +pub type vortex_array::arrays::ListView::Array = vortex_array::arrays::ListViewData pub type vortex_array::arrays::ListView::Metadata = vortex_array::ProstMetadata @@ -22590,25 +22520,25 @@ pub type vortex_array::arrays::ListView::OperationsVTable = vortex_array::arrays pub type vortex_array::arrays::ListView::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::ListView::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::ListView::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::ListView::array_eq(array: &vortex_array::arrays::ListViewArray, other: &vortex_array::arrays::ListViewArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::ListView::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::ListView::array_hash(array: &vortex_array::arrays::ListViewArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::ListView::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::ListView::buffer(_array: &vortex_array::arrays::ListViewArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::ListView::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::ListView::buffer_name(_array: &vortex_array::arrays::ListViewArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::ListView::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::ListView::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::ListView::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::ListView::child(array: &vortex_array::arrays::ListViewArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ListView::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::ListView::child_name(_array: &vortex_array::arrays::ListViewArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::ListView::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::ListView::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::ListView::dtype(array: &vortex_array::arrays::ListViewArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::ListView::dtype(array: &vortex_array::arrays::ListViewData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::ListView::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -22616,13 +22546,13 @@ pub fn vortex_array::arrays::ListView::execute_parent(array: &vortex_array::vtab pub fn vortex_array::arrays::ListView::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::ListView::len(array: &vortex_array::arrays::ListViewArray) -> usize +pub fn vortex_array::arrays::ListView::len(array: &vortex_array::arrays::ListViewData) -> usize -pub fn vortex_array::arrays::ListView::metadata(array: &vortex_array::arrays::ListViewArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::ListView::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::ListView::nbuffers(_array: &vortex_array::arrays::ListViewArray) -> usize +pub fn vortex_array::arrays::ListView::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::ListView::nchildren(array: &vortex_array::arrays::ListViewArray) -> usize +pub fn vortex_array::arrays::ListView::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::ListView::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -22630,15 +22560,15 @@ pub fn vortex_array::arrays::ListView::reduce_parent(array: &vortex_array::vtabl pub fn vortex_array::arrays::ListView::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::ListView::stats(array: &vortex_array::arrays::ListViewArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::ListView::stats(array: &vortex_array::arrays::ListViewData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::ListView::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::ListView::vtable(_array: &vortex_array::arrays::ListViewData) -> &Self pub fn vortex_array::arrays::ListView::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Masked -pub type vortex_array::arrays::Masked::Array = vortex_array::arrays::MaskedArray +pub type vortex_array::arrays::Masked::Array = vortex_array::arrays::MaskedData pub type vortex_array::arrays::Masked::Metadata = vortex_array::EmptyMetadata @@ -22646,25 +22576,25 @@ pub type vortex_array::arrays::Masked::OperationsVTable = vortex_array::arrays:: pub type vortex_array::arrays::Masked::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::Masked::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Masked::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Masked::array_eq(array: &vortex_array::arrays::MaskedArray, other: &vortex_array::arrays::MaskedArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Masked::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Masked::array_hash(array: &vortex_array::arrays::MaskedArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Masked::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Masked::buffer(_array: &Self::Array, _idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Masked::buffer(_array: &vortex_array::vtable::Array, _idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Masked::buffer_name(_array: &Self::Array, _idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Masked::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Masked::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Masked::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Masked::child(array: &Self::Array, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Masked::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Masked::child_name(_array: &Self::Array, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Masked::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Masked::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Masked::dtype(array: &vortex_array::arrays::MaskedArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Masked::dtype(array: &vortex_array::arrays::MaskedData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Masked::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -22672,13 +22602,13 @@ pub fn vortex_array::arrays::Masked::execute_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Masked::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Masked::len(array: &vortex_array::arrays::MaskedArray) -> usize +pub fn vortex_array::arrays::Masked::len(array: &vortex_array::arrays::MaskedData) -> usize -pub fn vortex_array::arrays::Masked::metadata(_array: &vortex_array::arrays::MaskedArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Masked::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Masked::nbuffers(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::Masked::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Masked::nchildren(array: &Self::Array) -> usize +pub fn vortex_array::arrays::Masked::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Masked::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -22686,7 +22616,7 @@ pub fn vortex_array::arrays::Masked::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::Masked::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Masked::stats(array: &vortex_array::arrays::MaskedArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Masked::stats(array: &vortex_array::arrays::MaskedData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Masked::vtable(_array: &Self::Array) -> &Self @@ -22694,7 +22624,7 @@ pub fn vortex_array::arrays::Masked::with_children(array: &mut Self::Array, chil impl vortex_array::vtable::VTable for vortex_array::arrays::Primitive -pub type vortex_array::arrays::Primitive::Array = vortex_array::arrays::PrimitiveArray +pub type vortex_array::arrays::Primitive::Array = vortex_array::arrays::PrimitiveData pub type vortex_array::arrays::Primitive::Metadata = vortex_array::EmptyMetadata @@ -22702,25 +22632,25 @@ pub type vortex_array::arrays::Primitive::OperationsVTable = vortex_array::array pub type vortex_array::arrays::Primitive::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::Primitive::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Primitive::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Primitive::array_eq(array: &vortex_array::arrays::PrimitiveArray, other: &vortex_array::arrays::PrimitiveArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Primitive::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Primitive::array_hash(array: &vortex_array::arrays::PrimitiveArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Primitive::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Primitive::buffer(array: &vortex_array::arrays::PrimitiveArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Primitive::buffer(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Primitive::buffer_name(_array: &vortex_array::arrays::PrimitiveArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Primitive::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Primitive::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Primitive::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Primitive::child(array: &vortex_array::arrays::PrimitiveArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Primitive::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Primitive::child_name(_array: &vortex_array::arrays::PrimitiveArray, _idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Primitive::child_name(_array: &vortex_array::vtable::Array, _idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Primitive::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Primitive::dtype(array: &vortex_array::arrays::PrimitiveArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Primitive::dtype(array: &vortex_array::arrays::PrimitiveData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Primitive::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -22728,13 +22658,13 @@ pub fn vortex_array::arrays::Primitive::execute_parent(array: &vortex_array::vta pub fn vortex_array::arrays::Primitive::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Primitive::len(array: &vortex_array::arrays::PrimitiveArray) -> usize +pub fn vortex_array::arrays::Primitive::len(array: &vortex_array::arrays::PrimitiveData) -> usize -pub fn vortex_array::arrays::Primitive::metadata(_array: &vortex_array::arrays::PrimitiveArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Primitive::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Primitive::nbuffers(_array: &vortex_array::arrays::PrimitiveArray) -> usize +pub fn vortex_array::arrays::Primitive::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Primitive::nchildren(array: &vortex_array::arrays::PrimitiveArray) -> usize +pub fn vortex_array::arrays::Primitive::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Primitive::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -22742,7 +22672,7 @@ pub fn vortex_array::arrays::Primitive::reduce_parent(array: &vortex_array::vtab pub fn vortex_array::arrays::Primitive::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Primitive::stats(array: &vortex_array::arrays::PrimitiveArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Primitive::stats(array: &vortex_array::arrays::PrimitiveData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Primitive::vtable(_array: &Self::Array) -> &Self @@ -22750,7 +22680,7 @@ pub fn vortex_array::arrays::Primitive::with_children(array: &mut Self::Array, c impl vortex_array::vtable::VTable for vortex_array::arrays::Shared -pub type vortex_array::arrays::Shared::Array = vortex_array::arrays::SharedArray +pub type vortex_array::arrays::Shared::Array = vortex_array::arrays::SharedData pub type vortex_array::arrays::Shared::Metadata = vortex_array::EmptyMetadata @@ -22758,25 +22688,25 @@ pub type vortex_array::arrays::Shared::OperationsVTable = vortex_array::arrays:: pub type vortex_array::arrays::Shared::ValidityVTable = vortex_array::arrays::Shared -pub fn vortex_array::arrays::Shared::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Shared::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Shared::array_eq(array: &vortex_array::arrays::SharedArray, other: &vortex_array::arrays::SharedArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Shared::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Shared::array_hash(array: &vortex_array::arrays::SharedArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Shared::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Shared::buffer(_array: &Self::Array, _idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Shared::buffer(_array: &vortex_array::vtable::Array, _idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Shared::buffer_name(_array: &Self::Array, _idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Shared::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Shared::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Shared::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Shared::child(array: &Self::Array, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Shared::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Shared::child_name(_array: &Self::Array, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Shared::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Shared::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Shared::dtype(array: &vortex_array::arrays::SharedArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Shared::dtype(array: &vortex_array::arrays::SharedData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Shared::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -22784,13 +22714,13 @@ pub fn vortex_array::arrays::Shared::execute_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Shared::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Shared::len(array: &vortex_array::arrays::SharedArray) -> usize +pub fn vortex_array::arrays::Shared::len(array: &vortex_array::arrays::SharedData) -> usize -pub fn vortex_array::arrays::Shared::metadata(_array: &Self::Array) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Shared::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Shared::nbuffers(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::Shared::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Shared::nchildren(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::Shared::nchildren(_array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Shared::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -22798,15 +22728,15 @@ pub fn vortex_array::arrays::Shared::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::Shared::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Shared::stats(array: &vortex_array::arrays::SharedArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Shared::stats(array: &vortex_array::arrays::SharedData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Shared::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Shared::vtable(_array: &vortex_array::arrays::SharedData) -> &Self pub fn vortex_array::arrays::Shared::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Struct -pub type vortex_array::arrays::Struct::Array = vortex_array::arrays::StructArray +pub type vortex_array::arrays::Struct::Array = vortex_array::arrays::StructData pub type vortex_array::arrays::Struct::Metadata = vortex_array::EmptyMetadata @@ -22814,25 +22744,25 @@ pub type vortex_array::arrays::Struct::OperationsVTable = vortex_array::arrays:: pub type vortex_array::arrays::Struct::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::Struct::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Struct::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Struct::array_eq(array: &vortex_array::arrays::StructArray, other: &vortex_array::arrays::StructArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Struct::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Struct::array_hash(array: &vortex_array::arrays::StructArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Struct::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Struct::buffer(_array: &vortex_array::arrays::StructArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Struct::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Struct::buffer_name(_array: &vortex_array::arrays::StructArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Struct::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Struct::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Struct::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Struct::child(array: &vortex_array::arrays::StructArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Struct::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Struct::child_name(array: &vortex_array::arrays::StructArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Struct::child_name(array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Struct::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Struct::dtype(array: &vortex_array::arrays::StructArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Struct::dtype(array: &vortex_array::arrays::StructData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Struct::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -22840,13 +22770,13 @@ pub fn vortex_array::arrays::Struct::execute_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Struct::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Struct::len(array: &vortex_array::arrays::StructArray) -> usize +pub fn vortex_array::arrays::Struct::len(array: &vortex_array::arrays::StructData) -> usize -pub fn vortex_array::arrays::Struct::metadata(_array: &vortex_array::arrays::StructArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Struct::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Struct::nbuffers(_array: &vortex_array::arrays::StructArray) -> usize +pub fn vortex_array::arrays::Struct::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Struct::nchildren(array: &vortex_array::arrays::StructArray) -> usize +pub fn vortex_array::arrays::Struct::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Struct::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -22854,7 +22784,7 @@ pub fn vortex_array::arrays::Struct::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::Struct::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Struct::stats(array: &vortex_array::arrays::StructArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Struct::stats(array: &vortex_array::arrays::StructData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::Struct::vtable(_array: &Self::Array) -> &Self @@ -22862,7 +22792,7 @@ pub fn vortex_array::arrays::Struct::with_children(array: &mut Self::Array, chil impl vortex_array::vtable::VTable for vortex_array::arrays::VarBin -pub type vortex_array::arrays::VarBin::Array = vortex_array::arrays::VarBinArray +pub type vortex_array::arrays::VarBin::Array = vortex_array::arrays::VarBinData pub type vortex_array::arrays::VarBin::Metadata = vortex_array::ProstMetadata @@ -22870,25 +22800,25 @@ pub type vortex_array::arrays::VarBin::OperationsVTable = vortex_array::arrays:: pub type vortex_array::arrays::VarBin::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::VarBin::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::VarBin::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::VarBin::array_eq(array: &vortex_array::arrays::VarBinArray, other: &vortex_array::arrays::VarBinArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::VarBin::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::VarBin::array_hash(array: &vortex_array::arrays::VarBinArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::VarBin::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::VarBin::buffer(array: &vortex_array::arrays::VarBinArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::VarBin::buffer(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::VarBin::buffer_name(_array: &vortex_array::arrays::VarBinArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::VarBin::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::VarBin::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBin::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::VarBin::child(array: &vortex_array::arrays::VarBinArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::VarBin::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::VarBin::child_name(_array: &vortex_array::arrays::VarBinArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::VarBin::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::VarBin::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::VarBin::dtype(array: &vortex_array::arrays::VarBinArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::VarBin::dtype(array: &vortex_array::arrays::VarBinData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::VarBin::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -22896,13 +22826,13 @@ pub fn vortex_array::arrays::VarBin::execute_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::VarBin::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::VarBin::len(array: &vortex_array::arrays::VarBinArray) -> usize +pub fn vortex_array::arrays::VarBin::len(array: &vortex_array::arrays::VarBinData) -> usize -pub fn vortex_array::arrays::VarBin::metadata(array: &vortex_array::arrays::VarBinArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBin::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::VarBin::nbuffers(_array: &vortex_array::arrays::VarBinArray) -> usize +pub fn vortex_array::arrays::VarBin::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::VarBin::nchildren(array: &vortex_array::arrays::VarBinArray) -> usize +pub fn vortex_array::arrays::VarBin::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::VarBin::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -22910,15 +22840,15 @@ pub fn vortex_array::arrays::VarBin::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::arrays::VarBin::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::VarBin::stats(array: &vortex_array::arrays::VarBinArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::VarBin::stats(array: &vortex_array::arrays::VarBinData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::VarBin::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::VarBin::vtable(_array: &vortex_array::arrays::VarBinData) -> &Self pub fn vortex_array::arrays::VarBin::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::VarBinView -pub type vortex_array::arrays::VarBinView::Array = vortex_array::arrays::VarBinViewArray +pub type vortex_array::arrays::VarBinView::Array = vortex_array::arrays::VarBinViewData pub type vortex_array::arrays::VarBinView::Metadata = vortex_array::EmptyMetadata @@ -22926,25 +22856,25 @@ pub type vortex_array::arrays::VarBinView::OperationsVTable = vortex_array::arra pub type vortex_array::arrays::VarBinView::ValidityVTable = vortex_array::vtable::ValidityVTableFromValidityHelper -pub fn vortex_array::arrays::VarBinView::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::VarBinView::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::VarBinView::array_eq(array: &vortex_array::arrays::VarBinViewArray, other: &vortex_array::arrays::VarBinViewArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::VarBinView::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::VarBinView::array_hash(array: &vortex_array::arrays::VarBinViewArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::VarBinView::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::VarBinView::buffer(array: &vortex_array::arrays::VarBinViewArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::VarBinView::buffer(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::VarBinView::buffer_name(array: &vortex_array::arrays::VarBinViewArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::VarBinView::buffer_name(array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::VarBinView::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBinView::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::VarBinView::child(array: &vortex_array::arrays::VarBinViewArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::VarBinView::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::VarBinView::child_name(_array: &vortex_array::arrays::VarBinViewArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::VarBinView::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::VarBinView::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::VarBinView::dtype(array: &vortex_array::arrays::VarBinViewArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::VarBinView::dtype(array: &vortex_array::arrays::VarBinViewData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::VarBinView::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -22952,13 +22882,13 @@ pub fn vortex_array::arrays::VarBinView::execute_parent(array: &vortex_array::vt pub fn vortex_array::arrays::VarBinView::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::VarBinView::len(array: &vortex_array::arrays::VarBinViewArray) -> usize +pub fn vortex_array::arrays::VarBinView::len(array: &vortex_array::arrays::VarBinViewData) -> usize -pub fn vortex_array::arrays::VarBinView::metadata(_array: &vortex_array::arrays::VarBinViewArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::VarBinView::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::VarBinView::nbuffers(array: &vortex_array::arrays::VarBinViewArray) -> usize +pub fn vortex_array::arrays::VarBinView::nbuffers(array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::VarBinView::nchildren(array: &vortex_array::arrays::VarBinViewArray) -> usize +pub fn vortex_array::arrays::VarBinView::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::VarBinView::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -22966,15 +22896,15 @@ pub fn vortex_array::arrays::VarBinView::reduce_parent(array: &vortex_array::vta pub fn vortex_array::arrays::VarBinView::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::VarBinView::stats(array: &vortex_array::arrays::VarBinViewArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::VarBinView::stats(array: &vortex_array::arrays::VarBinViewData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::VarBinView::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::VarBinView::vtable(_array: &vortex_array::arrays::VarBinViewData) -> &Self pub fn vortex_array::arrays::VarBinView::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Variant -pub type vortex_array::arrays::Variant::Array = vortex_array::arrays::variant::VariantArray +pub type vortex_array::arrays::Variant::Array = vortex_array::arrays::variant::VariantData pub type vortex_array::arrays::Variant::Metadata = vortex_array::EmptyMetadata @@ -22982,21 +22912,21 @@ pub type vortex_array::arrays::Variant::OperationsVTable = vortex_array::arrays: pub type vortex_array::arrays::Variant::ValidityVTable = vortex_array::arrays::Variant -pub fn vortex_array::arrays::Variant::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Variant::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::Variant::array_eq(array: &Self::Array, other: &Self::Array, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::Variant::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::Variant::array_hash(array: &Self::Array, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::Variant::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::Variant::buffer(_array: &Self::Array, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::Variant::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::Variant::buffer_name(_array: &Self::Array, _idx: usize) -> core::option::Option +pub fn vortex_array::arrays::Variant::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option pub fn vortex_array::arrays::Variant::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Variant::child(array: &Self::Array, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::Variant::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::Variant::child_name(_array: &Self::Array, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::Variant::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::Variant::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult @@ -23010,11 +22940,11 @@ pub fn vortex_array::arrays::Variant::id(&self) -> vortex_array::vtable::ArrayId pub fn vortex_array::arrays::Variant::len(array: &Self::Array) -> usize -pub fn vortex_array::arrays::Variant::metadata(_array: &Self::Array) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Variant::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Variant::nbuffers(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::Variant::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::Variant::nchildren(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::Variant::nchildren(_array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::Variant::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -23030,7 +22960,7 @@ pub fn vortex_array::arrays::Variant::with_children(array: &mut Self::Array, chi impl vortex_array::vtable::VTable for vortex_array::arrays::dict::Dict -pub type vortex_array::arrays::dict::Dict::Array = vortex_array::arrays::dict::DictArray +pub type vortex_array::arrays::dict::Dict::Array = vortex_array::arrays::dict::DictData pub type vortex_array::arrays::dict::Dict::Metadata = vortex_array::ProstMetadata @@ -23038,25 +22968,25 @@ pub type vortex_array::arrays::dict::Dict::OperationsVTable = vortex_array::arra pub type vortex_array::arrays::dict::Dict::ValidityVTable = vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::dict::Dict::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::dict::Dict::array_eq(array: &vortex_array::arrays::dict::DictArray, other: &vortex_array::arrays::dict::DictArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::dict::Dict::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::dict::Dict::array_hash(array: &vortex_array::arrays::dict::DictArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::dict::Dict::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::dict::Dict::buffer(_array: &vortex_array::arrays::dict::DictArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::dict::Dict::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::dict::Dict::buffer_name(_array: &vortex_array::arrays::dict::DictArray, _idx: usize) -> core::option::Option +pub fn vortex_array::arrays::dict::Dict::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option -pub fn vortex_array::arrays::dict::Dict::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::dict::Dict::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::dict::Dict::child(array: &vortex_array::arrays::dict::DictArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::dict::Dict::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::dict::Dict::child_name(_array: &vortex_array::arrays::dict::DictArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::dict::Dict::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::dict::Dict::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::dict::Dict::dtype(array: &vortex_array::arrays::dict::DictArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::dict::Dict::dtype(array: &vortex_array::arrays::dict::DictData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::dict::Dict::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -23064,13 +22994,13 @@ pub fn vortex_array::arrays::dict::Dict::execute_parent(array: &vortex_array::vt pub fn vortex_array::arrays::dict::Dict::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::dict::Dict::len(array: &vortex_array::arrays::dict::DictArray) -> usize +pub fn vortex_array::arrays::dict::Dict::len(array: &vortex_array::arrays::dict::DictData) -> usize -pub fn vortex_array::arrays::dict::Dict::metadata(array: &vortex_array::arrays::dict::DictArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::dict::Dict::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::dict::Dict::nbuffers(_array: &vortex_array::arrays::dict::DictArray) -> usize +pub fn vortex_array::arrays::dict::Dict::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::dict::Dict::nchildren(_array: &vortex_array::arrays::dict::DictArray) -> usize +pub fn vortex_array::arrays::dict::Dict::nchildren(_array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::dict::Dict::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -23078,7 +23008,7 @@ pub fn vortex_array::arrays::dict::Dict::reduce_parent(array: &vortex_array::vta pub fn vortex_array::arrays::dict::Dict::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::dict::Dict::stats(array: &vortex_array::arrays::dict::DictArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::dict::Dict::stats(array: &vortex_array::arrays::dict::DictData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::dict::Dict::vtable(_array: &Self::Array) -> &Self @@ -23086,7 +23016,7 @@ pub fn vortex_array::arrays::dict::Dict::with_children(array: &mut Self::Array, impl vortex_array::vtable::VTable for vortex_array::arrays::null::Null -pub type vortex_array::arrays::null::Null::Array = vortex_array::arrays::null::NullArray +pub type vortex_array::arrays::null::Null::Array = vortex_array::arrays::null::NullData pub type vortex_array::arrays::null::Null::Metadata = vortex_array::EmptyMetadata @@ -23094,25 +23024,25 @@ pub type vortex_array::arrays::null::Null::OperationsVTable = vortex_array::arra pub type vortex_array::arrays::null::Null::ValidityVTable = vortex_array::arrays::null::Null -pub fn vortex_array::arrays::null::Null::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::null::Null::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::null::Null::array_eq(array: &vortex_array::arrays::null::NullArray, other: &vortex_array::arrays::null::NullArray, _precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::null::Null::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, _precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::null::Null::array_hash(array: &vortex_array::arrays::null::NullArray, state: &mut H, _precision: vortex_array::Precision) +pub fn vortex_array::arrays::null::Null::array_hash(array: &vortex_array::vtable::Array, state: &mut H, _precision: vortex_array::Precision) -pub fn vortex_array::arrays::null::Null::buffer(_array: &vortex_array::arrays::null::NullArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::null::Null::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::null::Null::buffer_name(_array: &vortex_array::arrays::null::NullArray, _idx: usize) -> core::option::Option +pub fn vortex_array::arrays::null::Null::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option -pub fn vortex_array::arrays::null::Null::build(_dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], _children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::null::Null::build(_dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], _children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::null::Null::child(_array: &vortex_array::arrays::null::NullArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::null::Null::child(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::null::Null::child_name(_array: &vortex_array::arrays::null::NullArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::null::Null::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::null::Null::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::null::Null::dtype(_array: &vortex_array::arrays::null::NullArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::null::Null::dtype(_array: &vortex_array::arrays::null::NullData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::null::Null::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -23120,13 +23050,13 @@ pub fn vortex_array::arrays::null::Null::execute_parent(array: &vortex_array::vt pub fn vortex_array::arrays::null::Null::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::null::Null::len(array: &vortex_array::arrays::null::NullArray) -> usize +pub fn vortex_array::arrays::null::Null::len(array: &vortex_array::arrays::null::NullData) -> usize -pub fn vortex_array::arrays::null::Null::metadata(_array: &vortex_array::arrays::null::NullArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::null::Null::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::null::Null::nbuffers(_array: &vortex_array::arrays::null::NullArray) -> usize +pub fn vortex_array::arrays::null::Null::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::null::Null::nchildren(_array: &vortex_array::arrays::null::NullArray) -> usize +pub fn vortex_array::arrays::null::Null::nchildren(_array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::null::Null::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -23134,7 +23064,7 @@ pub fn vortex_array::arrays::null::Null::reduce_parent(array: &vortex_array::vta pub fn vortex_array::arrays::null::Null::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::null::Null::stats(array: &vortex_array::arrays::null::NullArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::null::Null::stats(array: &vortex_array::arrays::null::NullData) -> &vortex_array::stats::ArrayStats pub fn vortex_array::arrays::null::Null::vtable(_array: &Self::Array) -> &Self @@ -23142,7 +23072,7 @@ pub fn vortex_array::arrays::null::Null::with_children(_array: &mut Self::Array, impl vortex_array::vtable::VTable for vortex_array::arrays::scalar_fn::ScalarFnVTable -pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::Array = vortex_array::arrays::scalar_fn::ScalarFnArray +pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::Array = vortex_array::arrays::ScalarFnData pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::Metadata = vortex_array::arrays::scalar_fn::metadata::ScalarFnMetadata @@ -23150,25 +23080,25 @@ pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::OperationsVTable = vor pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::ValidityVTable = vortex_array::arrays::scalar_fn::ScalarFnVTable -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::array_eq(array: &vortex_array::arrays::scalar_fn::ScalarFnArray, other: &vortex_array::arrays::scalar_fn::ScalarFnArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::array_hash(array: &vortex_array::arrays::scalar_fn::ScalarFnArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::buffer(_array: &vortex_array::arrays::scalar_fn::ScalarFnArray, idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::buffer(_array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::buffer_name(_array: &vortex_array::arrays::scalar_fn::ScalarFnArray, idx: usize) -> core::option::Option +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &vortex_array::arrays::scalar_fn::metadata::ScalarFnMetadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::child(array: &vortex_array::arrays::scalar_fn::ScalarFnArray, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::child_name(array: &vortex_array::arrays::scalar_fn::ScalarFnArray, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::child_name(array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::dtype(array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::dtype(array: &vortex_array::arrays::ScalarFnData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -23176,13 +23106,13 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::execute_parent(array: &v pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::len(array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> usize +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::len(array: &vortex_array::arrays::ScalarFnData) -> usize -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::metadata(array: &Self::Array) -> vortex_error::VortexResult +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::nbuffers(_array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> usize +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::nchildren(array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> usize +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::nchildren(array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -23190,15 +23120,15 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::reduce_parent(array: &vo pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::stats(array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::stats(array: &vortex_array::arrays::ScalarFnData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::vtable(array: &Self::Array) -> &Self +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::vtable(array: &vortex_array::arrays::ScalarFnData) -> &Self pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::slice::Slice -pub type vortex_array::arrays::slice::Slice::Array = vortex_array::arrays::slice::SliceArray +pub type vortex_array::arrays::slice::Slice::Array = vortex_array::arrays::SliceData pub type vortex_array::arrays::slice::Slice::Metadata = vortex_array::arrays::slice::SliceMetadata @@ -23206,25 +23136,25 @@ pub type vortex_array::arrays::slice::Slice::OperationsVTable = vortex_array::ar pub type vortex_array::arrays::slice::Slice::ValidityVTable = vortex_array::arrays::slice::Slice -pub fn vortex_array::arrays::slice::Slice::append_to_builder(array: &Self::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::slice::Slice::append_to_builder(array: &vortex_array::vtable::Array, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> -pub fn vortex_array::arrays::slice::Slice::array_eq(array: &vortex_array::arrays::slice::SliceArray, other: &vortex_array::arrays::slice::SliceArray, precision: vortex_array::Precision) -> bool +pub fn vortex_array::arrays::slice::Slice::array_eq(array: &vortex_array::vtable::Array, other: &vortex_array::vtable::Array, precision: vortex_array::Precision) -> bool -pub fn vortex_array::arrays::slice::Slice::array_hash(array: &vortex_array::arrays::slice::SliceArray, state: &mut H, precision: vortex_array::Precision) +pub fn vortex_array::arrays::slice::Slice::array_hash(array: &vortex_array::vtable::Array, state: &mut H, precision: vortex_array::Precision) -pub fn vortex_array::arrays::slice::Slice::buffer(_array: &Self::Array, _idx: usize) -> vortex_array::buffer::BufferHandle +pub fn vortex_array::arrays::slice::Slice::buffer(_array: &vortex_array::vtable::Array, _idx: usize) -> vortex_array::buffer::BufferHandle -pub fn vortex_array::arrays::slice::Slice::buffer_name(_array: &Self::Array, _idx: usize) -> core::option::Option +pub fn vortex_array::arrays::slice::Slice::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option pub fn vortex_array::arrays::slice::Slice::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &vortex_array::arrays::slice::SliceMetadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult -pub fn vortex_array::arrays::slice::Slice::child(array: &Self::Array, idx: usize) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::slice::Slice::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef -pub fn vortex_array::arrays::slice::Slice::child_name(_array: &Self::Array, idx: usize) -> alloc::string::String +pub fn vortex_array::arrays::slice::Slice::child_name(_array: &vortex_array::vtable::Array, idx: usize) -> alloc::string::String pub fn vortex_array::arrays::slice::Slice::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::slice::Slice::dtype(array: &vortex_array::arrays::slice::SliceArray) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::slice::Slice::dtype(array: &vortex_array::arrays::SliceData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::slice::Slice::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -23232,13 +23162,13 @@ pub fn vortex_array::arrays::slice::Slice::execute_parent(array: &vortex_array:: pub fn vortex_array::arrays::slice::Slice::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::slice::Slice::len(array: &vortex_array::arrays::slice::SliceArray) -> usize +pub fn vortex_array::arrays::slice::Slice::len(array: &vortex_array::arrays::SliceData) -> usize -pub fn vortex_array::arrays::slice::Slice::metadata(array: &Self::Array) -> vortex_error::VortexResult +pub fn vortex_array::arrays::slice::Slice::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -pub fn vortex_array::arrays::slice::Slice::nbuffers(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::slice::Slice::nbuffers(_array: &vortex_array::vtable::Array) -> usize -pub fn vortex_array::arrays::slice::Slice::nchildren(_array: &Self::Array) -> usize +pub fn vortex_array::arrays::slice::Slice::nchildren(_array: &vortex_array::vtable::Array) -> usize pub fn vortex_array::arrays::slice::Slice::reduce(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult> @@ -23246,9 +23176,9 @@ pub fn vortex_array::arrays::slice::Slice::reduce_parent(array: &vortex_array::v pub fn vortex_array::arrays::slice::Slice::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::slice::Slice::stats(array: &vortex_array::arrays::slice::SliceArray) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::slice::Slice::stats(array: &vortex_array::arrays::SliceData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::slice::Slice::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::slice::Slice::vtable(_array: &vortex_array::arrays::SliceData) -> &Self pub fn vortex_array::arrays::slice::Slice::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> @@ -23258,7 +23188,7 @@ pub fn vortex_array::vtable::ValidityChild::validity_child(array: & for vortex_array::arrays::Extension -pub fn vortex_array::arrays::Extension::validity_child(array: &vortex_array::arrays::ExtensionArray) -> &vortex_array::ArrayRef +pub fn vortex_array::arrays::Extension::validity_child(array: &vortex_array::arrays::ExtensionData) -> &vortex_array::ArrayRef pub trait vortex_array::vtable::ValidityChildSliceHelper @@ -23270,45 +23200,45 @@ pub trait vortex_array::vtable::ValidityHelper pub fn vortex_array::vtable::ValidityHelper::validity(&self) -> &vortex_array::validity::Validity -impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::BoolArray +impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::BoolData -pub fn vortex_array::arrays::BoolArray::validity(&self) -> &vortex_array::validity::Validity +pub fn vortex_array::arrays::BoolData::validity(&self) -> &vortex_array::validity::Validity -impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::DecimalArray +impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::DecimalData -pub fn vortex_array::arrays::DecimalArray::validity(&self) -> &vortex_array::validity::Validity +pub fn vortex_array::arrays::DecimalData::validity(&self) -> &vortex_array::validity::Validity -impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::FixedSizeListArray +impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::FixedSizeListData -pub fn vortex_array::arrays::FixedSizeListArray::validity(&self) -> &vortex_array::validity::Validity +pub fn vortex_array::arrays::FixedSizeListData::validity(&self) -> &vortex_array::validity::Validity -impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::ListArray +impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::ListData -pub fn vortex_array::arrays::ListArray::validity(&self) -> &vortex_array::validity::Validity +pub fn vortex_array::arrays::ListData::validity(&self) -> &vortex_array::validity::Validity -impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::ListViewArray +impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::ListViewData -pub fn vortex_array::arrays::ListViewArray::validity(&self) -> &vortex_array::validity::Validity +pub fn vortex_array::arrays::ListViewData::validity(&self) -> &vortex_array::validity::Validity -impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::MaskedArray +impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::MaskedData -pub fn vortex_array::arrays::MaskedArray::validity(&self) -> &vortex_array::validity::Validity +pub fn vortex_array::arrays::MaskedData::validity(&self) -> &vortex_array::validity::Validity -impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::PrimitiveArray +impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::PrimitiveData -pub fn vortex_array::arrays::PrimitiveArray::validity(&self) -> &vortex_array::validity::Validity +pub fn vortex_array::arrays::PrimitiveData::validity(&self) -> &vortex_array::validity::Validity -impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::StructArray +impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::StructData -pub fn vortex_array::arrays::StructArray::validity(&self) -> &vortex_array::validity::Validity +pub fn vortex_array::arrays::StructData::validity(&self) -> &vortex_array::validity::Validity -impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::VarBinArray +impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::VarBinData -pub fn vortex_array::arrays::VarBinArray::validity(&self) -> &vortex_array::validity::Validity +pub fn vortex_array::arrays::VarBinData::validity(&self) -> &vortex_array::validity::Validity -impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::VarBinViewArray +impl vortex_array::vtable::ValidityHelper for vortex_array::arrays::VarBinViewData -pub fn vortex_array::arrays::VarBinViewArray::validity(&self) -> &vortex_array::validity::Validity +pub fn vortex_array::arrays::VarBinViewData::validity(&self) -> &vortex_array::validity::Validity pub trait vortex_array::vtable::ValiditySliceHelper @@ -23318,59 +23248,59 @@ pub fn vortex_array::vtable::ValiditySliceHelper::unsliced_validity_and_slice(&s pub trait vortex_array::vtable::ValidityVTable -pub fn vortex_array::vtable::ValidityVTable::validity(array: &::Array) -> vortex_error::VortexResult +pub fn vortex_array::vtable::ValidityVTable::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Chunked -pub fn vortex_array::arrays::Chunked::validity(array: &vortex_array::arrays::ChunkedArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Chunked::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Constant -pub fn vortex_array::arrays::Constant::validity(array: &vortex_array::arrays::ConstantArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Constant::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Filter -pub fn vortex_array::arrays::Filter::validity(array: &vortex_array::arrays::FilterArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Filter::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Shared -pub fn vortex_array::arrays::Shared::validity(array: &vortex_array::arrays::SharedArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Shared::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Variant -pub fn vortex_array::arrays::Variant::validity(array: &::Array) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Variant::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::dict::Dict -pub fn vortex_array::arrays::dict::Dict::validity(array: &vortex_array::arrays::dict::DictArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::dict::Dict::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::null::Null -pub fn vortex_array::arrays::null::Null::validity(_array: &vortex_array::arrays::null::NullArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::null::Null::validity(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::scalar_fn::ScalarFnVTable -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::validity(array: &vortex_array::arrays::scalar_fn::ScalarFnArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::slice::Slice -pub fn vortex_array::arrays::slice::Slice::validity(array: &vortex_array::arrays::slice::SliceArray) -> vortex_error::VortexResult +pub fn vortex_array::arrays::slice::Slice::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult impl vortex_array::vtable::ValidityVTable for vortex_array::vtable::ValidityVTableFromChildSliceHelper where ::Array: vortex_array::vtable::ValidityChildSliceHelper -pub fn vortex_array::vtable::ValidityVTableFromChildSliceHelper::validity(array: &::Array) -> vortex_error::VortexResult +pub fn vortex_array::vtable::ValidityVTableFromChildSliceHelper::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult impl vortex_array::vtable::ValidityVTable for vortex_array::vtable::ValidityVTableFromValidityHelper where ::Array: vortex_array::vtable::ValidityHelper -pub fn vortex_array::vtable::ValidityVTableFromValidityHelper::validity(array: &::Array) -> vortex_error::VortexResult +pub fn vortex_array::vtable::ValidityVTableFromValidityHelper::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult impl vortex_array::vtable::ValidityVTable for vortex_array::vtable::ValidityVTableFromValiditySliceHelper where ::Array: vortex_array::vtable::ValiditySliceHelper -pub fn vortex_array::vtable::ValidityVTableFromValiditySliceHelper::validity(array: &::Array) -> vortex_error::VortexResult +pub fn vortex_array::vtable::ValidityVTableFromValiditySliceHelper::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult impl vortex_array::vtable::ValidityVTable for vortex_array::vtable::ValidityVTableFromChild where V: vortex_array::vtable::ValidityChild + vortex_array::vtable::VTable -pub fn vortex_array::vtable::ValidityVTableFromChild::validity(array: &::Array) -> vortex_error::VortexResult +pub fn vortex_array::vtable::ValidityVTableFromChild::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult pub fn vortex_array::vtable::patches_child(patches: &vortex_array::patches::Patches, idx: usize) -> vortex_array::ArrayRef @@ -23434,7 +23364,7 @@ pub vortex_array::Canonical::Struct(vortex_array::arrays::StructArray) pub vortex_array::Canonical::VarBinView(vortex_array::arrays::VarBinViewArray) -pub vortex_array::Canonical::Variant(vortex_array::arrays::variant::VariantArray) +pub vortex_array::Canonical::Variant(vortex_array::arrays::VariantArray) impl vortex_array::Canonical @@ -23488,13 +23418,13 @@ pub fn vortex_array::Canonical::is_empty(&self) -> bool pub fn vortex_array::Canonical::len(&self) -> usize -impl core::clone::Clone for vortex_array::Canonical +impl vortex_array::Canonical -pub fn vortex_array::Canonical::clone(&self) -> vortex_array::Canonical +pub fn vortex_array::Canonical::to_array_ref(&self) -> vortex_array::ArrayRef -impl core::convert::AsRef for vortex_array::Canonical +impl core::clone::Clone for vortex_array::Canonical -pub fn vortex_array::Canonical::as_ref(&self) -> &(dyn vortex_array::DynArray + 'static) +pub fn vortex_array::Canonical::clone(&self) -> vortex_array::Canonical impl core::convert::From for vortex_array::ArrayRef @@ -23536,11 +23466,11 @@ pub vortex_array::CanonicalView::Struct(&'a vortex_array::arrays::StructArray) pub vortex_array::CanonicalView::VarBinView(&'a vortex_array::arrays::VarBinViewArray) -pub vortex_array::CanonicalView::Variant(&'a vortex_array::arrays::variant::VariantArray) +pub vortex_array::CanonicalView::Variant(&'a vortex_array::arrays::VariantArray) -impl core::convert::AsRef for vortex_array::CanonicalView<'_> +impl vortex_array::CanonicalView<'_> -pub fn vortex_array::CanonicalView<'_>::as_ref(&self) -> &dyn vortex_array::DynArray +pub fn vortex_array::CanonicalView<'_>::to_array_ref(&self) -> vortex_array::ArrayRef impl core::convert::From> for vortex_array::Canonical @@ -23584,9 +23514,9 @@ pub vortex_array::ColumnarView::Canonical(vortex_array::CanonicalView<'a>) pub vortex_array::ColumnarView::Constant(&'a vortex_array::arrays::ConstantArray) -impl<'a> core::convert::AsRef for vortex_array::ColumnarView<'a> +impl vortex_array::ColumnarView<'_> -pub fn vortex_array::ColumnarView<'a>::as_ref(&self) -> &dyn vortex_array::DynArray +pub fn vortex_array::ColumnarView<'_>::to_array_ref(&self) -> vortex_array::ArrayRef pub enum vortex_array::ExecutionStep @@ -23634,110 +23564,6 @@ pub fn vortex_array::AnyColumnar::matches(array: &dyn vortex_array::DynArray) -> pub fn vortex_array::AnyColumnar::try_match<'a>(array: &'a dyn vortex_array::DynArray) -> core::option::Option -#[repr(transparent)] pub struct vortex_array::ArrayAdapter(_) - -impl core::fmt::Debug for vortex_array::ArrayAdapter - -pub fn vortex_array::ArrayAdapter::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result - -impl vortex_array::ArrayEq for vortex_array::ArrayAdapter - -pub fn vortex_array::ArrayAdapter::array_eq(&self, other: &Self, precision: vortex_array::Precision) -> bool - -impl vortex_array::ArrayHash for vortex_array::ArrayAdapter - -pub fn vortex_array::ArrayAdapter::array_hash(&self, state: &mut H, precision: vortex_array::Precision) - -impl vortex_array::ArrayVisitor for vortex_array::ArrayAdapter - -pub fn vortex_array::ArrayAdapter::buffer_handles(&self) -> alloc::vec::Vec - -pub fn vortex_array::ArrayAdapter::buffer_names(&self) -> alloc::vec::Vec - -pub fn vortex_array::ArrayAdapter::buffers(&self) -> alloc::vec::Vec - -pub fn vortex_array::ArrayAdapter::children(&self) -> alloc::vec::Vec - -pub fn vortex_array::ArrayAdapter::children_names(&self) -> alloc::vec::Vec - -pub fn vortex_array::ArrayAdapter::is_host(&self) -> bool - -pub fn vortex_array::ArrayAdapter::metadata(&self) -> vortex_error::VortexResult>> - -pub fn vortex_array::ArrayAdapter::metadata_fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result - -pub fn vortex_array::ArrayAdapter::named_buffers(&self) -> alloc::vec::Vec<(alloc::string::String, vortex_array::buffer::BufferHandle)> - -pub fn vortex_array::ArrayAdapter::named_children(&self) -> alloc::vec::Vec<(alloc::string::String, vortex_array::ArrayRef)> - -pub fn vortex_array::ArrayAdapter::nbuffers(&self) -> usize - -pub fn vortex_array::ArrayAdapter::nchildren(&self) -> usize - -pub fn vortex_array::ArrayAdapter::nth_child(&self, idx: usize) -> core::option::Option - -impl vortex_array::DynArray for vortex_array::ArrayAdapter - -pub fn vortex_array::ArrayAdapter::all_invalid(&self) -> vortex_error::VortexResult - -pub fn vortex_array::ArrayAdapter::all_valid(&self) -> vortex_error::VortexResult - -pub fn vortex_array::ArrayAdapter::append_to_builder(&self, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> - -pub fn vortex_array::ArrayAdapter::as_any(&self) -> &dyn core::any::Any - -pub fn vortex_array::ArrayAdapter::as_any_arc(self: alloc::sync::Arc) -> alloc::sync::Arc<(dyn core::any::Any + core::marker::Send + core::marker::Sync)> - -pub fn vortex_array::ArrayAdapter::dtype(&self) -> &vortex_array::dtype::DType - -pub fn vortex_array::ArrayAdapter::encoding_id(&self) -> vortex_array::vtable::ArrayId - -pub fn vortex_array::ArrayAdapter::filter(&self, mask: vortex_mask::Mask) -> vortex_error::VortexResult - -pub fn vortex_array::ArrayAdapter::invalid_count(&self) -> vortex_error::VortexResult - -pub fn vortex_array::ArrayAdapter::is_empty(&self) -> bool - -pub fn vortex_array::ArrayAdapter::is_invalid(&self, index: usize) -> vortex_error::VortexResult - -pub fn vortex_array::ArrayAdapter::is_valid(&self, index: usize) -> vortex_error::VortexResult - -pub fn vortex_array::ArrayAdapter::len(&self) -> usize - -pub fn vortex_array::ArrayAdapter::scalar_at(&self, index: usize) -> vortex_error::VortexResult - -pub fn vortex_array::ArrayAdapter::slice(&self, range: core::ops::range::Range) -> vortex_error::VortexResult - -pub fn vortex_array::ArrayAdapter::statistics(&self) -> vortex_array::stats::StatsSetRef<'_> - -pub fn vortex_array::ArrayAdapter::take(&self, indices: vortex_array::ArrayRef) -> vortex_error::VortexResult - -pub fn vortex_array::ArrayAdapter::to_array(&self) -> vortex_array::ArrayRef - -pub fn vortex_array::ArrayAdapter::to_canonical(&self) -> vortex_error::VortexResult - -pub fn vortex_array::ArrayAdapter::valid_count(&self) -> vortex_error::VortexResult - -pub fn vortex_array::ArrayAdapter::validity(&self) -> vortex_error::VortexResult - -pub fn vortex_array::ArrayAdapter::validity_mask(&self) -> vortex_error::VortexResult - -pub fn vortex_array::ArrayAdapter::vtable(&self) -> &dyn vortex_array::vtable::DynVTable - -pub fn vortex_array::ArrayAdapter::with_children(&self, children: alloc::vec::Vec) -> vortex_error::VortexResult - -impl vortex_array::scalar_fn::ReduceNode for vortex_array::ArrayAdapter - -pub fn vortex_array::ArrayAdapter::as_any(&self) -> &dyn core::any::Any - -pub fn vortex_array::ArrayAdapter::child(&self, idx: usize) -> vortex_array::scalar_fn::ReduceNodeRef - -pub fn vortex_array::ArrayAdapter::child_count(&self) -> usize - -pub fn vortex_array::ArrayAdapter::node_dtype(&self) -> vortex_error::VortexResult - -pub fn vortex_array::ArrayAdapter::scalar_fn(&self) -> core::option::Option<&vortex_array::scalar_fn::ScalarFnRef> - pub struct vortex_array::CanonicalValidity(pub vortex_array::Canonical) impl vortex_array::Executable for vortex_array::CanonicalValidity @@ -23910,10 +23736,6 @@ impl vortex_array::ArrayEq for core::option::Option pub fn core::option::Option::array_eq(&self, other: &Self, precision: vortex_array::Precision) -> bool -impl vortex_array::ArrayEq for vortex_array::ArrayAdapter - -pub fn vortex_array::ArrayAdapter::array_eq(&self, other: &Self, precision: vortex_array::Precision) -> bool - impl vortex_array::ArrayEq for vortex_array::vtable::Array pub fn vortex_array::vtable::Array::array_eq(&self, other: &Self, precision: vortex_array::Precision) -> bool @@ -23958,10 +23780,6 @@ impl vortex_array::ArrayHash for core::option::Optio pub fn core::option::Option::array_hash(&self, state: &mut H, precision: vortex_array::Precision) -impl vortex_array::ArrayHash for vortex_array::ArrayAdapter - -pub fn vortex_array::ArrayAdapter::array_hash(&self, state: &mut H, precision: vortex_array::Precision) - impl vortex_array::ArrayHash for vortex_array::vtable::Array pub fn vortex_array::vtable::Array::array_hash(&self, state: &mut H, precision: vortex_array::Precision) @@ -24022,34 +23840,6 @@ pub fn alloc::sync::Arc::nchildren(&self) -> usize pub fn alloc::sync::Arc::nth_child(&self, idx: usize) -> core::option::Option -impl vortex_array::ArrayVisitor for vortex_array::ArrayAdapter - -pub fn vortex_array::ArrayAdapter::buffer_handles(&self) -> alloc::vec::Vec - -pub fn vortex_array::ArrayAdapter::buffer_names(&self) -> alloc::vec::Vec - -pub fn vortex_array::ArrayAdapter::buffers(&self) -> alloc::vec::Vec - -pub fn vortex_array::ArrayAdapter::children(&self) -> alloc::vec::Vec - -pub fn vortex_array::ArrayAdapter::children_names(&self) -> alloc::vec::Vec - -pub fn vortex_array::ArrayAdapter::is_host(&self) -> bool - -pub fn vortex_array::ArrayAdapter::metadata(&self) -> vortex_error::VortexResult>> - -pub fn vortex_array::ArrayAdapter::metadata_fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result - -pub fn vortex_array::ArrayAdapter::named_buffers(&self) -> alloc::vec::Vec<(alloc::string::String, vortex_array::buffer::BufferHandle)> - -pub fn vortex_array::ArrayAdapter::named_children(&self) -> alloc::vec::Vec<(alloc::string::String, vortex_array::ArrayRef)> - -pub fn vortex_array::ArrayAdapter::nbuffers(&self) -> usize - -pub fn vortex_array::ArrayAdapter::nchildren(&self) -> usize - -pub fn vortex_array::ArrayAdapter::nth_child(&self, idx: usize) -> core::option::Option - impl vortex_array::ArrayVisitor for vortex_array::vtable::Array pub fn vortex_array::vtable::Array::buffer_handles(&self) -> alloc::vec::Vec @@ -24214,56 +24004,6 @@ pub fn alloc::sync::Arc::vtable(&self) -> &dyn vorte pub fn alloc::sync::Arc::with_children(&self, children: alloc::vec::Vec) -> vortex_error::VortexResult -impl vortex_array::DynArray for vortex_array::ArrayAdapter - -pub fn vortex_array::ArrayAdapter::all_invalid(&self) -> vortex_error::VortexResult - -pub fn vortex_array::ArrayAdapter::all_valid(&self) -> vortex_error::VortexResult - -pub fn vortex_array::ArrayAdapter::append_to_builder(&self, builder: &mut dyn vortex_array::builders::ArrayBuilder, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult<()> - -pub fn vortex_array::ArrayAdapter::as_any(&self) -> &dyn core::any::Any - -pub fn vortex_array::ArrayAdapter::as_any_arc(self: alloc::sync::Arc) -> alloc::sync::Arc<(dyn core::any::Any + core::marker::Send + core::marker::Sync)> - -pub fn vortex_array::ArrayAdapter::dtype(&self) -> &vortex_array::dtype::DType - -pub fn vortex_array::ArrayAdapter::encoding_id(&self) -> vortex_array::vtable::ArrayId - -pub fn vortex_array::ArrayAdapter::filter(&self, mask: vortex_mask::Mask) -> vortex_error::VortexResult - -pub fn vortex_array::ArrayAdapter::invalid_count(&self) -> vortex_error::VortexResult - -pub fn vortex_array::ArrayAdapter::is_empty(&self) -> bool - -pub fn vortex_array::ArrayAdapter::is_invalid(&self, index: usize) -> vortex_error::VortexResult - -pub fn vortex_array::ArrayAdapter::is_valid(&self, index: usize) -> vortex_error::VortexResult - -pub fn vortex_array::ArrayAdapter::len(&self) -> usize - -pub fn vortex_array::ArrayAdapter::scalar_at(&self, index: usize) -> vortex_error::VortexResult - -pub fn vortex_array::ArrayAdapter::slice(&self, range: core::ops::range::Range) -> vortex_error::VortexResult - -pub fn vortex_array::ArrayAdapter::statistics(&self) -> vortex_array::stats::StatsSetRef<'_> - -pub fn vortex_array::ArrayAdapter::take(&self, indices: vortex_array::ArrayRef) -> vortex_error::VortexResult - -pub fn vortex_array::ArrayAdapter::to_array(&self) -> vortex_array::ArrayRef - -pub fn vortex_array::ArrayAdapter::to_canonical(&self) -> vortex_error::VortexResult - -pub fn vortex_array::ArrayAdapter::valid_count(&self) -> vortex_error::VortexResult - -pub fn vortex_array::ArrayAdapter::validity(&self) -> vortex_error::VortexResult - -pub fn vortex_array::ArrayAdapter::validity_mask(&self) -> vortex_error::VortexResult - -pub fn vortex_array::ArrayAdapter::vtable(&self) -> &dyn vortex_array::vtable::DynVTable - -pub fn vortex_array::ArrayAdapter::with_children(&self, children: alloc::vec::Vec) -> vortex_error::VortexResult - impl vortex_array::DynArray for vortex_array::vtable::Array pub fn vortex_array::vtable::Array::all_invalid(&self) -> vortex_error::VortexResult @@ -24430,89 +24170,89 @@ impl vortex_array::IntoArray for vortex_array::Columnar pub fn vortex_array::Columnar::into_array(self) -> vortex_array::ArrayRef -impl vortex_array::IntoArray for vortex_array::arrays::BoolArray +impl vortex_array::IntoArray for vortex_array::arrays::BoolData -pub fn vortex_array::arrays::BoolArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::BoolData::into_array(self) -> vortex_array::ArrayRef -impl vortex_array::IntoArray for vortex_array::arrays::ChunkedArray +impl vortex_array::IntoArray for vortex_array::arrays::ChunkedData -pub fn vortex_array::arrays::ChunkedArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ChunkedData::into_array(self) -> vortex_array::ArrayRef -impl vortex_array::IntoArray for vortex_array::arrays::ConstantArray +impl vortex_array::IntoArray for vortex_array::arrays::ConstantData -pub fn vortex_array::arrays::ConstantArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ConstantData::into_array(self) -> vortex_array::ArrayRef -impl vortex_array::IntoArray for vortex_array::arrays::DecimalArray +impl vortex_array::IntoArray for vortex_array::arrays::DecimalData -pub fn vortex_array::arrays::DecimalArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::DecimalData::into_array(self) -> vortex_array::ArrayRef -impl vortex_array::IntoArray for vortex_array::arrays::ExtensionArray +impl vortex_array::IntoArray for vortex_array::arrays::ExtensionData -pub fn vortex_array::arrays::ExtensionArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ExtensionData::into_array(self) -> vortex_array::ArrayRef -impl vortex_array::IntoArray for vortex_array::arrays::FilterArray +impl vortex_array::IntoArray for vortex_array::arrays::FilterData -pub fn vortex_array::arrays::FilterArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::FilterData::into_array(self) -> vortex_array::ArrayRef -impl vortex_array::IntoArray for vortex_array::arrays::FixedSizeListArray +impl vortex_array::IntoArray for vortex_array::arrays::FixedSizeListData -pub fn vortex_array::arrays::FixedSizeListArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::FixedSizeListData::into_array(self) -> vortex_array::ArrayRef -impl vortex_array::IntoArray for vortex_array::arrays::ListArray +impl vortex_array::IntoArray for vortex_array::arrays::ListData -pub fn vortex_array::arrays::ListArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ListData::into_array(self) -> vortex_array::ArrayRef -impl vortex_array::IntoArray for vortex_array::arrays::ListViewArray +impl vortex_array::IntoArray for vortex_array::arrays::ListViewData -pub fn vortex_array::arrays::ListViewArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ListViewData::into_array(self) -> vortex_array::ArrayRef -impl vortex_array::IntoArray for vortex_array::arrays::MaskedArray +impl vortex_array::IntoArray for vortex_array::arrays::MaskedData -pub fn vortex_array::arrays::MaskedArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::MaskedData::into_array(self) -> vortex_array::ArrayRef -impl vortex_array::IntoArray for vortex_array::arrays::PrimitiveArray +impl vortex_array::IntoArray for vortex_array::arrays::PrimitiveData -pub fn vortex_array::arrays::PrimitiveArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::PrimitiveData::into_array(self) -> vortex_array::ArrayRef -impl vortex_array::IntoArray for vortex_array::arrays::SharedArray +impl vortex_array::IntoArray for vortex_array::arrays::ScalarFnData -pub fn vortex_array::arrays::SharedArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ScalarFnData::into_array(self) -> vortex_array::ArrayRef -impl vortex_array::IntoArray for vortex_array::arrays::StructArray +impl vortex_array::IntoArray for vortex_array::arrays::SharedData -pub fn vortex_array::arrays::StructArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::SharedData::into_array(self) -> vortex_array::ArrayRef -impl vortex_array::IntoArray for vortex_array::arrays::VarBinArray +impl vortex_array::IntoArray for vortex_array::arrays::SliceData -pub fn vortex_array::arrays::VarBinArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::SliceData::into_array(self) -> vortex_array::ArrayRef -impl vortex_array::IntoArray for vortex_array::arrays::VarBinViewArray +impl vortex_array::IntoArray for vortex_array::arrays::StructData -pub fn vortex_array::arrays::VarBinViewArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::StructData::into_array(self) -> vortex_array::ArrayRef -impl vortex_array::IntoArray for vortex_array::arrays::datetime::TemporalArray +impl vortex_array::IntoArray for vortex_array::arrays::VarBinData -pub fn vortex_array::arrays::datetime::TemporalArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::VarBinData::into_array(self) -> vortex_array::ArrayRef -impl vortex_array::IntoArray for vortex_array::arrays::dict::DictArray +impl vortex_array::IntoArray for vortex_array::arrays::VarBinViewData -pub fn vortex_array::arrays::dict::DictArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::VarBinViewData::into_array(self) -> vortex_array::ArrayRef -impl vortex_array::IntoArray for vortex_array::arrays::null::NullArray +impl vortex_array::IntoArray for vortex_array::arrays::datetime::TemporalData -pub fn vortex_array::arrays::null::NullArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::datetime::TemporalData::into_array(self) -> vortex_array::ArrayRef -impl vortex_array::IntoArray for vortex_array::arrays::scalar_fn::ScalarFnArray +impl vortex_array::IntoArray for vortex_array::arrays::dict::DictData -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::dict::DictData::into_array(self) -> vortex_array::ArrayRef -impl vortex_array::IntoArray for vortex_array::arrays::slice::SliceArray +impl vortex_array::IntoArray for vortex_array::arrays::null::NullData -pub fn vortex_array::arrays::slice::SliceArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::null::NullData::into_array(self) -> vortex_array::ArrayRef -impl vortex_array::IntoArray for vortex_array::arrays::variant::VariantArray +impl vortex_array::IntoArray for vortex_array::arrays::variant::VariantData -pub fn vortex_array::arrays::variant::VariantArray::into_array(self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::variant::VariantData::into_array(self) -> vortex_array::ArrayRef impl vortex_array::IntoArray for vortex_buffer::bit::buf::BitBuffer @@ -24588,23 +24328,23 @@ pub fn vortex_array::ToCanonical::to_varbinview(&self) -> vortex_array::arrays:: impl vortex_array::ToCanonical for A -pub fn A::to_bool(&self) -> vortex_array::arrays::BoolArray +pub fn A::to_bool(&self) -> vortex_array::vtable::Array -pub fn A::to_decimal(&self) -> vortex_array::arrays::DecimalArray +pub fn A::to_decimal(&self) -> vortex_array::vtable::Array -pub fn A::to_extension(&self) -> vortex_array::arrays::ExtensionArray +pub fn A::to_extension(&self) -> vortex_array::vtable::Array -pub fn A::to_fixed_size_list(&self) -> vortex_array::arrays::FixedSizeListArray +pub fn A::to_fixed_size_list(&self) -> vortex_array::vtable::Array -pub fn A::to_listview(&self) -> vortex_array::arrays::ListViewArray +pub fn A::to_listview(&self) -> vortex_array::vtable::Array -pub fn A::to_null(&self) -> vortex_array::arrays::null::NullArray +pub fn A::to_null(&self) -> vortex_array::vtable::Array -pub fn A::to_primitive(&self) -> vortex_array::arrays::PrimitiveArray +pub fn A::to_primitive(&self) -> vortex_array::vtable::Array -pub fn A::to_struct(&self) -> vortex_array::arrays::StructArray +pub fn A::to_struct(&self) -> vortex_array::vtable::Array -pub fn A::to_varbinview(&self) -> vortex_array::arrays::VarBinViewArray +pub fn A::to_varbinview(&self) -> vortex_array::vtable::Array pub trait vortex_array::VortexSessionExecute diff --git a/vortex-array/src/arrays/bool/array.rs b/vortex-array/src/arrays/bool/array.rs index b465ca8a9d9..2d5c18f72a1 100644 --- a/vortex-array/src/arrays/bool/array.rs +++ b/vortex-array/src/arrays/bool/array.rs @@ -359,6 +359,7 @@ mod tests { use vortex_buffer::BitBufferMut; use vortex_buffer::buffer; + use crate::IntoArray; use crate::LEGACY_SESSION; use crate::VortexSessionExecute; use crate::arrays::BoolArray; diff --git a/vortex-array/src/arrays/bool/vtable/operations.rs b/vortex-array/src/arrays/bool/vtable/operations.rs index 1c926fa1db1..98e93121959 100644 --- a/vortex-array/src/arrays/bool/vtable/operations.rs +++ b/vortex-array/src/arrays/bool/vtable/operations.rs @@ -29,6 +29,7 @@ mod tests { use super::*; use crate::IntoArray; use crate::ToCanonical; + use crate::arrays::BoolArray; use crate::assert_arrays_eq; #[test] diff --git a/vortex-array/src/arrays/chunked/array.rs b/vortex-array/src/arrays/chunked/array.rs index cf04c83d1b6..70e7354cab6 100644 --- a/vortex-array/src/arrays/chunked/array.rs +++ b/vortex-array/src/arrays/chunked/array.rs @@ -351,7 +351,7 @@ mod test { // Should be all_valid since all non-empty chunks are all_valid assert!(chunked.clone().into_array().all_valid().unwrap()); - assert!(!chunked.clone().into_array().all_invalid().unwrap()); + assert!(!chunked.into_array().all_invalid().unwrap()); Ok(()) } @@ -371,7 +371,7 @@ mod test { // Should be all_invalid since all non-empty chunks are all_invalid assert!(!chunked.clone().into_array().all_valid().unwrap()); - assert!(chunked.clone().into_array().all_invalid().unwrap()); + assert!(chunked.into_array().all_invalid().unwrap()); Ok(()) } @@ -391,7 +391,7 @@ mod test { // Should be neither all_valid nor all_invalid assert!(!chunked.clone().into_array().all_valid().unwrap()); - assert!(!chunked.clone().into_array().all_invalid().unwrap()); + assert!(!chunked.into_array().all_invalid().unwrap()); Ok(()) } diff --git a/vortex-array/src/arrays/decimal/compute/cast.rs b/vortex-array/src/arrays/decimal/compute/cast.rs index 21603124e1c..3f15eaf8d42 100644 --- a/vortex-array/src/arrays/decimal/compute/cast.rs +++ b/vortex-array/src/arrays/decimal/compute/cast.rs @@ -381,7 +381,7 @@ mod tests { assert_eq!(casted.len(), 3); // Check validity is preserved - let mask = casted.validity_mask().unwrap(); + let mask = casted.validity_mask(); assert!(mask.value(0)); assert!(!mask.value(1)); assert!(mask.value(2)); diff --git a/vortex-array/src/arrays/decimal/compute/fill_null.rs b/vortex-array/src/arrays/decimal/compute/fill_null.rs index 743a16ef20d..3ccd894508f 100644 --- a/vortex-array/src/arrays/decimal/compute/fill_null.rs +++ b/vortex-array/src/arrays/decimal/compute/fill_null.rs @@ -126,7 +126,7 @@ mod tests { p.buffer::().as_slice(), vec![4200, 800, 4200, 1000, 4200] ); - assert!(p.validity_mask().unwrap().all_true()); + assert!(p.validity_mask().all_true()); } #[test] diff --git a/vortex-array/src/arrays/filter/array.rs b/vortex-array/src/arrays/filter/array.rs index 83b95275db9..604bfd51274 100644 --- a/vortex-array/src/arrays/filter/array.rs +++ b/vortex-array/src/arrays/filter/array.rs @@ -85,6 +85,11 @@ impl FilterData { } impl Array { + /// Creates a new [`FilterArray`]. + pub fn new(array: ArrayRef, mask: Mask) -> Self { + Array::from_inner(FilterData::new(array, mask)) + } + /// Constructs a new `FilterArray`. pub fn try_new(array: ArrayRef, mask: Mask) -> VortexResult { Ok(Array::from_inner(FilterData::try_new(array, mask)?)) diff --git a/vortex-array/src/arrays/list/tests.rs b/vortex-array/src/arrays/list/tests.rs index c6b6b99246c..fd52d8207ed 100644 --- a/vortex-array/src/arrays/list/tests.rs +++ b/vortex-array/src/arrays/list/tests.rs @@ -912,8 +912,8 @@ fn test_recursive_compact_list_of_lists() { // Verify data integrity is preserved assert_eq!( - non_recursive.scalar_at(0).unwrap(), - recursive.scalar_at(0).unwrap() + non_recursive.clone().into_array().scalar_at(0).unwrap(), + recursive.clone().into_array().scalar_at(0).unwrap() ); } diff --git a/vortex-array/src/arrays/masked/tests.rs b/vortex-array/src/arrays/masked/tests.rs index 4b28a171ffd..2c723990d1b 100644 --- a/vortex-array/src/arrays/masked/tests.rs +++ b/vortex-array/src/arrays/masked/tests.rs @@ -101,11 +101,5 @@ fn test_masked_child_preserves_length(#[case] validity: Validity) { assert_eq!(array.len(), len); let mut ctx = LEGACY_SESSION.create_execution_ctx(); - assert!( - array - .validity() - .unwrap() - .mask_eq(&validity, &mut ctx) - .unwrap(), - ); + assert!(array.validity().mask_eq(&validity, &mut ctx).unwrap(),); } diff --git a/vortex-array/src/arrays/masked/vtable/canonical.rs b/vortex-array/src/arrays/masked/vtable/canonical.rs index 6954479a57b..f56896bc981 100644 --- a/vortex-array/src/arrays/masked/vtable/canonical.rs +++ b/vortex-array/src/arrays/masked/vtable/canonical.rs @@ -6,6 +6,7 @@ mod tests { use rstest::rstest; use vortex_error::VortexResult; + use crate::DynArray; use crate::IntoArray; use crate::ToCanonical; use crate::arrays::MaskedArray; diff --git a/vortex-array/src/arrays/masked/vtable/mod.rs b/vortex-array/src/arrays/masked/vtable/mod.rs index 627fed68e68..0ec40eea686 100644 --- a/vortex-array/src/arrays/masked/vtable/mod.rs +++ b/vortex-array/src/arrays/masked/vtable/mod.rs @@ -230,6 +230,7 @@ mod tests { use crate::ArrayContext; use crate::Canonical; + use crate::DynArray; use crate::IntoArray; use crate::LEGACY_SESSION; use crate::VortexSessionExecute; @@ -290,7 +291,7 @@ mod tests { assert!(decoded.is::()); assert_eq!( - array.as_ref().display_values().to_string(), + array.to_array().display_values().to_string(), decoded.display_values().to_string() ); } @@ -316,7 +317,7 @@ mod tests { let result: Canonical = array.into_array().execute(&mut ctx)?; assert_eq!( - result.as_ref().dtype().nullability(), + result.dtype().nullability(), Nullability::Nullable, "MaskedArray execute should produce Nullable dtype" ); diff --git a/vortex-array/src/arrays/null/compute/mod.rs b/vortex-array/src/arrays/null/compute/mod.rs index 55fcf7b120b..f904486236e 100644 --- a/vortex-array/src/arrays/null/compute/mod.rs +++ b/vortex-array/src/arrays/null/compute/mod.rs @@ -14,6 +14,7 @@ mod test { use vortex_buffer::buffer; use vortex_mask::Mask; + use crate::DynArray; use crate::IntoArray; use crate::ToCanonical; use crate::arrays::NullArray; @@ -29,7 +30,10 @@ mod test { let sliced = nulls.slice(0..4).unwrap().to_null(); assert_eq!(sliced.len(), 4); - assert!(matches!(sliced.validity_mask().unwrap(), Mask::AllFalse(4))); + assert!(matches!( + DynArray::validity_mask(&sliced).unwrap(), + Mask::AllFalse(4) + )); } #[test] @@ -41,7 +45,10 @@ mod test { .to_null(); assert_eq!(taken.len(), 5); - assert!(matches!(taken.validity_mask().unwrap(), Mask::AllFalse(5))); + assert!(matches!( + DynArray::validity_mask(&taken).unwrap(), + Mask::AllFalse(5) + )); } #[test] diff --git a/vortex-array/src/arrays/primitive/array/mod.rs b/vortex-array/src/arrays/primitive/array/mod.rs index 325161d2d2c..7ec7f1f4de1 100644 --- a/vortex-array/src/arrays/primitive/array/mod.rs +++ b/vortex-array/src/arrays/primitive/array/mod.rs @@ -195,6 +195,11 @@ impl Array { Array::from_inner(PrimitiveData::new(buffer, validity)) } + /// Constructs a new `PrimitiveArray`. + pub fn try_new(buffer: Buffer, validity: Validity) -> VortexResult { + Ok(Array::from_inner(PrimitiveData::try_new(buffer, validity)?)) + } + /// Creates a new [`PrimitiveArray`] without validation. /// /// # Safety diff --git a/vortex-array/src/arrays/primitive/compute/cast.rs b/vortex-array/src/arrays/primitive/compute/cast.rs index 8599b5b07b9..13544a638dc 100644 --- a/vortex-array/src/arrays/primitive/compute/cast.rs +++ b/vortex-array/src/arrays/primitive/compute/cast.rs @@ -249,7 +249,7 @@ mod test { PrimitiveArray::from_option_iter([None, Some(0u32), Some(10)]) ); assert_eq!( - p.validity_mask().unwrap(), + p.validity_mask(), Mask::from(BitBuffer::from(vec![false, true, true])) ); } diff --git a/vortex-array/src/arrays/primitive/compute/fill_null.rs b/vortex-array/src/arrays/primitive/compute/fill_null.rs index 651e3a20462..039e2fd3a2a 100644 --- a/vortex-array/src/arrays/primitive/compute/fill_null.rs +++ b/vortex-array/src/arrays/primitive/compute/fill_null.rs @@ -72,7 +72,7 @@ mod test { .unwrap() .to_primitive(); assert_arrays_eq!(p, PrimitiveArray::from_iter([42u8, 8, 42, 10, 42])); - assert!(p.validity_mask().unwrap().all_true()); + assert!(p.validity_mask().all_true()); } #[test] @@ -85,7 +85,7 @@ mod test { .unwrap() .to_primitive(); assert_arrays_eq!(p, PrimitiveArray::from_iter([255u8, 255, 255, 255, 255])); - assert!(p.validity_mask().unwrap().all_true()); + assert!(p.validity_mask().all_true()); } #[test] @@ -100,7 +100,7 @@ mod test { .unwrap() .to_primitive(); assert_arrays_eq!(p, PrimitiveArray::from_iter([8u8, 10, 12, 14, 16])); - assert!(p.validity_mask().unwrap().all_true()); + assert!(p.validity_mask().all_true()); } #[test] @@ -108,6 +108,6 @@ mod test { let arr = buffer![8u8, 10, 12, 14, 16].into_array(); let p = arr.fill_null(Scalar::from(255u8)).unwrap().to_primitive(); assert_arrays_eq!(p, PrimitiveArray::from_iter([8u8, 10, 12, 14, 16])); - assert!(p.validity_mask().unwrap().all_true()); + assert!(p.validity_mask().all_true()); } } diff --git a/vortex-array/src/arrays/scalar_fn/vtable/operations.rs b/vortex-array/src/arrays/scalar_fn/vtable/operations.rs index c3995baf77b..82993cc15b9 100644 --- a/vortex-array/src/arrays/scalar_fn/vtable/operations.rs +++ b/vortex-array/src/arrays/scalar_fn/vtable/operations.rs @@ -64,7 +64,7 @@ mod tests { use crate::IntoArray; use crate::arrays::BoolArray; use crate::arrays::PrimitiveArray; - use crate::arrays::scalar_fn::array::ScalarFnArray; + use crate::arrays::ScalarFnArray; use crate::assert_arrays_eq; use crate::scalar_fn::ScalarFn; use crate::scalar_fn::fns::binary::Binary; diff --git a/vortex-array/src/arrays/struct_/array.rs b/vortex-array/src/arrays/struct_/array.rs index 6de577aaa29..a382b694107 100644 --- a/vortex-array/src/arrays/struct_/array.rs +++ b/vortex-array/src/arrays/struct_/array.rs @@ -557,6 +557,18 @@ impl Array { iter, validity, )?)) } + + /// Create a [`StructArray`] from an iterator of (name, array) pairs. + pub fn try_from_iter, A: IntoArray, T: IntoIterator>( + iter: T, + ) -> VortexResult { + Ok(Array::from_inner(StructData::try_from_iter(iter)?)) + } + + /// Create a fieldless [`StructArray`] with the given length. + pub fn new_fieldless_with_len(len: usize) -> Self { + Array::from_inner(StructData::new_fieldless_with_len(len)) + } } impl StructData { diff --git a/vortex-array/src/arrays/varbin/array.rs b/vortex-array/src/arrays/varbin/array.rs index 7fe4e473645..49961c39d91 100644 --- a/vortex-array/src/arrays/varbin/array.rs +++ b/vortex-array/src/arrays/varbin/array.rs @@ -452,6 +452,11 @@ impl VarBinData { } impl Array { + /// Creates a new [`VarBinArray`]. + pub fn new(offsets: ArrayRef, bytes: ByteBuffer, dtype: DType, validity: Validity) -> Self { + Array::from_inner(VarBinData::new(offsets, bytes, dtype, validity)) + } + /// Creates a new [`VarBinArray`] without validation. /// /// # Safety @@ -566,3 +571,77 @@ impl<'a> FromIterator> for VarBinData { Self::from_iter(iter, DType::Utf8(Nullability::Nullable)) } } + +// --- From and FromIterator forwarding for Array --- + +impl From> for Array { + fn from(value: Vec<&[u8]>) -> Self { + Array::from_inner(VarBinData::from(value)) + } +} + +impl From>> for Array { + fn from(value: Vec>) -> Self { + Array::from_inner(VarBinData::from(value)) + } +} + +impl From> for Array { + fn from(value: Vec) -> Self { + Array::from_inner(VarBinData::from(value)) + } +} + +impl From> for Array { + fn from(value: Vec<&str>) -> Self { + Array::from_inner(VarBinData::from(value)) + } +} + +impl From>> for Array { + fn from(value: Vec>) -> Self { + Array::from_inner(VarBinData::from(value)) + } +} + +impl From>>> for Array { + fn from(value: Vec>>) -> Self { + Array::from_inner(VarBinData::from(value)) + } +} + +impl From>> for Array { + fn from(value: Vec>) -> Self { + Array::from_inner(VarBinData::from(value)) + } +} + +impl From>> for Array { + fn from(value: Vec>) -> Self { + Array::from_inner(VarBinData::from(value)) + } +} + +impl<'a> FromIterator> for Array { + fn from_iter>>(iter: T) -> Self { + Array::from_inner(>::from_iter(iter)) + } +} + +impl FromIterator>> for Array { + fn from_iter>>>(iter: T) -> Self { + Array::from_inner(>::from_iter(iter)) + } +} + +impl FromIterator> for Array { + fn from_iter>>(iter: T) -> Self { + Array::from_inner(>::from_iter(iter)) + } +} + +impl<'a> FromIterator> for Array { + fn from_iter>>(iter: T) -> Self { + Array::from_inner(>::from_iter(iter)) + } +} diff --git a/vortex-array/src/arrays/varbin/compute/compare.rs b/vortex-array/src/arrays/varbin/compute/compare.rs index 2b67bd29d1a..5bb411a1602 100644 --- a/vortex-array/src/arrays/varbin/compute/compare.rs +++ b/vortex-array/src/arrays/varbin/compute/compare.rs @@ -177,7 +177,7 @@ mod test { .to_bool(); assert_eq!( - &result.validity_mask().unwrap().to_bit_buffer(), + &result.validity_mask().to_bit_buffer(), &BitBuffer::from_iter([true, false, true]) ); assert_eq!( @@ -203,7 +203,7 @@ mod test { .to_bool(); assert_eq!( - result.validity_mask().unwrap().to_bit_buffer(), + result.validity_mask().to_bit_buffer(), BitBuffer::from_iter([false, false, true]) ); assert_eq!( diff --git a/vortex-array/src/arrays/varbinview/array.rs b/vortex-array/src/arrays/varbinview/array.rs index 936fd04c240..74794a4621a 100644 --- a/vortex-array/src/arrays/varbinview/array.rs +++ b/vortex-array/src/arrays/varbinview/array.rs @@ -542,6 +542,10 @@ impl VarBinViewData { impl Array { /// Construct a [`VarBinViewArray`] from an iterator of optional byte slices. + #[expect( + clippy::same_name_method, + reason = "intentionally named from_iter like Iterator::from_iter" + )] pub fn from_iter, I: IntoIterator>>( iter: I, dtype: DType, @@ -569,6 +573,18 @@ impl Array { Array::from_inner(VarBinViewData::from_iter_nullable_bin(iter)) } + /// Creates a new [`VarBinViewArray`]. + pub fn try_new( + views: Buffer, + buffers: Arc<[ByteBuffer]>, + dtype: DType, + validity: Validity, + ) -> VortexResult { + Ok(Array::from_inner(VarBinViewData::try_new( + views, buffers, dtype, validity, + )?)) + } + /// Creates a new [`VarBinViewArray`] without validation. /// /// # Safety @@ -633,3 +649,29 @@ impl<'a> FromIterator> for VarBinViewData { Self::from_iter_nullable_str(iter) } } + +// --- FromIterator forwarding for Array --- + +impl<'a> FromIterator> for Array { + fn from_iter>>(iter: T) -> Self { + Array::from_inner(>::from_iter(iter)) + } +} + +impl FromIterator>> for Array { + fn from_iter>>>(iter: T) -> Self { + Array::from_inner(>::from_iter(iter)) + } +} + +impl FromIterator> for Array { + fn from_iter>>(iter: T) -> Self { + Array::from_inner(>::from_iter(iter)) + } +} + +impl<'a> FromIterator> for Array { + fn from_iter>>(iter: T) -> Self { + Array::from_inner(>::from_iter(iter)) + } +} diff --git a/vortex-array/src/builders/varbinview.rs b/vortex-array/src/builders/varbinview.rs index ab65abdf7d2..5cb157116e6 100644 --- a/vortex-array/src/builders/varbinview.rs +++ b/vortex-array/src/builders/varbinview.rs @@ -824,6 +824,7 @@ impl RewritingViewAdjustment { mod tests { use vortex_error::VortexResult; + use crate::DynArray; use crate::IntoArray; use crate::LEGACY_SESSION; use crate::VortexSessionExecute; diff --git a/vortex-array/src/patches.rs b/vortex-array/src/patches.rs index 7dff4934f06..388ac1966ae 100644 --- a/vortex-array/src/patches.rs +++ b/vortex-array/src/patches.rs @@ -1289,7 +1289,7 @@ mod test { ); assert_arrays_eq!(primitive_indices, PrimitiveArray::from_iter([0u64])); assert_eq!( - primitive_values.validity_mask().unwrap(), + primitive_values.validity_mask(), Mask::from_iter(vec![true]) ); } @@ -1323,7 +1323,7 @@ mod test { assert_arrays_eq!(taken.indices(), PrimitiveArray::from_iter([0u64, 1])); assert_eq!( - primitive_values.validity_mask().unwrap(), + primitive_values.validity_mask(), Mask::from_iter([true, false]) ); } diff --git a/vortex-array/src/scalar_fn/fns/list_contains/mod.rs b/vortex-array/src/scalar_fn/fns/list_contains/mod.rs index d88885f3033..31f1a4c5b56 100644 --- a/vortex-array/src/scalar_fn/fns/list_contains/mod.rs +++ b/vortex-array/src/scalar_fn/fns/list_contains/mod.rs @@ -781,7 +781,7 @@ mod tests { }; let elem = ConstantArray::new(scalar, list_array.len()); let expr = list_contains(root(), lit(elem.scalar().clone())); - let result = list_array.apply(&expr).unwrap(); + let result = list_array.to_array().apply(&expr).unwrap(); assert_arrays_eq!(result, expected); } @@ -798,7 +798,7 @@ mod tests { .into_array(); let expr = list_contains(root(), lit(2i32)); - let contains = list_array.apply(&expr).unwrap(); + let contains = list_array.to_array().apply(&expr).unwrap(); assert!(contains.is::(), "Expected constant result"); let expected = BoolArray::from_iter([true, true]); assert_arrays_eq!(contains, expected); @@ -816,7 +816,7 @@ mod tests { .into_array(); let expr = list_contains(root(), lit(2i32)); - let contains = list_array.apply(&expr).unwrap(); + let contains = list_array.to_array().apply(&expr).unwrap(); assert!(contains.is::(), "Expected constant result"); let expected = BoolArray::new( @@ -859,7 +859,7 @@ mod tests { }; let expr = list_contains(root(), lit(42i32)); - let result = list_array.apply(&expr).unwrap(); + let result = list_array.to_array().apply(&expr).unwrap(); let expected = BoolArray::from_iter([false, false, false, false]); assert_arrays_eq!(result, expected); @@ -884,7 +884,7 @@ mod tests { // Searching for null let null_scalar = Scalar::null(DType::Primitive(I32, Nullability::Nullable)); let expr = list_contains(root(), lit(null_scalar)); - let result = list_array.apply(&expr).unwrap(); + let result = list_array.to_array().apply(&expr).unwrap(); let expected = BoolArray::new( [false, false, false].into_iter().collect(), @@ -894,7 +894,7 @@ mod tests { // Searching for non-null let expr2 = list_contains(root(), lit(42i32)); - let result2 = list_array.apply(&expr2).unwrap(); + let result2 = list_array.to_array().apply(&expr2).unwrap(); let expected2 = BoolArray::from_iter([false, false, false]); assert_arrays_eq!(result2, expected2); @@ -911,13 +911,13 @@ mod tests { ListViewArray::new(elements.into_array(), offsets, sizes, Validity::NonNullable); let expr = list_contains(root(), lit(2i32)); - let result = list_array.apply(&expr).unwrap(); + let result = list_array.to_array().apply(&expr).unwrap(); let expected = BoolArray::from_iter([false, true, false, false]); assert_arrays_eq!(result, expected); let expr5 = list_contains(root(), lit(5i32)); - let result5 = list_array.apply(&expr5).unwrap(); + let result5 = list_array.to_array().apply(&expr5).unwrap(); let expected5 = BoolArray::from_iter([false, false, true, false]); assert_arrays_eq!(result5, expected5); @@ -933,13 +933,13 @@ mod tests { ListViewArray::new(elements.into_array(), offsets, sizes, Validity::NonNullable); let expr = list_contains(root(), lit(255i32)); - let result = list_array.apply(&expr).unwrap(); + let result = list_array.to_array().apply(&expr).unwrap(); let expected = BoolArray::from_iter([false, false, false, true]); assert_arrays_eq!(result, expected); let expr_zero = list_contains(root(), lit(0i32)); - let result_zero = list_array.apply(&expr_zero).unwrap(); + let result_zero = list_array.to_array().apply(&expr_zero).unwrap(); let expected_zero = BoolArray::from_iter([true, false, false, false]); assert_arrays_eq!(result_zero, expected_zero); diff --git a/vortex-btrblocks/public-api.lock b/vortex-btrblocks/public-api.lock index 55d23a96a26..c3cf37445da 100644 --- a/vortex-btrblocks/public-api.lock +++ b/vortex-btrblocks/public-api.lock @@ -272,13 +272,13 @@ pub type vortex_btrblocks::IntegerStats::ArrayVTable = vortex_array::arrays::pri pub fn vortex_btrblocks::IntegerStats::generate(input: &::Array) -> Self -pub fn vortex_btrblocks::IntegerStats::generate_opts(input: &vortex_array::arrays::primitive::array::PrimitiveArray, opts: vortex_btrblocks::GenerateStatsOptions) -> Self +pub fn vortex_btrblocks::IntegerStats::generate_opts(input: &vortex_array::arrays::primitive::array::PrimitiveData, opts: vortex_btrblocks::GenerateStatsOptions) -> Self pub fn vortex_btrblocks::IntegerStats::sample(&self, sample_size: u32, sample_count: u32) -> Self pub fn vortex_btrblocks::IntegerStats::sample_opts(&self, sample_size: u32, sample_count: u32, opts: vortex_btrblocks::GenerateStatsOptions) -> Self -pub fn vortex_btrblocks::IntegerStats::source(&self) -> &vortex_array::arrays::primitive::array::PrimitiveArray +pub fn vortex_btrblocks::IntegerStats::source(&self) -> &vortex_array::arrays::primitive::array::PrimitiveData pub trait vortex_btrblocks::CanonicalCompressor @@ -320,12 +320,12 @@ pub type vortex_btrblocks::IntegerStats::ArrayVTable = vortex_array::arrays::pri pub fn vortex_btrblocks::IntegerStats::generate(input: &::Array) -> Self -pub fn vortex_btrblocks::IntegerStats::generate_opts(input: &vortex_array::arrays::primitive::array::PrimitiveArray, opts: vortex_btrblocks::GenerateStatsOptions) -> Self +pub fn vortex_btrblocks::IntegerStats::generate_opts(input: &vortex_array::arrays::primitive::array::PrimitiveData, opts: vortex_btrblocks::GenerateStatsOptions) -> Self pub fn vortex_btrblocks::IntegerStats::sample(&self, sample_size: u32, sample_count: u32) -> Self pub fn vortex_btrblocks::IntegerStats::sample_opts(&self, sample_size: u32, sample_count: u32, opts: vortex_btrblocks::GenerateStatsOptions) -> Self -pub fn vortex_btrblocks::IntegerStats::source(&self) -> &vortex_array::arrays::primitive::array::PrimitiveArray +pub fn vortex_btrblocks::IntegerStats::source(&self) -> &vortex_array::arrays::primitive::array::PrimitiveData -pub fn vortex_btrblocks::integer_dictionary_encode(stats: &vortex_btrblocks::IntegerStats) -> vortex_array::arrays::dict::array::DictArray +pub fn vortex_btrblocks::integer_dictionary_encode(stats: &vortex_btrblocks::IntegerStats) -> vortex_array::arrays::dict::vtable::DictArray diff --git a/vortex-btrblocks/src/compressor/float/dictionary.rs b/vortex-btrblocks/src/compressor/float/dictionary.rs index 1d3a61d8bff..24703f4a356 100644 --- a/vortex-btrblocks/src/compressor/float/dictionary.rs +++ b/vortex-btrblocks/src/compressor/float/dictionary.rs @@ -131,6 +131,6 @@ mod tests { Validity::Array(BoolArray::from_iter([true, true, true, false, true]).into_array()), ) .into_array(); - assert_arrays_eq!(undict.as_ref(), expected.as_ref()); + assert_arrays_eq!(undict, expected); } } diff --git a/vortex-btrblocks/src/compressor/float/mod.rs b/vortex-btrblocks/src/compressor/float/mod.rs index d6d93a48f23..2e53066616f 100644 --- a/vortex-btrblocks/src/compressor/float/mod.rs +++ b/vortex-btrblocks/src/compressor/float/mod.rs @@ -633,7 +633,7 @@ mod tests { let decoded = compressed; let expected = Buffer::copy_from(&values).into_array(); - assert_arrays_eq!(decoded.as_ref(), expected.as_ref()); + assert_arrays_eq!(decoded, expected); Ok(()) } diff --git a/vortex-btrblocks/src/compressor/integer/dictionary.rs b/vortex-btrblocks/src/compressor/integer/dictionary.rs index 97263db9aba..f04cb7a1f06 100644 --- a/vortex-btrblocks/src/compressor/integer/dictionary.rs +++ b/vortex-btrblocks/src/compressor/integer/dictionary.rs @@ -147,6 +147,6 @@ mod tests { Validity::Array(BoolArray::from_iter([true, true, true, false, true]).into_array()), ) .into_array(); - assert_arrays_eq!(undict.as_ref(), expected.as_ref()); + assert_arrays_eq!(undict, expected); } } diff --git a/vortex-btrblocks/src/compressor/integer/mod.rs b/vortex-btrblocks/src/compressor/integer/mod.rs index 2c77b83f7b5..a9013e000a3 100644 --- a/vortex-btrblocks/src/compressor/integer/mod.rs +++ b/vortex-btrblocks/src/compressor/integer/mod.rs @@ -978,7 +978,7 @@ mod tests { let expected = PrimitiveArray::new(buffer![189u8, 189, 189, 0, 0], array.validity().clone()) .into_array(); - assert_arrays_eq!(decoded.as_ref(), expected.as_ref()); + assert_arrays_eq!(decoded, expected); Ok(()) } @@ -1004,7 +1004,7 @@ mod tests { array.validity().clone(), ) .into_array(); - assert_arrays_eq!(decoded.as_ref(), expected.as_ref()); + assert_arrays_eq!(decoded, expected); Ok(()) } @@ -1022,7 +1022,7 @@ mod tests { assert!(compressed.is::()); let decoded = compressed; let expected = PrimitiveArray::from_option_iter(values.into_iter().map(Some)).into_array(); - assert_arrays_eq!(decoded.as_ref(), expected.as_ref()); + assert_arrays_eq!(decoded, expected); Ok(()) } @@ -1044,7 +1044,7 @@ mod tests { let decoded = compressed; let expected = Buffer::copy_from(&values).into_array(); - assert_arrays_eq!(decoded.as_ref(), expected.as_ref()); + assert_arrays_eq!(decoded, expected); Ok(()) } diff --git a/vortex-cuda/src/dynamic_dispatch/mod.rs b/vortex-cuda/src/dynamic_dispatch/mod.rs index 3bdd3f25315..33317320478 100644 --- a/vortex-cuda/src/dynamic_dispatch/mod.rs +++ b/vortex-cuda/src/dynamic_dispatch/mod.rs @@ -289,14 +289,15 @@ mod tests { use vortex::array::validity::Validity::NonNullable; use vortex::buffer::Buffer; use vortex::dtype::PType; - use vortex::encodings::alp::ALPArray; + use vortex::encodings::alp::ALP; use vortex::encodings::alp::ALPFloat; use vortex::encodings::alp::Exponents; use vortex::encodings::alp::alp_encode; + use vortex::encodings::fastlanes::BitPacked; use vortex::encodings::fastlanes::BitPackedArray; - use vortex::encodings::fastlanes::FoRArray; - use vortex::encodings::runend::RunEndArray; - use vortex::encodings::zigzag::ZigZagArray; + use vortex::encodings::fastlanes::FoR; + use vortex::encodings::runend::RunEnd; + use vortex::encodings::zigzag::ZigZag; use vortex::error::VortexExpect; use vortex::error::VortexResult; use vortex::session::VortexSession; @@ -318,7 +319,7 @@ mod tests { .map(|i| ((i as u64) % (max_val + 1)) as u32) .collect(); let primitive = PrimitiveArray::new(Buffer::from(values), NonNullable); - BitPackedArray::encode(&primitive.into_array(), bit_width) + BitPacked::encode(&primitive.into_array(), bit_width) .vortex_expect("failed to create BitPacked array") } @@ -546,7 +547,7 @@ mod tests { let expected: Vec = raw.iter().map(|&v| v + reference).collect(); let bp = make_bitpacked_array_u32(bit_width, len); - let for_arr = FoRArray::try_new(bp.into_array(), Scalar::from(reference))?; + let for_arr = FoR::try_new(bp.into_array(), Scalar::from(reference))?; let cuda_ctx = CudaSession::create_execution_ctx(&VortexSession::empty())?; let plan = UnmaterializedPlan::new(&for_arr.into_array())?.materialize(&cuda_ctx)?; @@ -572,7 +573,7 @@ mod tests { let ends_arr = PrimitiveArray::new(Buffer::from(ends), NonNullable).into_array(); let values_arr = PrimitiveArray::new(Buffer::from(values), NonNullable).into_array(); - let re = RunEndArray::new(ends_arr, values_arr); + let re = RunEnd::new(ends_arr, values_arr); let cuda_ctx = CudaSession::create_execution_ctx(&VortexSession::empty())?; let plan = UnmaterializedPlan::new(&re.into_array())?.materialize(&cuda_ctx)?; @@ -598,12 +599,12 @@ mod tests { // BitPack+FoR the dict values let dict_prim = PrimitiveArray::new(Buffer::from(dict_residuals), NonNullable); - let dict_bp = BitPackedArray::encode(&dict_prim.into_array(), 6)?; - let dict_for = FoRArray::try_new(dict_bp.into_array(), Scalar::from(dict_reference))?; + let dict_bp = BitPacked::encode(&dict_prim.into_array(), 6)?; + let dict_for = FoR::try_new(dict_bp.into_array(), Scalar::from(dict_reference))?; // BitPack the codes let codes_prim = PrimitiveArray::new(Buffer::from(codes), NonNullable); - let codes_bp = BitPackedArray::encode(&codes_prim.into_array(), 6)?; + let codes_bp = BitPacked::encode(&codes_prim.into_array(), 6)?; let dict = DictArray::try_new(codes_bp.into_array(), dict_for.into_array())?; @@ -630,11 +631,11 @@ mod tests { let alp = alp_encode(&float_prim, Some(exponents))?; assert!(alp.patches().is_none()); - let for_arr = FoRArray::encode(alp.encoded().to_primitive())?; - let bp = BitPackedArray::encode(for_arr.encoded(), 6)?; + let for_arr = FoR::encode(alp.encoded().to_primitive())?; + let bp = BitPacked::encode(for_arr.encoded(), 6)?; - let tree = ALPArray::new( - FoRArray::try_new(bp.into_array(), for_arr.reference_scalar().clone())?.into_array(), + let tree = ALP::new( + FoR::try_new(bp.into_array(), for_arr.reference_scalar().clone())?.into_array(), exponents, None, ); @@ -665,8 +666,8 @@ mod tests { .collect(); let prim = PrimitiveArray::new(Buffer::from(raw), NonNullable); - let bp = BitPackedArray::encode(&prim.into_array(), bit_width)?; - let zz = ZigZagArray::try_new(bp.into_array())?; + let bp = BitPacked::encode(&prim.into_array(), bit_width)?; + let zz = ZigZag::try_new(bp.into_array())?; let cuda_ctx = CudaSession::create_execution_ctx(&VortexSession::empty())?; let plan = UnmaterializedPlan::new(&zz.into_array())?.materialize(&cuda_ctx)?; @@ -694,8 +695,8 @@ mod tests { let ends_arr = PrimitiveArray::new(Buffer::from(ends), NonNullable).into_array(); let values_arr = PrimitiveArray::new(Buffer::from(values), NonNullable).into_array(); - let re = RunEndArray::new(ends_arr, values_arr); - let for_arr = FoRArray::try_new(re.into_array(), Scalar::from(reference))?; + let re = RunEnd::new(ends_arr, values_arr); + let for_arr = FoR::try_new(re.into_array(), Scalar::from(reference))?; let cuda_ctx = CudaSession::create_execution_ctx(&VortexSession::empty())?; let plan = UnmaterializedPlan::new(&for_arr.into_array())?.materialize(&cuda_ctx)?; @@ -724,7 +725,7 @@ mod tests { let codes_prim = PrimitiveArray::new(Buffer::from(codes), NonNullable); let values_prim = PrimitiveArray::new(Buffer::from(dict_values), NonNullable); let dict = DictArray::try_new(codes_prim.into_array(), values_prim.into_array())?; - let for_arr = FoRArray::try_new(dict.into_array(), Scalar::from(reference))?; + let for_arr = FoR::try_new(dict.into_array(), Scalar::from(reference))?; let cuda_ctx = CudaSession::create_execution_ctx(&VortexSession::empty())?; let plan = UnmaterializedPlan::new(&for_arr.into_array())?.materialize(&cuda_ctx)?; @@ -748,8 +749,8 @@ mod tests { // BitPack codes, then wrap in FoR (reference=0 so values unchanged) let bit_width: u8 = 3; let codes_prim = PrimitiveArray::new(Buffer::from(codes), NonNullable); - let codes_bp = BitPackedArray::encode(&codes_prim.into_array(), bit_width)?; - let codes_for = FoRArray::try_new(codes_bp.into_array(), Scalar::from(0u32))?; + let codes_bp = BitPacked::encode(&codes_prim.into_array(), bit_width)?; + let codes_for = FoR::try_new(codes_bp.into_array(), Scalar::from(0u32))?; let values_prim = PrimitiveArray::new(Buffer::from(dict_values), NonNullable); let dict = DictArray::try_new(codes_for.into_array(), values_prim.into_array())?; @@ -774,7 +775,7 @@ mod tests { let bit_width: u8 = 2; let codes_prim = PrimitiveArray::new(Buffer::from(codes), NonNullable); - let codes_bp = BitPackedArray::encode(&codes_prim.into_array(), bit_width)?; + let codes_bp = BitPacked::encode(&codes_prim.into_array(), bit_width)?; let values_prim = PrimitiveArray::new(Buffer::from(dict_values), NonNullable); let dict = DictArray::try_new(codes_bp.into_array(), values_prim.into_array())?; @@ -812,7 +813,7 @@ mod tests { let ends_arr = PrimitiveArray::new(Buffer::from(ends), NonNullable).into_array(); let values_arr = PrimitiveArray::new(Buffer::from(values), NonNullable).into_array(); - let re = RunEndArray::new(ends_arr, values_arr); + let re = RunEnd::new(ends_arr, values_arr); // UnmaterializedPlan::new should fail because u64 ends != i32 values in byte width. assert!(UnmaterializedPlan::new(&re.into_array()).is_err()); @@ -894,8 +895,8 @@ mod tests { .collect(); let prim = PrimitiveArray::new(Buffer::from(raw), NonNullable); - let bp = BitPackedArray::encode(&prim.into_array(), bit_width)?; - let zz = ZigZagArray::try_new(bp.into_array())?; + let bp = BitPacked::encode(&prim.into_array(), bit_width)?; + let zz = ZigZag::try_new(bp.into_array())?; let sliced = zz.into_array().slice(slice_start..slice_end)?; let expected: Vec = all_decoded[slice_start..slice_end].to_vec(); @@ -990,7 +991,7 @@ mod tests { let data: Vec = (0..len).map(|i| (i as u32) % max_val).collect(); let prim = PrimitiveArray::new(Buffer::from(data.clone()), NonNullable); - let bp = BitPackedArray::encode(&prim.into_array(), bit_width)?; + let bp = BitPacked::encode(&prim.into_array(), bit_width)?; let sliced = bp.into_array().slice(slice_start..slice_end)?; let expected: Vec = data[slice_start..slice_end].to_vec(); @@ -1036,8 +1037,8 @@ mod tests { let encoded_data: Vec = (0..len).map(|i| (i as u32) % max_val).collect(); let prim = PrimitiveArray::new(Buffer::from(encoded_data.clone()), NonNullable); - let bp = BitPackedArray::encode(&prim.into_array(), bit_width)?; - let for_arr = FoRArray::try_new(bp.into_array(), Scalar::from(reference))?; + let bp = BitPacked::encode(&prim.into_array(), bit_width)?; + let for_arr = FoR::try_new(bp.into_array(), Scalar::from(reference))?; let all_decoded: Vec = encoded_data.iter().map(|&v| v + reference).collect(); @@ -1091,7 +1092,7 @@ mod tests { let ends_arr = PrimitiveArray::new(Buffer::from(ends), NonNullable).into_array(); let values_arr = PrimitiveArray::new(Buffer::from(values), NonNullable).into_array(); - let re = RunEndArray::new(ends_arr, values_arr); + let re = RunEnd::new(ends_arr, values_arr); let sliced = re.into_array().slice(slice_start..slice_end)?; let expected: Vec = all_decoded[slice_start..slice_end].to_vec(); @@ -1141,12 +1142,12 @@ mod tests { // BitPack+FoR the dict values let dict_prim = PrimitiveArray::new(Buffer::from(dict_residuals), NonNullable); - let dict_bp = BitPackedArray::encode(&dict_prim.into_array(), 6)?; - let dict_for = FoRArray::try_new(dict_bp.into_array(), Scalar::from(dict_reference))?; + let dict_bp = BitPacked::encode(&dict_prim.into_array(), 6)?; + let dict_for = FoR::try_new(dict_bp.into_array(), Scalar::from(dict_reference))?; // BitPack the codes let codes_prim = PrimitiveArray::new(Buffer::from(codes), NonNullable); - let codes_bp = BitPackedArray::encode(&codes_prim.into_array(), 6)?; + let codes_bp = BitPacked::encode(&codes_prim.into_array(), 6)?; let dict = DictArray::try_new(codes_bp.into_array(), dict_for.into_array())?; @@ -1179,11 +1180,11 @@ mod tests { #[case] len: usize, ) -> VortexResult<()> { use vortex::dtype::Nullability; - use vortex::encodings::sequence::SequenceArray; + use vortex::encodings::sequence::Sequence; let expected: Vec = (0..len).map(|i| base + (i as u32) * multiplier).collect(); - let seq = SequenceArray::try_new_typed(base, multiplier, Nullability::NonNullable, len)?; + let seq = Sequence::try_new_typed(base, multiplier, Nullability::NonNullable, len)?; let cuda_ctx = CudaSession::create_execution_ctx(&VortexSession::empty())?; let plan = UnmaterializedPlan::new(&seq.into_array())?.materialize(&cuda_ctx)?; @@ -1212,11 +1213,11 @@ mod tests { #[case] len: usize, ) -> VortexResult<()> { use vortex::dtype::Nullability; - use vortex::encodings::sequence::SequenceArray; + use vortex::encodings::sequence::Sequence; let expected: Vec = (0..len).map(|i| base + (i as i32) * multiplier).collect(); - let seq = SequenceArray::try_new_typed(base, multiplier, Nullability::NonNullable, len)?; + let seq = Sequence::try_new_typed(base, multiplier, Nullability::NonNullable, len)?; let cuda_ctx = CudaSession::create_execution_ctx(&VortexSession::empty())?; let plan = UnmaterializedPlan::new(&seq.into_array())?.materialize(&cuda_ctx)?; diff --git a/vortex-cuda/src/hybrid_dispatch/mod.rs b/vortex-cuda/src/hybrid_dispatch/mod.rs index e75dd5791be..c0f5b3aa9bb 100644 --- a/vortex-cuda/src/hybrid_dispatch/mod.rs +++ b/vortex-cuda/src/hybrid_dispatch/mod.rs @@ -150,8 +150,8 @@ mod tests { use vortex::array::assert_arrays_eq; use vortex::array::validity::Validity::NonNullable; use vortex::buffer::Buffer; - use vortex::encodings::fastlanes::BitPackedArray; - use vortex::encodings::fastlanes::FoRArray; + use vortex::encodings::fastlanes::BitPacked; + use vortex::encodings::fastlanes::FoR; use vortex::error::VortexExpect; use vortex::error::VortexResult; use vortex::mask::Mask; @@ -167,12 +167,12 @@ mod tests { let mut ctx = CudaSession::create_execution_ctx(&VortexSession::empty()).vortex_expect("ctx"); let values: Vec = (0..2048).map(|i| (i % 128) as u32).collect(); - let bp = BitPackedArray::encode( + let bp = BitPacked::encode( &PrimitiveArray::new(Buffer::from(values), NonNullable).into_array(), 7, ) .vortex_expect("bp"); - let arr = FoRArray::try_new(bp.into_array(), 1000u32.into()).vortex_expect("for"); + let arr = FoR::try_new(bp.into_array(), 1000u32.into()).vortex_expect("for"); let cpu = arr.to_canonical()?.into_array(); let gpu = arr @@ -190,19 +190,19 @@ mod tests { /// Exercises the unsigned type reinterpretation in CudaDispatchPlan::execute. #[crate::test] async fn test_fused_f32() -> VortexResult<()> { - use vortex::encodings::alp::ALPArray; + use vortex::encodings::alp::ALP; use vortex::encodings::alp::Exponents; let mut ctx = CudaSession::create_execution_ctx(&VortexSession::empty()).vortex_expect("ctx"); let encoded: Vec = (0i32..2048).map(|i| i % 500).collect(); - let bp = BitPackedArray::encode( + let bp = BitPacked::encode( &PrimitiveArray::new(Buffer::from(encoded), NonNullable).into_array(), 9, ) .vortex_expect("bp"); - let alp = ALPArray::try_new( - FoRArray::try_new(bp.into_array(), 0i32.into()) + let alp = ALP::try_new( + FoR::try_new(bp.into_array(), 0i32.into()) .vortex_expect("for") .into_array(), Exponents { e: 0, f: 2 }, @@ -227,7 +227,7 @@ mod tests { use vortex::array::patches::Patches; use vortex::array::validity::Validity::NonNullable as NN; use vortex::buffer::buffer; - use vortex::encodings::alp::ALPArray; + use vortex::encodings::alp::ALP; use vortex::encodings::alp::Exponents; let mut ctx = @@ -245,7 +245,7 @@ mod tests { None, ) .unwrap(); - let arr = ALPArray::try_new(encoded, Exponents { e: 0, f: 2 }, Some(patches))?; + let arr = ALP::try_new(encoded, Exponents { e: 0, f: 2 }, Some(patches))?; let cpu = arr.to_canonical()?.into_array(); let gpu = arr @@ -285,10 +285,8 @@ mod tests { NonNullable, ) .into_array(); - let vals = FoRArray::try_new( - BitPackedArray::encode(&vals, 6) - .vortex_expect("bp") - .into_array(), + let vals = FoR::try_new( + BitPacked::encode(&vals, 6).vortex_expect("bp").into_array(), 0u32.into(), ) .vortex_expect("for"); @@ -300,8 +298,8 @@ mod tests { NonNullable, ) .into_array(); - let codes = FoRArray::try_new( - BitPackedArray::encode(&codes, 6) + let codes = FoR::try_new( + BitPacked::encode(&codes, 6) .vortex_expect("bp") .into_array(), 0u32.into(), @@ -334,12 +332,12 @@ mod tests { let len = 2048u32; let data: Vec = (0..len).map(|i| i % 128).collect(); - let bp = BitPackedArray::encode( + let bp = BitPacked::encode( &PrimitiveArray::new(Buffer::from(data.clone()), NonNullable).into_array(), 7, ) .vortex_expect("bp"); - let for_arr = FoRArray::try_new(bp.into_array(), 100u32.into()).vortex_expect("for"); + let for_arr = FoR::try_new(bp.into_array(), 100u32.into()).vortex_expect("for"); // Keep every other element. let mask = Mask::from_iter((0..len as usize).map(|i| i % 2 == 0)); diff --git a/vortex-cuda/src/kernel/arrays/dict.rs b/vortex-cuda/src/kernel/arrays/dict.rs index ffa8a55047f..1dcca646f79 100644 --- a/vortex-cuda/src/kernel/arrays/dict.rs +++ b/vortex-cuda/src/kernel/arrays/dict.rs @@ -324,7 +324,7 @@ mod tests { Ok(PrimitiveArray::from_byte_buffer( prim.buffer_handle().try_to_host_sync()?, prim.ptype(), - prim.validity()?, + prim.validity().clone(), )) } @@ -655,7 +655,7 @@ mod tests { BufferHandle::new_host(decimal.buffer_handle().try_to_host_sync()?), decimal.values_type(), decimal.decimal_dtype(), - decimal.validity()?, + decimal.validity().clone(), )) } diff --git a/vortex-cuda/src/kernel/encodings/alp.rs b/vortex-cuda/src/kernel/encodings/alp.rs index 5860e96412a..d7ae5d57dab 100644 --- a/vortex-cuda/src/kernel/encodings/alp.rs +++ b/vortex-cuda/src/kernel/encodings/alp.rs @@ -124,7 +124,7 @@ mod tests { use vortex::array::validity::Validity; use vortex::buffer::Buffer; use vortex::buffer::buffer; - use vortex::encodings::alp::ALPArray; + use vortex::encodings::alp::ALP; use vortex::encodings::alp::Exponents; use vortex::error::VortexExpect; use vortex::session::VortexSession; @@ -155,7 +155,7 @@ mod tests { ) .unwrap(); - let alp_array = ALPArray::try_new( + let alp_array = ALP::try_new( PrimitiveArray::new(Buffer::from(encoded_data.clone()), Validity::NonNullable) .into_array(), exponents, diff --git a/vortex-cuda/src/kernel/encodings/bitpacked.rs b/vortex-cuda/src/kernel/encodings/bitpacked.rs index 0662ac26503..cfecd926ccf 100644 --- a/vortex-cuda/src/kernel/encodings/bitpacked.rs +++ b/vortex-cuda/src/kernel/encodings/bitpacked.rs @@ -200,7 +200,7 @@ mod tests { let array = PrimitiveArray::new(iter.collect::>(), NonNullable); // Last two items should be patched - let bp_with_patches = BitPackedArray::encode(&array.into_array(), bw)?; + let bp_with_patches = BitPacked::encode(&array.into_array(), bw)?; assert!(bp_with_patches.patches().is_some()); let cpu_result = bp_with_patches.to_canonical()?.into_array(); @@ -231,7 +231,7 @@ mod tests { ); // Last two items should be patched - let bp_with_patches = BitPackedArray::encode(&array.into_array(), 9)?; + let bp_with_patches = BitPacked::encode(&array.into_array(), 9)?; assert!(bp_with_patches.patches().is_some()); let cpu_result = bp_with_patches.to_canonical()?.into_array(); @@ -273,7 +273,7 @@ mod tests { NonNullable, ); - let bitpacked_array = BitPackedArray::encode(&primitive_array.into_array(), bit_width) + let bitpacked_array = BitPacked::encode(&primitive_array.into_array(), bit_width) .vortex_expect("operation should succeed in test"); let cpu_result = bitpacked_array.to_canonical()?; @@ -322,7 +322,7 @@ mod tests { NonNullable, ); - let bitpacked_array = BitPackedArray::encode(&primitive_array.into_array(), bit_width) + let bitpacked_array = BitPacked::encode(&primitive_array.into_array(), bit_width) .vortex_expect("operation should succeed in test"); let cpu_result = bitpacked_array.to_canonical()?; @@ -387,7 +387,7 @@ mod tests { NonNullable, ); - let bitpacked_array = BitPackedArray::encode(&primitive_array.into_array(), bit_width) + let bitpacked_array = BitPacked::encode(&primitive_array.into_array(), bit_width) .vortex_expect("operation should succeed in test"); let cpu_result = bitpacked_array.to_canonical()?; @@ -484,7 +484,7 @@ mod tests { NonNullable, ); - let bitpacked_array = BitPackedArray::encode(&primitive_array.into_array(), bit_width) + let bitpacked_array = BitPacked::encode(&primitive_array.into_array(), bit_width) .vortex_expect("operation should succeed in test"); let cpu_result = bitpacked_array.to_canonical()?; let gpu_result = block_on(async { @@ -517,7 +517,7 @@ mod tests { NonNullable, ); - let bitpacked_array = BitPackedArray::encode(&primitive_array.into_array(), bit_width) + let bitpacked_array = BitPacked::encode(&primitive_array.into_array(), bit_width) .vortex_expect("operation should succeed in test"); let slice_ref = bitpacked_array.clone().into_array().slice(67..3969)?; let bitpacked_ref = bitpacked_array.into_array(); diff --git a/vortex-cuda/src/kernel/encodings/date_time_parts.rs b/vortex-cuda/src/kernel/encodings/date_time_parts.rs index 715c2f2c33b..9e690193453 100644 --- a/vortex-cuda/src/kernel/encodings/date_time_parts.rs +++ b/vortex-cuda/src/kernel/encodings/date_time_parts.rs @@ -208,6 +208,7 @@ mod tests { use vortex::array::validity::Validity; use vortex::buffer::Buffer; use vortex::buffer::buffer; + use vortex::encodings::datetime_parts::DateTimeParts; use vortex::encodings::datetime_parts::DateTimePartsArray; use vortex::error::VortexExpect; use vortex::error::VortexResult; @@ -237,7 +238,7 @@ mod tests { None, ); - DateTimePartsArray::try_new( + DateTimeParts::try_new( temporal.dtype().clone(), days_arr, seconds_arr, @@ -348,7 +349,7 @@ mod tests { None, ); - let dtp_array = DateTimePartsArray::try_new( + let dtp_array = DateTimeParts::try_new( temporal.dtype().clone(), days_arr, seconds_arr, diff --git a/vortex-cuda/src/kernel/encodings/decimal_byte_parts.rs b/vortex-cuda/src/kernel/encodings/decimal_byte_parts.rs index b46e2c2c6eb..b75b13cbed0 100644 --- a/vortex-cuda/src/kernel/encodings/decimal_byte_parts.rs +++ b/vortex-cuda/src/kernel/encodings/decimal_byte_parts.rs @@ -65,7 +65,7 @@ mod tests { use vortex::array::validity::Validity; use vortex::buffer::Buffer; use vortex::dtype::DecimalDType; - use vortex::encodings::decimal_byte_parts::DecimalBytePartsArray; + use vortex::encodings::decimal_byte_parts::DecimalByteParts; use vortex::error::VortexExpect; use vortex::session::VortexSession; @@ -87,7 +87,7 @@ mod tests { .vortex_expect("create execution context"); let decimal_dtype = DecimalDType::new(precision, scale); - let dbp_array = DecimalBytePartsArray::try_new( + let dbp_array = DecimalByteParts::try_new( PrimitiveArray::new(encoded, Validity::NonNullable).into_array(), decimal_dtype, ) diff --git a/vortex-cuda/src/kernel/encodings/for_.rs b/vortex-cuda/src/kernel/encodings/for_.rs index c3565be0f72..4af12f431ac 100644 --- a/vortex-cuda/src/kernel/encodings/for_.rs +++ b/vortex-cuda/src/kernel/encodings/for_.rs @@ -132,7 +132,8 @@ mod tests { use vortex::array::validity::Validity::NonNullable; use vortex::buffer::Buffer; use vortex::dtype::NativePType; - use vortex::encodings::fastlanes::BitPackedArray; + use vortex::encodings::fastlanes::BitPacked; + use vortex::encodings::fastlanes::FoR; use vortex::encodings::fastlanes::FoRArray; use vortex::error::VortexExpect; use vortex::scalar::Scalar; @@ -143,7 +144,7 @@ mod tests { use crate::session::CudaSession; fn make_for_array>(input_data: Vec, reference: T) -> FoRArray { - FoRArray::try_new( + FoR::try_new( PrimitiveArray::new(Buffer::from(input_data), NonNullable).into_array(), reference.into(), ) @@ -185,8 +186,8 @@ mod tests { .take(1024) .collect::>() .into_array(); - let packed = BitPackedArray::encode(&values, 3).unwrap().into_array(); - let for_array = FoRArray::try_new(packed, (-8i8).into()).unwrap(); + let packed = BitPacked::encode(&values, 3).unwrap().into_array(); + let for_array = FoR::try_new(packed, (-8i8).into()).unwrap(); let cpu_result = for_array.to_canonical().unwrap(); diff --git a/vortex-cuda/src/kernel/encodings/runend.rs b/vortex-cuda/src/kernel/encodings/runend.rs index 78120f00757..7be5ca46004 100644 --- a/vortex-cuda/src/kernel/encodings/runend.rs +++ b/vortex-cuda/src/kernel/encodings/runend.rs @@ -166,6 +166,7 @@ mod tests { use vortex::array::assert_arrays_eq; use vortex::array::validity::Validity; use vortex::buffer::Buffer; + use vortex::encodings::runend::RunEnd; use vortex::encodings::runend::RunEndArray; use vortex::error::VortexExpect; use vortex::error::VortexResult; @@ -184,7 +185,7 @@ mod tests { PrimitiveArray::new(Buffer::from(ends), Validity::NonNullable).into_array(); let values_array = PrimitiveArray::new(Buffer::from(values), Validity::NonNullable).into_array(); - RunEndArray::new(ends_array, values_array) + RunEnd::new(ends_array, values_array) } #[rstest] diff --git a/vortex-cuda/src/kernel/encodings/sequence.rs b/vortex-cuda/src/kernel/encodings/sequence.rs index 656c6bf7122..bec35721f99 100644 --- a/vortex-cuda/src/kernel/encodings/sequence.rs +++ b/vortex-cuda/src/kernel/encodings/sequence.rs @@ -89,7 +89,7 @@ mod tests { use vortex::array::assert_arrays_eq; use vortex::dtype::NativePType; use vortex::dtype::Nullability; - use vortex::encodings::sequence::SequenceArray; + use vortex::encodings::sequence::Sequence; use vortex::scalar::PValue; use vortex::session::VortexSession; @@ -126,7 +126,7 @@ mod tests { ) { let mut cuda_ctx = CudaSession::create_execution_ctx(&VortexSession::empty()).unwrap(); - let array = SequenceArray::try_new_typed(base, multiplier, nullability, len).unwrap(); + let array = Sequence::try_new_typed(base, multiplier, nullability, len).unwrap(); let cpu_result = array.to_canonical().unwrap().into_array(); diff --git a/vortex-cuda/src/kernel/encodings/zigzag.rs b/vortex-cuda/src/kernel/encodings/zigzag.rs index 4c369510760..635bd685c22 100644 --- a/vortex-cuda/src/kernel/encodings/zigzag.rs +++ b/vortex-cuda/src/kernel/encodings/zigzag.rs @@ -102,7 +102,7 @@ mod tests { use vortex::array::assert_arrays_eq; use vortex::array::validity::Validity::NonNullable; use vortex::buffer::Buffer; - use vortex::encodings::zigzag::ZigZagArray; + use vortex::encodings::zigzag::ZigZag; use vortex::error::VortexExpect; use vortex::session::VortexSession; @@ -119,7 +119,7 @@ mod tests { // So encoded [0, 2, 4, 1, 3] should decode to [0, 1, 2, -1, -2] let encoded_data: Vec = vec![0, 2, 4, 1, 3]; - let zigzag_array = ZigZagArray::try_new( + let zigzag_array = ZigZag::try_new( PrimitiveArray::new(Buffer::from(encoded_data), NonNullable).into_array(), )?; diff --git a/vortex-cuda/src/kernel/encodings/zstd.rs b/vortex-cuda/src/kernel/encodings/zstd.rs index 5723aa8fe49..c998808fd45 100644 --- a/vortex-cuda/src/kernel/encodings/zstd.rs +++ b/vortex-cuda/src/kernel/encodings/zstd.rs @@ -350,7 +350,7 @@ mod tests { use vortex::array::IntoArray; use vortex::array::arrays::VarBinViewArray; use vortex::array::assert_arrays_eq; - use vortex::encodings::zstd::ZstdArray; + use vortex::encodings::zstd::Zstd; use vortex::error::VortexResult; use vortex::session::VortexSession; @@ -371,7 +371,7 @@ mod tests { "baz", ]); - let zstd_array = ZstdArray::from_var_bin_view(&strings, 3, 0)?; + let zstd_array = Zstd::from_var_bin_view(&strings, 3, 0)?; let cpu_result = zstd_array .decompress(cuda_ctx.execution_ctx())? @@ -408,7 +408,7 @@ mod tests { // Compress with ZSTD using values_per_frame=3 to create multiple frames. // 14 strings and 3 values per frame = ceil(14/3) = 5 frames. - let zstd_array = ZstdArray::from_var_bin_view(&strings, 3, 3)?; + let zstd_array = Zstd::from_var_bin_view(&strings, 3, 3)?; let cpu_result = zstd_array .decompress(cuda_ctx.execution_ctx())? @@ -439,7 +439,7 @@ mod tests { "final test string", ]); - let zstd_array = ZstdArray::from_var_bin_view(&strings, 3, 0)?; + let zstd_array = Zstd::from_var_bin_view(&strings, 3, 0)?; // Slice the array to get a subset (indices 2..7) let sliced_zstd = zstd_array.slice(2..7)?; diff --git a/vortex-cuda/src/kernel/patches/mod.rs b/vortex-cuda/src/kernel/patches/mod.rs index 4c102d2db8e..67c670d158a 100644 --- a/vortex-cuda/src/kernel/patches/mod.rs +++ b/vortex-cuda/src/kernel/patches/mod.rs @@ -171,7 +171,7 @@ mod tests { let PrimitiveArrayParts { buffer: cuda_buffer, .. - } = values.into_parts(); + } = values.into_inner().into_parts(); let handle = ctx.ensure_on_device(cuda_buffer).await.unwrap(); let device_buf = handle diff --git a/vortex-datafusion/examples/vortex_table.rs b/vortex-datafusion/examples/vortex_table.rs index cbd138baa0a..2570fc47afd 100644 --- a/vortex-datafusion/examples/vortex_table.rs +++ b/vortex-datafusion/examples/vortex_table.rs @@ -58,7 +58,7 @@ async fn main() -> anyhow::Result<()> { session .write_options() - .write(&mut f, st.to_array_stream()) + .write(&mut f, st.into_array().to_array_stream()) .await?; // [register] diff --git a/vortex-datafusion/src/persistent/mod.rs b/vortex-datafusion/src/persistent/mod.rs index 558032ebd01..c2d83532fe3 100644 --- a/vortex-datafusion/src/persistent/mod.rs +++ b/vortex-datafusion/src/persistent/mod.rs @@ -69,7 +69,7 @@ mod tests { let summary = session .write_options() - .write(&mut writer, st.to_array_stream()) + .write(&mut writer, st.into_array().to_array_stream()) .await?; writer.shutdown().await?; diff --git a/vortex-duckdb/src/e2e_test/vortex_scan_test.rs b/vortex-duckdb/src/e2e_test/vortex_scan_test.rs index 75db1ac3cd6..8bf69cda5aa 100644 --- a/vortex-duckdb/src/e2e_test/vortex_scan_test.rs +++ b/vortex-duckdb/src/e2e_test/vortex_scan_test.rs @@ -36,7 +36,8 @@ use vortex::file::WriteOptionsSessionExt; use vortex::io::runtime::BlockingRuntime; use vortex::scalar::PValue; use vortex::scalar::Scalar; -use vortex_runend::RunEndArray; +use vortex_runend::RunEnd; +use vortex_sequence::Sequence; use vortex_sequence::SequenceArray; use crate::RUNTIME; @@ -71,7 +72,7 @@ async fn write_vortex_file( let mut file = async_fs::File::create(&temp_file_path).await.unwrap(); SESSION .write_options() - .write(&mut file, struct_array.to_array_stream()) + .write(&mut file, struct_array.into_array().to_array_stream()) .await .unwrap(); @@ -167,7 +168,7 @@ async fn write_vortex_file_to_dir( let mut file = async_fs::File::create(&temp_file_path).await.unwrap(); SESSION .write_options() - .write(&mut file, struct_array.to_array_stream()) + .write(&mut file, struct_array.into_array().to_array_stream()) .await .unwrap(); @@ -789,10 +790,10 @@ async fn write_vortex_file_with_encodings() -> NamedTempFile { // 4. Run-End let run_ends = buffer![3u32, 5]; let run_values = buffer![100i32, 200]; - let rle_array = RunEndArray::try_new(run_ends.into_array(), run_values.into_array()).unwrap(); + let rle_array = RunEnd::try_new(run_ends.into_array(), run_values.into_array()).unwrap(); // 5. Sequence array - let sequence_array = SequenceArray::try_new( + let sequence_array = Sequence::try_new( PValue::I64(0), PValue::I64(10), PType::I64, @@ -844,7 +845,7 @@ async fn write_vortex_file_with_encodings() -> NamedTempFile { let mut file = async_fs::File::create(&temp_file_path).await.unwrap(); SESSION .write_options() - .write(&mut file, struct_array.to_array_stream()) + .write(&mut file, struct_array.into_array().to_array_stream()) .await .unwrap(); diff --git a/vortex-duckdb/src/exporter/sequence.rs b/vortex-duckdb/src/exporter/sequence.rs index 380f57c95bf..468f3ee1457 100644 --- a/vortex-duckdb/src/exporter/sequence.rs +++ b/vortex-duckdb/src/exporter/sequence.rs @@ -54,7 +54,7 @@ mod tests { #[test] fn test_sequence() { - let arr = SequenceArray::try_new_typed(2, 5, Nullability::NonNullable, 100).unwrap(); + let arr = Sequence::try_new_typed(2, 5, Nullability::NonNullable, 100).unwrap(); let mut chunk = DataChunk::new([LogicalType::new(cpp::duckdb_type::DUCKDB_TYPE_INTEGER)]); new_exporter(&arr) diff --git a/vortex-ffi/examples/hello_vortex.rs b/vortex-ffi/examples/hello_vortex.rs index fa458ce483a..dc7ef690ca9 100644 --- a/vortex-ffi/examples/hello_vortex.rs +++ b/vortex-ffi/examples/hello_vortex.rs @@ -156,7 +156,7 @@ async fn write_vortex_file(path: impl AsRef) -> VortexResult<()> { SESSION .write_options() - .write(&mut file, test_data.to_array_stream()) + .write(&mut file, test_data.into_array().to_array_stream()) .await?; file.shutdown().await?; diff --git a/vortex-file/src/tests.rs b/vortex-file/src/tests.rs index 51b3b97383a..074d33cf0b0 100644 --- a/vortex-file/src/tests.rs +++ b/vortex-file/src/tests.rs @@ -111,7 +111,7 @@ async fn test_read_simple() { let mut buf = ByteBufferMut::empty(); SESSION .write_options() - .write(&mut buf, st.to_array_stream()) + .write(&mut buf, st.into_array().to_array_stream()) .await .unwrap(); @@ -187,11 +187,12 @@ async fn test_round_trip_many_types() { ("decimal_35", decimal_35), ]) .unwrap(); + let dtype = st.dtype().clone(); let mut buf = ByteBufferMut::empty(); SESSION .write_options() - .write(&mut buf, st.to_array_stream()) + .write(&mut buf, st.into_array().to_array_stream()) .await .unwrap(); @@ -207,7 +208,7 @@ async fn test_round_trip_many_types() { .await .unwrap(); - let read = ChunkedArray::try_new(chunks, st.dtype().clone()).unwrap(); + let read = ChunkedArray::try_new(chunks, dtype).unwrap(); assert_eq!(read.len(), 3); } @@ -248,7 +249,7 @@ async fn test_read_simple_with_spawn() { let mut buf = ByteBufferMut::empty(); SESSION .write_options() - .write(&mut buf, st.to_array_stream()) + .write(&mut buf, st.into_array().to_array_stream()) .await .unwrap(); @@ -279,7 +280,7 @@ async fn test_read_projection() { let mut buf = ByteBufferMut::empty(); SESSION .write_options() - .write(&mut buf, st.to_array_stream()) + .write(&mut buf, st.into_array().to_array_stream()) .await .unwrap(); @@ -304,7 +305,7 @@ async fn test_read_projection() { let actual = array.to_struct().unmasked_fields()[0].clone(); let expected = VarBinArray::from(strings_expected.to_vec()).into_array(); - assert_arrays_eq!(actual.as_ref(), expected.as_ref()); + assert_arrays_eq!(actual, expected); let array = file .scan() @@ -326,7 +327,7 @@ async fn test_read_projection() { let actual = array.to_struct().unmasked_fields()[0].clone(); let expected = Buffer::copy_from(numbers_expected).into_array(); - assert_arrays_eq!(actual.as_ref(), expected.as_ref()); + assert_arrays_eq!(actual, expected); } #[tokio::test] @@ -348,7 +349,7 @@ async fn unequal_batches() { let mut buf = ByteBufferMut::empty(); SESSION .write_options() - .write(&mut buf, st.to_array_stream()) + .write(&mut buf, st.into_array().to_array_stream()) .await .unwrap(); @@ -408,7 +409,7 @@ async fn write_chunked() { let mut buf = ByteBufferMut::empty(); SESSION .write_options() - .write(&mut buf, chunked_st.to_array_stream()) + .write(&mut buf, chunked_st.into_array().to_array_stream()) .await .unwrap(); @@ -435,11 +436,12 @@ async fn test_empty_varbin_array_roundtrip() { let empty = VarBinArray::from(Vec::<&str>::new()).into_array(); let st = StructArray::from_fields(&[("a", empty)]).unwrap(); + let dtype = st.dtype().clone(); let mut buf = ByteBufferMut::empty(); SESSION .write_options() - .write(&mut buf, st.to_array_stream()) + .write(&mut buf, st.into_array().to_array_stream()) .await .unwrap(); @@ -455,7 +457,7 @@ async fn test_empty_varbin_array_roundtrip() { .unwrap(); assert_eq!(result.len(), 0); - assert_eq!(result.dtype(), st.dtype()); + assert_eq!(result.dtype(), &dtype); } #[tokio::test] @@ -518,7 +520,7 @@ async fn filter_string() { let mut buf = ByteBufferMut::empty(); SESSION .write_options() - .write(&mut buf, st.to_array_stream()) + .write(&mut buf, st.into_array().to_array_stream()) .await .unwrap(); @@ -540,11 +542,11 @@ async fn filter_string() { let names_expected = VarBinArray::from_iter(vec![Some("Joseph")], DType::Utf8(Nullability::Nullable)) .into_array(); - assert_arrays_eq!(names_actual.as_ref(), names_expected.as_ref()); + assert_arrays_eq!(names_actual, names_expected); let ages_actual = result[0].to_struct().unmasked_fields()[1].clone(); let ages_expected = PrimitiveArray::from_option_iter([Some(25i32)]).into_array(); - assert_arrays_eq!(ages_actual.as_ref(), ages_expected.as_ref()); + assert_arrays_eq!(ages_actual, ages_expected); } #[tokio::test] @@ -567,7 +569,7 @@ async fn filter_or() { let mut buf = ByteBufferMut::empty(); SESSION .write_options() - .write(&mut buf, st.to_array_stream()) + .write(&mut buf, st.into_array().to_array_stream()) .await .unwrap(); @@ -597,11 +599,11 @@ async fn filter_or() { DType::Utf8(Nullability::Nullable), ) .into_array(); - assert_arrays_eq!(names_actual.as_ref(), names_expected.as_ref()); + assert_arrays_eq!(names_actual, names_expected); let ages_actual = result[0].to_struct().unmasked_fields()[1].clone(); let ages_expected = PrimitiveArray::from_option_iter([Some(25i32), None]).into_array(); - assert_arrays_eq!(ages_actual.as_ref(), ages_expected.as_ref()); + assert_arrays_eq!(ages_actual, ages_expected); } #[tokio::test] @@ -624,7 +626,7 @@ async fn filter_and() { let mut buf = ByteBufferMut::empty(); SESSION .write_options() - .write(&mut buf, st.to_array_stream()) + .write(&mut buf, st.into_array().to_array_stream()) .await .unwrap(); @@ -651,11 +653,11 @@ async fn filter_and() { DType::Utf8(Nullability::Nullable), ) .into_array(); - assert_arrays_eq!(names_actual.as_ref(), names_expected.as_ref()); + assert_arrays_eq!(names_actual, names_expected); let ages_actual = result[0].to_struct().unmasked_fields()[1].clone(); let ages_expected = PrimitiveArray::from_option_iter([Some(25i32), Some(31i32)]).into_array(); - assert_arrays_eq!(ages_actual.as_ref(), ages_expected.as_ref()); + assert_arrays_eq!(ages_actual, ages_expected); } #[tokio::test] @@ -678,7 +680,7 @@ async fn test_with_indices_simple() { let mut buf = ByteBufferMut::empty(); SESSION .write_options() - .write(&mut buf, expected_array.to_array_stream()) + .write(&mut buf, expected_array.into_array().to_array_stream()) .await .unwrap(); @@ -718,7 +720,7 @@ async fn test_with_indices_simple() { .map(|&x| expected_numbers[x as usize]) .collect(); let expected_array = Buffer::copy_from(&expected_kept_numbers).into_array(); - assert_arrays_eq!(actual_kept_numbers_array.as_ref(), expected_array.as_ref()); + assert_arrays_eq!(actual_kept_numbers_array, expected_array); // test all indices let actual_array = file @@ -733,7 +735,7 @@ async fn test_with_indices_simple() { .to_struct(); let actual_numbers_array = actual_array.unmasked_fields()[0].clone(); let expected_array = Buffer::copy_from(&expected_numbers).into_array(); - assert_arrays_eq!(actual_numbers_array.as_ref(), expected_array.as_ref()); + assert_arrays_eq!(actual_numbers_array, expected_array); } #[tokio::test] @@ -757,7 +759,7 @@ async fn test_with_indices_on_two_columns() { let mut buf = ByteBufferMut::empty(); SESSION .write_options() - .write(&mut buf, st.to_array_stream()) + .write(&mut buf, st.into_array().to_array_stream()) .await .unwrap(); @@ -782,7 +784,7 @@ async fn test_with_indices_on_two_columns() { .map(|&x| strings_expected[x as usize]) .collect(); let strings_expected_array = VarBinArray::from(strings_expected_vec).into_array(); - assert_arrays_eq!(strings_actual.as_ref(), strings_expected_array.as_ref()); + assert_arrays_eq!(strings_actual, strings_expected_array); let numbers_actual = array.unmasked_fields()[1].clone(); let numbers_expected_vec: Vec = kept_indices @@ -790,7 +792,7 @@ async fn test_with_indices_on_two_columns() { .map(|&x| numbers_expected[x as usize]) .collect(); let numbers_expected_array = Buffer::copy_from(&numbers_expected_vec).into_array(); - assert_arrays_eq!(numbers_actual.as_ref(), numbers_expected_array.as_ref()); + assert_arrays_eq!(numbers_actual, numbers_expected_array); } #[tokio::test] @@ -813,7 +815,7 @@ async fn test_with_indices_and_with_row_filter_simple() { let mut buf = ByteBufferMut::empty(); SESSION .write_options() - .write(&mut buf, expected_array.to_array_stream()) + .write(&mut buf, expected_array.into_array().to_array_stream()) .await .unwrap(); @@ -856,7 +858,7 @@ async fn test_with_indices_and_with_row_filter_simple() { .filter(|&x| x > 50) .collect(); let expected_array = expected_kept_numbers.into_array(); - assert_arrays_eq!(actual_kept_numbers_array.as_ref(), expected_array.as_ref()); + assert_arrays_eq!(actual_kept_numbers_array, expected_array); // test all indices let actual_array = file @@ -878,10 +880,7 @@ async fn test_with_indices_and_with_row_filter_simple() { .cloned() .collect(); let expected_numbers_array = expected_filtered.into_array(); - assert_arrays_eq!( - actual_numbers_array.as_ref(), - expected_numbers_array.as_ref() - ); + assert_arrays_eq!(actual_numbers_array, expected_numbers_array); } #[tokio::test] @@ -938,11 +937,11 @@ async fn filter_string_chunked() { let names_expected = VarBinArray::from_iter(vec![Some("Joseph")], DType::Utf8(Nullability::Nullable)) .into_array(); - assert_arrays_eq!(names_actual.as_ref(), names_expected.as_ref()); + assert_arrays_eq!(names_actual, names_expected); let ages_actual = actual_array.unmasked_fields()[1].clone(); let ages_expected = PrimitiveArray::from_option_iter([Some(25i32)]).into_array(); - assert_arrays_eq!(ages_actual.as_ref(), ages_expected.as_ref()); + assert_arrays_eq!(ages_actual, ages_expected); } #[tokio::test] @@ -1039,7 +1038,7 @@ async fn test_pruning_with_or() { Some("P".to_owned()), ]) .into_array(); - assert_arrays_eq!(letters_actual.as_ref(), letters_expected.as_ref()); + assert_arrays_eq!(letters_actual, letters_expected); let numbers_actual = actual_array.unmasked_fields()[1].clone(); let numbers_expected = PrimitiveArray::from_option_iter([ @@ -1055,7 +1054,7 @@ async fn test_pruning_with_or() { Some(22), ]) .into_array(); - assert_arrays_eq!(numbers_actual.as_ref(), numbers_expected.as_ref()); + assert_arrays_eq!(numbers_actual, numbers_expected); } #[tokio::test] @@ -1077,7 +1076,7 @@ async fn test_repeated_projection() { let mut buf = ByteBufferMut::empty(); SESSION .write_options() - .write(&mut buf, single_column_array.to_array_stream()) + .write(&mut buf, single_column_array.into_array().to_array_stream()) .await .unwrap(); @@ -1120,7 +1119,7 @@ async fn basic_file_roundtrip() -> VortexResult<()> { let result = vxf.scan()?.into_array_stream()?.read_all().await?; let expected = buffer![0i32, 1, 2, 3, 4, 5, 6, 7, 8].into_array(); - assert_arrays_eq!(result.as_ref(), expected.as_ref()); + assert_arrays_eq!(result, expected); Ok(()) } @@ -1168,7 +1167,7 @@ async fn file_take() -> VortexResult<()> { .await?; let expected = buffer![0i32, 1, 8].into_array(); - assert_arrays_eq!(result.as_ref(), expected.as_ref()); + assert_arrays_eq!(result, expected); Ok(()) } @@ -1291,7 +1290,7 @@ async fn test_into_tokio_array_stream() -> VortexResult<()> { let mut buf = ByteBufferMut::empty(); SESSION .write_options() - .write(&mut buf, st.to_array_stream()) + .write(&mut buf, st.into_array().to_array_stream()) .await?; let file = SESSION.open_options().open_buffer(buf)?; @@ -1383,7 +1382,7 @@ async fn test_writer_multiple_pushes() -> VortexResult<()> { .unmasked_field_by_name("numbers")? .clone(); let expected = buffer![1u32, 2, 3, 4, 5, 6, 7, 8, 9].into_array(); - assert_arrays_eq!(numbers.as_ref(), expected.as_ref()); + assert_arrays_eq!(numbers, expected); Ok(()) } @@ -1417,7 +1416,7 @@ async fn test_writer_push_stream() -> VortexResult<()> { .unmasked_field_by_name("numbers")? .clone(); let expected = buffer![1u32, 2, 3, 4, 5, 6].into_array(); - assert_arrays_eq!(numbers.as_ref(), expected.as_ref()); + assert_arrays_eq!(numbers, expected); Ok(()) } @@ -1481,7 +1480,7 @@ async fn test_writer_empty_chunks() -> VortexResult<()> { .unmasked_field_by_name("numbers")? .clone(); let expected = buffer![1u32, 2].into_array(); - assert_arrays_eq!(numbers.as_ref(), expected.as_ref()); + assert_arrays_eq!(numbers, expected); Ok(()) } @@ -1519,7 +1518,7 @@ async fn test_writer_mixed_push_and_stream() -> VortexResult<()> { .unmasked_field_by_name("numbers")? .clone(); let expected = buffer![1u32, 2, 3, 4, 5, 6].into_array(); - assert_arrays_eq!(numbers.as_ref(), expected.as_ref()); + assert_arrays_eq!(numbers, expected); Ok(()) } diff --git a/vortex-layout/public-api.lock b/vortex-layout/public-api.lock index 7db679cfec4..15e3e91cf4a 100644 --- a/vortex-layout/public-api.lock +++ b/vortex-layout/public-api.lock @@ -824,13 +824,13 @@ pub struct vortex_layout::layouts::zoned::zone_map::ZoneMap impl vortex_layout::layouts::zoned::zone_map::ZoneMap -pub fn vortex_layout::layouts::zoned::zone_map::ZoneMap::array(&self) -> &vortex_array::arrays::struct_::array::StructArray +pub fn vortex_layout::layouts::zoned::zone_map::ZoneMap::array(&self) -> &vortex_array::arrays::struct_::vtable::StructArray pub fn vortex_layout::layouts::zoned::zone_map::ZoneMap::dtype_for_stats_table(column_dtype: &vortex_array::dtype::DType, present_stats: &[vortex_array::expr::stats::Stat]) -> vortex_array::dtype::DType pub fn vortex_layout::layouts::zoned::zone_map::ZoneMap::get_stat(&self, stat: vortex_array::expr::stats::Stat) -> vortex_error::VortexResult> -pub unsafe fn vortex_layout::layouts::zoned::zone_map::ZoneMap::new_unchecked(array: vortex_array::arrays::struct_::array::StructArray, stats: alloc::sync::Arc<[vortex_array::expr::stats::Stat]>) -> Self +pub unsafe fn vortex_layout::layouts::zoned::zone_map::ZoneMap::new_unchecked(array: vortex_array::arrays::struct_::vtable::StructArray, stats: alloc::sync::Arc<[vortex_array::expr::stats::Stat]>) -> Self pub fn vortex_layout::layouts::zoned::zone_map::ZoneMap::present_stats(&self) -> &alloc::sync::Arc<[vortex_array::expr::stats::Stat]> @@ -838,7 +838,7 @@ pub fn vortex_layout::layouts::zoned::zone_map::ZoneMap::prune(&self, predicate: pub fn vortex_layout::layouts::zoned::zone_map::ZoneMap::to_stats_set(&self, stats: &[vortex_array::expr::stats::Stat], ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult -pub fn vortex_layout::layouts::zoned::zone_map::ZoneMap::try_new(column_dtype: vortex_array::dtype::DType, array: vortex_array::arrays::struct_::array::StructArray, stats: alloc::sync::Arc<[vortex_array::expr::stats::Stat]>) -> vortex_error::VortexResult +pub fn vortex_layout::layouts::zoned::zone_map::ZoneMap::try_new(column_dtype: vortex_array::dtype::DType, array: vortex_array::arrays::struct_::vtable::StructArray, stats: alloc::sync::Arc<[vortex_array::expr::stats::Stat]>) -> vortex_error::VortexResult impl core::clone::Clone for vortex_layout::layouts::zoned::zone_map::ZoneMap diff --git a/vortex-layout/src/display.rs b/vortex-layout/src/display.rs index 75d1b61d55e..c3c36a06de1 100644 --- a/vortex-layout/src/display.rs +++ b/vortex-layout/src/display.rs @@ -265,7 +265,7 @@ mod tests { .write_stream( ctx.clone(), segments.clone(), - array1.to_array_stream().sequenced(ptr1), + array1.into_array().to_array_stream().sequenced(ptr1), eof1, handle.clone(), ) @@ -288,7 +288,11 @@ mod tests { .write_stream( ctx.clone(), segments.clone(), - builder.finish().to_array_stream().sequenced(ptr2), + builder + .finish() + .into_array() + .to_array_stream() + .sequenced(ptr2), eof2, handle.clone(), ) @@ -348,7 +352,7 @@ vortex.struct, dtype: {numbers=i64?, strings=utf8}, children: 2, rows: 5 .write_stream( ctx.clone(), segments.clone(), - array1.to_array_stream().sequenced(ptr1), + array1.into_array().to_array_stream().sequenced(ptr1), eof1, handle.clone(), ) @@ -362,7 +366,7 @@ vortex.struct, dtype: {numbers=i64?, strings=utf8}, children: 2, rows: 5 .write_stream( ctx.clone(), segments.clone(), - array2.to_array_stream().sequenced(ptr2), + array2.into_array().to_array_stream().sequenced(ptr2), eof2, handle.clone(), ) @@ -407,7 +411,7 @@ vortex.chunked, dtype: i32, children: 2, rows: 10 .write_stream( ctx.clone(), segments.clone(), - array.to_array_stream().sequenced(ptr), + array.into_array().to_array_stream().sequenced(ptr), eof, handle, ) @@ -449,7 +453,7 @@ vortex.flat, dtype: i32?, segment 0, buffers=[20B], total=20B .write_stream( ctx, segments.clone(), - array.to_array_stream().sequenced(ptr), + array.into_array().to_array_stream().sequenced(ptr), eof, handle, ) diff --git a/vortex-layout/src/layouts/chunked/reader.rs b/vortex-layout/src/layouts/chunked/reader.rs index 6a0c63b6eb5..63e22e4a394 100644 --- a/vortex-layout/src/layouts/chunked/reader.rs +++ b/vortex-layout/src/layouts/chunked/reader.rs @@ -403,7 +403,7 @@ mod test { .unwrap(); let expected = buffer![1i32, 2, 3, 4, 5, 6, 7, 8, 9].into_array(); - assert_arrays_eq!(result.as_ref(), expected.as_ref()); + assert_arrays_eq!(result, expected); }) } } diff --git a/vortex-layout/src/layouts/flat/reader.rs b/vortex-layout/src/layouts/flat/reader.rs index 727566d3db8..b1c7c575fc0 100644 --- a/vortex-layout/src/layouts/flat/reader.rs +++ b/vortex-layout/src/layouts/flat/reader.rs @@ -348,7 +348,7 @@ mod test { .unwrap(); let expected = PrimitiveArray::new(buffer![3i32, 4], Validity::AllValid).into_array(); - assert_arrays_eq!(result.as_ref(), expected.as_ref()); + assert_arrays_eq!(result, expected); }) } } diff --git a/vortex-layout/src/layouts/flat/writer.rs b/vortex-layout/src/layouts/flat/writer.rs index 8f01669638e..a331fe19aad 100644 --- a/vortex-layout/src/layouts/flat/writer.rs +++ b/vortex-layout/src/layouts/flat/writer.rs @@ -250,7 +250,7 @@ mod tests { .write_stream( ctx, segments.clone(), - array.to_array_stream().sequenced(ptr), + array.into_array().to_array_stream().sequenced(ptr), eof, handle, ) @@ -299,7 +299,7 @@ mod tests { .write_stream( ctx, segments.clone(), - array.to_array_stream().sequenced(ptr), + array.into_array().to_array_stream().sequenced(ptr), eof, handle, ) @@ -366,7 +366,7 @@ mod tests { .write_stream( ctx, segments.clone(), - array.to_array_stream().sequenced(ptr), + array.into_array().to_array_stream().sequenced(ptr), eof, handle, ) @@ -434,7 +434,7 @@ mod tests { .write_stream( ctx, segments.clone(), - filter.to_array_stream().sequenced(ptr), + filter.into_array().to_array_stream().sequenced(ptr), eof, handle, ) @@ -476,7 +476,7 @@ mod tests { .write_stream( ctx, segments.clone(), - dict.to_array_stream().sequenced(ptr), + dict.into_array().to_array_stream().sequenced(ptr), eof, handle, ) diff --git a/vortex-layout/src/layouts/zoned/reader.rs b/vortex-layout/src/layouts/zoned/reader.rs index b4c30610467..02bff672eeb 100644 --- a/vortex-layout/src/layouts/zoned/reader.rs +++ b/vortex-layout/src/layouts/zoned/reader.rs @@ -468,7 +468,7 @@ mod test { .unwrap(); let expected = buffer![1i32, 2, 3, 4, 5, 6, 7, 8, 9].into_array(); - assert_arrays_eq!(result.as_ref(), expected.as_ref()); + assert_arrays_eq!(result, expected); }) } diff --git a/vortex/examples/tracing_vortex.rs b/vortex/examples/tracing_vortex.rs index aa456a44f5f..379602b3442 100644 --- a/vortex/examples/tracing_vortex.rs +++ b/vortex/examples/tracing_vortex.rs @@ -393,7 +393,7 @@ async fn write_batch_to_vortex( ); write_opts - .write(&mut file, struct_array.to_array_stream()) + .write(&mut file, struct_array.into_array().to_array_stream()) .await?; println!( diff --git a/vortex/src/lib.rs b/vortex/src/lib.rs index a532fc1adad..961a750ba36 100644 --- a/vortex/src/lib.rs +++ b/vortex/src/lib.rs @@ -253,7 +253,7 @@ mod test { println!( "BtrBlocks size: {} / {}", compressed.nbytes(), - array.nbytes() + array.clone().into_array().nbytes() ); // [compress] @@ -274,7 +274,7 @@ mod test { .write_options() .write( &mut tokio::fs::File::create(&path).await?, - array.to_array_stream(), + array.into_array().to_array_stream(), ) .await?; @@ -318,7 +318,7 @@ mod test { ) .write( &mut tokio::fs::File::create(&path).await?, - array.to_array_stream(), + array.clone().into_array().to_array_stream(), ) .await?; @@ -375,7 +375,7 @@ mod test { .write_options() .write( &mut tokio::fs::File::create(&path).await?, - array.to_array_stream(), + array.into_array().to_array_stream(), ) .await?; From 77a85298b15179f53c9395b5e4c7325679b6f199 Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Mon, 30 Mar 2026 11:41:54 +0100 Subject: [PATCH 03/11] Array VTables 5 Signed-off-by: Nicholas Gates --- encodings/alp/src/alp/array.rs | 10 +- encodings/alp/src/alp/compress.rs | 2 +- encodings/alp/src/alp/compute/slice.rs | 1 - encodings/alp/src/alp_rd/array.rs | 2 +- encodings/alp/src/alp_rd/slice.rs | 1 - encodings/bytebool/src/array.rs | 6 +- encodings/bytebool/src/compute.rs | 81 +++++------ encodings/datetime-parts/src/canonical.rs | 18 ++- encodings/datetime-parts/src/compress.rs | 1 - encodings/datetime-parts/src/compute/cast.rs | 12 +- .../datetime-parts/src/compute/compare.rs | 2 +- encodings/datetime-parts/src/compute/mod.rs | 32 ++--- encodings/datetime-parts/src/compute/rules.rs | 2 +- encodings/datetime-parts/src/compute/slice.rs | 1 - encodings/datetime-parts/src/compute/take.rs | 12 +- .../src/decimal_byte_parts/compute/cast.rs | 24 ++-- .../src/decimal_byte_parts/compute/compare.rs | 8 +- .../src/decimal_byte_parts/compute/filter.rs | 9 +- .../src/decimal_byte_parts/compute/mod.rs | 21 +-- .../src/decimal_byte_parts/mod.rs | 3 +- .../fastlanes/benches/bitpacking_take.rs | 30 ++-- .../fastlanes/benches/compute_between.rs | 4 +- .../src/bitpacking/array/bitpack_compress.rs | 4 +- .../bitpacking/array/bitpack_decompress.rs | 59 ++++---- .../fastlanes/src/bitpacking/array/mod.rs | 10 +- .../src/bitpacking/array/unpack_iter.rs | 1 - .../fastlanes/src/bitpacking/compute/cast.rs | 23 +-- .../src/bitpacking/compute/filter.rs | 29 ++-- .../src/bitpacking/compute/is_constant.rs | 7 +- .../fastlanes/src/bitpacking/compute/mod.rs | 44 +++--- .../fastlanes/src/bitpacking/compute/take.rs | 39 ++--- .../fastlanes/src/bitpacking/vtable/mod.rs | 5 + .../src/bitpacking/vtable/operations.rs | 44 +++--- .../src/delta/array/delta_compress.rs | 25 ++-- .../src/delta/array/delta_decompress.rs | 1 - encodings/fastlanes/src/delta/compute/cast.rs | 1 + .../fastlanes/src/delta/vtable/operations.rs | 135 ++++-------------- .../fastlanes/src/for/array/for_compress.rs | 18 ++- .../fastlanes/src/for/array/for_decompress.rs | 4 +- encodings/fastlanes/src/for/compute/cast.rs | 31 ++-- .../fastlanes/src/for/compute/compare.rs | 27 ++-- .../fastlanes/src/for/compute/is_sorted.rs | 61 +------- encodings/fastlanes/src/for/compute/mod.rs | 128 +++++++---------- .../fastlanes/src/for/vtable/operations.rs | 8 +- encodings/fastlanes/src/rle/array/mod.rs | 132 +++++++++-------- .../fastlanes/src/rle/array/rle_compress.rs | 40 ++++-- .../fastlanes/src/rle/array/rle_decompress.rs | 1 - encodings/fastlanes/src/rle/compute/cast.rs | 16 ++- .../fastlanes/src/rle/vtable/operations.rs | 39 ++--- encodings/fsst/benches/fsst_compress.rs | 14 +- encodings/fsst/benches/fsst_url_compare.rs | 20 ++- encodings/fsst/src/canonical.rs | 5 +- encodings/fsst/src/compress.rs | 4 +- encodings/fsst/src/compute/like.rs | 2 +- encodings/fsst/src/compute/mod.rs | 21 +-- encodings/fsst/src/dfa/tests.rs | 2 +- encodings/fsst/src/slice.rs | 1 - encodings/fsst/src/test_utils.rs | 19 +-- encodings/pco/src/array.rs | 5 +- encodings/pco/src/compute/cast.rs | 11 +- encodings/pco/src/compute/mod.rs | 18 +-- encodings/pco/src/test.rs | 31 ++-- encodings/runend/benches/run_end_compress.rs | 8 +- .../runend/benches/run_end_null_count.rs | 3 +- encodings/runend/src/arbitrary.rs | 1 - encodings/runend/src/array.rs | 23 ++- encodings/runend/src/arrow.rs | 8 +- encodings/runend/src/compress.rs | 4 +- encodings/runend/src/compute/cast.rs | 17 +-- encodings/runend/src/compute/compare.rs | 8 +- encodings/runend/src/compute/filter.rs | 9 +- encodings/runend/src/compute/mod.rs | 14 +- encodings/runend/src/compute/take.rs | 16 +-- encodings/runend/src/compute/take_from.rs | 12 +- encodings/runend/src/decompress_bool.rs | 2 +- encodings/runend/src/ops.rs | 17 ++- encodings/sequence/src/array.rs | 24 ++-- encodings/sequence/src/compute/cast.rs | 23 ++- encodings/sequence/src/compute/compare.rs | 9 +- encodings/sequence/src/compute/filter.rs | 26 ++-- .../sequence/src/compute/list_contains.rs | 12 +- encodings/sequence/src/compute/mod.rs | 20 +-- encodings/sequence/src/compute/slice.rs | 1 - encodings/sequence/src/compute/take.rs | 20 +-- encodings/sparse/src/canonical.rs | 48 +++---- encodings/sparse/src/compute/cast.rs | 17 +-- encodings/sparse/src/compute/filter.rs | 14 +- encodings/sparse/src/compute/mod.rs | 44 +++--- encodings/sparse/src/compute/take.rs | 15 +- encodings/sparse/src/lib.rs | 17 +-- encodings/sparse/src/ops.rs | 4 +- encodings/zigzag/src/array.rs | 3 +- encodings/zigzag/src/compress.rs | 18 ++- encodings/zigzag/src/compute/cast.rs | 8 +- encodings/zigzag/src/compute/mod.rs | 57 +++----- encodings/zigzag/src/slice.rs | 1 - encodings/zstd/benches/listview_rebuild.rs | 4 +- encodings/zstd/src/array.rs | 4 +- encodings/zstd/src/compute/cast.rs | 11 +- encodings/zstd/src/compute/mod.rs | 18 +-- encodings/zstd/src/test.rs | 26 ++-- encodings/zstd/src/zstd_buffers.rs | 8 +- fuzz/fuzz_targets/file_io.rs | 1 - fuzz/src/array/search_sorted.rs | 6 +- fuzz/src/array/sort.rs | 6 +- .../src/aggregate_fn/fns/is_sorted/bool.rs | 2 +- .../src/aggregate_fn/fns/is_sorted/decimal.rs | 2 +- .../aggregate_fn/fns/is_sorted/primitive.rs | 2 +- .../src/aggregate_fn/fns/min_max/bool.rs | 2 +- .../src/aggregate_fn/fns/min_max/decimal.rs | 2 +- .../src/aggregate_fn/fns/min_max/primitive.rs | 2 +- .../aggregate_fn/fns/nan_count/primitive.rs | 2 +- vortex-array/src/aggregate_fn/fns/sum/bool.rs | 2 +- .../src/aggregate_fn/fns/sum/decimal.rs | 2 +- .../src/aggregate_fn/fns/sum/primitive.rs | 2 +- vortex-array/src/arrays/bool/test_harness.rs | 3 + .../src/arrays/chunked/compute/take.rs | 5 +- .../src/arrays/decimal/compute/cast.rs | 2 +- .../src/arrays/decimal/compute/fill_null.rs | 2 +- .../arrays/fixed_size_list/compute/take.rs | 4 +- vortex-array/src/arrays/list/compute/take.rs | 8 +- vortex-array/src/arrays/masked/vtable/mod.rs | 2 +- .../src/arrays/primitive/array/top_value.rs | 2 +- .../src/arrays/primitive/compute/cast.rs | 4 +- .../src/arrays/primitive/compute/fill_null.rs | 8 +- .../src/arrays/varbin/compute/compare.rs | 4 +- .../src/arrays/varbin/compute/filter.rs | 2 +- .../src/arrays/varbin/compute/take.rs | 4 +- vortex-array/src/arrays/varbinview/compact.rs | 2 +- .../src/arrays/varbinview/compute/take.rs | 2 +- .../src/arrays/varbinview/compute/zip.rs | 4 +- vortex-array/src/arrow/executor/bool.rs | 2 +- vortex-array/src/arrow/executor/byte_view.rs | 2 +- vortex-array/src/arrow/executor/decimal.rs | 8 +- vortex-array/src/arrow/executor/primitive.rs | 2 +- vortex-array/src/arrow/executor/temporal.rs | 2 +- vortex-array/src/builders/bool.rs | 4 +- vortex-array/src/builders/decimal.rs | 2 +- vortex-array/src/builders/primitive.rs | 4 +- vortex-array/src/builders/struct_.rs | 3 +- vortex-array/src/builders/varbinview.rs | 46 +++--- vortex-array/src/mask.rs | 2 +- vortex-array/src/patches.rs | 8 +- vortex-array/src/test_harness.rs | 2 +- vortex-array/src/vtable/typed.rs | 7 +- .../src/compressor/float/stats.rs | 2 +- .../src/compressor/integer/stats.rs | 2 +- vortex-btrblocks/src/compressor/rle.rs | 4 +- vortex-cuda/benches/bitpacked_cuda.rs | 13 +- vortex-cuda/benches/date_time_parts_cuda.rs | 7 +- vortex-cuda/benches/dynamic_dispatch_cuda.rs | 30 ++-- vortex-cuda/benches/for_cuda.rs | 17 ++- vortex-cuda/benches/runend_cuda.rs | 3 +- vortex-cuda/benches/zstd_cuda.rs | 5 +- vortex-cuda/src/hybrid_dispatch/mod.rs | 4 +- .../src/kernel/encodings/zstd_buffers.rs | 7 +- vortex-duckdb/src/exporter/sequence.rs | 1 + vortex-ipc/src/messages/decoder.rs | 6 +- .../common_encoding_tree_throughput.rs | 63 ++++---- vortex/benches/single_encoding_throughput.rs | 67 +++++---- vortex/src/lib.rs | 2 +- 161 files changed, 1202 insertions(+), 1177 deletions(-) diff --git a/encodings/alp/src/alp/array.rs b/encodings/alp/src/alp/array.rs index 2ea537d7e67..83777fe11bd 100644 --- a/encodings/alp/src/alp/array.rs +++ b/encodings/alp/src/alp/array.rs @@ -393,7 +393,7 @@ impl ALPData { /// # Examples /// /// ``` - /// # use vortex_alp::{ALPArray, Exponents}; + /// # use vortex_alp::{ALPData, ALPArray, Exponents}; /// # use vortex_array::IntoArray; /// # use vortex_buffer::buffer; /// @@ -414,11 +414,11 @@ impl ALPData { /// assert!(result.is_err()); /// /// // Success! - /// let value = ALPData::try_new( + /// let value = ALPArray::from_inner(ALPData::try_new( /// buffer![0i32].into_array(), /// Exponents { e: 1, f: 1 }, /// None - /// ).unwrap(); + /// ).unwrap()); /// /// assert_eq!(value.scalar_at(0).unwrap(), 0f32.into()); /// ``` @@ -853,11 +853,11 @@ mod tests { .unwrap(); // Build a new ALPArray with the same encoded data but patches without chunk_offsets. - let alp_without_chunk_offsets = ALPData::new( + let alp_without_chunk_offsets = ALPArray::from_inner(ALPData::new( normally_encoded.encoded().clone(), normally_encoded.exponents(), Some(patches_without_chunk_offsets), - ); + )); // The legacy decompress_into_array path should work correctly. let result_legacy = decompress_into_array( diff --git a/encodings/alp/src/alp/compress.rs b/encodings/alp/src/alp/compress.rs index e474238da98..53d6319fb73 100644 --- a/encodings/alp/src/alp/compress.rs +++ b/encodings/alp/src/alp/compress.rs @@ -76,7 +76,7 @@ where let encoded_array = PrimitiveArray::new(encoded, values.validity().clone()).into_array(); - let validity = values.validity_mask(); + let validity = values.validity_mask()?; // exceptional_positions may contain exceptions at invalid positions (which contain garbage // data). We remove null exceptions in order to keep the Patches small. let (valid_exceptional_positions, valid_exceptional_values): (Buffer, Buffer) = diff --git a/encodings/alp/src/alp/compute/slice.rs b/encodings/alp/src/alp/compute/slice.rs index bcd0ddd7500..2b85ac0535e 100644 --- a/encodings/alp/src/alp/compute/slice.rs +++ b/encodings/alp/src/alp/compute/slice.rs @@ -11,7 +11,6 @@ use vortex_array::vtable::Array; use vortex_error::VortexResult; use crate::ALP; -use crate::ALPArray; impl SliceKernel for ALP { fn slice( diff --git a/encodings/alp/src/alp_rd/array.rs b/encodings/alp/src/alp_rd/array.rs index 21d2d2e0c9d..23e99df5cbf 100644 --- a/encodings/alp/src/alp_rd/array.rs +++ b/encodings/alp/src/alp_rd/array.rs @@ -329,7 +329,7 @@ impl VTable for ALPRD { // Decode the left_parts using our builtin dictionary. let left_parts_dict = left_parts_dictionary; - let validity = left_parts.validity_mask(); + let validity = left_parts.validity_mask()?; let decoded_array = if ptype == PType::F32 { // TODO(joe): use iterative execution for the patches. diff --git a/encodings/alp/src/alp_rd/slice.rs b/encodings/alp/src/alp_rd/slice.rs index 7e728f32927..4d12a74dc7d 100644 --- a/encodings/alp/src/alp_rd/slice.rs +++ b/encodings/alp/src/alp_rd/slice.rs @@ -11,7 +11,6 @@ use vortex_array::vtable::Array; use vortex_error::VortexResult; use crate::alp_rd::ALPRD; -use crate::alp_rd::ALPRDArray; impl SliceKernel for ALPRD { fn slice( diff --git a/encodings/bytebool/src/array.rs b/encodings/bytebool/src/array.rs index 2db4a306b45..937bc34ab31 100644 --- a/encodings/bytebool/src/array.rs +++ b/encodings/bytebool/src/array.rs @@ -326,7 +326,7 @@ mod tests { let v = vec![true, false]; let v_len = v.len(); - let arr = ByteBoolArray::from(v); + let arr = ByteBoolArray::from_inner(ByteBoolData::from(v)); assert_eq!(v_len, arr.len()); for idx in 0..arr.len() { @@ -334,7 +334,7 @@ mod tests { } let v = vec![Some(true), None, Some(false)]; - let arr = ByteBoolArray::from(v); + let arr = ByteBoolArray::from_inner(ByteBoolData::from(v)); assert!(arr.is_valid(0).unwrap()); assert!(!arr.is_valid(1).unwrap()); assert!(arr.is_valid(2).unwrap()); @@ -343,7 +343,7 @@ mod tests { let v: Vec> = vec![None, None]; let v_len = v.len(); - let arr = ByteBoolArray::from(v); + let arr = ByteBoolArray::from_inner(ByteBoolData::from(v)); assert_eq!(v_len, arr.len()); for idx in 0..arr.len() { diff --git a/encodings/bytebool/src/compute.rs b/encodings/bytebool/src/compute.rs index 317312102c0..b91142a9bde 100644 --- a/encodings/bytebool/src/compute.rs +++ b/encodings/bytebool/src/compute.rs @@ -102,94 +102,95 @@ mod tests { use super::*; + fn bb(v: Vec) -> ByteBoolArray { + ByteBoolArray::from_inner(ByteBoolData::from(v)) + } + + fn bb_opt(v: Vec>) -> ByteBoolArray { + ByteBoolArray::from_inner(ByteBoolData::from(v)) + } + #[test] fn test_slice() { let original = vec![Some(true), Some(true), None, Some(false), None]; - let vortex_arr = ByteBoolArray::from(original); + let vortex_arr = bb_opt(original); let sliced_arr = vortex_arr.slice(1..4).unwrap(); - let expected = ByteBoolArray::from(vec![Some(true), None, Some(false)]); + let expected = bb_opt(vec![Some(true), None, Some(false)]); assert_arrays_eq!(sliced_arr, expected.into_array()); } #[test] fn test_compare_all_equal() { - let lhs = ByteBoolArray::from(vec![true; 5]); - let rhs = ByteBoolArray::from(vec![true; 5]); + let lhs = bb(vec![true; 5]); + let rhs = bb(vec![true; 5]); let arr = lhs .into_array() .binary(rhs.into_array(), Operator::Eq) .unwrap(); - let expected = ByteBoolArray::from(vec![true; 5]); + let expected = bb(vec![true; 5]); assert_arrays_eq!(arr, expected.into_array()); } #[test] fn test_compare_all_different() { - let lhs = ByteBoolArray::from(vec![false; 5]); - let rhs = ByteBoolArray::from(vec![true; 5]); + let lhs = bb(vec![false; 5]); + let rhs = bb(vec![true; 5]); let arr = lhs .into_array() .binary(rhs.into_array(), Operator::Eq) .unwrap(); - let expected = ByteBoolArray::from(vec![false; 5]); + let expected = bb(vec![false; 5]); assert_arrays_eq!(arr, expected.into_array()); } #[test] fn test_compare_with_nulls() { - let lhs = ByteBoolArray::from(vec![true; 5]); - let rhs = ByteBoolArray::from(vec![Some(true), Some(true), Some(true), Some(false), None]); + let lhs = bb(vec![true; 5]); + let rhs = bb_opt(vec![Some(true), Some(true), Some(true), Some(false), None]); let arr = lhs .into_array() .binary(rhs.into_array(), Operator::Eq) .unwrap(); - let expected = - ByteBoolArray::from(vec![Some(true), Some(true), Some(true), Some(false), None]); + let expected = bb_opt(vec![Some(true), Some(true), Some(true), Some(false), None]); assert_arrays_eq!(arr, expected.into_array()); } #[test] fn test_mask_byte_bool() { + test_mask_conformance(&bb(vec![true, false, true, true, false]).into_array()); test_mask_conformance( - &ByteBoolArray::from(vec![true, false, true, true, false]).into_array(), - ); - test_mask_conformance( - &ByteBoolArray::from(vec![Some(true), Some(true), None, Some(false), None]) - .into_array(), + &bb_opt(vec![Some(true), Some(true), None, Some(false), None]).into_array(), ); } #[test] fn test_filter_byte_bool() { + test_filter_conformance(&bb(vec![true, false, true, true, false]).into_array()); test_filter_conformance( - &ByteBoolArray::from(vec![true, false, true, true, false]).into_array(), - ); - test_filter_conformance( - &ByteBoolArray::from(vec![Some(true), Some(true), None, Some(false), None]) - .into_array(), + &bb_opt(vec![Some(true), Some(true), None, Some(false), None]).into_array(), ); } #[rstest] - #[case(ByteBoolArray::from(vec![true, false, true, true, false]))] - #[case(ByteBoolArray::from(vec![Some(true), Some(true), None, Some(false), None]))] - #[case(ByteBoolArray::from(vec![true, false]))] - #[case(ByteBoolArray::from(vec![true]))] + #[case(bb(vec![true, false, true, true, false]))] + #[case(bb_opt(vec![Some(true), Some(true), None, Some(false), None]))] + #[case(bb(vec![true, false]))] + #[case(bb(vec![true]))] fn test_take_byte_bool_conformance(#[case] array: ByteBoolArray) { test_take_conformance(&array.into_array()); } #[test] fn test_cast_bytebool_to_nullable() { - let array = ByteBoolArray::from(vec![true, false, true, false]); + let array = bb(vec![true, false, true, false]); let casted = array .into_array() .cast(DType::Bool(Nullability::Nullable)) @@ -199,24 +200,24 @@ mod tests { } #[rstest] - #[case(ByteBoolArray::from(vec![true, false, true, true, false]))] - #[case(ByteBoolArray::from(vec![Some(true), Some(false), None, Some(true), None]))] - #[case(ByteBoolArray::from(vec![false]))] - #[case(ByteBoolArray::from(vec![true]))] - #[case(ByteBoolArray::from(vec![Some(true), None]))] + #[case(bb(vec![true, false, true, true, false]))] + #[case(bb_opt(vec![Some(true), Some(false), None, Some(true), None]))] + #[case(bb(vec![false]))] + #[case(bb(vec![true]))] + #[case(bb_opt(vec![Some(true), None]))] fn test_cast_bytebool_conformance(#[case] array: ByteBoolArray) { test_cast_conformance(&array.into_array()); } #[rstest] - #[case::non_nullable(ByteBoolArray::from(vec![true, false, true, true, false]))] - #[case::nullable(ByteBoolArray::from(vec![Some(true), Some(false), None, Some(true), None]))] - #[case::all_true(ByteBoolArray::from(vec![true, true, true, true]))] - #[case::all_false(ByteBoolArray::from(vec![false, false, false, false]))] - #[case::single_true(ByteBoolArray::from(vec![true]))] - #[case::single_false(ByteBoolArray::from(vec![false]))] - #[case::single_null(ByteBoolArray::from(vec![None]))] - #[case::mixed_with_nulls(ByteBoolArray::from(vec![Some(true), None, Some(false), None, Some(true)]))] + #[case::non_nullable(bb(vec![true, false, true, true, false]))] + #[case::nullable(bb_opt(vec![Some(true), Some(false), None, Some(true), None]))] + #[case::all_true(bb(vec![true, true, true, true]))] + #[case::all_false(bb(vec![false, false, false, false]))] + #[case::single_true(bb(vec![true]))] + #[case::single_false(bb(vec![false]))] + #[case::single_null(bb_opt(vec![None]))] + #[case::mixed_with_nulls(bb_opt(vec![Some(true), None, Some(false), None, Some(true)]))] fn test_bytebool_consistency(#[case] array: ByteBoolArray) { test_array_consistency(&array.into_array()); } diff --git a/encodings/datetime-parts/src/canonical.rs b/encodings/datetime-parts/src/canonical.rs index 29b4d7e34df..2e8dc6b81a6 100644 --- a/encodings/datetime-parts/src/canonical.rs +++ b/encodings/datetime-parts/src/canonical.rs @@ -108,6 +108,7 @@ pub fn decode_to_temporal( #[cfg(test)] mod test { use rstest::rstest; + use vortex_array::DynArray; use vortex_array::ExecutionCtx; use vortex_array::IntoArray; use vortex_array::arrays::PrimitiveArray; @@ -121,6 +122,7 @@ mod test { use vortex_session::VortexSession; use crate::DateTimePartsArray; + use crate::DateTimePartsData; use crate::canonical::decode_to_temporal; #[rstest] @@ -140,16 +142,18 @@ mod test { ], validity.clone(), ); - let date_times = DateTimePartsData::try_from(TemporalArray::new_timestamp( - milliseconds.clone().into_array(), - TimeUnit::Milliseconds, - Some("UTC".into()), - )) - .unwrap(); + let date_times = DateTimePartsArray::from_inner( + DateTimePartsData::try_from(TemporalArray::new_timestamp( + milliseconds.clone().into_array(), + TimeUnit::Milliseconds, + Some("UTC".into()), + )) + .unwrap(), + ); let mut ctx = ExecutionCtx::new(VortexSession::empty()); - assert!(date_times.validity()?.mask_eq(&validity, &mut ctx)?); + assert!(DynArray::validity(&date_times)?.mask_eq(&validity, &mut ctx)?); let primitive_values = decode_to_temporal(&date_times, &mut ctx)? .temporal_values() diff --git a/encodings/datetime-parts/src/compress.rs b/encodings/datetime-parts/src/compress.rs index a0b62de3666..87047a30ee4 100644 --- a/encodings/datetime-parts/src/compress.rs +++ b/encodings/datetime-parts/src/compress.rs @@ -14,7 +14,6 @@ use vortex_buffer::BufferMut; use vortex_error::VortexError; use vortex_error::VortexResult; -use crate::DateTimePartsArray; use crate::DateTimePartsData; use crate::timestamp; pub struct TemporalParts { diff --git a/encodings/datetime-parts/src/compute/cast.rs b/encodings/datetime-parts/src/compute/cast.rs index 3f303db1db7..11e4dbe70b5 100644 --- a/encodings/datetime-parts/src/compute/cast.rs +++ b/encodings/datetime-parts/src/compute/cast.rs @@ -106,7 +106,7 @@ mod tests { } #[rstest] - #[case(DateTimePartsData::try_from(TemporalArray::new_timestamp( + #[case(DateTimePartsArray::from_inner(DateTimePartsData::try_from(TemporalArray::new_timestamp( buffer![ 0i64, 86_400_000, // 1 day in ms @@ -116,8 +116,8 @@ mod tests { ].into_array(), TimeUnit::Milliseconds, Some("UTC".into()) - )).unwrap())] - #[case(DateTimePartsData::try_from(TemporalArray::new_timestamp( + )).unwrap()))] + #[case(DateTimePartsArray::from_inner(DateTimePartsData::try_from(TemporalArray::new_timestamp( PrimitiveArray::from_option_iter([ Some(0i64), None, @@ -127,12 +127,12 @@ mod tests { ]).into_array(), TimeUnit::Milliseconds, Some("UTC".into()) - )).unwrap())] - #[case(DateTimePartsData::try_from(TemporalArray::new_timestamp( + )).unwrap()))] + #[case(DateTimePartsArray::from_inner(DateTimePartsData::try_from(TemporalArray::new_timestamp( buffer![86_400_000_000_000i64].into_array(), // 1 day in ns TimeUnit::Nanoseconds, Some("UTC".into()) - )).unwrap())] + )).unwrap()))] fn test_cast_datetime_parts_conformance(#[case] array: DateTimePartsArray) { use vortex_array::compute::conformance::cast::test_cast_conformance; test_cast_conformance(&array.into_array()); diff --git a/encodings/datetime-parts/src/compute/compare.rs b/encodings/datetime-parts/src/compute/compare.rs index 9bbd9ee5501..c1f495595c4 100644 --- a/encodings/datetime-parts/src/compute/compare.rs +++ b/encodings/datetime-parts/src/compute/compare.rs @@ -16,7 +16,6 @@ use vortex_array::scalar_fn::fns::operators::CompareOperator; use vortex_array::scalar_fn::fns::operators::Operator; use vortex_error::VortexResult; -use crate::DateTimePartsData; use crate::array::DateTimeParts; use crate::array::DateTimePartsArray; use crate::timestamp; @@ -207,6 +206,7 @@ mod test { use vortex_buffer::buffer; use super::*; + use crate::DateTimePartsData; fn dtp_array_from_timestamp( value: T, diff --git a/encodings/datetime-parts/src/compute/mod.rs b/encodings/datetime-parts/src/compute/mod.rs index 0f13adfce5b..8086c573c3f 100644 --- a/encodings/datetime-parts/src/compute/mod.rs +++ b/encodings/datetime-parts/src/compute/mod.rs @@ -26,50 +26,50 @@ mod tests { #[rstest] // Basic datetime arrays - #[case::datetime_seconds(DateTimePartsData::try_from(TemporalArray::new_timestamp( + #[case::datetime_seconds(DateTimePartsArray::from_inner(DateTimePartsData::try_from(TemporalArray::new_timestamp( buffer![0i64, 86400, 172800, 259200, 345600].into_array(), TimeUnit::Seconds, Some("UTC".into()), - )).unwrap())] - #[case::datetime_millis(DateTimePartsData::try_from(TemporalArray::new_timestamp( + )).unwrap()))] + #[case::datetime_millis(DateTimePartsArray::from_inner(DateTimePartsData::try_from(TemporalArray::new_timestamp( buffer![0i64, 86400000, 172800000].into_array(), TimeUnit::Milliseconds, Some("UTC".into()), - )).unwrap())] - #[case::datetime_micros(DateTimePartsData::try_from(TemporalArray::new_timestamp( + )).unwrap()))] + #[case::datetime_micros(DateTimePartsArray::from_inner(DateTimePartsData::try_from(TemporalArray::new_timestamp( buffer![0i64, 86400000000, 172800000000].into_array(), TimeUnit::Microseconds, Some("UTC".into()), - )).unwrap())] - #[case::datetime_nanos(DateTimePartsData::try_from(TemporalArray::new_timestamp( + )).unwrap()))] + #[case::datetime_nanos(DateTimePartsArray::from_inner(DateTimePartsData::try_from(TemporalArray::new_timestamp( buffer![0i64, 86400000000000].into_array(), TimeUnit::Nanoseconds, Some("UTC".into()), - )).unwrap())] + )).unwrap()))] // Nullable arrays - #[case::datetime_nullable_seconds(DateTimePartsData::try_from(TemporalArray::new_timestamp( + #[case::datetime_nullable_seconds(DateTimePartsArray::from_inner(DateTimePartsData::try_from(TemporalArray::new_timestamp( PrimitiveArray::from_option_iter([Some(0i64), None, Some(86400), Some(172800), None]).into_array(), TimeUnit::Seconds, Some("UTC".into()), - )).unwrap())] + )).unwrap()))] // Edge cases - #[case::datetime_single(DateTimePartsData::try_from(TemporalArray::new_timestamp( + #[case::datetime_single(DateTimePartsArray::from_inner(DateTimePartsData::try_from(TemporalArray::new_timestamp( buffer![1234567890i64].into_array(), TimeUnit::Seconds, Some("UTC".into()), - )).unwrap())] + )).unwrap()))] // Large arrays (> 1024 elements) - #[case::datetime_large(DateTimePartsData::try_from(TemporalArray::new_timestamp( + #[case::datetime_large(DateTimePartsArray::from_inner(DateTimePartsData::try_from(TemporalArray::new_timestamp( PrimitiveArray::from_iter((0..1500).map(|i| i as i64 * 86400)).into_array(), TimeUnit::Seconds, Some("UTC".into()), - )).unwrap())] + )).unwrap()))] // Different time patterns - #[case::datetime_with_subseconds(DateTimePartsData::try_from(TemporalArray::new_timestamp( + #[case::datetime_with_subseconds(DateTimePartsArray::from_inner(DateTimePartsData::try_from(TemporalArray::new_timestamp( buffer![123456789i64, 234567890, 345678901, 456789012, 567890123].into_array(), TimeUnit::Milliseconds, Some("UTC".into()), - )).unwrap())] + )).unwrap()))] fn test_datetime_parts_consistency(#[case] array: DateTimePartsArray) { test_array_consistency(&array.into_array()); diff --git a/encodings/datetime-parts/src/compute/rules.rs b/encodings/datetime-parts/src/compute/rules.rs index 03d1b2eee3c..d3ceb76db9a 100644 --- a/encodings/datetime-parts/src/compute/rules.rs +++ b/encodings/datetime-parts/src/compute/rules.rs @@ -216,7 +216,7 @@ mod tests { time_unit, None, ); - DateTimePartsData::try_from(temporal).unwrap() + DateTimePartsArray::from_inner(DateTimePartsData::try_from(temporal).unwrap()) } /// Create a constant timestamp scalar at midnight for the given day. diff --git a/encodings/datetime-parts/src/compute/slice.rs b/encodings/datetime-parts/src/compute/slice.rs index 70a588b0a95..c73eda9388c 100644 --- a/encodings/datetime-parts/src/compute/slice.rs +++ b/encodings/datetime-parts/src/compute/slice.rs @@ -10,7 +10,6 @@ use vortex_array::vtable::Array; use vortex_error::VortexResult; use crate::DateTimeParts; -use crate::DateTimePartsArray; use crate::DateTimePartsData; impl SliceReduce for DateTimeParts { diff --git a/encodings/datetime-parts/src/compute/take.rs b/encodings/datetime-parts/src/compute/take.rs index 19b19be5837..3d123e9c8ed 100644 --- a/encodings/datetime-parts/src/compute/take.rs +++ b/encodings/datetime-parts/src/compute/take.rs @@ -106,7 +106,7 @@ mod tests { use crate::DateTimePartsData; #[rstest] - #[case(DateTimePartsData::try_from(TemporalArray::new_timestamp( + #[case(DateTimePartsArray::from_inner(DateTimePartsData::try_from(TemporalArray::new_timestamp( buffer![ 0i64, 86_400_000, // 1 day in ms @@ -116,8 +116,8 @@ mod tests { ].into_array(), TimeUnit::Milliseconds, Some("UTC".into()) - )).unwrap())] - #[case(DateTimePartsData::try_from(TemporalArray::new_timestamp( + )).unwrap()))] + #[case(DateTimePartsArray::from_inner(DateTimePartsData::try_from(TemporalArray::new_timestamp( PrimitiveArray::from_option_iter([ Some(0i64), None, @@ -127,12 +127,12 @@ mod tests { ]).into_array(), TimeUnit::Milliseconds, Some("UTC".into()) - )).unwrap())] - #[case(DateTimePartsData::try_from(TemporalArray::new_timestamp( + )).unwrap()))] + #[case(DateTimePartsArray::from_inner(DateTimePartsData::try_from(TemporalArray::new_timestamp( buffer![86_400_000i64].into_array(), TimeUnit::Milliseconds, Some("UTC".into()) - )).unwrap())] + )).unwrap()))] fn test_take_datetime_parts_conformance(#[case] array: DateTimePartsArray) { test_take_conformance(&array.into_array()); } diff --git a/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/cast.rs b/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/cast.rs index 85f3fb7d132..86d9e156c04 100644 --- a/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/cast.rs +++ b/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/cast.rs @@ -9,7 +9,6 @@ use vortex_array::dtype::DType; use vortex_array::scalar_fn::fns::cast::CastReduce; use vortex_error::VortexResult; -use super::DecimalBytePartsData; use crate::DecimalByteParts; use crate::DecimalBytePartsArray; impl CastReduce for DecimalByteParts { @@ -30,7 +29,7 @@ impl CastReduce for DecimalByteParts { .cast(array.msp().dtype().with_nullability(*target_nullability))?; return Ok(Some( - DecimalBytePartsData::try_new(new_msp, *target_decimal)?.into_array(), + DecimalByteParts::try_new(new_msp, *target_decimal)?.into_array(), )); } @@ -52,16 +51,15 @@ mod tests { use vortex_array::dtype::Nullability; use vortex_buffer::buffer; + use crate::DecimalByteParts; use crate::DecimalBytePartsArray; #[test] fn test_cast_decimal_byte_parts_nullability() { let decimal_dtype = DecimalDType::new(10, 2); - let array = DecimalBytePartsData::try_new( - buffer![100i32, 200, 300, 400].into_array(), - decimal_dtype, - ) - .unwrap(); + let array = + DecimalByteParts::try_new(buffer![100i32, 200, 300, 400].into_array(), decimal_dtype) + .unwrap(); // Cast to nullable decimal let casted = array @@ -81,7 +79,7 @@ mod tests { #[test] fn test_cast_decimal_byte_parts_nullable_to_non_nullable() { let decimal_dtype = DecimalDType::new(10, 2); - let array = DecimalBytePartsData::try_new( + let array = DecimalByteParts::try_new( PrimitiveArray::from_option_iter([Some(100i32), None, Some(300)]).into_array(), decimal_dtype, ) @@ -96,24 +94,24 @@ mod tests { } #[rstest] - #[case::i32(DecimalBytePartsData::try_new( + #[case::i32(DecimalByteParts::try_new( buffer![100i32, 200, 300, 400, 500].into_array(), DecimalDType::new(10, 2), ).unwrap())] - #[case::i64(DecimalBytePartsData::try_new( + #[case::i64(DecimalByteParts::try_new( buffer![1000i64, 2000, 3000, 4000].into_array(), DecimalDType::new(19, 4), ).unwrap())] - #[case::nullable(DecimalBytePartsData::try_new( + #[case::nullable(DecimalByteParts::try_new( PrimitiveArray::from_option_iter([Some(100i32), None, Some(300), Some(400), None]) .into_array(), DecimalDType::new(10, 2), ).unwrap())] - #[case::single(DecimalBytePartsData::try_new( + #[case::single(DecimalByteParts::try_new( buffer![42i32].into_array(), DecimalDType::new(5, 1), ).unwrap())] - #[case::negative(DecimalBytePartsData::try_new( + #[case::negative(DecimalByteParts::try_new( buffer![-100i32, -200, 300, -400, 500].into_array(), DecimalDType::new(10, 2), ).unwrap())] diff --git a/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/compare.rs b/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/compare.rs index 244e17a77aa..f94e55df7b5 100644 --- a/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/compare.rs +++ b/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/compare.rs @@ -25,7 +25,6 @@ use vortex_array::vtable::Array; use vortex_error::VortexExpect; use vortex_error::VortexResult; -use super::DecimalBytePartsData; use crate::DecimalByteParts; use crate::decimal_byte_parts::compute::compare::Sign::Positive; @@ -160,13 +159,14 @@ mod tests { use vortex_buffer::buffer; use vortex_error::VortexResult; + use crate::DecimalByteParts; use crate::DecimalBytePartsArray; #[test] fn compare_decimal_const() { let decimal_dtype = DecimalDType::new(8, 2); let dtype = DType::Decimal(decimal_dtype, Nullability::Nullable); - let lhs = DecimalBytePartsData::try_new( + let lhs = DecimalByteParts::try_new( PrimitiveArray::new(buffer![100i32, 200i32, 400i32], Validity::AllValid).into_array(), decimal_dtype, ) @@ -186,7 +186,7 @@ mod tests { #[test] fn test_byteparts_compare_nullable() -> VortexResult<()> { let decimal_type = DecimalDType::new(19, -11); - let lhs = DecimalBytePartsData::try_new( + let lhs = DecimalByteParts::try_new( PrimitiveArray::new( buffer![1i64, 2i64, 3i64, 4i64], Validity::Array(BoolArray::from_iter([false, true, true, true]).into_array()), @@ -217,7 +217,7 @@ mod tests { fn compare_decimal_const_unconvertible_comparison() { let decimal_dtype = DecimalDType::new(40, 2); let dtype = DType::Decimal(decimal_dtype, Nullability::Nullable); - let lhs = DecimalBytePartsData::try_new( + let lhs = DecimalByteParts::try_new( PrimitiveArray::new(buffer![100i32, 200i32, 400i32], Validity::AllValid).into_array(), decimal_dtype, ) diff --git a/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/filter.rs b/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/filter.rs index d6ffcb51b12..b71bfc267fd 100644 --- a/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/filter.rs +++ b/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/filter.rs @@ -7,12 +7,11 @@ use vortex_array::arrays::filter::FilterReduce; use vortex_error::VortexResult; use vortex_mask::Mask; -use super::DecimalBytePartsData; use crate::DecimalByteParts; use crate::DecimalBytePartsArray; impl FilterReduce for DecimalByteParts { fn filter(array: &DecimalBytePartsArray, mask: &Mask) -> VortexResult> { - DecimalBytePartsData::try_new(array.msp.filter(mask.clone())?, *array.decimal_dtype()) + DecimalByteParts::try_new(array.msp.filter(mask.clone())?, *array.decimal_dtype()) .map(|d| Some(d.into_array())) } } @@ -25,7 +24,7 @@ mod test { use vortex_array::dtype::DecimalDType; use vortex_buffer::buffer; - use crate::DecimalBytePartsArray; + use crate::DecimalByteParts; #[test] fn test_filter_decimal_byte_parts() { @@ -33,7 +32,7 @@ mod test { let msp = buffer![100i32, 200, 300, 400, 500].into_array(); let decimal_dtype = DecimalDType::new(8, 2); - let array = DecimalBytePartsData::try_new(msp, decimal_dtype).unwrap(); + let array = DecimalByteParts::try_new(msp, decimal_dtype).unwrap(); test_filter_conformance(&array.into_array()); // Test with nullable values @@ -41,7 +40,7 @@ mod test { .into_array(); let decimal_dtype = DecimalDType::new(18, 4); - let array = DecimalBytePartsData::try_new(msp, decimal_dtype).unwrap(); + let array = DecimalByteParts::try_new(msp, decimal_dtype).unwrap(); test_filter_conformance(&array.into_array()); } } diff --git a/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/mod.rs b/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/mod.rs index 24e09031a21..ef271694aea 100644 --- a/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/mod.rs +++ b/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/mod.rs @@ -19,51 +19,52 @@ mod tests { use vortex_array::dtype::DecimalDType; use vortex_buffer::buffer; + use crate::DecimalByteParts; use crate::DecimalBytePartsArray; #[rstest] // Basic decimal byte parts arrays - #[case::decimal_i32(DecimalBytePartsData::try_new( + #[case::decimal_i32(DecimalByteParts::try_new( buffer![100i32, 200, 300, 400, 500].into_array(), DecimalDType::new(10, 2) ).unwrap())] - #[case::decimal_i64(DecimalBytePartsData::try_new( + #[case::decimal_i64(DecimalByteParts::try_new( buffer![1000i64, 2000, 3000, 4000, 5000].into_array(), DecimalDType::new(19, 4) ).unwrap())] // Nullable arrays - #[case::decimal_nullable_i32(DecimalBytePartsData::try_new( + #[case::decimal_nullable_i32(DecimalByteParts::try_new( PrimitiveArray::from_option_iter([Some(100i32), None, Some(300), Some(400), None]).into_array(), DecimalDType::new(10, 2) ).unwrap())] - #[case::decimal_nullable_i64(DecimalBytePartsData::try_new( + #[case::decimal_nullable_i64(DecimalByteParts::try_new( PrimitiveArray::from_option_iter([Some(1000i64), None, Some(3000), Some(4000), None]).into_array(), DecimalDType::new(19, 4) ).unwrap())] // Different precision/scale combinations - #[case::decimal_high_precision(DecimalBytePartsData::try_new( + #[case::decimal_high_precision(DecimalByteParts::try_new( buffer![123456789i32, 987654321, -123456789].into_array(), DecimalDType::new(38, 10) ).unwrap())] - #[case::decimal_zero_scale(DecimalBytePartsData::try_new( + #[case::decimal_zero_scale(DecimalByteParts::try_new( buffer![100i32, 200, 300].into_array(), DecimalDType::new(10, 0) ).unwrap())] // Edge cases - #[case::decimal_single(DecimalBytePartsData::try_new( + #[case::decimal_single(DecimalByteParts::try_new( buffer![42i32].into_array(), DecimalDType::new(5, 1) ).unwrap())] - #[case::decimal_negative(DecimalBytePartsData::try_new( + #[case::decimal_negative(DecimalByteParts::try_new( buffer![-100i32, -200, 300, -400, 500].into_array(), DecimalDType::new(10, 2) ).unwrap())] // Large arrays - #[case::decimal_large(DecimalBytePartsData::try_new( + #[case::decimal_large(DecimalByteParts::try_new( PrimitiveArray::from_iter((0..1500).map(|i| i * 100)).into_array(), DecimalDType::new(10, 2) ).unwrap())] - #[case::decimal_large_i64(DecimalBytePartsData::try_new( + #[case::decimal_large_i64(DecimalByteParts::try_new( PrimitiveArray::from_iter((0..2000i64).map(|i| i * 1000000)).into_array(), DecimalDType::new(19, 6) ).unwrap())] diff --git a/encodings/decimal-byte-parts/src/decimal_byte_parts/mod.rs b/encodings/decimal-byte-parts/src/decimal_byte_parts/mod.rs index dc62ed8d09b..e4745f9d386 100644 --- a/encodings/decimal-byte-parts/src/decimal_byte_parts/mod.rs +++ b/encodings/decimal-byte-parts/src/decimal_byte_parts/mod.rs @@ -366,13 +366,14 @@ mod tests { use vortex_array::validity::Validity; use vortex_buffer::buffer; + use crate::DecimalByteParts; use crate::DecimalBytePartsArray; #[test] fn test_scalar_at_decimal_parts() { let decimal_dtype = DecimalDType::new(8, 2); let dtype = DType::Decimal(decimal_dtype, Nullability::Nullable); - let array = DecimalBytePartsData::try_new( + let array = DecimalByteParts::try_new( PrimitiveArray::new( buffer![100i32, 200i32, 400i32], Validity::Array(BoolArray::from_iter(vec![false, true, true]).into_array()), diff --git a/encodings/fastlanes/benches/bitpacking_take.rs b/encodings/fastlanes/benches/bitpacking_take.rs index 23e857777f7..373cb558a91 100644 --- a/encodings/fastlanes/benches/bitpacking_take.rs +++ b/encodings/fastlanes/benches/bitpacking_take.rs @@ -16,8 +16,10 @@ use vortex_array::RecursiveCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::PrimitiveArray; use vortex_array::validity::Validity; +use vortex_array::vtable::Array; use vortex_buffer::Buffer; use vortex_buffer::buffer; +use vortex_fastlanes::BitPacked; use vortex_fastlanes::bitpack_compress::bitpack_to_best_bit_width; fn main() { @@ -28,7 +30,7 @@ fn main() { fn take_10_stratified(bencher: Bencher) { let values = fixture(65_536, 8); let uncompressed = PrimitiveArray::new(values, Validity::NonNullable); - let packed = bitpack_to_best_bit_width(&uncompressed).unwrap(); + let packed = Array::::from_inner(bitpack_to_best_bit_width(&uncompressed).unwrap()); let indices = PrimitiveArray::from_iter((0..10).map(|i| i * 6_553)); bencher @@ -46,7 +48,7 @@ fn take_10_stratified(bencher: Bencher) { fn take_10_contiguous(bencher: Bencher) { let values = fixture(65_536, 8); let uncompressed = PrimitiveArray::new(values, Validity::NonNullable); - let packed = bitpack_to_best_bit_width(&uncompressed).unwrap(); + let packed = Array::::from_inner(bitpack_to_best_bit_width(&uncompressed).unwrap()); let indices = buffer![0..10].into_array(); bencher @@ -65,7 +67,7 @@ fn take_10k_random(bencher: Bencher) { let values = fixture(65_536, 8); let range = Uniform::new(0, values.len()).unwrap(); let uncompressed = PrimitiveArray::new(values, Validity::NonNullable); - let packed = bitpack_to_best_bit_width(&uncompressed).unwrap(); + let packed = Array::::from_inner(bitpack_to_best_bit_width(&uncompressed).unwrap()); let rng = StdRng::seed_from_u64(0); let indices = PrimitiveArray::from_iter(rng.sample_iter(range).take(10_000).map(|i| i as u32)); @@ -85,7 +87,7 @@ fn take_10k_random(bencher: Bencher) { fn take_10k_contiguous(bencher: Bencher) { let values = fixture(65_536, 8); let uncompressed = PrimitiveArray::new(values, Validity::NonNullable); - let packed = bitpack_to_best_bit_width(&uncompressed).unwrap(); + let packed = Array::::from_inner(bitpack_to_best_bit_width(&uncompressed).unwrap()); let indices = PrimitiveArray::from_iter(0..10_000); bencher @@ -103,7 +105,7 @@ fn take_10k_contiguous(bencher: Bencher) { fn take_10k_dispersed(bencher: Bencher) { let values = fixture(65_536, 8); let uncompressed = PrimitiveArray::new(values.clone(), Validity::NonNullable); - let packed = bitpack_to_best_bit_width(&uncompressed).unwrap(); + let packed = Array::::from_inner(bitpack_to_best_bit_width(&uncompressed).unwrap()); let indices = PrimitiveArray::from_iter((0..10_000).map(|i| (i * 42) % values.len() as u64)); bencher @@ -121,7 +123,7 @@ fn take_10k_dispersed(bencher: Bencher) { fn take_10k_first_chunk_only(bencher: Bencher) { let values = fixture(65_536, 8); let uncompressed = PrimitiveArray::new(values, Validity::NonNullable); - let packed = bitpack_to_best_bit_width(&uncompressed).unwrap(); + let packed = Array::::from_inner(bitpack_to_best_bit_width(&uncompressed).unwrap()); let indices = PrimitiveArray::from_iter((0..10_000).map(|i| ((i * 42) % 1024) as u64)); bencher @@ -159,7 +161,7 @@ const NUM_EXCEPTIONS: u32 = 1024; fn patched_take_10_stratified(bencher: Bencher) { let values = (0u32..BIG_BASE2 + NUM_EXCEPTIONS).collect::>(); let uncompressed = PrimitiveArray::new(values, Validity::NonNullable); - let packed = bitpack_to_best_bit_width(&uncompressed).unwrap(); + let packed = Array::::from_inner(bitpack_to_best_bit_width(&uncompressed).unwrap()); assert!(packed.patches().is_some()); assert_eq!( @@ -184,7 +186,7 @@ fn patched_take_10_stratified(bencher: Bencher) { fn patched_take_10_contiguous(bencher: Bencher) { let values = (0u32..BIG_BASE2 + NUM_EXCEPTIONS).collect::>(); let uncompressed = PrimitiveArray::new(values, Validity::NonNullable); - let packed = bitpack_to_best_bit_width(&uncompressed).unwrap(); + let packed = Array::::from_inner(bitpack_to_best_bit_width(&uncompressed).unwrap()); assert!(packed.patches().is_some()); assert_eq!( @@ -209,7 +211,7 @@ fn patched_take_10_contiguous(bencher: Bencher) { fn patched_take_10k_random(bencher: Bencher) { let values = (0u32..BIG_BASE2 + NUM_EXCEPTIONS).collect::>(); let uncompressed = PrimitiveArray::new(values.clone(), Validity::NonNullable); - let packed = bitpack_to_best_bit_width(&uncompressed).unwrap(); + let packed = Array::::from_inner(bitpack_to_best_bit_width(&uncompressed).unwrap()); let rng = StdRng::seed_from_u64(0); let range = Uniform::new(0, values.len()).unwrap(); @@ -230,7 +232,7 @@ fn patched_take_10k_random(bencher: Bencher) { fn patched_take_10k_contiguous_not_patches(bencher: Bencher) { let values = (0u32..BIG_BASE2 + NUM_EXCEPTIONS).collect::>(); let uncompressed = PrimitiveArray::new(values, Validity::NonNullable); - let packed = bitpack_to_best_bit_width(&uncompressed).unwrap(); + let packed = Array::::from_inner(bitpack_to_best_bit_width(&uncompressed).unwrap()); let indices = PrimitiveArray::from_iter((0u32..NUM_EXCEPTIONS).cycle().take(10000)); bencher @@ -248,7 +250,7 @@ fn patched_take_10k_contiguous_not_patches(bencher: Bencher) { fn patched_take_10k_contiguous_patches(bencher: Bencher) { let values = (0u32..BIG_BASE2 + NUM_EXCEPTIONS).collect::>(); let uncompressed = PrimitiveArray::new(values, Validity::NonNullable); - let packed = bitpack_to_best_bit_width(&uncompressed).unwrap(); + let packed = Array::::from_inner(bitpack_to_best_bit_width(&uncompressed).unwrap()); assert!(packed.patches().is_some()); assert_eq!( @@ -274,7 +276,7 @@ fn patched_take_10k_contiguous_patches(bencher: Bencher) { fn patched_take_10k_dispersed(bencher: Bencher) { let values = (0u32..BIG_BASE2 + NUM_EXCEPTIONS).collect::>(); let uncompressed = PrimitiveArray::new(values.clone(), Validity::NonNullable); - let packed = bitpack_to_best_bit_width(&uncompressed).unwrap(); + let packed = Array::::from_inner(bitpack_to_best_bit_width(&uncompressed).unwrap()); let indices = PrimitiveArray::from_iter((0..10_000).map(|i| (i * 42) % values.len() as u64)); bencher @@ -292,7 +294,7 @@ fn patched_take_10k_dispersed(bencher: Bencher) { fn patched_take_10k_first_chunk_only(bencher: Bencher) { let values = (0u32..BIG_BASE2 + NUM_EXCEPTIONS).collect::>(); let uncompressed = PrimitiveArray::new(values, Validity::NonNullable); - let packed = bitpack_to_best_bit_width(&uncompressed).unwrap(); + let packed = Array::::from_inner(bitpack_to_best_bit_width(&uncompressed).unwrap()); let indices = PrimitiveArray::from_iter((0..10_000).map(|i| ((i * 42) % 1024) as u64)); bencher @@ -310,7 +312,7 @@ fn patched_take_10k_first_chunk_only(bencher: Bencher) { fn patched_take_10k_adversarial(bencher: Bencher) { let values = (0u32..BIG_BASE2 + NUM_EXCEPTIONS).collect::>(); let uncompressed = PrimitiveArray::new(values, Validity::NonNullable); - let packed = bitpack_to_best_bit_width(&uncompressed).unwrap(); + let packed = Array::::from_inner(bitpack_to_best_bit_width(&uncompressed).unwrap()); let per_chunk_count = 100; let indices = PrimitiveArray::from_iter( (0..(NUM_EXCEPTIONS + 1024) / 1024) diff --git a/encodings/fastlanes/benches/compute_between.rs b/encodings/fastlanes/benches/compute_between.rs index 48cbae73216..7ca38d54b17 100644 --- a/encodings/fastlanes/benches/compute_between.rs +++ b/encodings/fastlanes/benches/compute_between.rs @@ -5,7 +5,7 @@ use num_traits::NumCast; use rand::RngExt; use rand::rngs::StdRng; -use vortex_alp::ALPArray; +use vortex_alp::ALP; use vortex_alp::alp_encode; use vortex_array::ArrayRef; use vortex_array::IntoArray; @@ -54,7 +54,7 @@ fn generate_alp_bit_pack_primitive_array( let bp = bitpack_to_best_bit_width(&encoded) .vortex_expect("") .into_array(); - ALPArray::new(bp, alp.exponents(), None).into_array() + ALP::new(bp, alp.exponents(), None).into_array() } const BENCH_ARGS: &[usize] = &[2 << 10, 2 << 13, 2 << 14]; diff --git a/encodings/fastlanes/src/bitpacking/array/bitpack_compress.rs b/encodings/fastlanes/src/bitpacking/array/bitpack_compress.rs index 2e64e823ab1..9bea2fe2197 100644 --- a/encodings/fastlanes/src/bitpacking/array/bitpack_compress.rs +++ b/encodings/fastlanes/src/bitpacking/array/bitpack_compress.rs @@ -218,7 +218,7 @@ pub fn gather_patches( }; let array_len = parray.len(); - let validity_mask = parray.validity_mask(); + let validity_mask = parray.validity_mask()?; let patches = if array_len < u8::MAX as usize { match_each_integer_ptype!(parray.ptype(), |T| { @@ -320,7 +320,7 @@ fn bit_width_histogram_typed( |v: T| (8 * size_of::()) - (PrimInt::leading_zeros(v) as usize); let mut bit_widths = vec![0usize; size_of::() * 8 + 1]; - match array.validity_mask().bit_buffer() { + match array.validity_mask()?.bit_buffer() { AllOr::All => { // All values are valid. for v in array.as_slice::() { diff --git a/encodings/fastlanes/src/bitpacking/array/bitpack_decompress.rs b/encodings/fastlanes/src/bitpacking/array/bitpack_decompress.rs index 1e658eb0e73..999b26f9d34 100644 --- a/encodings/fastlanes/src/bitpacking/array/bitpack_decompress.rs +++ b/encodings/fastlanes/src/bitpacking/array/bitpack_decompress.rs @@ -19,7 +19,6 @@ use vortex_error::VortexExpect; use vortex_error::VortexResult; use crate::BitPackedArray; -use crate::BitPackedData; use crate::unpack_iter::BitPacked; /// Unpacks a bit-packed array into a primitive array. @@ -58,7 +57,7 @@ pub(crate) fn unpack_into_primitive_builder( // SAFETY: We later initialize the the uninitialized range of values with `copy_from_slice`. unsafe { // Append a dense null Mask. - uninit_range.append_mask(array.validity_mask()); + uninit_range.append_mask(array.validity_mask()?); } // SAFETY: `decode_into` will initialize all values in this range. @@ -175,14 +174,22 @@ mod tests { use vortex_session::VortexSession; use super::*; + use crate::BitPackedArray; + use crate::BitPackedData; use crate::bitpack_compress::bitpack_encode; + fn encode(array: &PrimitiveArray, bit_width: u8) -> BitPackedArray { + BitPackedArray::from_inner(bitpack_encode(array, bit_width, None).unwrap()) + } + static SESSION: LazyLock = LazyLock::new(|| VortexSession::empty().with::()); fn compression_roundtrip(n: usize) { let values = PrimitiveArray::from_iter((0..n).map(|i| (i % 2047) as u16)); - let compressed = BitPackedData::encode(&values.clone().into_array(), 11).unwrap(); + let compressed = BitPackedArray::from_inner( + BitPackedData::encode(&values.clone().into_array(), 11).unwrap(), + ); assert_arrays_eq!(compressed, values); values @@ -211,7 +218,7 @@ mod tests { #[test] fn test_all_zeros() -> VortexResult<()> { let zeros = buffer![0u16, 0, 0, 0].into_array().to_primitive(); - let bitpacked = bitpack_encode(&zeros, 0, None)?; + let bitpacked = encode(&zeros, 0); let actual = unpack_array(&bitpacked, &mut SESSION.create_execution_ctx())?; assert_arrays_eq!(actual, PrimitiveArray::from_iter([0u16, 0, 0, 0])); Ok(()) @@ -220,7 +227,7 @@ mod tests { #[test] fn test_simple_patches() -> VortexResult<()> { let zeros = buffer![0u16, 1, 0, 1].into_array().to_primitive(); - let bitpacked = bitpack_encode(&zeros, 0, None).unwrap(); + let bitpacked = encode(&zeros, 0); let actual = unpack_array(&bitpacked, &mut SESSION.create_execution_ctx())?; assert_arrays_eq!(actual, PrimitiveArray::from_iter([0u16, 1, 0, 1])); Ok(()) @@ -229,7 +236,7 @@ mod tests { #[test] fn test_one_full_chunk() -> VortexResult<()> { let zeros = BufferMut::from_iter(0u16..1024).into_array().to_primitive(); - let bitpacked = bitpack_encode(&zeros, 10, None).unwrap(); + let bitpacked = encode(&zeros, 10); let actual = unpack_array(&bitpacked, &mut SESSION.create_execution_ctx())?; assert_arrays_eq!(actual, PrimitiveArray::from_iter(0u16..1024)); Ok(()) @@ -240,7 +247,7 @@ mod tests { let zeros = BufferMut::from_iter((5u16..1029).chain(5u16..1029).chain(5u16..1029)) .into_array() .to_primitive(); - let bitpacked = bitpack_encode(&zeros, 10, None).unwrap(); + let bitpacked = encode(&zeros, 10); assert!(bitpacked.patches().is_some()); let actual = unpack_array(&bitpacked, &mut SESSION.create_execution_ctx())?; assert_arrays_eq!( @@ -253,7 +260,7 @@ mod tests { #[test] fn test_one_full_chunk_and_one_short_chunk_no_patch() -> VortexResult<()> { let zeros = BufferMut::from_iter(0u16..1025).into_array().to_primitive(); - let bitpacked = bitpack_encode(&zeros, 11, None).unwrap(); + let bitpacked = encode(&zeros, 11); assert!(bitpacked.patches().is_none()); let actual = unpack_array(&bitpacked, &mut SESSION.create_execution_ctx())?; assert_arrays_eq!(actual, PrimitiveArray::from_iter(0u16..1025)); @@ -265,7 +272,7 @@ mod tests { let zeros = BufferMut::from_iter(512u16..1537) .into_array() .to_primitive(); - let bitpacked = bitpack_encode(&zeros, 10, None).unwrap(); + let bitpacked = encode(&zeros, 10); assert_eq!(bitpacked.len(), 1025); assert!(bitpacked.patches().is_some()); let actual = unpack_array(&bitpacked, &mut SESSION.create_execution_ctx())?; @@ -278,7 +285,7 @@ mod tests { let zeros = BufferMut::from_iter(512u16..1537) .into_array() .to_primitive(); - let bitpacked = bitpack_encode(&zeros, 10, None).unwrap(); + let bitpacked = encode(&zeros, 10); assert_eq!(bitpacked.len(), 1025); assert!(bitpacked.patches().is_some()); let slice_ref = bitpacked.into_array().slice(1023..1025).unwrap(); @@ -299,7 +306,7 @@ mod tests { let zeros = BufferMut::from_iter(512u16..2741) .into_array() .to_primitive(); - let bitpacked = bitpack_encode(&zeros, 10, None).unwrap(); + let bitpacked = encode(&zeros, 10); assert_eq!(bitpacked.len(), 2229); assert!(bitpacked.patches().is_some()); let slice_ref = bitpacked.into_array().slice(1023..2049).unwrap(); @@ -321,7 +328,7 @@ mod tests { #[test] fn test_unpack_into_empty_array() -> VortexResult<()> { let empty: PrimitiveArray = PrimitiveArray::from_iter(Vec::::new()); - let bitpacked = bitpack_encode(&empty, 0, None).unwrap(); + let bitpacked = encode(&empty, 0); let mut builder = PrimitiveBuilder::::new(Nullability::NonNullable); unpack_into_primitive_builder( @@ -348,7 +355,7 @@ mod tests { let array = PrimitiveArray::new(values, validity); // Bitpack the array. - let bitpacked = bitpack_encode(&array, 3, None).unwrap(); + let bitpacked = encode(&array, 3); // Unpack into a new builder. let mut builder = PrimitiveBuilder::::with_capacity(Nullability::Nullable, 5); @@ -380,7 +387,7 @@ mod tests { let array = PrimitiveArray::from_iter(values.clone()); // Bitpack with a bit width that will require patches. - let bitpacked = bitpack_encode(&array, 4, None).unwrap(); + let bitpacked = encode(&array, 4); assert!( bitpacked.patches().is_some(), "Should have patches for values > 15" @@ -413,7 +420,7 @@ mod tests { let array = PrimitiveArray::new(values, Validity::NonNullable); // Bitpack with a small bit width to force patches. - let bitpacked = bitpack_encode(&array, 6, None).unwrap(); + let bitpacked = encode(&array, 6); assert!(bitpacked.patches().is_some(), "Should have patches"); // Test with a larger array with multiple patches across chunks. @@ -427,7 +434,7 @@ mod tests { }) .collect(); let large_array = PrimitiveArray::from_iter(large_values); - let large_bitpacked = bitpack_encode(&large_array, 8, None).unwrap(); + let large_bitpacked = encode(&large_array, 8); assert!(large_bitpacked.patches().is_some()); let large_result = unpack_array(&large_bitpacked, &mut SESSION.create_execution_ctx())?; @@ -443,7 +450,7 @@ mod tests { let validity = Validity::from_iter([true, false, true, false, true, false, true]); let array = PrimitiveArray::new(values, validity); - let bitpacked = bitpack_encode(&array, 9, None).unwrap(); + let bitpacked = encode(&array, 9); let result = unpack_array(&bitpacked, &mut SESSION.create_execution_ctx()).vortex_expect("unpack"); @@ -459,7 +466,7 @@ mod tests { let patch_validity = Validity::from_iter([true, false, true, false, true, true, false]); let patch_array = PrimitiveArray::new(patch_values, patch_validity); - let patch_bitpacked = bitpack_encode(&patch_array, 5, None).unwrap(); + let patch_bitpacked = encode(&patch_array, 5); assert!(patch_bitpacked.patches().is_some()); let patch_result = unpack_array(&patch_bitpacked, &mut SESSION.create_execution_ctx()) @@ -471,7 +478,7 @@ mod tests { Buffer::from_iter([0u32, 0, 0, 0]), Validity::from_iter([false, false, false, false]), ); - let all_nulls_bp = bitpack_encode(&all_nulls, 0, None).unwrap(); + let all_nulls_bp = encode(&all_nulls, 0); let all_nulls_result = unpack_array(&all_nulls_bp, &mut SESSION.create_execution_ctx()) .vortex_expect("unpack"); assert_eq!(all_nulls_result.len(), 4); @@ -482,7 +489,7 @@ mod tests { fn test_execute_method_consistency() -> VortexResult<()> { // Test that execute(), unpack_to_primitive(), and unpack_array() all produce consistent results. let test_consistency = |array: &PrimitiveArray, bit_width: u8| -> VortexResult<()> { - let bitpacked = bitpack_encode(array, bit_width, None).unwrap(); + let bitpacked = encode(array, bit_width); let unpacked_array = unpack_array(&bitpacked, &mut SESSION.create_execution_ctx())?; @@ -543,7 +550,7 @@ mod tests { // Test with sliced array (offset > 0). let values = PrimitiveArray::from_iter(0u32..2048); - let bitpacked = bitpack_encode(&values, 11, None).unwrap(); + let bitpacked = encode(&values, 11); let slice_ref = bitpacked.into_array().slice(500..1500).unwrap(); let sliced = { let mut ctx = SESSION.create_execution_ctx(); @@ -587,13 +594,13 @@ mod tests { fn test_unpack_edge_cases() -> VortexResult<()> { // Empty array. let empty: PrimitiveArray = PrimitiveArray::from_iter(Vec::::new()); - let empty_bp = bitpack_encode(&empty, 0, None).unwrap(); + let empty_bp = encode(&empty, 0); let empty_result = unpack_array(&empty_bp, &mut SESSION.create_execution_ctx())?; assert_eq!(empty_result.len(), 0); // All zeros (bit_width = 0). let zeros = PrimitiveArray::from_iter([0u32; 100]); - let zeros_bp = bitpack_encode(&zeros, 0, None).unwrap(); + let zeros_bp = encode(&zeros, 0); let zeros_result = unpack_array(&zeros_bp, &mut SESSION.create_execution_ctx())?; assert_eq!(zeros_result.len(), 100); // Verify consistency with unpack_array. @@ -603,7 +610,7 @@ mod tests { // Maximum bit width for u16 (15 bits, since bitpacking requires bit_width < type bit width). let max_values = PrimitiveArray::from_iter([32767u16; 50]); // 2^15 - 1 - let max_bp = bitpack_encode(&max_values, 15, None).unwrap(); + let max_bp = encode(&max_values, 15); let max_result = unpack_array(&max_bp, &mut SESSION.create_execution_ctx())?; assert_eq!(max_result.len(), 50); @@ -618,7 +625,7 @@ mod tests { }) .collect(); let boundary_array = PrimitiveArray::from_iter(boundary_values); - let boundary_bp = bitpack_encode(&boundary_array, 7, None).unwrap(); + let boundary_bp = encode(&boundary_array, 7); assert!(boundary_bp.patches().is_some()); let boundary_result = unpack_array(&boundary_bp, &mut SESSION.create_execution_ctx())?; @@ -630,7 +637,7 @@ mod tests { // Single element. let single = PrimitiveArray::from_iter([42u8]); - let single_bp = bitpack_encode(&single, 6, None).unwrap(); + let single_bp = encode(&single, 6); let single_result = unpack_array(&single_bp, &mut SESSION.create_execution_ctx())?; assert_eq!(single_result.len(), 1); Ok(()) diff --git a/encodings/fastlanes/src/bitpacking/array/mod.rs b/encodings/fastlanes/src/bitpacking/array/mod.rs index 89c02b37b17..58a726d1b67 100644 --- a/encodings/fastlanes/src/bitpacking/array/mod.rs +++ b/encodings/fastlanes/src/bitpacking/array/mod.rs @@ -334,6 +334,9 @@ mod test { use vortex_array::assert_arrays_eq; use vortex_buffer::Buffer; + use crate::BitPackedArray; + use crate::BitPackedData; + #[test] fn test_encode() { let values = [ @@ -346,7 +349,9 @@ mod test { Some(u64::MAX), ]; let uncompressed = PrimitiveArray::from_option_iter(values); - let packed = BitPackedData::encode(&uncompressed.into_array(), 1).unwrap(); + let packed = BitPackedArray::from_inner( + BitPackedData::encode(&uncompressed.into_array(), 1).unwrap(), + ); let expected = PrimitiveArray::from_option_iter(values); assert_arrays_eq!(packed.to_primitive(), expected); } @@ -366,7 +371,8 @@ mod test { let values: Buffer = (0i32..=512).collect(); let parray = values.clone().into_array(); - let packed_with_patches = BitPackedData::encode(&parray, 9).unwrap(); + let packed_with_patches = + BitPackedArray::from_inner(BitPackedData::encode(&parray, 9).unwrap()); assert!(packed_with_patches.patches().is_some()); assert_arrays_eq!( packed_with_patches.to_primitive(), diff --git a/encodings/fastlanes/src/bitpacking/array/unpack_iter.rs b/encodings/fastlanes/src/bitpacking/array/unpack_iter.rs index 9fa9a1cb31a..1b698aae1a5 100644 --- a/encodings/fastlanes/src/bitpacking/array/unpack_iter.rs +++ b/encodings/fastlanes/src/bitpacking/array/unpack_iter.rs @@ -12,7 +12,6 @@ use lending_iterator::prelude::LendingIterator; use vortex_array::dtype::PhysicalPType; use vortex_buffer::ByteBuffer; -use crate::BitPackedArray; use crate::BitPackedData; const CHUNK_SIZE: usize = 1024; diff --git a/encodings/fastlanes/src/bitpacking/compute/cast.rs b/encodings/fastlanes/src/bitpacking/compute/cast.rs index 39250269723..a5d350ef2a8 100644 --- a/encodings/fastlanes/src/bitpacking/compute/cast.rs +++ b/encodings/fastlanes/src/bitpacking/compute/cast.rs @@ -52,6 +52,7 @@ impl CastReduce for BitPacked { #[cfg(test)] mod tests { use rstest::rstest; + use vortex_array::ArrayRef; use vortex_array::IntoArray; use vortex_array::arrays::PrimitiveArray; use vortex_array::assert_arrays_eq; @@ -62,10 +63,16 @@ mod tests { use vortex_array::dtype::PType; use vortex_buffer::buffer; + use crate::BitPackedArray; + use crate::BitPackedData; + + fn bp(array: &ArrayRef, bit_width: u8) -> BitPackedArray { + BitPackedArray::from_inner(BitPackedData::encode(array, bit_width).unwrap()) + } + #[test] fn test_cast_bitpacked_u8_to_u32() { - let packed = - BitPackedData::encode(&buffer![10u8, 20, 30, 40, 50, 60].into_array(), 6).unwrap(); + let packed = bp(&buffer![10u8, 20, 30, 40, 50, 60].into_array(), 6); let casted = packed .into_array() @@ -77,7 +84,7 @@ mod tests { ); assert_arrays_eq!( - casted.as_ref(), + casted, PrimitiveArray::from_iter([10u32, 20, 30, 40, 50, 60]) ); } @@ -85,7 +92,7 @@ mod tests { #[test] fn test_cast_bitpacked_nullable() { let values = PrimitiveArray::from_option_iter([Some(5u16), None, Some(10), Some(15), None]); - let packed = BitPackedData::encode(&values.into_array(), 4).unwrap(); + let packed = bp(&values.into_array(), 4); let casted = packed .into_array() @@ -98,10 +105,10 @@ mod tests { } #[rstest] - #[case(BitPackedData::encode(&buffer![0u8, 10, 20, 30, 40, 50, 60, 63].into_array(), 6).unwrap())] - #[case(BitPackedData::encode(&buffer![0u16, 100, 200, 300, 400, 500].into_array(), 9).unwrap())] - #[case(BitPackedData::encode(&buffer![0u32, 1000, 2000, 3000, 4000].into_array(), 12).unwrap())] - #[case(BitPackedData::encode(&PrimitiveArray::from_option_iter([Some(1u32), None, Some(7), Some(15), None]).into_array(), 4).unwrap())] + #[case(bp(&buffer![0u8, 10, 20, 30, 40, 50, 60, 63].into_array(), 6))] + #[case(bp(&buffer![0u16, 100, 200, 300, 400, 500].into_array(), 9))] + #[case(bp(&buffer![0u32, 1000, 2000, 3000, 4000].into_array(), 12))] + #[case(bp(&PrimitiveArray::from_option_iter([Some(1u32), None, Some(7), Some(15), None]).into_array(), 4))] fn test_cast_bitpacked_conformance(#[case] array: BitPackedArray) { test_cast_conformance(&array.into_array()); } diff --git a/encodings/fastlanes/src/bitpacking/compute/filter.rs b/encodings/fastlanes/src/bitpacking/compute/filter.rs index b400efbfa97..48173fd41b3 100644 --- a/encodings/fastlanes/src/bitpacking/compute/filter.rs +++ b/encodings/fastlanes/src/bitpacking/compute/filter.rs @@ -25,7 +25,6 @@ use super::chunked_indices; use super::take::UNPACK_CHUNK_THRESHOLD; use crate::BitPacked; use crate::BitPackedArray; -use crate::BitPackedData; /// The threshold over which it is faster to fully unpack the entire [`BitPackedArray`] and then /// filter the result than to unpack only specific bitpacked values into the output buffer. @@ -173,11 +172,15 @@ mod test { use vortex_buffer::buffer; use vortex_mask::Mask; + use crate::BitPackedArray; + use crate::BitPackedData; + #[test] fn take_indices() { // Create a u8 array modulo 63. let unpacked = PrimitiveArray::from_iter((0..4096).map(|i| (i % 63) as u8)); - let bitpacked = BitPackedData::encode(&unpacked.into_array(), 6).unwrap(); + let bitpacked = + BitPackedArray::from_inner(BitPackedData::encode(&unpacked.into_array(), 6).unwrap()); let mask = Mask::from_indices(bitpacked.len(), vec![0, 125, 2047, 2049, 2151, 2790]); @@ -192,7 +195,8 @@ mod test { fn take_sliced_indices() { // Create a u8 array modulo 63. let unpacked = PrimitiveArray::from_iter((0..4096).map(|i| (i % 63) as u8)); - let bitpacked = BitPackedData::encode(&unpacked.into_array(), 6).unwrap(); + let bitpacked = + BitPackedArray::from_inner(BitPackedData::encode(&unpacked.into_array(), 6).unwrap()); let sliced = bitpacked.slice(128..2050).unwrap(); let mask = Mask::from_indices(sliced.len(), vec![1919, 1921]); @@ -204,7 +208,8 @@ mod test { #[test] fn filter_bitpacked() { let unpacked = PrimitiveArray::from_iter((0..4096).map(|i| (i % 63) as u8)); - let bitpacked = BitPackedData::encode(&unpacked.into_array(), 6).unwrap(); + let bitpacked = + BitPackedArray::from_inner(BitPackedData::encode(&unpacked.into_array(), 6).unwrap()); let filtered = bitpacked .filter(Mask::from_indices(4096, (0..1024).collect())) .unwrap(); @@ -218,7 +223,8 @@ mod test { fn filter_bitpacked_signed() { let values: Buffer = (0..500).collect(); let unpacked = PrimitiveArray::new(values.clone(), Validity::NonNullable); - let bitpacked = BitPackedData::encode(&unpacked.into_array(), 9).unwrap(); + let bitpacked = + BitPackedArray::from_inner(BitPackedData::encode(&unpacked.into_array(), 9).unwrap()); let filtered = bitpacked .filter(Mask::from_indices(values.len(), (0..250).collect())) .unwrap() @@ -234,17 +240,18 @@ mod test { fn test_filter_bitpacked_conformance() { // Test with u8 values let unpacked = buffer![1u8, 2, 3, 4, 5].into_array(); - let bitpacked = BitPackedData::encode(&unpacked, 3).unwrap(); + let bitpacked = BitPackedArray::from_inner(BitPackedData::encode(&unpacked, 3).unwrap()); test_filter_conformance(&bitpacked.into_array()); // Test with u32 values let unpacked = buffer![100u32, 200, 300, 400, 500].into_array(); - let bitpacked = BitPackedData::encode(&unpacked, 9).unwrap(); + let bitpacked = BitPackedArray::from_inner(BitPackedData::encode(&unpacked, 9).unwrap()); test_filter_conformance(&bitpacked.into_array()); // Test with nullable values let unpacked = PrimitiveArray::from_option_iter([Some(1u16), None, Some(3), Some(4), None]); - let bitpacked = BitPackedData::encode(&unpacked.into_array(), 3).unwrap(); + let bitpacked = + BitPackedArray::from_inner(BitPackedData::encode(&unpacked.into_array(), 3).unwrap()); test_filter_conformance(&bitpacked.into_array()); } @@ -259,7 +266,8 @@ mod test { // Values 0-127 fit in 7 bits, but 1000 and 2000 do not. let values: Vec = vec![0, 10, 1000, 20, 30, 2000, 40, 50, 60, 70]; let unpacked = PrimitiveArray::from_iter(values.clone()); - let bitpacked = BitPackedData::encode(&unpacked.into_array(), 7).unwrap(); + let bitpacked = + BitPackedArray::from_inner(BitPackedData::encode(&unpacked.into_array(), 7).unwrap()); assert!( bitpacked.patches().is_some(), "Expected patches for values exceeding bit width" @@ -291,7 +299,8 @@ mod test { }) .collect(); let unpacked = PrimitiveArray::from_iter(values.clone()); - let bitpacked = BitPackedData::encode(&unpacked.into_array(), 7).unwrap(); + let bitpacked = + BitPackedArray::from_inner(BitPackedData::encode(&unpacked.into_array(), 7).unwrap()); assert!( bitpacked.patches().is_some(), "Expected patches for values exceeding bit width" diff --git a/encodings/fastlanes/src/bitpacking/compute/is_constant.rs b/encodings/fastlanes/src/bitpacking/compute/is_constant.rs index b17f8e1f014..d2becbb2b6a 100644 --- a/encodings/fastlanes/src/bitpacking/compute/is_constant.rs +++ b/encodings/fastlanes/src/bitpacking/compute/is_constant.rs @@ -22,7 +22,6 @@ use vortex_error::VortexResult; use crate::BitPacked; use crate::BitPackedArray; -use crate::BitPackedData; use crate::unpack_iter::BitPacked as BitPackedUnpack; /// BitPacked-specific is_constant kernel with SIMD support. @@ -188,9 +187,13 @@ mod tests { use vortex_buffer::buffer; use vortex_error::VortexResult; + use crate::BitPackedArray; + use crate::BitPackedData; + #[test] fn is_constant_with_patches() -> VortexResult<()> { - let array = BitPackedData::encode(&buffer![4; 1025].into_array(), 2)?; + let array = + BitPackedArray::from_inner(BitPackedData::encode(&buffer![4; 1025].into_array(), 2)?); let mut ctx = LEGACY_SESSION.create_execution_ctx(); assert!(is_constant(&array.into_array(), &mut ctx)?); Ok(()) diff --git a/encodings/fastlanes/src/bitpacking/compute/mod.rs b/encodings/fastlanes/src/bitpacking/compute/mod.rs index cf3a536ea47..35b633c5885 100644 --- a/encodings/fastlanes/src/bitpacking/compute/mod.rs +++ b/encodings/fastlanes/src/bitpacking/compute/mod.rs @@ -1,7 +1,6 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors -use crate::BitPackedData; mod cast; mod filter; pub(crate) mod is_constant; @@ -47,9 +46,14 @@ mod tests { use vortex_array::compute::conformance::binary_numeric::test_binary_numeric_array; use vortex_array::compute::conformance::consistency::test_array_consistency; + use crate::BitPackedArray; use crate::bitpack_compress::bitpack_encode; use crate::bitpacking::compute::chunked_indices; + fn bp(array: &PrimitiveArray, bit_width: u8) -> BitPackedArray { + BitPackedArray::from_inner(bitpack_encode(array, bit_width, None).unwrap()) + } + #[test] fn chunk_indices_repeated() { let mut called = false; @@ -63,35 +67,35 @@ mod tests { #[rstest] // Basic integer arrays that can be bitpacked - #[case::u8_small(bitpack_encode(&PrimitiveArray::from_iter([1u8, 2, 3, 4, 5]), 3, None).unwrap())] - #[case::u16_array(bitpack_encode(&PrimitiveArray::from_iter([10u16, 20, 30, 40, 50]), 6, None).unwrap())] - #[case::u32_array(bitpack_encode(&PrimitiveArray::from_iter([100u32, 200, 300, 400, 500]), 9, None).unwrap())] + #[case::u8_small(bp(&PrimitiveArray::from_iter([1u8, 2, 3, 4, 5]), 3))] + #[case::u16_array(bp(&PrimitiveArray::from_iter([10u16, 20, 30, 40, 50]), 6))] + #[case::u32_array(bp(&PrimitiveArray::from_iter([100u32, 200, 300, 400, 500]), 9))] // Arrays with nulls - #[case::nullable_u8(bitpack_encode(&PrimitiveArray::from_option_iter([Some(1u8), None, Some(3), Some(4), None]), 3, None).unwrap())] - #[case::nullable_u32(bitpack_encode(&PrimitiveArray::from_option_iter([Some(100u32), None, Some(300), Some(400), None]), 9, None).unwrap())] + #[case::nullable_u8(bp(&PrimitiveArray::from_option_iter([Some(1u8), None, Some(3), Some(4), None]), 3))] + #[case::nullable_u32(bp(&PrimitiveArray::from_option_iter([Some(100u32), None, Some(300), Some(400), None]), 9))] // Edge cases - #[case::single_element(bitpack_encode(&PrimitiveArray::from_iter([42u32]), 6, None).unwrap())] - #[case::all_zeros(bitpack_encode(&PrimitiveArray::from_iter([0u16; 100]), 1, None).unwrap())] + #[case::single_element(bp(&PrimitiveArray::from_iter([42u32]), 6))] + #[case::all_zeros(bp(&PrimitiveArray::from_iter([0u16; 100]), 1))] // Large arrays (multiple chunks - fastlanes uses 1024-element chunks) - #[case::large_u16(bitpack_encode(&PrimitiveArray::from_iter((0..2048).map(|i| (i % 256) as u16)), 8, None).unwrap())] - #[case::large_u32(bitpack_encode(&PrimitiveArray::from_iter((0..3000).map(|i| (i % 1024) as u32)), 10, None).unwrap())] - #[case::large_u8_many_chunks(bitpack_encode(&PrimitiveArray::from_iter((0..5120).map(|i| (i % 128) as u8)), 7, None).unwrap())] // 5 chunks - #[case::large_nullable(bitpack_encode(&PrimitiveArray::from_option_iter((0..2500).map(|i| if i % 10 == 0 { None } else { Some((i % 512) as u16) })), 9, None).unwrap())] + #[case::large_u16(bp(&PrimitiveArray::from_iter((0..2048).map(|i| (i % 256) as u16)), 8))] + #[case::large_u32(bp(&PrimitiveArray::from_iter((0..3000).map(|i| (i % 1024) as u32)), 10))] + #[case::large_u8_many_chunks(bp(&PrimitiveArray::from_iter((0..5120).map(|i| (i % 128) as u8)), 7))] // 5 chunks + #[case::large_nullable(bp(&PrimitiveArray::from_option_iter((0..2500).map(|i| if i % 10 == 0 { None } else { Some((i % 512) as u16) })), 9))] // Arrays with specific bit patterns - #[case::max_value_for_bits(bitpack_encode(&PrimitiveArray::from_iter([7u8, 7, 7, 7, 7]), 3, None).unwrap())] // max value for 3 bits - #[case::alternating_bits(bitpack_encode(&PrimitiveArray::from_iter([0u16, 255, 0, 255, 0, 255]), 8, None).unwrap())] + #[case::max_value_for_bits(bp(&PrimitiveArray::from_iter([7u8, 7, 7, 7, 7]), 3))] // max value for 3 bits + #[case::alternating_bits(bp(&PrimitiveArray::from_iter([0u16, 255, 0, 255, 0, 255]), 8))] fn test_bitpacked_consistency(#[case] array: BitPackedArray) { test_array_consistency(&array.into_array()); } #[rstest] - #[case::u8_basic(bitpack_encode(&PrimitiveArray::from_iter([1u8, 2, 3, 4, 5]), 3, None).unwrap())] - #[case::u16_basic(bitpack_encode(&PrimitiveArray::from_iter([10u16, 20, 30, 40, 50]), 6, None).unwrap())] - #[case::u32_basic(bitpack_encode(&PrimitiveArray::from_iter([100u32, 200, 300, 400, 500]), 9, None).unwrap())] - #[case::u64_basic(bitpack_encode(&PrimitiveArray::from_iter([1000u64, 2000, 3000, 4000, 5000]), 13, None).unwrap())] - #[case::i32_basic(bitpack_encode(&PrimitiveArray::from_iter([10i32, 20, 30, 40, 50]), 7, None).unwrap())] - #[case::large_u32(bitpack_encode(&PrimitiveArray::from_iter((0..100).map(|i| i as u32)), 7, None).unwrap())] + #[case::u8_basic(bp(&PrimitiveArray::from_iter([1u8, 2, 3, 4, 5]), 3))] + #[case::u16_basic(bp(&PrimitiveArray::from_iter([10u16, 20, 30, 40, 50]), 6))] + #[case::u32_basic(bp(&PrimitiveArray::from_iter([100u32, 200, 300, 400, 500]), 9))] + #[case::u64_basic(bp(&PrimitiveArray::from_iter([1000u64, 2000, 3000, 4000, 5000]), 13))] + #[case::i32_basic(bp(&PrimitiveArray::from_iter([10i32, 20, 30, 40, 50]), 7))] + #[case::large_u32(bp(&PrimitiveArray::from_iter((0..100).map(|i| i as u32)), 7))] fn test_bitpacked_binary_numeric(#[case] array: BitPackedArray) { test_binary_numeric_array(array.into_array()); } diff --git a/encodings/fastlanes/src/bitpacking/compute/take.rs b/encodings/fastlanes/src/bitpacking/compute/take.rs index e941cb48e5a..b0fa2579a62 100644 --- a/encodings/fastlanes/src/bitpacking/compute/take.rs +++ b/encodings/fastlanes/src/bitpacking/compute/take.rs @@ -25,7 +25,6 @@ use vortex_error::VortexResult; use super::chunked_indices; use crate::BitPacked; use crate::BitPackedArray; -use crate::BitPackedData; use crate::bitpack_decompress; // TODO(connor): This is duplicated in `encodings/fastlanes/src/bitpacking/kernels/mod.rs`. @@ -162,6 +161,8 @@ mod test { use vortex_buffer::Buffer; use vortex_buffer::buffer; + use crate::BitPackedArray; + use crate::BitPackedData; use crate::bitpacking::compute::take::take_primitive; #[test] @@ -170,7 +171,8 @@ mod test { // Create a u8 array modulo 63. let unpacked = PrimitiveArray::from_iter((0..4096).map(|i| (i % 63) as u8)); - let bitpacked = BitPackedData::encode(&unpacked.into_array(), 6).unwrap(); + let bitpacked = + BitPackedArray::from_inner(BitPackedData::encode(&unpacked.into_array(), 6).unwrap()); let primitive_result = bitpacked.take(indices.to_array()).unwrap(); assert_arrays_eq!( @@ -182,7 +184,7 @@ mod test { #[test] fn take_with_patches() { let unpacked = Buffer::from_iter(0u32..1024).into_array(); - let bitpacked = BitPackedData::encode(&unpacked, 2).unwrap(); + let bitpacked = BitPackedArray::from_inner(BitPackedData::encode(&unpacked, 2).unwrap()); let indices = buffer![0, 2, 4, 6].into_array(); @@ -196,7 +198,8 @@ mod test { // Create a u8 array modulo 63. let unpacked = PrimitiveArray::from_iter((0..4096).map(|i| (i % 63) as u8)); - let bitpacked = BitPackedData::encode(&unpacked.into_array(), 6).unwrap(); + let bitpacked = + BitPackedArray::from_inner(BitPackedData::encode(&unpacked.into_array(), 6).unwrap()); let sliced = bitpacked.slice(128..2050).unwrap(); let primitive_result = sliced.take(indices.to_array()).unwrap(); @@ -209,7 +212,9 @@ mod test { let num_patches: usize = 128; let values = (0..u16::MAX as u32 + num_patches as u32).collect::>(); let uncompressed = PrimitiveArray::new(values.clone(), Validity::NonNullable); - let packed = BitPackedData::encode(&uncompressed.into_array(), 16).unwrap(); + let packed = BitPackedArray::from_inner( + BitPackedData::encode(&uncompressed.into_array(), 16).unwrap(), + ); assert!(packed.patches().is_some()); let rng = rng(); @@ -238,8 +243,9 @@ mod test { #[test] #[cfg_attr(miri, ignore)] fn take_signed_with_patches() { - let start = - BitPackedData::encode(&buffer![1i32, 2i32, 3i32, 4i32].into_array(), 1).unwrap(); + let start = BitPackedArray::from_inner( + BitPackedData::encode(&buffer![1i32, 2i32, 3i32, 4i32].into_array(), 1).unwrap(), + ); let taken_primitive = take_primitive::( &start, @@ -253,8 +259,9 @@ mod test { #[test] fn take_nullable_with_nullables() { - let start = - BitPackedData::encode(&buffer![1i32, 2i32, 3i32, 4i32].into_array(), 1).unwrap(); + let start = BitPackedArray::from_inner( + BitPackedData::encode(&buffer![1i32, 2i32, 3i32, 4i32].into_array(), 1).unwrap(), + ); let taken_primitive = start .take( @@ -269,15 +276,15 @@ mod test { } #[rstest] - #[case(BitPackedData::encode(&PrimitiveArray::from_iter((0..100).map(|i| (i % 63) as u8)).into_array(), 6).unwrap())] - #[case(BitPackedData::encode(&PrimitiveArray::from_iter((0..256).map(|i| i as u32)).into_array(), 8).unwrap())] - #[case(BitPackedData::encode(&buffer![1i32, 2, 3, 4, 5, 6, 7, 8].into_array(), 3).unwrap())] - #[case(BitPackedData::encode( + #[case(BitPackedArray::from_inner(BitPackedData::encode(&PrimitiveArray::from_iter((0..100).map(|i| (i % 63) as u8)).into_array(), 6).unwrap()))] + #[case(BitPackedArray::from_inner(BitPackedData::encode(&PrimitiveArray::from_iter((0..256).map(|i| i as u32)).into_array(), 8).unwrap()))] + #[case(BitPackedArray::from_inner(BitPackedData::encode(&buffer![1i32, 2, 3, 4, 5, 6, 7, 8].into_array(), 3).unwrap()))] + #[case(BitPackedArray::from_inner(BitPackedData::encode( &PrimitiveArray::from_option_iter([Some(10u16), None, Some(20), Some(30), None]).into_array(), 5 - ).unwrap())] - #[case(BitPackedData::encode(&buffer![42u32].into_array(), 6).unwrap())] - #[case(BitPackedData::encode(&PrimitiveArray::from_iter((0..1024).map(|i| i as u32)).into_array(), 8).unwrap())] + ).unwrap()))] + #[case(BitPackedArray::from_inner(BitPackedData::encode(&buffer![42u32].into_array(), 6).unwrap()))] + #[case(BitPackedArray::from_inner(BitPackedData::encode(&PrimitiveArray::from_iter((0..1024).map(|i| i as u32)).into_array(), 8).unwrap()))] fn test_take_bitpacked_conformance(#[case] bitpacked: BitPackedArray) { use vortex_array::compute::conformance::take::test_take_conformance; test_take_conformance(&bitpacked.into_array()); diff --git a/encodings/fastlanes/src/bitpacking/vtable/mod.rs b/encodings/fastlanes/src/bitpacking/vtable/mod.rs index 032ae106dd4..219d25d92ff 100644 --- a/encodings/fastlanes/src/bitpacking/vtable/mod.rs +++ b/encodings/fastlanes/src/bitpacking/vtable/mod.rs @@ -377,4 +377,9 @@ pub struct BitPacked; impl BitPacked { pub const ID: ArrayId = ArrayId::new_ref("fastlanes.bitpacked"); + + /// Encode an array into a bitpacked representation with the given bit width. + pub fn encode(array: &ArrayRef, bit_width: u8) -> VortexResult { + Ok(Array::from_inner(BitPackedData::encode(array, bit_width)?)) + } } diff --git a/encodings/fastlanes/src/bitpacking/vtable/operations.rs b/encodings/fastlanes/src/bitpacking/vtable/operations.rs index b146e9ba119..adec08dd5d5 100644 --- a/encodings/fastlanes/src/bitpacking/vtable/operations.rs +++ b/encodings/fastlanes/src/bitpacking/vtable/operations.rs @@ -8,7 +8,6 @@ use vortex_array::vtable::OperationsVTable; use vortex_error::VortexResult; use crate::BitPacked; -use crate::BitPackedData; use crate::bitpack_decompress; impl OperationsVTable for BitPacked { fn scalar_at( @@ -33,6 +32,7 @@ mod test { use std::ops::Range; use std::sync::LazyLock; + use vortex_array::ArrayRef; use vortex_array::DynArray; use vortex_array::IntoArray; use vortex_array::VortexSessionExecute; @@ -54,10 +54,16 @@ mod test { use vortex_buffer::buffer; use crate::BitPacked; + use crate::BitPackedArray; + use crate::BitPackedData; static SESSION: LazyLock = LazyLock::new(|| vortex_session::VortexSession::empty().with::()); + fn bp(array: &ArrayRef, bit_width: u8) -> BitPackedArray { + BitPackedArray::from_inner(BitPackedData::encode(array, bit_width).unwrap()) + } + fn slice_via_kernel(array: &BitPackedArray, range: Range) -> BitPackedArray { let array_ref = array.clone().into_array(); let slice_array = SliceArray::new(array_ref.clone(), range); @@ -72,11 +78,10 @@ mod test { #[test] pub fn slice_block() { - let arr = BitPackedData::encode( + let arr = bp( &PrimitiveArray::from_iter((0u32..2048).map(|v| v % 64)).into_array(), 6, - ) - .unwrap(); + ); let sliced = slice_via_kernel(&arr, 1024..2048); assert_nth_scalar!(sliced, 0, 1024u32 % 64); assert_nth_scalar!(sliced, 1023, 2047u32 % 64); @@ -86,11 +91,10 @@ mod test { #[test] pub fn slice_within_block() { - let arr = BitPackedData::encode( + let arr = bp( &PrimitiveArray::from_iter((0u32..2048).map(|v| v % 64)).into_array(), 6, - ) - .unwrap(); + ); let sliced = slice_via_kernel(&arr, 512..1434); assert_nth_scalar!(sliced, 0, 512u32 % 64); assert_nth_scalar!(sliced, 921, 1433u32 % 64); @@ -100,11 +104,10 @@ mod test { #[test] fn slice_within_block_u8s() { - let packed = BitPackedData::encode( + let packed = bp( &PrimitiveArray::from_iter((0..10_000).map(|i| (i % 63) as u8)).into_array(), 7, - ) - .unwrap(); + ); let compressed = packed.slice(768..9999).unwrap(); assert_nth_scalar!(compressed, 0, (768 % 63) as u8); @@ -113,11 +116,10 @@ mod test { #[test] fn slice_block_boundary_u8s() { - let packed = BitPackedData::encode( + let packed = bp( &PrimitiveArray::from_iter((0..10_000).map(|i| (i % 63) as u8)).into_array(), 7, - ) - .unwrap(); + ); let compressed = packed.slice(7168..9216).unwrap(); assert_nth_scalar!(compressed, 0, (7168 % 63) as u8); @@ -126,11 +128,10 @@ mod test { #[test] fn double_slice_within_block() { - let arr = BitPackedData::encode( + let arr = bp( &PrimitiveArray::from_iter((0u32..2048).map(|v| v % 64)).into_array(), 6, - ) - .unwrap(); + ); let sliced = slice_via_kernel(&arr, 512..1434); assert_nth_scalar!(sliced, 0, 512u32 % 64); assert_nth_scalar!(sliced, 921, 1433u32 % 64); @@ -146,7 +147,9 @@ mod test { #[test] fn slice_empty_patches() { // We create an array that has 1 element that does not fit in the 6-bit range. - let array = BitPackedData::encode(&buffer![0u32..=64].into_array(), 6).unwrap(); + let array = BitPackedArray::from_inner( + BitPackedData::encode(&buffer![0u32..=64].into_array(), 6).unwrap(), + ); assert!(array.patches().is_some()); @@ -162,11 +165,10 @@ mod test { fn take_after_slice() { // Check that our take implementation respects the offsets applied after slicing. - let array = BitPackedData::encode( + let array = bp( &PrimitiveArray::from_iter((63u32..).take(3072)).into_array(), 6, - ) - .unwrap(); + ); // Slice the array. // The resulting array will still have 3 1024-element chunks. @@ -219,7 +221,7 @@ mod test { fn scalar_at() { let values = (0u32..257).collect::>(); let uncompressed = values.clone().into_array(); - let packed = BitPackedData::encode(&uncompressed, 8).unwrap(); + let packed = BitPackedArray::from_inner(BitPackedData::encode(&uncompressed, 8).unwrap()); assert!(packed.patches().is_some()); let patches = packed.patches().unwrap().indices().clone(); diff --git a/encodings/fastlanes/src/delta/array/delta_compress.rs b/encodings/fastlanes/src/delta/array/delta_compress.rs index 8fc47a26aa6..be7183f21e1 100644 --- a/encodings/fastlanes/src/delta/array/delta_compress.rs +++ b/encodings/fastlanes/src/delta/array/delta_compress.rs @@ -15,7 +15,6 @@ use vortex_buffer::Buffer; use vortex_buffer::BufferMut; use vortex_error::VortexResult; -use crate::DeltaData; use crate::FL_CHUNK_SIZE; use crate::bit_transpose::transpose_validity; use crate::fill_forward_nulls; @@ -104,6 +103,8 @@ mod tests { use vortex_error::VortexResult; use vortex_session::VortexSession; + use crate::DeltaArray; + use crate::DeltaData; use crate::bitpack_compress::bitpack_encode; use crate::delta::array::delta_decompress::delta_decompress; use crate::delta_compress; @@ -118,8 +119,10 @@ mod tests { (0u32..10_000).map(|i| (i % 2 == 0).then_some(i)), ))] fn test_compress(#[case] array: PrimitiveArray) -> VortexResult<()> { - let delta = - DeltaData::try_from_primitive_array(&array, &mut SESSION.create_execution_ctx())?; + let delta = DeltaArray::from_inner(DeltaData::try_from_primitive_array( + &array, + &mut SESSION.create_execution_ctx(), + )?); assert_eq!(delta.len(), array.len()); let decompressed = delta_decompress(&delta, &mut SESSION.create_execution_ctx())?; assert_arrays_eq!(decompressed, array); @@ -136,13 +139,15 @@ mod tests { ); let (bases, deltas) = delta_compress(&array, &mut SESSION.create_execution_ctx()).unwrap(); let bitpacked_deltas = bitpack_encode(&deltas, 1, None).unwrap(); - let packed_delta = DeltaData::try_new( - bases.into_array(), - bitpacked_deltas.into_array(), - 0, - array.len(), - ) - .unwrap(); + let packed_delta = DeltaArray::from_inner( + DeltaData::try_new( + bases.into_array(), + bitpacked_deltas.into_array(), + 0, + array.len(), + ) + .unwrap(), + ); assert_arrays_eq!(packed_delta.to_primitive(), array); } } diff --git a/encodings/fastlanes/src/delta/array/delta_decompress.rs b/encodings/fastlanes/src/delta/array/delta_decompress.rs index 3c32c87e3de..338a39156ff 100644 --- a/encodings/fastlanes/src/delta/array/delta_decompress.rs +++ b/encodings/fastlanes/src/delta/array/delta_decompress.rs @@ -17,7 +17,6 @@ use vortex_buffer::BufferMut; use vortex_error::VortexResult; use crate::DeltaArray; -use crate::DeltaData; use crate::bit_transpose::untranspose_validity; pub fn delta_decompress( diff --git a/encodings/fastlanes/src/delta/compute/cast.rs b/encodings/fastlanes/src/delta/compute/cast.rs index 5e65db2af53..ec7162550c2 100644 --- a/encodings/fastlanes/src/delta/compute/cast.rs +++ b/encodings/fastlanes/src/delta/compute/cast.rs @@ -62,6 +62,7 @@ mod tests { use vortex_buffer::buffer; use vortex_session::VortexSession; + use crate::DeltaData; use crate::delta::DeltaArray; static SESSION: LazyLock = LazyLock::new(|| VortexSession::empty().with::()); diff --git a/encodings/fastlanes/src/delta/vtable/operations.rs b/encodings/fastlanes/src/delta/vtable/operations.rs index ad3a314123f..92ad4df22a1 100644 --- a/encodings/fastlanes/src/delta/vtable/operations.rs +++ b/encodings/fastlanes/src/delta/vtable/operations.rs @@ -11,7 +11,6 @@ use vortex_array::vtable::OperationsVTable; use vortex_error::VortexResult; use super::Delta; -use crate::DeltaData; impl OperationsVTable for Delta { fn scalar_at( array: &Array, @@ -39,16 +38,22 @@ mod tests { use vortex_buffer::buffer; use vortex_session::VortexSession; + use crate::DeltaArray; + use crate::DeltaData; + static SESSION: LazyLock = LazyLock::new(|| VortexSession::empty().with::()); + fn da(array: &PrimitiveArray) -> DeltaArray { + DeltaArray::from_inner( + DeltaData::try_from_primitive_array(array, &mut SESSION.create_execution_ctx()) + .unwrap(), + ) + } + #[test] fn test_slice_non_jagged_array_first_chunk_of_two() { - let delta = DeltaData::try_from_primitive_array( - &(0u32..2048).collect(), - &mut SESSION.create_execution_ctx(), - ) - .unwrap(); + let delta = da(&(0u32..2048).collect()); let actual = delta.slice(10..250).unwrap(); let expected = PrimitiveArray::from_iter(10u32..250).into_array(); @@ -57,11 +62,7 @@ mod tests { #[test] fn test_slice_non_jagged_array_second_chunk_of_two() { - let delta = DeltaData::try_from_primitive_array( - &(0u32..2048).collect(), - &mut SESSION.create_execution_ctx(), - ) - .unwrap(); + let delta = da(&(0u32..2048).collect()); let actual = delta.slice(1024 + 10..1024 + 250).unwrap(); let expected = PrimitiveArray::from_iter((1024 + 10u32)..(1024 + 250)).into_array(); @@ -70,11 +71,7 @@ mod tests { #[test] fn test_slice_non_jagged_array_span_two_chunks_chunk_of_two() { - let delta = DeltaData::try_from_primitive_array( - &(0u32..2048).collect(), - &mut SESSION.create_execution_ctx(), - ) - .unwrap(); + let delta = da(&(0u32..2048).collect()); let actual = delta.slice(1000..1048).unwrap(); let expected = PrimitiveArray::from_iter(1000u32..1048).into_array(); @@ -83,11 +80,7 @@ mod tests { #[test] fn test_slice_non_jagged_array_span_two_chunks_chunk_of_four() { - let delta = DeltaData::try_from_primitive_array( - &(0u32..4096).collect(), - &mut SESSION.create_execution_ctx(), - ) - .unwrap(); + let delta = da(&(0u32..4096).collect()); let actual = delta.slice(2040..2050).unwrap(); let expected = PrimitiveArray::from_iter(2040u32..2050).into_array(); @@ -96,11 +89,7 @@ mod tests { #[test] fn test_slice_non_jagged_array_whole() { - let delta = DeltaData::try_from_primitive_array( - &(0u32..4096).collect(), - &mut SESSION.create_execution_ctx(), - ) - .unwrap(); + let delta = da(&(0u32..4096).collect()); let actual = delta.slice(0..4096).unwrap(); let expected = PrimitiveArray::from_iter(0u32..4096).into_array(); @@ -109,11 +98,7 @@ mod tests { #[test] fn test_slice_non_jagged_array_empty() { - let delta = DeltaData::try_from_primitive_array( - &(0u32..4096).collect(), - &mut SESSION.create_execution_ctx(), - ) - .unwrap(); + let delta = da(&(0u32..4096).collect()); let actual = delta.slice(0..0).unwrap(); let expected = PrimitiveArray::from_iter(Vec::::new()).into_array(); @@ -130,11 +115,7 @@ mod tests { #[test] fn test_slice_jagged_array_second_chunk_of_two() { - let delta = DeltaData::try_from_primitive_array( - &(0u32..2000).collect(), - &mut SESSION.create_execution_ctx(), - ) - .unwrap(); + let delta = da(&(0u32..2000).collect()); let actual = delta.slice(1024 + 10..1024 + 250).unwrap(); let expected = PrimitiveArray::from_iter((1024 + 10u32)..(1024 + 250)).into_array(); @@ -143,11 +124,7 @@ mod tests { #[test] fn test_slice_jagged_array_empty() { - let delta = DeltaData::try_from_primitive_array( - &(0u32..4000).collect(), - &mut SESSION.create_execution_ctx(), - ) - .unwrap(); + let delta = da(&(0u32..4000).collect()); let actual = delta.slice(0..0).unwrap(); let expected = PrimitiveArray::from_iter(Vec::::new()).into_array(); @@ -164,11 +141,7 @@ mod tests { #[test] fn test_slice_of_slice_of_non_jagged() { - let delta = DeltaData::try_from_primitive_array( - &(0u32..2048).collect(), - &mut SESSION.create_execution_ctx(), - ) - .unwrap(); + let delta = da(&(0u32..2048).collect()); let sliced = delta.slice(10..1013).unwrap(); let sliced_again = sliced.slice(0..2).unwrap(); @@ -179,11 +152,7 @@ mod tests { #[test] fn test_slice_of_slice_of_jagged() { - let delta = DeltaData::try_from_primitive_array( - &(0u32..2000).collect(), - &mut SESSION.create_execution_ctx(), - ) - .unwrap(); + let delta = da(&(0u32..2000).collect()); let sliced = delta.slice(10..1013).unwrap(); let sliced_again = sliced.slice(0..2).unwrap(); @@ -194,11 +163,7 @@ mod tests { #[test] fn test_slice_of_slice_second_chunk_of_non_jagged() { - let delta = DeltaData::try_from_primitive_array( - &(0u32..2048).collect(), - &mut SESSION.create_execution_ctx(), - ) - .unwrap(); + let delta = da(&(0u32..2048).collect()); let sliced = delta.slice(1034..1050).unwrap(); let sliced_again = sliced.slice(0..2).unwrap(); @@ -209,11 +174,7 @@ mod tests { #[test] fn test_slice_of_slice_second_chunk_of_jagged() { - let delta = DeltaData::try_from_primitive_array( - &(0u32..2000).collect(), - &mut SESSION.create_execution_ctx(), - ) - .unwrap(); + let delta = da(&(0u32..2000).collect()); let sliced = delta.slice(1034..1050).unwrap(); let sliced_again = sliced.slice(0..2).unwrap(); @@ -224,11 +185,7 @@ mod tests { #[test] fn test_slice_of_slice_spanning_two_chunks_of_non_jagged() { - let delta = DeltaData::try_from_primitive_array( - &(0u32..2048).collect(), - &mut SESSION.create_execution_ctx(), - ) - .unwrap(); + let delta = da(&(0u32..2048).collect()); let sliced = delta.slice(1010..1050).unwrap(); let sliced_again = sliced.slice(5..20).unwrap(); @@ -239,11 +196,7 @@ mod tests { #[test] fn test_slice_of_slice_spanning_two_chunks_of_jagged() { - let delta = DeltaData::try_from_primitive_array( - &(0u32..2000).collect(), - &mut SESSION.create_execution_ctx(), - ) - .unwrap(); + let delta = da(&(0u32..2000).collect()); let sliced = delta.slice(1010..1050).unwrap(); let sliced_again = sliced.slice(5..20).unwrap(); @@ -254,12 +207,7 @@ mod tests { #[test] fn test_scalar_at_non_jagged_array() { - let delta = DeltaData::try_from_primitive_array( - &(0u32..2048).collect(), - &mut SESSION.create_execution_ctx(), - ) - .unwrap() - .into_array(); + let delta = da(&(0u32..2048).collect()).into_array(); let expected = PrimitiveArray::from_iter(0u32..2048).into_array(); assert_arrays_eq!(delta, expected); @@ -268,22 +216,12 @@ mod tests { #[test] #[should_panic] fn test_scalar_at_non_jagged_array_oob() { - let delta = DeltaData::try_from_primitive_array( - &(0u32..2048).collect(), - &mut SESSION.create_execution_ctx(), - ) - .unwrap() - .into_array(); + let delta = da(&(0u32..2048).collect()).into_array(); delta.scalar_at(2048).unwrap(); } #[test] fn test_scalar_at_jagged_array() { - let delta = DeltaData::try_from_primitive_array( - &(0u32..2000).collect(), - &mut SESSION.create_execution_ctx(), - ) - .unwrap() - .into_array(); + let delta = da(&(0u32..2000).collect()).into_array(); let expected = PrimitiveArray::from_iter(0u32..2000).into_array(); assert_arrays_eq!(delta, expected); @@ -292,12 +230,7 @@ mod tests { #[test] #[should_panic] fn test_scalar_at_jagged_array_oob() { - let delta = DeltaData::try_from_primitive_array( - &(0u32..2000).collect(), - &mut SESSION.create_execution_ctx(), - ) - .unwrap() - .into_array(); + let delta = da(&(0u32..2000).collect()).into_array(); delta.scalar_at(2000).unwrap(); } @@ -311,11 +244,7 @@ mod tests { // Single element #[case::delta_single(PrimitiveArray::new(buffer![42u32], Validity::NonNullable))] fn test_delta_consistency(#[case] array: PrimitiveArray) { - test_array_consistency( - &DeltaData::try_from_primitive_array(&array, &mut SESSION.create_execution_ctx()) - .unwrap() - .into_array(), - ); + test_array_consistency(&da(&array).into_array()); } #[rstest] @@ -325,10 +254,6 @@ mod tests { #[case::delta_u64_basic(PrimitiveArray::new(buffer![1u64, 1, 1, 1, 1], Validity::NonNullable))] #[case::delta_u32_large(PrimitiveArray::new(buffer![1u32; 100], Validity::NonNullable))] fn test_delta_binary_numeric(#[case] array: PrimitiveArray) { - test_binary_numeric_array( - DeltaData::try_from_primitive_array(&array, &mut SESSION.create_execution_ctx()) - .unwrap() - .into_array(), - ); + test_binary_numeric_array(da(&array).into_array()); } } diff --git a/encodings/fastlanes/src/for/array/for_compress.rs b/encodings/fastlanes/src/for/array/for_compress.rs index 584fd72c538..48ad7ee4207 100644 --- a/encodings/fastlanes/src/for/array/for_compress.rs +++ b/encodings/fastlanes/src/for/array/for_compress.rs @@ -13,7 +13,6 @@ use vortex_array::stats::ArrayStats; use vortex_error::VortexResult; use vortex_error::vortex_err; -use crate::BitPackedData; use crate::FoRData; impl FoRData { pub fn encode(array: PrimitiveArray) -> VortexResult { @@ -72,6 +71,9 @@ mod test { use vortex_session::VortexSession; use super::*; + use crate::BitPackedArray; + use crate::BitPackedData; + use crate::FoRArray; use crate::r#for::array::for_decompress::decompress; use crate::r#for::array::for_decompress::fused_decompress; @@ -99,7 +101,7 @@ mod test { .collect::>(), Validity::NonNullable, ); - let compressed = FoRData::encode(array).unwrap(); + let compressed = FoRArray::from_inner(FoRData::encode(array).unwrap()); assert_eq!( u32::try_from(compressed.reference_scalar()).unwrap(), 1_000_000u32 @@ -112,7 +114,7 @@ mod test { assert_eq!(array.statistics().len(), 0); let dtype = array.dtype().clone(); - let compressed = FoRData::encode(array).unwrap(); + let compressed = FoRArray::from_inner(FoRData::encode(array).unwrap()); assert_eq!(compressed.reference_scalar().dtype(), &dtype); assert!(compressed.reference_scalar().dtype().is_signed_int()); assert!(compressed.encoded().dtype().is_signed_int()); @@ -135,7 +137,8 @@ mod test { let expect = PrimitiveArray::from_iter((0u32..1024).map(|x| x % 7 + 10)); let array = PrimitiveArray::from_iter((0u32..1024).map(|x| x % 7)); let bp = BitPackedData::encode(&array.into_array(), 3).unwrap(); - let compressed = FoRData::try_new(bp.into_array(), 10u32.into()).unwrap(); + let compressed = + FoRArray::from_inner(FoRData::try_new(bp.into_array(), 10u32.into()).unwrap()); assert_arrays_eq!(compressed, expect); } @@ -144,8 +147,9 @@ mod test { // Create a range offset by a million. let expect = PrimitiveArray::from_iter((0u32..1024).map(|x| x % 7 + 10)); let array = PrimitiveArray::from_iter((0u32..1024).map(|x| x % 7)); - let bp = BitPackedData::encode(&array.into_array(), 2).unwrap(); - let compressed = FoRData::try_new(bp.clone().into_array(), 10u32.into()).unwrap(); + let bp = BitPackedArray::from_inner(BitPackedData::encode(&array.into_array(), 2).unwrap()); + let compressed = + FoRArray::from_inner(FoRData::try_new(bp.clone().into_array(), 10u32.into()).unwrap()); let decompressed = fused_decompress::(&compressed, &bp, &mut SESSION.create_execution_ctx())?; assert_arrays_eq!(decompressed, expect); @@ -155,7 +159,7 @@ mod test { #[test] fn test_overflow() -> VortexResult<()> { let array = PrimitiveArray::from_iter(i8::MIN..=i8::MAX); - let compressed = FoRData::encode(array.clone()).unwrap(); + let compressed = FoRArray::from_inner(FoRData::encode(array.clone()).unwrap()); assert_eq!( i8::MIN, compressed diff --git a/encodings/fastlanes/src/for/array/for_decompress.rs b/encodings/fastlanes/src/for/array/for_decompress.rs index 5f606e24077..3eb82678d25 100644 --- a/encodings/fastlanes/src/for/array/for_decompress.rs +++ b/encodings/fastlanes/src/for/array/for_decompress.rs @@ -18,9 +18,7 @@ use vortex_error::VortexResult; use crate::BitPacked; use crate::BitPackedArray; -use crate::BitPackedData; use crate::FoRArray; -use crate::FoRData; use crate::bitpack_decompress; use crate::unpack_iter::UnpackStrategy; use crate::unpack_iter::UnpackedChunks; @@ -109,7 +107,7 @@ pub(crate) fn fused_decompress< let mut uninit_range = builder.uninit_range(bp.len()); unsafe { // Append a dense null Mask. - uninit_range.append_mask(bp.validity_mask()); + uninit_range.append_mask(bp.validity_mask()?); } // SAFETY: `decode_into` will initialize all values in this range. diff --git a/encodings/fastlanes/src/for/compute/cast.rs b/encodings/fastlanes/src/for/compute/cast.rs index 5f37777d4c3..211e4d5d0ce 100644 --- a/encodings/fastlanes/src/for/compute/cast.rs +++ b/encodings/fastlanes/src/for/compute/cast.rs @@ -31,6 +31,7 @@ impl CastReduce for FoR { #[cfg(test)] mod tests { use rstest::rstest; + use vortex_array::ArrayRef; use vortex_array::IntoArray; use vortex_array::arrays::PrimitiveArray; use vortex_array::assert_arrays_eq; @@ -42,13 +43,19 @@ mod tests { use vortex_array::scalar::Scalar; use vortex_buffer::buffer; + use crate::FoRArray; + use crate::FoRData; + + fn for_arr(encoded: ArrayRef, reference: Scalar) -> FoRArray { + FoRArray::from_inner(FoRData::try_new(encoded, reference).unwrap()) + } + #[test] fn test_cast_for_i32_to_i64() { - let for_array = FoRData::try_new( + let for_array = for_arr( buffer![0i32, 10, 20, 30, 40].into_array(), Scalar::from(100i32), - ) - .unwrap(); + ); let casted = for_array .into_array() @@ -69,7 +76,7 @@ mod tests { #[test] fn test_cast_for_nullable() { let values = PrimitiveArray::from_option_iter([Some(0i32), None, Some(20), Some(30), None]); - let for_array = FoRData::try_new(values.into_array(), Scalar::from(50i32)).unwrap(); + let for_array = for_arr(values.into_array(), Scalar::from(50i32)); let casted = for_array .into_array() @@ -82,22 +89,22 @@ mod tests { } #[rstest] - #[case(FoRData::try_new( + #[case(for_arr( buffer![0i32, 1, 2, 3, 4].into_array(), Scalar::from(100i32) - ).unwrap())] - #[case(FoRData::try_new( + ))] + #[case(for_arr( buffer![0u64, 10, 20, 30].into_array(), Scalar::from(1000u64) - ).unwrap())] - #[case(FoRData::try_new( + ))] + #[case(for_arr( PrimitiveArray::from_option_iter([Some(0i16), None, Some(5), Some(10), None]).into_array(), Scalar::from(50i16) - ).unwrap())] - #[case(FoRData::try_new( + ))] + #[case(for_arr( buffer![-10i32, -5, 0, 5, 10].into_array(), Scalar::from(-100i32) - ).unwrap())] + ))] fn test_cast_for_conformance(#[case] array: FoRArray) { test_cast_conformance(&array.into_array()); } diff --git a/encodings/fastlanes/src/for/compute/compare.rs b/encodings/fastlanes/src/for/compute/compare.rs index 89274efff02..4e54c282fbe 100644 --- a/encodings/fastlanes/src/for/compute/compare.rs +++ b/encodings/fastlanes/src/for/compute/compare.rs @@ -24,7 +24,6 @@ use vortex_error::VortexResult; use crate::FoR; use crate::FoRArray; -use crate::FoRData; impl CompareKernel for FoR { fn compare( @@ -100,16 +99,21 @@ mod tests { use vortex_buffer::buffer; use super::*; + use crate::FoRArray; + use crate::FoRData; + + fn for_arr(encoded: ArrayRef, reference: Scalar) -> FoRArray { + FoRArray::from_inner(FoRData::try_new(encoded, reference).unwrap()) + } #[test] fn test_compare_constant() { let reference = Scalar::from(10); // 10, 30, 12 - let lhs = FoRData::try_new( + let lhs = for_arr( PrimitiveArray::new(buffer!(0i32, 20, 2), Validity::AllValid).into_array(), reference, - ) - .unwrap(); + ); let result = compare_constant(&lhs, 30i32, Nullability::NonNullable, CompareOperator::Eq) .unwrap() @@ -144,11 +148,10 @@ mod tests { fn test_compare_nullable_constant() { let reference = Scalar::from(0); // 10, 30, 12 - let lhs = FoRData::try_new( + let lhs = for_arr( PrimitiveArray::new(buffer!(0i32, 20, 2), Validity::NonNullable).into_array(), reference, - ) - .unwrap(); + ); assert_eq!( compare_constant(&lhs, 30i32, Nullability::Nullable, CompareOperator::Eq) @@ -170,11 +173,10 @@ mod tests { fn compare_non_encodable_constant() { let reference = Scalar::from(10); // 10, 30, 12 - let lhs = FoRData::try_new( + let lhs = for_arr( PrimitiveArray::new(buffer!(0i32, 10, 1), Validity::AllValid).into_array(), reference, - ) - .unwrap(); + ); let result = compare_constant(&lhs, -1i32, Nullability::NonNullable, CompareOperator::Eq) .unwrap() @@ -199,15 +201,14 @@ mod tests { fn compare_large_constant() { let reference = Scalar::from(-9219218377546224477i64); #[allow(clippy::cast_possible_truncation)] - let lhs = FoRData::try_new( + let lhs = for_arr( PrimitiveArray::new( buffer![0i64, 9654309310445864926u64 as i64], Validity::AllValid, ) .into_array(), reference, - ) - .unwrap(); + ); let result = compare_constant( &lhs, diff --git a/encodings/fastlanes/src/for/compute/is_sorted.rs b/encodings/fastlanes/src/for/compute/is_sorted.rs index ea6adce5389..05d5e31836e 100644 --- a/encodings/fastlanes/src/for/compute/is_sorted.rs +++ b/encodings/fastlanes/src/for/compute/is_sorted.rs @@ -14,65 +14,6 @@ use vortex_array::scalar::Scalar; use vortex_error::VortexResult; use crate::FoR; -/// FoR can express sortedness directly on its encoded form. -/// -/// If the minimum is greater than or equal to zero, subtracting it from the other values does not -/// wrap (the value always decreases and the smallest value is zero because min - min = 0). -/// -/// Subtraction without wrapping is order-preserving, so we only need to consider what happens to -/// wrapped numbers. -/// -/// Non-negative minimum values can't wrap. For a negative minimum value, wrapping means that -/// -/// ```text -/// a + abs(min) > 127 -/// ``` -/// -/// There's some residue r, -/// -/// ```text -/// r < 128 -/// ``` -/// -/// such that -/// -/// ```text -/// a + abs(min) mod 128 = r -/// ``` -/// -/// For example, -/// -/// ```text -/// min = -128 -/// a = 1 -/// -/// 1 - -128 = 129 -/// ``` -/// -/// And 129's residue is 1. 129 is represented as -/// -/// ```text -/// -128 + 1 = -127 -/// ``` -/// -/// The unsigned representation is -/// -/// ```text -/// 2^8 - 127 -/// ``` -/// -/// More directly, for some residue r: -/// -/// ```text -/// 2^8 + (-128 + r) -/// = 2^8 - 128 + r -/// = 128 + r -/// ``` -/// -/// Addition is order-preserving, so all the wrapped values preserve their order and they're all -/// represented as unsigned values larger than 127 so they also preserve their order with the -/// unwrapped values. -use crate::FoRData; #[derive(Debug)] pub(crate) struct FoRIsSortedKernel; @@ -117,6 +58,8 @@ mod test { use vortex_array::validity::Validity; use vortex_buffer::buffer; + use crate::FoRData; + #[test] fn test_sorted() { let mut ctx = LEGACY_SESSION.create_execution_ctx(); diff --git a/encodings/fastlanes/src/for/compute/mod.rs b/encodings/fastlanes/src/for/compute/mod.rs index 9a08697afdb..9957cccccd7 100644 --- a/encodings/fastlanes/src/for/compute/mod.rs +++ b/encodings/fastlanes/src/for/compute/mod.rs @@ -48,43 +48,49 @@ impl FilterReduce for FoR { #[cfg(test)] mod test { use rstest::rstest; + use vortex_array::ArrayRef; use vortex_array::IntoArray; use vortex_array::arrays::PrimitiveArray; use vortex_array::compute::conformance::filter::test_filter_conformance; use vortex_array::scalar::Scalar; use vortex_buffer::buffer; + use crate::FoRArray; + use crate::FoRData; + + fn fa(encoded: ArrayRef, reference: Scalar) -> FoRArray { + FoRArray::from_inner(FoRData::try_new(encoded, reference).unwrap()) + } + #[test] fn test_filter_for_array() { - // Test with i32 values - let values = buffer![100i32, 101, 102, 103, 104].into_array(); - let reference = Scalar::from(100i32); - let for_array = FoRData::try_new(values, reference).unwrap(); + let for_array = fa( + buffer![100i32, 101, 102, 103, 104].into_array(), + Scalar::from(100i32), + ); test_filter_conformance(&for_array.into_array()); - // Test with u64 values - let values = buffer![1000u64, 1001, 1002, 1003, 1004].into_array(); - let reference = Scalar::from(1000u64); - let for_array = FoRData::try_new(values, reference).unwrap(); + let for_array = fa( + buffer![1000u64, 1001, 1002, 1003, 1004].into_array(), + Scalar::from(1000u64), + ); test_filter_conformance(&for_array.into_array()); - // Test with nullable values let values = PrimitiveArray::from_option_iter([Some(50i16), None, Some(52), Some(53), None]); - let reference = Scalar::from(50i16); - let for_array = FoRData::try_new(values.into_array(), reference).unwrap(); + let for_array = fa(values.into_array(), Scalar::from(50i16)); test_filter_conformance(&for_array.into_array()); } #[rstest] - #[case(FoRData::try_new(buffer![100i32, 101, 102, 103, 104].into_array(), Scalar::from(100i32)).unwrap())] - #[case(FoRData::try_new(buffer![1000u64, 1001, 1002, 1003, 1004].into_array(), Scalar::from(1000u64)).unwrap())] - #[case(FoRData::try_new( + #[case(fa(buffer![100i32, 101, 102, 103, 104].into_array(), Scalar::from(100i32)))] + #[case(fa(buffer![1000u64, 1001, 1002, 1003, 1004].into_array(), Scalar::from(1000u64)))] + #[case(fa( PrimitiveArray::from_option_iter([Some(50i16), None, Some(52), Some(53), None]).into_array(), Scalar::from(50i16) - ).unwrap())] - #[case(FoRData::try_new(buffer![-100i32, -99, -98, -97, -96].into_array(), Scalar::from(-100i32)).unwrap())] - #[case(FoRData::try_new(buffer![42i64].into_array(), Scalar::from(40i64)).unwrap())] + ))] + #[case(fa(buffer![-100i32, -99, -98, -97, -96].into_array(), Scalar::from(-100i32)))] + #[case(fa(buffer![42i64].into_array(), Scalar::from(40i64)))] fn test_take_for_conformance(#[case] for_array: FoRArray) { use vortex_array::compute::conformance::take::test_take_conformance; test_take_conformance(&for_array.into_array()); @@ -94,6 +100,7 @@ mod test { #[cfg(test)] mod tests { use rstest::rstest; + use vortex_array::ArrayRef; use vortex_array::IntoArray; use vortex_array::arrays::PrimitiveArray; use vortex_array::compute::conformance::binary_numeric::test_binary_numeric_array; @@ -101,83 +108,54 @@ mod tests { use vortex_array::scalar::Scalar; use vortex_buffer::buffer; + use crate::FoRArray; + use crate::FoRData; + + fn fa(encoded: ArrayRef, reference: Scalar) -> FoRArray { + FoRArray::from_inner(FoRData::try_new(encoded, reference).unwrap()) + } + #[rstest] - // Basic FoR arrays - #[case::for_i32(FoRData::try_new( - buffer![100i32, 101, 102, 103, 104].into_array(), - Scalar::from(100i32) - ).unwrap())] - #[case::for_u64(FoRData::try_new( - buffer![1000u64, 1001, 1002, 1003, 1004].into_array(), - Scalar::from(1000u64) - ).unwrap())] - // Nullable arrays - #[case::for_nullable_i16(FoRData::try_new( + #[case::for_i32(fa(buffer![100i32, 101, 102, 103, 104].into_array(), Scalar::from(100i32)))] + #[case::for_u64(fa(buffer![1000u64, 1001, 1002, 1003, 1004].into_array(), Scalar::from(1000u64)))] + #[case::for_nullable_i16(fa( PrimitiveArray::from_option_iter([Some(50i16), None, Some(52), Some(53), None]).into_array(), Scalar::from(50i16) - ).unwrap())] - #[case::for_nullable_i32(FoRData::try_new( + ))] + #[case::for_nullable_i32(fa( PrimitiveArray::from_option_iter([Some(200i32), None, Some(202), Some(203), None]).into_array(), Scalar::from(200i32) - ).unwrap())] - // Negative values - #[case::for_negative(FoRData::try_new( - buffer![-100i32, -99, -98, -97, -96].into_array(), - Scalar::from(-100i32) - ).unwrap())] - // Edge cases - #[case::for_single(FoRData::try_new( - buffer![42i64].into_array(), - Scalar::from(40i64) - ).unwrap())] - #[case::for_zero_ref(FoRData::try_new( - buffer![0u32, 1, 2, 3, 4].into_array(), - Scalar::from(0u32) - ).unwrap())] - // Large arrays (> 1024 elements for fastlanes chunking) - #[case::for_large(FoRData::try_new( + ))] + #[case::for_negative(fa(buffer![-100i32, -99, -98, -97, -96].into_array(), Scalar::from(-100i32)))] + #[case::for_single(fa(buffer![42i64].into_array(), Scalar::from(40i64)))] + #[case::for_zero_ref(fa(buffer![0u32, 1, 2, 3, 4].into_array(), Scalar::from(0u32)))] + #[case::for_large(fa( PrimitiveArray::from_iter((0..1500).map(|i| 5000 + i)).into_array(), Scalar::from(5000i32) - ).unwrap())] - #[case::for_very_large(FoRData::try_new( + ))] + #[case::for_very_large(fa( PrimitiveArray::from_iter((0..3072).map(|i| 10000 + i as i64)).into_array(), Scalar::from(10000i64) - ).unwrap())] - #[case::for_large_nullable(FoRData::try_new( + ))] + #[case::for_large_nullable(fa( PrimitiveArray::from_option_iter((0..2048).map(|i| (i % 15 == 0).then_some(1000 + i))).into_array(), Scalar::from(1000i32) - ).unwrap())] - // Arrays with large deltas from reference - #[case::for_large_deltas(FoRData::try_new( - buffer![100i64, 200, 300, 400, 500].into_array(), - Scalar::from(100i64) - ).unwrap())] + ))] + #[case::for_large_deltas(fa(buffer![100i64, 200, 300, 400, 500].into_array(), Scalar::from(100i64)))] fn test_for_consistency(#[case] array: FoRArray) { test_array_consistency(&array.into_array()); } #[rstest] - #[case::for_i32_basic(FoRData::try_new( - buffer![100i32, 101, 102, 103, 104].into_array(), - Scalar::from(100i32) - ).unwrap())] - #[case::for_u32_basic(FoRData::try_new( - buffer![1000u32, 1001, 1002, 1003, 1004].into_array(), - Scalar::from(1000u32) - ).unwrap())] - #[case::for_i64_basic(FoRData::try_new( - buffer![5000i64, 5001, 5002, 5003, 5004].into_array(), - Scalar::from(5000i64) - ).unwrap())] - #[case::for_u64_basic(FoRData::try_new( - buffer![10000u64, 10001, 10002, 10003, 10004].into_array(), - Scalar::from(10000u64) - ).unwrap())] - #[case::for_i32_large(FoRData::try_new( + #[case::for_i32_basic(fa(buffer![100i32, 101, 102, 103, 104].into_array(), Scalar::from(100i32)))] + #[case::for_u32_basic(fa(buffer![1000u32, 1001, 1002, 1003, 1004].into_array(), Scalar::from(1000u32)))] + #[case::for_i64_basic(fa(buffer![5000i64, 5001, 5002, 5003, 5004].into_array(), Scalar::from(5000i64)))] + #[case::for_u64_basic(fa(buffer![10000u64, 10001, 10002, 10003, 10004].into_array(), Scalar::from(10000u64)))] + #[case::for_i32_large(fa( PrimitiveArray::from_iter((0..100).map(|i| 2000 + i)).into_array(), Scalar::from(2000i32) - ).unwrap())] + ))] fn test_for_binary_numeric(#[case] array: FoRArray) { test_binary_numeric_array(array.into_array()); } diff --git a/encodings/fastlanes/src/for/vtable/operations.rs b/encodings/fastlanes/src/for/vtable/operations.rs index 2d36d198826..1eb4086643e 100644 --- a/encodings/fastlanes/src/for/vtable/operations.rs +++ b/encodings/fastlanes/src/for/vtable/operations.rs @@ -10,7 +10,6 @@ use vortex_error::VortexExpect; use vortex_error::VortexResult; use super::FoR; -use crate::FoRData; impl OperationsVTable for FoR { fn scalar_at( array: &Array, @@ -43,9 +42,14 @@ mod test { use vortex_array::arrays::PrimitiveArray; use vortex_array::assert_arrays_eq; + use crate::FoRArray; + use crate::FoRData; + #[test] fn for_scalar_at() { - let for_arr = FoRData::encode(PrimitiveArray::from_iter([-100, 1100, 1500, 1900])).unwrap(); + let for_arr = FoRArray::from_inner( + FoRData::encode(PrimitiveArray::from_iter([-100, 1100, 1500, 1900])).unwrap(), + ); let expected = PrimitiveArray::from_iter([-100, 1100, 1500, 1900]); assert_arrays_eq!(for_arr, expected); } diff --git a/encodings/fastlanes/src/rle/array/mod.rs b/encodings/fastlanes/src/rle/array/mod.rs index 9e4c46cf74c..ce6eb493dc1 100644 --- a/encodings/fastlanes/src/rle/array/mod.rs +++ b/encodings/fastlanes/src/rle/array/mod.rs @@ -234,6 +234,8 @@ mod tests { use vortex_session::registry::ReadContext; use crate::FL_CHUNK_SIZE; + use crate::RLEArray; + use crate::RLEData; use crate::test::SESSION; #[test] @@ -245,7 +247,9 @@ mod tests { PrimitiveArray::from_iter([0u16, 0, 1, 1, 2].iter().cycle().take(1024).copied()) .into_array(); let values_idx_offsets = PrimitiveArray::from_iter([0u64]).into_array(); - let rle_array = RLEData::try_new(values, indices, values_idx_offsets, 0, 5).unwrap(); + let rle_array = RLEArray::from_inner( + RLEData::try_new(values, indices, values_idx_offsets, 0, 5).unwrap(), + ); assert_eq!(rle_array.len(), 5); assert_eq!(rle_array.values().len(), 3); @@ -272,14 +276,16 @@ mod tests { ) .into_array(); - let rle_array = RLEData::try_new( - values.clone(), - indices_with_validity, - values_idx_offsets, - 0, - 3, - ) - .unwrap(); + let rle_array = RLEArray::from_inner( + RLEData::try_new( + values.clone(), + indices_with_validity, + values_idx_offsets, + 0, + 3, + ) + .unwrap(), + ); assert_eq!(rle_array.len(), 3); assert_eq!(rle_array.values().len(), 2); @@ -308,14 +314,16 @@ mod tests { ) .into_array(); - let rle_array = RLEData::try_new( - values.clone(), - indices_with_validity, - values_idx_offsets, - 0, - 5, - ) - .unwrap(); + let rle_array = RLEArray::from_inner( + RLEData::try_new( + values.clone(), + indices_with_validity, + values_idx_offsets, + 0, + 5, + ) + .unwrap(), + ); let valid_slice = rle_array.slice(0..3).unwrap().to_primitive(); // TODO(joe): replace with compute null count @@ -345,14 +353,16 @@ mod tests { ) .into_array(); - let rle_array = RLEData::try_new( - values.clone(), - indices_with_validity, - values_idx_offsets, - 0, - 5, - ) - .unwrap(); + let rle_array = RLEArray::from_inner( + RLEData::try_new( + values.clone(), + indices_with_validity, + values_idx_offsets, + 0, + 5, + ) + .unwrap(), + ); // TODO(joe): replace with compute null count let invalid_slice = rle_array @@ -387,14 +397,16 @@ mod tests { ) .into_array(); - let rle_array = RLEData::try_new( - values.clone(), - indices_with_validity, - values_idx_offsets, - 0, - 4, - ) - .unwrap(); + let rle_array = RLEArray::from_inner( + RLEData::try_new( + values.clone(), + indices_with_validity, + values_idx_offsets, + 0, + 4, + ) + .unwrap(), + ); let sliced_array = rle_array.slice(1..4).unwrap(); let validity_mask = sliced_array.validity_mask().unwrap(); @@ -414,14 +426,16 @@ mod tests { let values = PrimitiveArray::from_iter(Vec::::new()).into_array(); let indices = PrimitiveArray::from_iter(Vec::::new()).into_array(); let values_idx_offsets = PrimitiveArray::from_iter(Vec::::new()).into_array(); - let rle_array = RLEData::try_new( - values, - indices.clone(), - values_idx_offsets, - 0, - indices.len(), - ) - .unwrap(); + let rle_array = RLEArray::from_inner( + RLEData::try_new( + values, + indices.clone(), + values_idx_offsets, + 0, + indices.len(), + ) + .unwrap(), + ); assert_eq!(rle_array.len(), 0); assert_eq!(rle_array.values().len(), 0); @@ -432,7 +446,9 @@ mod tests { let values = PrimitiveArray::from_iter([10u32, 20, 30, 40]).into_array(); let indices = PrimitiveArray::from_iter([0u16, 1].repeat(1024)).into_array(); let values_idx_offsets = PrimitiveArray::from_iter([0u64, 2]).into_array(); - let rle_array = RLEData::try_new(values, indices, values_idx_offsets, 0, 2048).unwrap(); + let rle_array = RLEArray::from_inner( + RLEData::try_new(values, indices, values_idx_offsets, 0, 2048).unwrap(), + ); assert_eq!(rle_array.len(), 2048); assert_eq!(rle_array.values().len(), 4); @@ -444,7 +460,7 @@ mod tests { #[test] fn test_rle_serialization() { let primitive = PrimitiveArray::from_iter((0..2048).map(|i| (i / 100) as u32)); - let rle_array = RLEData::encode(&primitive).unwrap(); + let rle_array = RLEArray::from_inner(RLEData::encode(&primitive).unwrap()); assert_eq!(rle_array.len(), 2048); let original_data = rle_array.to_primitive(); @@ -479,16 +495,18 @@ mod tests { #[test] fn test_rle_serialization_slice() { let primitive = PrimitiveArray::from_iter((0..2048).map(|i| (i / 100) as u32)); - let rle_array = RLEData::encode(&primitive).unwrap(); - - let sliced = RLEData::try_new( - rle_array.values().clone(), - rle_array.indices().clone(), - rle_array.values_idx_offsets().clone(), - 100, - 100, - ) - .unwrap(); + let rle_array = RLEArray::from_inner(RLEData::encode(&primitive).unwrap()); + + let sliced = RLEArray::from_inner( + RLEData::try_new( + rle_array.values().clone(), + rle_array.indices().clone(), + rle_array.values_idx_offsets().clone(), + 100, + 100, + ) + .unwrap(), + ); assert_eq!(sliced.len(), 100); let ctx = ArrayContext::empty(); @@ -538,16 +556,16 @@ mod tests { // Chunk 1 (positions 1024..) is all-null. let original = PrimitiveArray::from_option_iter(values); - let rle = RLEData::encode(&original)?; + let rle = RLEArray::from_inner(RLEData::encode(&original)?); // Simulate cascading compression: narrow u16→u8 then re-encode with RLE, // matching the path taken by the BtrBlocks compressor. let indices_prim = rle.indices().to_primitive().narrow()?; - let re_encoded = RLEData::encode(&indices_prim)?; + let re_encoded = RLEArray::from_inner(RLEData::encode(&indices_prim)?); // Reconstruct the outer RLE with re-encoded indices. // SAFETY: we only replace the indices child; all other invariants hold. - let reconstructed = unsafe { + let reconstructed = RLEArray::from_inner(unsafe { RLEData::new_unchecked( rle.values().clone(), re_encoded.into_array(), @@ -556,7 +574,7 @@ mod tests { rle.offset(), rle.len(), ) - }; + }); // Decompress — panicked before the fill_forward_nulls chunk-boundary fix. let decoded = reconstructed.to_primitive(); diff --git a/encodings/fastlanes/src/rle/array/rle_compress.rs b/encodings/fastlanes/src/rle/array/rle_compress.rs index 01047a156c4..a269f763b22 100644 --- a/encodings/fastlanes/src/rle/array/rle_compress.rs +++ b/encodings/fastlanes/src/rle/array/rle_compress.rs @@ -142,29 +142,33 @@ mod tests { use vortex_buffer::buffer; use super::*; + use crate::RLEArray; #[test] fn test_encode_decode() { // u8 let array_u8: Buffer = buffer![1, 1, 2, 2, 3, 3]; - let encoded_u8 = - RLEData::encode(&PrimitiveArray::new(array_u8, Validity::NonNullable)).unwrap(); + let encoded_u8 = RLEArray::from_inner( + RLEData::encode(&PrimitiveArray::new(array_u8, Validity::NonNullable)).unwrap(), + ); let decoded_u8 = encoded_u8.to_primitive(); let expected_u8 = PrimitiveArray::from_iter(vec![1u8, 1, 2, 2, 3, 3]); assert_arrays_eq!(decoded_u8, expected_u8); // u16 let array_u16: Buffer = buffer![100, 100, 200, 200]; - let encoded_u16 = - RLEData::encode(&PrimitiveArray::new(array_u16, Validity::NonNullable)).unwrap(); + let encoded_u16 = RLEArray::from_inner( + RLEData::encode(&PrimitiveArray::new(array_u16, Validity::NonNullable)).unwrap(), + ); let decoded_u16 = encoded_u16.to_primitive(); let expected_u16 = PrimitiveArray::from_iter(vec![100u16, 100, 200, 200]); assert_arrays_eq!(decoded_u16, expected_u16); // u64 let array_u64: Buffer = buffer![1000, 1000, 2000]; - let encoded_u64 = - RLEData::encode(&PrimitiveArray::new(array_u64, Validity::NonNullable)).unwrap(); + let encoded_u64 = RLEArray::from_inner( + RLEData::encode(&PrimitiveArray::new(array_u64, Validity::NonNullable)).unwrap(), + ); let decoded_u64 = encoded_u64.to_primitive(); let expected_u64 = PrimitiveArray::from_iter(vec![1000u64, 1000, 2000]); assert_arrays_eq!(decoded_u64, expected_u64); @@ -173,14 +177,18 @@ mod tests { #[test] fn test_length() { let values: Buffer = buffer![1, 1, 2, 2, 2, 3]; - let encoded = RLEData::encode(&PrimitiveArray::new(values, Validity::NonNullable)).unwrap(); + let encoded = RLEArray::from_inner( + RLEData::encode(&PrimitiveArray::new(values, Validity::NonNullable)).unwrap(), + ); assert_eq!(encoded.len(), 6); } #[test] fn test_empty_length() { let values: Buffer = Buffer::empty(); - let encoded = RLEData::encode(&PrimitiveArray::new(values, Validity::NonNullable)).unwrap(); + let encoded = RLEArray::from_inner( + RLEData::encode(&PrimitiveArray::new(values, Validity::NonNullable)).unwrap(), + ); assert_eq!(encoded.len(), 0); assert_eq!(encoded.values().len(), 0); @@ -190,7 +198,9 @@ mod tests { fn test_single_value() { let values: Buffer = vec![42; 2000].into_iter().collect(); - let encoded = RLEData::encode(&PrimitiveArray::new(values, Validity::NonNullable)).unwrap(); + let encoded = RLEArray::from_inner( + RLEData::encode(&PrimitiveArray::new(values, Validity::NonNullable)).unwrap(), + ); assert_eq!(encoded.values().len(), 2); // 2 chunks, each storing value 42 let decoded = encoded.to_primitive(); // Verify round-trip @@ -202,7 +212,9 @@ mod tests { fn test_all_different() { let values: Buffer = (0u8..=255).collect(); - let encoded = RLEData::encode(&PrimitiveArray::new(values, Validity::NonNullable)).unwrap(); + let encoded = RLEArray::from_inner( + RLEData::encode(&PrimitiveArray::new(values, Validity::NonNullable)).unwrap(), + ); assert_eq!(encoded.values().len(), 256); let decoded = encoded.to_primitive(); // Verify round-trip @@ -216,7 +228,7 @@ mod tests { let values: Buffer = (0..1500).map(|i| (i / 100) as u32).collect(); let array = PrimitiveArray::new(values, Validity::NonNullable); - let encoded = RLEData::encode(&array).unwrap(); + let encoded = RLEArray::from_inner(RLEData::encode(&array).unwrap()); assert_eq!(encoded.len(), 1500); assert_arrays_eq!(encoded, array); @@ -230,7 +242,7 @@ mod tests { let values: Buffer = (0..2048).map(|i| (i / 100) as u32).collect(); let array = PrimitiveArray::new(values, Validity::NonNullable); - let encoded = RLEData::encode(&array).unwrap(); + let encoded = RLEArray::from_inner(RLEData::encode(&array).unwrap()); assert_eq!(encoded.len(), 2048); assert_arrays_eq!(encoded, array); @@ -251,7 +263,7 @@ mod tests { #[case::f64((-2000..2000).map(|i| i as f64).collect::>())] fn test_roundtrip_primitive_types(#[case] values: Buffer) { let primitive = values.clone().into_array().to_primitive(); - let result = RLEData::encode(&primitive).unwrap(); + let result = RLEArray::from_inner(RLEData::encode(&primitive).unwrap()); let decoded = result.to_primitive(); let expected = PrimitiveArray::new(values, primitive.validity().clone()); assert_arrays_eq!(decoded, expected); @@ -265,7 +277,7 @@ mod tests { #[case(vec![0f64, -0f64])] fn test_float_zeros(#[case] values: Vec) { let primitive = PrimitiveArray::from_iter(values); - let rle = RLEData::encode(&primitive).unwrap(); + let rle = RLEArray::from_inner(RLEData::encode(&primitive).unwrap()); let decoded = rle.to_primitive(); assert_arrays_eq!(primitive, decoded); } diff --git a/encodings/fastlanes/src/rle/array/rle_decompress.rs b/encodings/fastlanes/src/rle/array/rle_decompress.rs index e5dada76553..4bd5ac276ec 100644 --- a/encodings/fastlanes/src/rle/array/rle_decompress.rs +++ b/encodings/fastlanes/src/rle/array/rle_decompress.rs @@ -19,7 +19,6 @@ use vortex_error::vortex_panic; use crate::FL_CHUNK_SIZE; use crate::RLEArray; -use crate::RLEData; /// Decompresses an RLE array back into a primitive array. #[expect( diff --git a/encodings/fastlanes/src/rle/compute/cast.rs b/encodings/fastlanes/src/rle/compute/cast.rs index c051823e020..40bc6c6ab5c 100644 --- a/encodings/fastlanes/src/rle/compute/cast.rs +++ b/encodings/fastlanes/src/rle/compute/cast.rs @@ -55,17 +55,22 @@ mod tests { use vortex_array::validity::Validity; use vortex_buffer::Buffer; + use crate::RLEData; use crate::rle::RLEArray; + fn rle(primitive: &PrimitiveArray) -> RLEArray { + RLEArray::from_inner(RLEData::encode(primitive).unwrap()) + } + #[test] fn try_cast_rle_success() { let primitive = PrimitiveArray::new( Buffer::from_iter([10u8, 20, 30, 40, 50]), Validity::from_iter([true, true, true, true, true]), ); - let rle = RLEData::encode(&primitive).unwrap(); + let encoded = rle(&primitive); - let casted = rle + let casted = encoded .into_array() .cast(DType::Primitive(PType::U16, Nullability::NonNullable)) .unwrap(); @@ -79,8 +84,9 @@ mod tests { Buffer::from_iter([10u8, 20, 30, 40, 50]), Validity::from_iter([true, false, true, true, false]), ); - let rle = RLEData::encode(&primitive).unwrap(); - rle.into_array() + let encoded = rle(&primitive); + encoded + .into_array() .cast(DType::Primitive(PType::U8, Nullability::NonNullable)) .and_then(|a| a.to_canonical().map(|c| c.into_array())) .unwrap(); @@ -136,7 +142,7 @@ mod tests { ) )] fn test_cast_rle_conformance(#[case] primitive: PrimitiveArray) { - let rle_array = RLEData::encode(&primitive).unwrap(); + let rle_array = rle(&primitive); test_cast_conformance(&rle_array.into_array()); } } diff --git a/encodings/fastlanes/src/rle/vtable/operations.rs b/encodings/fastlanes/src/rle/vtable/operations.rs index c26657fef09..ffa0a15f5e0 100644 --- a/encodings/fastlanes/src/rle/vtable/operations.rs +++ b/encodings/fastlanes/src/rle/vtable/operations.rs @@ -10,7 +10,6 @@ use vortex_error::VortexResult; use super::RLE; use crate::FL_CHUNK_SIZE; -use crate::RLEData; impl OperationsVTable for RLE { fn scalar_at( @@ -49,6 +48,8 @@ mod tests { use vortex_buffer::buffer; use super::*; + use crate::RLEArray; + use crate::RLEData; mod fixture { use super::*; @@ -65,14 +66,16 @@ mod tests { .into_array(); let values_idx_offsets = PrimitiveArray::from_iter([0u64]).into_array(); - RLEData::try_new( - values, - indices.clone(), - values_idx_offsets, - 0, - indices.len(), + RLEArray::from_inner( + RLEData::try_new( + values, + indices.clone(), + values_idx_offsets, + 0, + indices.len(), + ) + .unwrap(), ) - .unwrap() } pub(super) fn rle_array_with_nulls() -> RLEArray { @@ -100,14 +103,16 @@ mod tests { ) .into_array(); - RLEData::try_new( - values, - indices.clone(), - values_idx_offsets, - 0, - indices.len(), + RLEArray::from_inner( + RLEData::try_new( + values, + indices.clone(), + values_idx_offsets, + 0, + indices.len(), + ) + .unwrap(), ) - .unwrap() } } @@ -168,7 +173,7 @@ mod tests { let expected: Vec = (0..3000).map(|i| (i / 50) as u16).collect(); let array = values.into_array(); - let encoded = RLEData::encode(&array.to_primitive()).unwrap(); + let encoded = RLEArray::from_inner(RLEData::encode(&array.to_primitive()).unwrap()); // Access scalars from multiple chunks. for &idx in &[1023, 1024, 1025, 2047, 2048, 2049] { @@ -274,7 +279,7 @@ mod tests { let expected: Vec = (0..2100).map(|i| (i / 100) as u32).collect(); let array = values.into_array(); - let encoded = RLEData::encode(&array.to_primitive()).unwrap(); + let encoded = RLEArray::from_inner(RLEData::encode(&array.to_primitive()).unwrap()); // Slice across first and second chunk. let slice = encoded.slice(500..1500).unwrap(); diff --git a/encodings/fsst/benches/fsst_compress.rs b/encodings/fsst/benches/fsst_compress.rs index a7dc915ee78..ec3f7dffb31 100644 --- a/encodings/fsst/benches/fsst_compress.rs +++ b/encodings/fsst/benches/fsst_compress.rs @@ -9,6 +9,7 @@ use divan::Bencher; use rand::RngExt; use rand::SeedableRng; use rand::rngs::StdRng; +use vortex_array::DynArray; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; use vortex_array::RecursiveCanonical; @@ -68,7 +69,8 @@ fn decompress_fsst(bencher: Bencher, (string_count, avg_len, unique_chars): (usi let compressor = fsst_train_compressor(&array); let len = array.len(); let dtype = array.dtype().clone(); - let encoded = fsst_compress(array, len, &dtype, &compressor); + let encoded = + vortex_fsst::FSSTArray::from_inner(fsst_compress(array, len, &dtype, &compressor)); bencher .with_inputs(|| &encoded) @@ -116,7 +118,12 @@ fn canonicalize_compare( ) { let array = generate_test_data(string_count, avg_len, unique_chars); let compressor = fsst_train_compressor(&array); - let fsst_array = fsst_compress(&array, array.len(), array.dtype(), &compressor); + let fsst_array = vortex_fsst::FSSTArray::from_inner(fsst_compress( + &array, + array.len(), + array.dtype(), + &compressor, + )); let constant = ConstantArray::new(Scalar::from(&b"const"[..]), array.len()); bencher @@ -131,8 +138,7 @@ fn canonicalize_compare( fsst_array .to_canonical() .unwrap() - .as_ref() - .to_array() + .into_array() .binary(constant.clone().into_array(), Operator::Eq) .unwrap() .execute::(ctx) diff --git a/encodings/fsst/benches/fsst_url_compare.rs b/encodings/fsst/benches/fsst_url_compare.rs index 37a1c1a9d56..fecf8c008a2 100644 --- a/encodings/fsst/benches/fsst_url_compare.rs +++ b/encodings/fsst/benches/fsst_url_compare.rs @@ -98,7 +98,12 @@ fn eq_pushdown_low_match(bencher: Bencher) { fn eq_canonicalize_high_match(bencher: Bencher) { let data = &*URL_DATA; let compressor = fsst_train_compressor(data); - let fsst_array = fsst_compress(data, data.len(), data.dtype(), &compressor); + let fsst_array = vortex_fsst::FSSTArray::from_inner(fsst_compress( + data, + data.len(), + data.dtype(), + &compressor, + )); let match_url = pick_url_with_domain(data, HIGH_MATCH_DOMAIN); let constant = ConstantArray::new(Scalar::from(match_url.as_str()), NUM_URLS); @@ -108,8 +113,7 @@ fn eq_canonicalize_high_match(bencher: Bencher) { fsst_array .to_canonical() .unwrap() - .as_ref() - .to_array() + .into_array() .binary(constant.clone().into_array(), Operator::Eq) .unwrap() .execute::(ctx) @@ -121,7 +125,12 @@ fn eq_canonicalize_high_match(bencher: Bencher) { fn eq_canonicalize_low_match(bencher: Bencher) { let data = &*URL_DATA; let compressor = fsst_train_compressor(data); - let fsst_array = fsst_compress(data, data.len(), data.dtype(), &compressor); + let fsst_array = vortex_fsst::FSSTArray::from_inner(fsst_compress( + data, + data.len(), + data.dtype(), + &compressor, + )); let match_url = pick_url_with_domain(data, LOW_MATCH_DOMAIN); let constant = ConstantArray::new(Scalar::from(match_url.as_str()), NUM_URLS); @@ -131,8 +140,7 @@ fn eq_canonicalize_low_match(bencher: Bencher) { fsst_array .to_canonical() .unwrap() - .as_ref() - .to_array() + .into_array() .binary(constant.clone().into_array(), Operator::Eq) .unwrap() .execute::(ctx) diff --git a/encodings/fsst/src/canonical.rs b/encodings/fsst/src/canonical.rs index b16b08b4e2c..b8ec8a12e51 100644 --- a/encodings/fsst/src/canonical.rs +++ b/encodings/fsst/src/canonical.rs @@ -170,7 +170,10 @@ mod tests { let mut builder = VarBinViewBuilder::with_capacity(chunked_arr.dtype().clone(), chunked_arr.len()); - chunked_arr.append_to_builder(&mut builder, &mut SESSION.create_execution_ctx())?; + chunked_arr + .clone() + .into_array() + .append_to_builder(&mut builder, &mut SESSION.create_execution_ctx())?; { let arr = builder.finish_into_canonical().into_varbinview(); diff --git a/encodings/fsst/src/compress.rs b/encodings/fsst/src/compress.rs index d3f715fd7bf..ce568ca0d74 100644 --- a/encodings/fsst/src/compress.rs +++ b/encodings/fsst/src/compress.rs @@ -13,7 +13,6 @@ use vortex_buffer::Buffer; use vortex_buffer::BufferMut; use vortex_error::VortexExpect; -use crate::FSSTArray; /// Compress a string array using FSST. use crate::FSSTData; pub fn fsst_compress>( @@ -113,6 +112,7 @@ mod tests { use vortex_array::dtype::Nullability; use vortex_array::scalar::Scalar; + use crate::FSSTArray; use crate::compress::DEFAULT_BUFFER_LEN; use crate::fsst_compress_iter; @@ -133,7 +133,7 @@ mod tests { &compressor, ); - let decoded = compressed.scalar_at(0).unwrap(); + let decoded = FSSTArray::from_inner(compressed).scalar_at(0).unwrap(); let expected = Scalar::utf8(big_string, Nullability::NonNullable); diff --git a/encodings/fsst/src/compute/like.rs b/encodings/fsst/src/compute/like.rs index 55ce8d11f1c..6bb6cf7169e 100644 --- a/encodings/fsst/src/compute/like.rs +++ b/encodings/fsst/src/compute/like.rs @@ -114,7 +114,7 @@ mod tests { let compressor = fsst_train_compressor(&varbin); let len = varbin.len(); let dtype = varbin.dtype().clone(); - fsst_compress(varbin, len, &dtype, &compressor) + FSSTArray::from_inner(fsst_compress(varbin, len, &dtype, &compressor)) } fn run_like(array: FSSTArray, pattern: &str, opts: LikeOptions) -> VortexResult { diff --git a/encodings/fsst/src/compute/mod.rs b/encodings/fsst/src/compute/mod.rs index 02f86024fd5..9ced229e603 100644 --- a/encodings/fsst/src/compute/mod.rs +++ b/encodings/fsst/src/compute/mod.rs @@ -72,7 +72,7 @@ mod tests { fn test_take_null() { let arr = VarBinArray::from_iter([Some("h")], DType::Utf8(Nullability::NonNullable)); let compr = fsst_train_compressor(&arr); - let fsst = fsst_compress(&arr, arr.len(), arr.dtype(), &compr); + let fsst = FSSTArray::from_inner(fsst_compress(&arr, arr.len(), arr.dtype(), &compr)); let idx1: PrimitiveArray = (0..1).collect(); @@ -104,7 +104,12 @@ mod tests { ))] fn test_take_fsst_conformance(#[case] varbin: VarBinArray) { let compressor = fsst_train_compressor(&varbin); - let array = fsst_compress(&varbin, varbin.len(), varbin.dtype(), &compressor); + let array = FSSTArray::from_inner(fsst_compress( + &varbin, + varbin.len(), + varbin.dtype(), + &compressor, + )); test_take_conformance(&array.into_array()); } @@ -116,7 +121,7 @@ mod tests { DType::Utf8(Nullability::NonNullable), ); let compressor = fsst_train_compressor(&varbin); - fsst_compress(&varbin, varbin.len(), varbin.dtype(), &compressor) + FSSTArray::from_inner(fsst_compress(&varbin, varbin.len(), varbin.dtype(), &compressor)) })] // Nullable strings #[case::fsst_nullable({ @@ -127,7 +132,7 @@ mod tests { let compressor = fsst_train_compressor(&varbin); let len = varbin.len(); let dtype = varbin.dtype().clone(); - fsst_compress(varbin, len, &dtype, &compressor) + FSSTArray::from_inner(fsst_compress(varbin, len, &dtype, &compressor)) })] // Repetitive patterns (good for FSST compression) #[case::fsst_repetitive({ @@ -136,7 +141,7 @@ mod tests { DType::Utf8(Nullability::NonNullable), ); let compressor = fsst_train_compressor(&varbin); - fsst_compress(&varbin, varbin.len(), varbin.dtype(), &compressor) + FSSTArray::from_inner(fsst_compress(&varbin, varbin.len(), varbin.dtype(), &compressor)) })] // Edge cases #[case::fsst_single({ @@ -145,7 +150,7 @@ mod tests { DType::Utf8(Nullability::NonNullable), ); let compressor = fsst_train_compressor(&varbin); - fsst_compress(&varbin, varbin.len(), varbin.dtype(), &compressor) + FSSTArray::from_inner(fsst_compress(&varbin, varbin.len(), varbin.dtype(), &compressor)) })] #[case::fsst_empty_strings({ let varbin = VarBinArray::from_iter( @@ -155,7 +160,7 @@ mod tests { let compressor = fsst_train_compressor(&varbin); let len = varbin.len(); let dtype = varbin.dtype().clone(); - fsst_compress(varbin, len, &dtype, &compressor) + FSSTArray::from_inner(fsst_compress(varbin, len, &dtype, &compressor)) })] // Large arrays #[case::fsst_large({ @@ -177,7 +182,7 @@ mod tests { let compressor = fsst_train_compressor(&varbin); let len = varbin.len(); let dtype = varbin.dtype().clone(); - fsst_compress(varbin, len, &dtype, &compressor) + FSSTArray::from_inner(fsst_compress(varbin, len, &dtype, &compressor)) })] fn test_fsst_consistency(#[case] array: FSSTArray) { diff --git a/encodings/fsst/src/dfa/tests.rs b/encodings/fsst/src/dfa/tests.rs index 0d61d92090a..c9c39f455dd 100644 --- a/encodings/fsst/src/dfa/tests.rs +++ b/encodings/fsst/src/dfa/tests.rs @@ -229,7 +229,7 @@ fn make_fsst_str(strings: &[Option<&str>]) -> FSSTArray { let compressor = fsst_train_compressor(&varbin); let len = varbin.len(); let dtype = varbin.dtype().clone(); - fsst_compress(varbin, len, &dtype, &compressor) + FSSTArray::from_inner(fsst_compress(varbin, len, &dtype, &compressor)) } fn run_like(array: FSSTArray, pattern_arr: ArrayRef) -> VortexResult { diff --git a/encodings/fsst/src/slice.rs b/encodings/fsst/src/slice.rs index 097a21045e1..ecf7c7ff63f 100644 --- a/encodings/fsst/src/slice.rs +++ b/encodings/fsst/src/slice.rs @@ -12,7 +12,6 @@ use vortex_error::VortexResult; use vortex_error::vortex_err; use crate::FSST; -use crate::FSSTArray; use crate::FSSTData; impl SliceReduce for FSST { diff --git a/encodings/fsst/src/test_utils.rs b/encodings/fsst/src/test_utils.rs index 421a5d4c3f5..f4f1597a7d5 100644 --- a/encodings/fsst/src/test_utils.rs +++ b/encodings/fsst/src/test_utils.rs @@ -14,6 +14,7 @@ use vortex_array::arrays::VarBinArray; use vortex_array::dtype::DType; use vortex_array::dtype::NativePType; use vortex_array::dtype::Nullability; +use vortex_array::vtable::Array; use vortex_error::VortexExpect; use crate::FSSTArray; @@ -45,7 +46,7 @@ pub fn gen_fsst_test_data(len: usize, avg_str_len: usize, unique_chars: u8) -> A let len = varbin.len(); let dtype = varbin.dtype().clone(); - fsst_compress(varbin, len, &dtype, &compressor).into_array() + FSSTArray::from_inner(fsst_compress(varbin, len, &dtype, &compressor)).into_array() } pub fn gen_dict_fsst_test_data( @@ -141,7 +142,7 @@ pub fn make_fsst_urls(n: usize) -> FSSTArray { let compressor = fsst_train_compressor(&varbin); let len = varbin.len(); let dtype = varbin.dtype().clone(); - fsst_compress(varbin, len, &dtype, &compressor) + Array::from_inner(fsst_compress(varbin, len, &dtype, &compressor)) } // --------------------------------------------------------------------------- @@ -237,7 +238,7 @@ pub fn make_fsst_clickbench_urls(n: usize) -> FSSTArray { let compressor = fsst_train_compressor(&varbin); let len = varbin.len(); let dtype = varbin.dtype().clone(); - fsst_compress(varbin, len, &dtype, &compressor) + Array::from_inner(fsst_compress(varbin, len, &dtype, &compressor)) } // --------------------------------------------------------------------------- @@ -305,7 +306,7 @@ pub fn make_fsst_short_urls(n: usize) -> FSSTArray { let compressor = fsst_train_compressor(&varbin); let len = varbin.len(); let dtype = varbin.dtype().clone(); - fsst_compress(varbin, len, &dtype, &compressor) + Array::from_inner(fsst_compress(varbin, len, &dtype, &compressor)) } // --------------------------------------------------------------------------- @@ -377,7 +378,7 @@ pub fn make_fsst_log_lines(n: usize) -> FSSTArray { let compressor = fsst_train_compressor(&varbin); let len = varbin.len(); let dtype = varbin.dtype().clone(); - fsst_compress(varbin, len, &dtype, &compressor) + Array::from_inner(fsst_compress(varbin, len, &dtype, &compressor)) } // --------------------------------------------------------------------------- @@ -436,7 +437,7 @@ pub fn make_fsst_json_strings(n: usize) -> FSSTArray { let compressor = fsst_train_compressor(&varbin); let len = varbin.len(); let dtype = varbin.dtype().clone(); - fsst_compress(varbin, len, &dtype, &compressor) + Array::from_inner(fsst_compress(varbin, len, &dtype, &compressor)) } // --------------------------------------------------------------------------- @@ -508,7 +509,7 @@ pub fn make_fsst_file_paths(n: usize) -> FSSTArray { let compressor = fsst_train_compressor(&varbin); let len = varbin.len(); let dtype = varbin.dtype().clone(); - fsst_compress(varbin, len, &dtype, &compressor) + Array::from_inner(fsst_compress(varbin, len, &dtype, &compressor)) } // --------------------------------------------------------------------------- @@ -561,7 +562,7 @@ pub fn make_fsst_emails(n: usize) -> FSSTArray { let compressor = fsst_train_compressor(&varbin); let len = varbin.len(); let dtype = varbin.dtype().clone(); - fsst_compress(varbin, len, &dtype, &compressor) + Array::from_inner(fsst_compress(varbin, len, &dtype, &compressor)) } // --------------------------------------------------------------------------- @@ -600,5 +601,5 @@ pub fn make_fsst_rare_match(n: usize) -> FSSTArray { let compressor = fsst_train_compressor(&varbin); let len = varbin.len(); let dtype = varbin.dtype().clone(); - fsst_compress(varbin, len, &dtype, &compressor) + Array::from_inner(fsst_compress(varbin, len, &dtype, &compressor)) } diff --git a/encodings/pco/src/array.rs b/encodings/pco/src/array.rs index cd686d18fef..a2437be32aa 100644 --- a/encodings/pco/src/array.rs +++ b/encodings/pco/src/array.rs @@ -300,7 +300,7 @@ pub(crate) fn number_type_from_dtype(dtype: &DType) -> NumberType { } fn collect_valid(parray: &PrimitiveArray) -> VortexResult { - let mask = parray.validity_mask(); + let mask = parray.validity_mask()?; Ok(parray.clone().into_array().filter(mask)?.to_primitive()) } @@ -619,6 +619,7 @@ mod tests { use vortex_array::validity::Validity; use vortex_buffer::buffer; + use crate::Pco; use crate::PcoArray; #[test] @@ -628,7 +629,7 @@ mod tests { buffer![10u32, 20, 30, 40, 50, 60], Validity::from_iter([false, true, true, true, true, false]), ); - let pco = PcoData::from_primitive(&values, 0, 128).unwrap(); + let pco = Pco::from_primitive(&values, 0, 128).unwrap(); assert_arrays_eq!( pco, PrimitiveArray::from_option_iter([ diff --git a/encodings/pco/src/compute/cast.rs b/encodings/pco/src/compute/cast.rs index 9876bf31450..28dfddd4344 100644 --- a/encodings/pco/src/compute/cast.rs +++ b/encodings/pco/src/compute/cast.rs @@ -62,12 +62,13 @@ mod tests { use vortex_array::validity::Validity; use vortex_buffer::buffer; + use crate::Pco; use crate::PcoArray; #[test] fn test_cast_pco_f32_to_f64() { let values = PrimitiveArray::from_iter([1.0f32, 2.0, 3.0, 4.0, 5.0]); - let pco = PcoData::from_primitive(&values, 0, 128).unwrap(); + let pco = Pco::from_primitive(&values, 0, 128).unwrap(); let casted = pco .into_array() @@ -88,7 +89,7 @@ mod tests { fn test_cast_pco_nullability_change() { // Test casting from NonNullable to Nullable let values = PrimitiveArray::from_iter([10u32, 20, 30, 40]); - let pco = PcoData::from_primitive(&values, 0, 128).unwrap(); + let pco = Pco::from_primitive(&values, 0, 128).unwrap(); let casted = pco .into_array() @@ -106,7 +107,7 @@ mod tests { buffer![10u32, 20, 30, 40, 50, 60], Validity::from_iter([true, true, true, true, true, true]), ); - let pco = PcoData::from_primitive(&values, 0, 128).unwrap(); + let pco = Pco::from_primitive(&values, 0, 128).unwrap(); let sliced = pco.slice(1..5).unwrap(); let casted = sliced .cast(DType::Primitive(PType::U32, Nullability::NonNullable)) @@ -129,7 +130,7 @@ mod tests { Some(50), Some(60), ]); - let pco = PcoData::from_primitive(&values, 0, 128).unwrap(); + let pco = Pco::from_primitive(&values, 0, 128).unwrap(); let sliced = pco.slice(1..5).unwrap(); let casted = sliced .cast(DType::Primitive(PType::U32, Nullability::NonNullable)) @@ -163,7 +164,7 @@ mod tests { Validity::NonNullable, ))] fn test_cast_pco_conformance(#[case] values: PrimitiveArray) { - let pco = PcoData::from_primitive(&values, 0, 128).unwrap(); + let pco = Pco::from_primitive(&values, 0, 128).unwrap(); test_cast_conformance(&pco.into_array()); } } diff --git a/encodings/pco/src/compute/mod.rs b/encodings/pco/src/compute/mod.rs index 161cdabd453..990a54179ae 100644 --- a/encodings/pco/src/compute/mod.rs +++ b/encodings/pco/src/compute/mod.rs @@ -1,7 +1,6 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors -use crate::PcoData; mod cast; #[cfg(test)] @@ -11,46 +10,47 @@ mod tests { use vortex_array::arrays::PrimitiveArray; use vortex_array::compute::conformance::consistency::test_array_consistency; + use crate::Pco; use crate::PcoArray; fn pco_f32() -> PcoArray { let values = PrimitiveArray::from_iter([1.23f32, 4.56, 7.89, 10.11, 12.13]); - PcoData::from_primitive(&values, 0, 128).unwrap() + Pco::from_primitive(&values, 0, 128).unwrap() } fn pco_f64() -> PcoArray { let values = PrimitiveArray::from_iter([100.1f64, 200.2, 300.3, 400.4, 500.5]); - PcoData::from_primitive(&values, 0, 128).unwrap() + Pco::from_primitive(&values, 0, 128).unwrap() } fn pco_i32() -> PcoArray { let values = PrimitiveArray::from_iter([100i32, 200, 300, 400, 500]); - PcoData::from_primitive(&values, 0, 128).unwrap() + Pco::from_primitive(&values, 0, 128).unwrap() } fn pco_u64() -> PcoArray { let values = PrimitiveArray::from_iter([1000u64, 2000, 3000, 4000]); - PcoData::from_primitive(&values, 0, 128).unwrap() + Pco::from_primitive(&values, 0, 128).unwrap() } fn pco_i16() -> PcoArray { let values = PrimitiveArray::from_iter([10i16, 20, 30, 40, 50]); - PcoData::from_primitive(&values, 0, 128).unwrap() + Pco::from_primitive(&values, 0, 128).unwrap() } fn pco_i32_alt() -> PcoArray { let values = PrimitiveArray::from_iter([1i32, 2, 3, 4, 5]); - PcoData::from_primitive(&values, 0, 128).unwrap() + Pco::from_primitive(&values, 0, 128).unwrap() } fn pco_single() -> PcoArray { let values = PrimitiveArray::from_iter([42.42f64]); - PcoData::from_primitive(&values, 0, 128).unwrap() + Pco::from_primitive(&values, 0, 128).unwrap() } fn pco_large() -> PcoArray { let values = PrimitiveArray::from_iter(0u32..1000); - PcoData::from_primitive(&values, 3, 128).unwrap() + Pco::from_primitive(&values, 3, 128).unwrap() } #[rstest] diff --git a/encodings/pco/src/test.rs b/encodings/pco/src/test.rs index 52e3c9495ce..7d647d2e728 100644 --- a/encodings/pco/src/test.rs +++ b/encodings/pco/src/test.rs @@ -5,6 +5,7 @@ use std::sync::LazyLock; use vortex_array::ArrayContext; +use vortex_array::DynArray; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; use vortex_array::ToCanonical; @@ -45,9 +46,9 @@ use crate::PcoArray; fn test_compress_decompress() { let data: Vec = (0..200).collect(); let array = PrimitiveArray::from_iter(data.clone()); - let compressed = PcoData::from_primitive(&array, 3, 0).unwrap(); + let compressed = Pco::from_primitive(&array, 3, 0).unwrap(); // this data should be compressible - assert!(compressed.pages.len() < array.nbytes() as usize); + assert!(compressed.pages.len() < array.into_array().nbytes() as usize); // check full decompression works let mut ctx = LEGACY_SESSION.create_execution_ctx(); @@ -68,7 +69,7 @@ fn test_compress_decompress() { #[test] fn test_compress_decompress_small() { let array = PrimitiveArray::from_option_iter([None, Some(1)]); - let compressed = PcoData::from_primitive(&array, 3, 0).unwrap(); + let compressed = Pco::from_primitive(&array, 3, 0).unwrap(); let expected = array.into_array(); assert_arrays_eq!(compressed, expected); @@ -82,7 +83,7 @@ fn test_compress_decompress_small() { fn test_empty() { let data: Vec = vec![]; let array = PrimitiveArray::from_iter(data.clone()); - let compressed = PcoData::from_primitive(&array, 3, 100).unwrap(); + let compressed = Pco::from_primitive(&array, 3, 100).unwrap(); let mut ctx = LEGACY_SESSION.create_execution_ctx(); let primitive = compressed.decompress(&mut ctx).unwrap(); assert_arrays_eq!(primitive, PrimitiveArray::from_iter(data)); @@ -101,13 +102,15 @@ fn test_validity_and_multiple_chunks_and_pages() { let compression_level = 3; let values_per_chunk = 33; let values_per_page = 10; - let compressed = PcoData::from_primitive_with_values_per_chunk( - &array, - compression_level, - values_per_chunk, - values_per_page, - ) - .unwrap(); + let compressed = PcoArray::from_inner( + PcoData::from_primitive_with_values_per_chunk( + &array, + compression_level, + values_per_chunk, + values_per_page, + ) + .unwrap(), + ); assert_eq!(compressed.metadata.chunks.len(), 6); // 191 values / 33 rounds up to 6 assert_eq!(compressed.metadata.chunks[0].pages.len(), 4); // 33 / 10 rounds up to 4 @@ -145,9 +148,9 @@ fn test_validity_vtable() { Buffer::from(data), Validity::Array(BoolArray::from_iter(mask_bools.clone()).into_array()), ); - let compressed = PcoData::from_primitive(&array, 3, 0).unwrap(); + let compressed = Pco::from_primitive(&array, 3, 0).unwrap(); assert_eq!( - compressed.validity_mask().unwrap(), + DynArray::validity_mask(&compressed).unwrap(), Mask::from_iter(mask_bools) ); assert_eq!( @@ -159,7 +162,7 @@ fn test_validity_vtable() { #[test] fn test_serde() -> VortexResult<()> { let data: PrimitiveArray = (0i32..1_000_000).collect(); - let pco = PcoData::from_primitive(&data, 3, 100)?.into_array(); + let pco = Pco::from_primitive(&data, 3, 100)?.into_array(); let context = ArrayContext::empty(); diff --git a/encodings/runend/benches/run_end_compress.rs b/encodings/runend/benches/run_end_compress.rs index bac8175b37a..5fa07b813b6 100644 --- a/encodings/runend/benches/run_end_compress.rs +++ b/encodings/runend/benches/run_end_compress.rs @@ -14,7 +14,7 @@ use vortex_array::arrays::VarBinViewArray; use vortex_array::dtype::IntegerPType; use vortex_array::validity::Validity; use vortex_buffer::Buffer; -use vortex_runend::RunEndArray; +use vortex_runend::RunEnd; use vortex_runend::compress::runend_encode; fn main() { @@ -64,7 +64,7 @@ fn decompress(bencher: Bencher, (length, run_step): (usize, usi .collect::>() .into_array(); - let run_end_array = RunEndArray::new(ends, values); + let run_end_array = RunEnd::new(ends, values); let array = run_end_array.into_array(); bencher @@ -89,7 +89,7 @@ fn take_indices(bencher: Bencher, (length, run_step): (usize, usize)) { let source_array = PrimitiveArray::from_iter(0..(length as i32)).into_array(); let (ends, values) = runend_encode(&values); - let runend_array = RunEndArray::try_new(ends.into_array(), values) + let runend_array = RunEnd::try_new(ends.into_array(), values) .unwrap() .into_array(); @@ -121,7 +121,7 @@ fn decompress_utf8(bencher: Bencher, (length, run_step): (usize, usize)) { let values = VarBinViewArray::from_iter_str((0..num_runs).map(|i| format!("run_value_{i}"))) .into_array(); - let run_end_array = RunEndArray::new(ends, values); + let run_end_array = RunEnd::new(ends, values); let array = run_end_array.into_array(); bencher diff --git a/encodings/runend/benches/run_end_null_count.rs b/encodings/runend/benches/run_end_null_count.rs index d85683a4c92..8a90f56a638 100644 --- a/encodings/runend/benches/run_end_null_count.rs +++ b/encodings/runend/benches/run_end_null_count.rs @@ -11,6 +11,7 @@ use vortex_array::DynArray; use vortex_array::IntoArray; use vortex_array::arrays::PrimitiveArray; use vortex_buffer::Buffer; +use vortex_runend::RunEnd; use vortex_runend::RunEndArray; fn main() { @@ -68,5 +69,5 @@ fn fixture(n: usize, run_step: usize, valid_density: f64) -> RunEndArray { ) .into_array(); - RunEndArray::new(ends, values) + RunEnd::new(ends, values) } diff --git a/encodings/runend/src/arbitrary.rs b/encodings/runend/src/arbitrary.rs index 20ef3d45c34..a63fa9bb2ed 100644 --- a/encodings/runend/src/arbitrary.rs +++ b/encodings/runend/src/arbitrary.rs @@ -14,7 +14,6 @@ use vortex_array::validity::Validity; use vortex_buffer::Buffer; use vortex_error::VortexExpect; -use crate::RunEndArray; use crate::RunEndData; /// A wrapper type to implement `Arbitrary` for `RunEndArray`. diff --git a/encodings/runend/src/array.rs b/encodings/runend/src/array.rs index f4c46c20817..73ad5bda9a1 100644 --- a/encodings/runend/src/array.rs +++ b/encodings/runend/src/array.rs @@ -262,6 +262,16 @@ impl RunEnd { ends, values, offset, length, )?)) } + + /// Build a new [`RunEndArray`] from ends and values (panics on invalid input). + pub fn new(ends: ArrayRef, values: ArrayRef) -> RunEndArray { + Array::from_inner(RunEndData::new(ends, values)) + } + + /// Run the array through run-end encoding. + pub fn encode(array: ArrayRef) -> VortexResult { + Ok(Array::from_inner(RunEndData::encode(array)?)) + } } impl RunEndData { @@ -353,11 +363,11 @@ impl RunEndData { /// # use vortex_array::IntoArray; /// # use vortex_buffer::buffer; /// # use vortex_error::VortexResult; - /// # use vortex_runend::RunEndArray; + /// # use vortex_runend::RunEnd; /// # fn main() -> VortexResult<()> { /// let ends = buffer![2u8, 3u8].into_array(); /// let values = BoolArray::from_iter([false, true]).into_array(); - /// let run_end = RunEndData::new(ends, values); + /// let run_end = RunEnd::new(ends, values); /// /// // Array encodes /// assert_eq!(run_end.scalar_at(0)?, false.into()); @@ -567,11 +577,11 @@ mod tests { use vortex_array::dtype::PType; use vortex_buffer::buffer; - use crate::RunEndArray; + use crate::RunEnd; #[test] fn test_runend_constructor() { - let arr = RunEndData::new( + let arr = RunEnd::new( buffer![2u32, 5, 10].into_array(), buffer![1i32, 2, 3].into_array(), ); @@ -591,7 +601,7 @@ mod tests { #[test] fn test_runend_utf8() { let values = VarBinViewArray::from_iter_str(["a", "b", "c"]).into_array(); - let arr = RunEndData::new(buffer![2u32, 5, 10].into_array(), values); + let arr = RunEnd::new(buffer![2u32, 5, 10].into_array(), values); assert_eq!(arr.len(), 10); assert_eq!(arr.dtype(), &DType::Utf8(Nullability::NonNullable)); @@ -607,8 +617,7 @@ mod tests { let dict_codes = buffer![0u32, 1, 2].into_array(); let dict = DictArray::try_new(dict_codes, dict_values).unwrap(); - let arr = - RunEndData::try_new(buffer![2u32, 5, 10].into_array(), dict.into_array()).unwrap(); + let arr = RunEnd::try_new(buffer![2u32, 5, 10].into_array(), dict.into_array()).unwrap(); assert_eq!(arr.len(), 10); let expected = diff --git a/encodings/runend/src/arrow.rs b/encodings/runend/src/arrow.rs index 26ab1668c68..34ad4121bdf 100644 --- a/encodings/runend/src/arrow.rs +++ b/encodings/runend/src/arrow.rs @@ -15,7 +15,6 @@ use vortex_array::validity::Validity; use vortex_buffer::Buffer; use vortex_error::VortexResult; -use crate::RunEndArray; use crate::RunEndData; use crate::ops::find_slice_end_index; impl FromArrowArray<&RunArray> for RunEndData @@ -80,7 +79,8 @@ mod tests { use vortex_error::VortexResult; use vortex_session::VortexSession; - use crate::RunEndArray; + use crate::RunEnd; + use crate::RunEndData; static SESSION: LazyLock = LazyLock::new(|| VortexSession::empty().with::()); @@ -98,7 +98,7 @@ mod tests { let vortex_array = RunEndData::from_arrow(&arrow_run_array, false)?; assert_arrays_eq!( - vortex_array.as_ref(), + vortex_array.into_array(), buffer![10i32, 10, 10, 20, 20, 30, 30, 30].into_array() ); Ok(()) @@ -115,7 +115,7 @@ mod tests { let vortex_array = RunEndData::from_arrow(&arrow_run_array, true)?; assert_arrays_eq!( - vortex_array.as_ref(), + vortex_array.into_array(), PrimitiveArray::from_option_iter([ Some(100i32), Some(100i32), diff --git a/encodings/runend/src/compress.rs b/encodings/runend/src/compress.rs index 8554db36c4f..ddd31c601c9 100644 --- a/encodings/runend/src/compress.rs +++ b/encodings/runend/src/compress.rs @@ -175,7 +175,7 @@ pub fn runend_decode_primitive( offset: usize, length: usize, ) -> VortexResult { - let validity_mask = values.validity_mask(); + let validity_mask = values.validity_mask()?; Ok(match_each_native_ptype!(values.ptype(), |P| { match_each_unsigned_integer_ptype!(ends.ptype(), |E| { runend_decode_typed_primitive( @@ -275,7 +275,7 @@ pub fn runend_decode_varbinview( offset: usize, length: usize, ) -> VortexResult { - let validity_mask = values.validity_mask(); + let validity_mask = values.validity_mask()?; let views = values.views(); let (decoded_views, validity) = match_each_unsigned_integer_ptype!(ends.ptype(), |E| { diff --git a/encodings/runend/src/compute/cast.rs b/encodings/runend/src/compute/cast.rs index be0a770bc3c..46376e7700b 100644 --- a/encodings/runend/src/compute/cast.rs +++ b/encodings/runend/src/compute/cast.rs @@ -47,11 +47,12 @@ mod tests { use vortex_array::dtype::PType; use vortex_buffer::buffer; + use crate::RunEnd; use crate::RunEndArray; #[test] fn test_cast_runend_i32_to_i64() { - let runend = RunEndData::try_new( + let runend = RunEnd::try_new( buffer![3u64, 5, 8, 10].into_array(), buffer![100i32, 200, 100, 300].into_array(), ) @@ -90,7 +91,7 @@ mod tests { #[test] fn test_cast_runend_nullable() { - let runend = RunEndData::try_new( + let runend = RunEnd::try_new( buffer![2u64, 4, 7].into_array(), PrimitiveArray::from_option_iter([Some(10i32), None, Some(20)]).into_array(), ) @@ -109,7 +110,7 @@ mod tests { #[test] fn test_cast_runend_with_offset() { // Create a RunEndArray: [100, 100, 100, 200, 200, 300, 300, 300, 300, 300] - let runend = RunEndData::try_new( + let runend = RunEnd::try_new( buffer![3u64, 5, 10].into_array(), buffer![100i32, 200, 300].into_array(), ) @@ -134,23 +135,23 @@ mod tests { } #[rstest] - #[case(RunEndData::try_new( + #[case(RunEnd::try_new( buffer![3u64, 5, 8].into_array(), buffer![100i32, 200, 300].into_array() ).unwrap())] - #[case(RunEndData::try_new( + #[case(RunEnd::try_new( buffer![1u64, 4, 10].into_array(), buffer![1.5f32, 2.5, 3.5].into_array() ).unwrap())] - #[case(RunEndData::try_new( + #[case(RunEnd::try_new( buffer![2u64, 3, 5].into_array(), PrimitiveArray::from_option_iter([Some(42i32), None, Some(84)]).into_array() ).unwrap())] - #[case(RunEndData::try_new( + #[case(RunEnd::try_new( buffer![10u64].into_array(), buffer![255u8].into_array() ).unwrap())] - #[case(RunEndData::try_new( + #[case(RunEnd::try_new( buffer![2u64, 4, 6, 8, 10].into_array(), BoolArray::from_iter(vec![true, false, true, false, true]).into_array() ).unwrap())] diff --git a/encodings/runend/src/compute/compare.rs b/encodings/runend/src/compute/compare.rs index b9092580032..10cd2501350 100644 --- a/encodings/runend/src/compute/compare.rs +++ b/encodings/runend/src/compute/compare.rs @@ -16,7 +16,6 @@ use vortex_error::VortexResult; use crate::RunEnd; use crate::RunEndArray; -use crate::RunEndData; use crate::decompress_bool::runend_decode_bools; impl CompareKernel for RunEnd { @@ -56,13 +55,12 @@ mod test { use vortex_array::builtins::ArrayBuiltins; use vortex_array::scalar_fn::fns::operators::Operator; + use crate::RunEnd; use crate::RunEndArray; fn ree_array() -> RunEndArray { - RunEndData::encode( - PrimitiveArray::from_iter([1, 1, 1, 4, 4, 4, 2, 2, 5, 5, 5, 5]).into_array(), - ) - .unwrap() + RunEnd::encode(PrimitiveArray::from_iter([1, 1, 1, 4, 4, 4, 2, 2, 5, 5, 5, 5]).into_array()) + .unwrap() } #[test] diff --git a/encodings/runend/src/compute/filter.rs b/encodings/runend/src/compute/filter.rs index 77969dcd767..3ddd81e15da 100644 --- a/encodings/runend/src/compute/filter.rs +++ b/encodings/runend/src/compute/filter.rs @@ -121,13 +121,12 @@ mod tests { use vortex_error::VortexResult; use vortex_mask::Mask; + use crate::RunEnd; use crate::RunEndArray; fn ree_array() -> RunEndArray { - RunEndData::encode( - PrimitiveArray::from_iter([1, 1, 1, 4, 4, 4, 2, 2, 5, 5, 5, 5]).into_array(), - ) - .unwrap() + RunEnd::encode(PrimitiveArray::from_iter([1, 1, 1, 4, 4, 4, 2, 2, 5, 5, 5, 5]).into_array()) + .unwrap() } #[test] @@ -137,7 +136,7 @@ mod tests { assert_arrays_eq!( filtered, - RunEndData::new( + RunEnd::new( PrimitiveArray::from_iter([1u8, 2, 3]).into_array(), PrimitiveArray::from_iter([1i32, 4, 2]).into_array() ) diff --git a/encodings/runend/src/compute/mod.rs b/encodings/runend/src/compute/mod.rs index becd3c1dfeb..f1f6dd97593 100644 --- a/encodings/runend/src/compute/mod.rs +++ b/encodings/runend/src/compute/mod.rs @@ -1,7 +1,6 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors -use crate::RunEndData; mod cast; mod compare; mod fill_null; @@ -20,28 +19,29 @@ mod tests { use vortex_array::compute::conformance::consistency::test_array_consistency; use vortex_buffer::buffer; + use crate::RunEnd; use crate::RunEndArray; #[rstest] // Simple run-end arrays - #[case::runend_i32(RunEndData::encode( + #[case::runend_i32(RunEnd::encode( buffer![1i32, 1, 1, 2, 2, 3, 3, 3, 3].into_array() ).unwrap())] - #[case::runend_single_run(RunEndData::encode( + #[case::runend_single_run(RunEnd::encode( buffer![5i32, 5, 5, 5, 5].into_array() ).unwrap())] - #[case::runend_alternating(RunEndData::encode( + #[case::runend_alternating(RunEnd::encode( buffer![1i32, 2, 1, 2, 1, 2].into_array() ).unwrap())] // Different types - #[case::runend_u64(RunEndData::encode( + #[case::runend_u64(RunEnd::encode( buffer![100u64, 100, 200, 200, 200].into_array() ).unwrap())] // Edge cases - #[case::runend_single(RunEndData::encode( + #[case::runend_single(RunEnd::encode( buffer![42i32].into_array() ).unwrap())] - #[case::runend_large(RunEndData::encode( + #[case::runend_large(RunEnd::encode( PrimitiveArray::from_iter((0..1000).map(|i| i / 10)).into_array() ).unwrap())] diff --git a/encodings/runend/src/compute/take.rs b/encodings/runend/src/compute/take.rs index c942ee3f8f6..fb46f063bdc 100644 --- a/encodings/runend/src/compute/take.rs +++ b/encodings/runend/src/compute/take.rs @@ -22,7 +22,6 @@ use vortex_error::vortex_bail; use crate::RunEnd; use crate::RunEndArray; -use crate::RunEndData; impl TakeExecute for RunEnd { #[expect( @@ -103,10 +102,11 @@ mod test { use vortex_array::compute::conformance::take::test_take_conformance; use vortex_buffer::buffer; + use crate::RunEnd; use crate::RunEndArray; fn ree_array() -> RunEndArray { - RunEndData::encode(buffer![1, 1, 1, 4, 4, 4, 2, 2, 5, 5, 5, 5].into_array()).unwrap() + RunEnd::encode(buffer![1, 1, 1, 4, 4, 4, 2, 2, 5, 5, 5, 5].into_array()).unwrap() } #[test] @@ -154,10 +154,10 @@ mod test { #[rstest] #[case(ree_array())] - #[case(RunEndData::encode( + #[case(RunEnd::encode( buffer![1u8, 1, 2, 2, 2, 3, 3, 3, 3, 4].into_array(), ).unwrap())] - #[case(RunEndData::encode( + #[case(RunEnd::encode( PrimitiveArray::from_option_iter([ Some(10), Some(10), @@ -169,9 +169,9 @@ mod test { ]) .into_array(), ).unwrap())] - #[case(RunEndData::encode(buffer![42i32, 42, 42, 42, 42].into_array()) + #[case(RunEnd::encode(buffer![42i32, 42, 42, 42, 42].into_array()) .unwrap())] - #[case(RunEndData::encode( + #[case(RunEnd::encode( buffer![1i32, 2, 3, 4, 5, 6, 7, 8, 9, 10].into_array(), ).unwrap())] #[case({ @@ -181,7 +181,7 @@ mod test { values.push(i); } } - RunEndData::encode(PrimitiveArray::from_iter(values).into_array()).unwrap() + RunEnd::encode(PrimitiveArray::from_iter(values).into_array()).unwrap() })] fn test_take_runend_conformance(#[case] array: RunEndArray) { test_take_conformance(&array.into_array()); @@ -190,7 +190,7 @@ mod test { #[rstest] #[case(ree_array().slice(3..6).unwrap())] #[case({ - let array = RunEndData::encode( + let array = RunEnd::encode( buffer![1i32, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3].into_array(), ) .unwrap(); diff --git a/encodings/runend/src/compute/take_from.rs b/encodings/runend/src/compute/take_from.rs index e01cf26784a..d003dfc6463 100644 --- a/encodings/runend/src/compute/take_from.rs +++ b/encodings/runend/src/compute/take_from.rs @@ -12,7 +12,6 @@ use vortex_error::VortexResult; use crate::RunEnd; use crate::RunEndArray; -use crate::RunEndData; #[derive(Debug)] pub(crate) struct RunEndTakeFrom; @@ -39,7 +38,7 @@ impl ExecuteParentKernel for RunEndTakeFrom { // Create a new run-end array containing values as values, instead of indices as values. // SAFETY: we are copying ends from an existing valid RunEndArray let ree_array = unsafe { - RunEndData::new_unchecked( + RunEnd::new_unchecked( array.ends().clone(), dict.values().take(array.values().clone())?, array.offset(), @@ -64,6 +63,7 @@ mod tests { use vortex_error::VortexResult; use vortex_session::VortexSession; + use crate::RunEnd; use crate::RunEndArray; use crate::compute::take_from::RunEndTakeFrom; @@ -74,7 +74,7 @@ mod tests { /// Codes: `[0, 0, 0, 1, 1, 0, 0]` /// RunEnd encoded codes: ends=`[3, 5, 7]`, values=`[0, 1, 0]` fn make_dict_with_runend_codes() -> (RunEndArray, DictArray) { - let codes = RunEndData::encode(buffer![0u32, 0, 0, 1, 1, 0, 0].into_array()).unwrap(); + let codes = RunEnd::encode(buffer![0u32, 0, 0, 1, 1, 0, 0].into_array()).unwrap(); let values = buffer![2i32, 3].into_array(); let dict = DictArray::try_new(codes.clone().into_array(), values).unwrap(); (codes, dict) @@ -99,7 +99,7 @@ mod tests { let (codes, dict) = make_dict_with_runend_codes(); // Slice codes to positions 2..5 → logical codes [0, 1, 1] → values [2, 3, 3] let sliced_codes = unsafe { - RunEndData::new_unchecked( + RunEnd::new_unchecked( codes.ends().clone(), codes.values().clone(), 2, // offset @@ -122,7 +122,7 @@ mod tests { let (codes, dict) = make_dict_with_runend_codes(); // Slice codes to positions 3..7 → logical codes [1, 1, 0, 0] → values [3, 3, 2, 2] let sliced_codes = unsafe { - RunEndData::new_unchecked( + RunEnd::new_unchecked( codes.ends().clone(), codes.values().clone(), 3, // offset at exact run boundary @@ -145,7 +145,7 @@ mod tests { let (codes, dict) = make_dict_with_runend_codes(); // Slice to single element at position 4 → code=1 → value=3 let sliced_codes = unsafe { - RunEndData::new_unchecked( + RunEnd::new_unchecked( codes.ends().slice(1..3)?, codes.values().slice(1..3)?, 4, // offset diff --git a/encodings/runend/src/decompress_bool.rs b/encodings/runend/src/decompress_bool.rs index 13825750f48..407745d9154 100644 --- a/encodings/runend/src/decompress_bool.rs +++ b/encodings/runend/src/decompress_bool.rs @@ -35,7 +35,7 @@ pub fn runend_decode_bools( offset: usize, length: usize, ) -> VortexResult { - let validity = values.validity_mask(); + let validity = values.validity_mask()?; let values_buf = values.to_bit_buffer(); let nullability = values.dtype().nullability(); diff --git a/encodings/runend/src/ops.rs b/encodings/runend/src/ops.rs index f0af4730f0f..e2a14ce9962 100644 --- a/encodings/runend/src/ops.rs +++ b/encodings/runend/src/ops.rs @@ -13,7 +13,6 @@ use vortex_array::vtable::OperationsVTable; use vortex_error::VortexResult; use crate::RunEnd; -use crate::RunEndData; impl OperationsVTable for RunEnd { fn scalar_at( @@ -60,11 +59,11 @@ mod tests { use vortex_array::dtype::PType; use vortex_buffer::buffer; - use crate::RunEndArray; + use crate::RunEnd; #[test] fn slice_array() { - let arr = RunEndData::try_new( + let arr = RunEnd::try_new( buffer![2u32, 5, 10].into_array(), buffer![1i32, 2, 3].into_array(), ) @@ -83,7 +82,7 @@ mod tests { #[test] fn double_slice() { - let arr = RunEndData::try_new( + let arr = RunEnd::try_new( buffer![2u32, 5, 10].into_array(), buffer![1i32, 2, 3].into_array(), ) @@ -100,7 +99,7 @@ mod tests { #[test] fn slice_end_inclusive() { - let arr = RunEndData::try_new( + let arr = RunEnd::try_new( buffer![2u32, 5, 10].into_array(), buffer![1i32, 2, 3].into_array(), ) @@ -119,7 +118,7 @@ mod tests { #[test] fn slice_at_end() { - let re_array = RunEndData::try_new( + let re_array = RunEnd::try_new( buffer![7_u64, 10].into_array(), buffer![2_u64, 3].into_array(), ) @@ -133,7 +132,7 @@ mod tests { #[test] fn slice_single_end() { - let re_array = RunEndData::try_new( + let re_array = RunEnd::try_new( buffer![7_u64, 10].into_array(), buffer![2_u64, 3].into_array(), ) @@ -149,7 +148,7 @@ mod tests { #[test] fn ree_scalar_at_end() { - let scalar = RunEndData::encode(buffer![1, 1, 1, 4, 4, 4, 2, 2, 5, 5, 5, 5].into_array()) + let scalar = RunEnd::encode(buffer![1, 1, 1, 4, 4, 4, 2, 2, 5, 5, 5, 5].into_array()) .unwrap() .scalar_at(11) .unwrap(); @@ -161,7 +160,7 @@ mod tests { fn slice_along_run_boundaries() { // Create a runend array with runs: [1, 1, 1] [4, 4, 4] [2, 2] [5, 5, 5, 5] // Run ends at indices: 3, 6, 8, 12 - let arr = RunEndData::try_new( + let arr = RunEnd::try_new( buffer![3u32, 6, 8, 12].into_array(), buffer![1i32, 4, 2, 5].into_array(), ) diff --git a/encodings/sequence/src/array.rs b/encodings/sequence/src/array.rs index 1f36c2ed233..0de6847de28 100644 --- a/encodings/sequence/src/array.rs +++ b/encodings/sequence/src/array.rs @@ -492,11 +492,11 @@ mod tests { use vortex_array::scalar::ScalarValue; use vortex_error::VortexResult; - use crate::array::SequenceArray; + use crate::Sequence; #[test] fn test_sequence_canonical() { - let arr = SequenceData::try_new_typed(2i64, 3, Nullability::NonNullable, 4).unwrap(); + let arr = Sequence::try_new_typed(2i64, 3, Nullability::NonNullable, 4).unwrap(); let canon = PrimitiveArray::from_iter((0..4).map(|i| 2i64 + i * 3)); @@ -505,7 +505,7 @@ mod tests { #[test] fn test_sequence_slice_canonical() { - let arr = SequenceData::try_new_typed(2i64, 3, Nullability::NonNullable, 4) + let arr = Sequence::try_new_typed(2i64, 3, Nullability::NonNullable, 4) .unwrap() .slice(2..3) .unwrap(); @@ -517,7 +517,7 @@ mod tests { #[test] fn test_sequence_scalar_at() { - let scalar = SequenceData::try_new_typed(2i64, 3, Nullability::NonNullable, 4) + let scalar = Sequence::try_new_typed(2i64, 3, Nullability::NonNullable, 4) .unwrap() .scalar_at(2) .unwrap(); @@ -530,19 +530,19 @@ mod tests { #[test] fn test_sequence_min_max() { - assert!(SequenceData::try_new_typed(-127i8, -1i8, Nullability::NonNullable, 2).is_ok()); - assert!(SequenceData::try_new_typed(126i8, -1i8, Nullability::NonNullable, 2).is_ok()); + assert!(Sequence::try_new_typed(-127i8, -1i8, Nullability::NonNullable, 2).is_ok()); + assert!(Sequence::try_new_typed(126i8, -1i8, Nullability::NonNullable, 2).is_ok()); } #[test] fn test_sequence_too_big() { - assert!(SequenceData::try_new_typed(127i8, 1i8, Nullability::NonNullable, 2).is_err()); - assert!(SequenceData::try_new_typed(-128i8, -1i8, Nullability::NonNullable, 2).is_err()); + assert!(Sequence::try_new_typed(127i8, 1i8, Nullability::NonNullable, 2).is_err()); + assert!(Sequence::try_new_typed(-128i8, -1i8, Nullability::NonNullable, 2).is_err()); } #[test] fn positive_multiplier_is_strict_sorted() -> VortexResult<()> { - let arr = SequenceData::try_new_typed(0i64, 3, Nullability::NonNullable, 4)?; + let arr = Sequence::try_new_typed(0i64, 3, Nullability::NonNullable, 4)?; let is_sorted = arr .statistics() @@ -558,7 +558,7 @@ mod tests { #[test] fn zero_multiplier_is_sorted_not_strict() -> VortexResult<()> { - let arr = SequenceData::try_new_typed(5i64, 0, Nullability::NonNullable, 4)?; + let arr = Sequence::try_new_typed(5i64, 0, Nullability::NonNullable, 4)?; let is_sorted = arr .statistics() @@ -574,7 +574,7 @@ mod tests { #[test] fn negative_multiplier_not_sorted() -> VortexResult<()> { - let arr = SequenceData::try_new_typed(10i64, -1, Nullability::NonNullable, 4)?; + let arr = Sequence::try_new_typed(10i64, -1, Nullability::NonNullable, 4)?; let is_sorted = arr .statistics() @@ -593,7 +593,7 @@ mod tests { #[test] fn test_large_multiplier_sorted() -> VortexResult<()> { let large_multiplier = (i64::MAX as u64) + 1; - let arr = SequenceData::try_new_typed(0, large_multiplier, Nullability::NonNullable, 2)?; + let arr = Sequence::try_new_typed(0, large_multiplier, Nullability::NonNullable, 2)?; let is_sorted = arr .statistics() diff --git a/encodings/sequence/src/compute/cast.rs b/encodings/sequence/src/compute/cast.rs index ff602639005..574f8b85315 100644 --- a/encodings/sequence/src/compute/cast.rs +++ b/encodings/sequence/src/compute/cast.rs @@ -99,12 +99,12 @@ mod tests { use vortex_array::dtype::Nullability; use vortex_array::dtype::PType; + use crate::Sequence; use crate::SequenceArray; #[test] fn test_cast_sequence_nullability() { - let sequence = - SequenceData::try_new_typed(0u32, 1u32, Nullability::NonNullable, 4).unwrap(); + let sequence = Sequence::try_new_typed(0u32, 1u32, Nullability::NonNullable, 4).unwrap(); // Cast to nullable let casted = sequence @@ -119,8 +119,7 @@ mod tests { #[test] fn test_cast_sequence_u32_to_i64() { - let sequence = - SequenceData::try_new_typed(100u32, 10u32, Nullability::NonNullable, 4).unwrap(); + let sequence = Sequence::try_new_typed(100u32, 10u32, Nullability::NonNullable, 4).unwrap(); let casted = sequence .into_array() @@ -139,8 +138,7 @@ mod tests { #[test] fn test_cast_sequence_i16_to_i32_nullable() { // Test ptype change AND nullability change in one cast - let sequence = - SequenceData::try_new_typed(5i16, 3i16, Nullability::NonNullable, 3).unwrap(); + let sequence = Sequence::try_new_typed(5i16, 3i16, Nullability::NonNullable, 3).unwrap(); let casted = sequence .into_array() @@ -161,8 +159,7 @@ mod tests { #[test] fn test_cast_sequence_to_float_delegates_to_canonical() { - let sequence = - SequenceData::try_new_typed(0i32, 1i32, Nullability::NonNullable, 5).unwrap(); + let sequence = Sequence::try_new_typed(0i32, 1i32, Nullability::NonNullable, 5).unwrap(); // Cast to float should delegate to canonical (SequenceArray doesn't support float) let casted = sequence @@ -184,15 +181,15 @@ mod tests { } #[rstest] - #[case::i32(SequenceData::try_new_typed(0i32, 1i32, Nullability::NonNullable, 5).unwrap())] - #[case::u64(SequenceData::try_new_typed(1000u64, 100u64, Nullability::NonNullable, 4).unwrap())] + #[case::i32(Sequence::try_new_typed(0i32, 1i32, Nullability::NonNullable, 5).unwrap())] + #[case::u64(Sequence::try_new_typed(1000u64, 100u64, Nullability::NonNullable, 4).unwrap())] // TODO(DK): SequenceArray does not actually conform. You cannot cast this array to u8 even // though all its values are representable therein. // - // #[case::negative_step(SequenceData::try_new_typed(100i32, -10i32, Nullability::NonNullable, + // #[case::negative_step(Sequence::try_new_typed(100i32, -10i32, Nullability::NonNullable, // 5).unwrap())] - #[case::single(SequenceData::try_new_typed(42i64, 0i64, Nullability::NonNullable, 1).unwrap())] - #[case::constant(SequenceData::try_new_typed( + #[case::single(Sequence::try_new_typed(42i64, 0i64, Nullability::NonNullable, 1).unwrap())] + #[case::constant(Sequence::try_new_typed( 100i32, 0i32, // multiplier of 0 means constant array Nullability::NonNullable, diff --git a/encodings/sequence/src/compute/compare.rs b/encodings/sequence/src/compute/compare.rs index db92a779ea6..7e0e58fca9b 100644 --- a/encodings/sequence/src/compute/compare.rs +++ b/encodings/sequence/src/compute/compare.rs @@ -21,7 +21,6 @@ use vortex_error::vortex_bail; use vortex_error::vortex_err; use crate::SequenceArray; -use crate::SequenceData; use crate::array::Sequence; impl CompareKernel for Sequence { @@ -146,11 +145,11 @@ mod tests { use vortex_array::dtype::Nullability::Nullable; use vortex_array::scalar_fn::fns::operators::Operator; - use crate::SequenceArray; + use crate::Sequence; #[test] fn test_compare_match() { - let lhs = SequenceData::try_new_typed(2i64, 1, NonNullable, 4).unwrap(); + let lhs = Sequence::try_new_typed(2i64, 1, NonNullable, 4).unwrap(); let rhs = ConstantArray::new(4i64, lhs.len()); let result = lhs .into_array() @@ -162,7 +161,7 @@ mod tests { #[test] fn test_compare_match_scale() { - let lhs = SequenceData::try_new_typed(2i64, 3, Nullable, 4).unwrap(); + let lhs = Sequence::try_new_typed(2i64, 3, Nullable, 4).unwrap(); let rhs = ConstantArray::new(8i64, lhs.len()); let result = lhs .into_array() @@ -174,7 +173,7 @@ mod tests { #[test] fn test_compare_no_match() { - let lhs = SequenceData::try_new_typed(2i64, 1, NonNullable, 4).unwrap(); + let lhs = Sequence::try_new_typed(2i64, 1, NonNullable, 4).unwrap(); let rhs = ConstantArray::new(1i64, lhs.len()); let result = lhs .into_array() diff --git a/encodings/sequence/src/compute/filter.rs b/encodings/sequence/src/compute/filter.rs index c6d82711eee..febbdf1d0c5 100644 --- a/encodings/sequence/src/compute/filter.rs +++ b/encodings/sequence/src/compute/filter.rs @@ -16,7 +16,6 @@ use vortex_mask::Mask; use crate::Sequence; use crate::SequenceArray; -use crate::SequenceData; impl FilterKernel for Sequence { fn filter( @@ -54,21 +53,22 @@ mod tests { use vortex_array::compute::conformance::filter::test_filter_conformance; use vortex_array::dtype::Nullability; + use crate::Sequence; use crate::SequenceArray; #[rstest] - #[case(SequenceData::try_new_typed(0i32, 1, Nullability::NonNullable, 5).unwrap())] - #[case(SequenceData::try_new_typed(10i32, 2, Nullability::NonNullable, 5).unwrap())] - #[case(SequenceData::try_new_typed(100i32, -3, Nullability::NonNullable, 5).unwrap())] - #[case(SequenceData::try_new_typed(0i32, 1, Nullability::NonNullable, 1).unwrap())] - #[case(SequenceData::try_new_typed(0i32, 1, Nullability::NonNullable, MEDIUM_SIZE).unwrap())] - #[case(SequenceData::try_new_typed(0i32, 1, Nullability::NonNullable, LARGE_SIZE).unwrap())] - #[case(SequenceData::try_new_typed(0i64, 1, Nullability::NonNullable, 5).unwrap())] - #[case(SequenceData::try_new_typed(1000i64, 50, Nullability::NonNullable, 5).unwrap())] - #[case(SequenceData::try_new_typed(-100i64, 10, Nullability::NonNullable, MEDIUM_SIZE).unwrap())] - #[case(SequenceData::try_new_typed(0u32, 1, Nullability::NonNullable, 5).unwrap())] - #[case(SequenceData::try_new_typed(0u32, 5, Nullability::NonNullable, MEDIUM_SIZE).unwrap())] - #[case(SequenceData::try_new_typed(0u64, 1, Nullability::NonNullable, LARGE_SIZE).unwrap())] + #[case(Sequence::try_new_typed(0i32, 1, Nullability::NonNullable, 5).unwrap())] + #[case(Sequence::try_new_typed(10i32, 2, Nullability::NonNullable, 5).unwrap())] + #[case(Sequence::try_new_typed(100i32, -3, Nullability::NonNullable, 5).unwrap())] + #[case(Sequence::try_new_typed(0i32, 1, Nullability::NonNullable, 1).unwrap())] + #[case(Sequence::try_new_typed(0i32, 1, Nullability::NonNullable, MEDIUM_SIZE).unwrap())] + #[case(Sequence::try_new_typed(0i32, 1, Nullability::NonNullable, LARGE_SIZE).unwrap())] + #[case(Sequence::try_new_typed(0i64, 1, Nullability::NonNullable, 5).unwrap())] + #[case(Sequence::try_new_typed(1000i64, 50, Nullability::NonNullable, 5).unwrap())] + #[case(Sequence::try_new_typed(-100i64, 10, Nullability::NonNullable, MEDIUM_SIZE).unwrap())] + #[case(Sequence::try_new_typed(0u32, 1, Nullability::NonNullable, 5).unwrap())] + #[case(Sequence::try_new_typed(0u32, 5, Nullability::NonNullable, MEDIUM_SIZE).unwrap())] + #[case(Sequence::try_new_typed(0u64, 1, Nullability::NonNullable, LARGE_SIZE).unwrap())] fn test_filter_sequence_conformance(#[case] array: SequenceArray) { test_filter_conformance(&array.into_array()); } diff --git a/encodings/sequence/src/compute/list_contains.rs b/encodings/sequence/src/compute/list_contains.rs index 6fa71af52ba..00c9c54331e 100644 --- a/encodings/sequence/src/compute/list_contains.rs +++ b/encodings/sequence/src/compute/list_contains.rs @@ -10,7 +10,6 @@ use vortex_array::vtable::Array; use vortex_error::VortexExpect; use vortex_error::VortexResult; -use crate::SequenceData; use crate::array::Sequence; use crate::compute::compare::find_intersection_scalar; @@ -53,6 +52,7 @@ mod tests { use std::sync::Arc; use vortex_array::DynArray; + use vortex_array::IntoArray; use vortex_array::arrays::BoolArray; use vortex_array::assert_arrays_eq; use vortex_array::dtype::Nullability; @@ -62,7 +62,7 @@ mod tests { use vortex_array::expr::root; use vortex_array::scalar::Scalar; - use crate::SequenceArray; + use crate::Sequence; #[test] fn test_list_contains_seq() { @@ -76,7 +76,9 @@ mod tests { // [1, 3] in 1 // 2 // 3 - let array = SequenceData::try_new_typed(1, 1, Nullability::NonNullable, 3).unwrap(); + let array = Sequence::try_new_typed(1, 1, Nullability::NonNullable, 3) + .unwrap() + .into_array(); let expr = list_contains(lit(list_scalar.clone()), root()); let result = array.apply(&expr).unwrap(); @@ -88,7 +90,9 @@ mod tests { // [1, 3] in 1 // 3 // 5 - let array = SequenceData::try_new_typed(1, 2, Nullability::NonNullable, 3).unwrap(); + let array = Sequence::try_new_typed(1, 2, Nullability::NonNullable, 3) + .unwrap() + .into_array(); let expr = list_contains(lit(list_scalar), root()); let result = array.apply(&expr).unwrap(); diff --git a/encodings/sequence/src/compute/mod.rs b/encodings/sequence/src/compute/mod.rs index f37080f1006..9a99ff235c4 100644 --- a/encodings/sequence/src/compute/mod.rs +++ b/encodings/sequence/src/compute/mod.rs @@ -1,7 +1,6 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors -use crate::SequenceData; mod cast; pub(crate) mod compare; mod filter; @@ -18,17 +17,18 @@ mod tests { use vortex_array::compute::conformance::consistency::test_array_consistency; use vortex_array::dtype::Nullability; + use crate::Sequence; use crate::SequenceArray; #[rstest] // Basic sequence arrays - A[i] = base + i * multiplier - #[case::sequence_i32(SequenceData::try_new_typed( + #[case::sequence_i32(Sequence::try_new_typed( 0i32, // base 1i32, // multiplier Nullability::NonNullable, 5 // length ).unwrap())] // Results in [0, 1, 2, 3, 4] - #[case::sequence_i64_step2(SequenceData::try_new_typed( + #[case::sequence_i64_step2(Sequence::try_new_typed( 10i64, // base 2i64, // multiplier Nullability::NonNullable, @@ -36,13 +36,13 @@ mod tests { ).unwrap())] // Results in [10, 12, 14, 16, 18] // Different types - #[case::sequence_u32(SequenceData::try_new_typed( + #[case::sequence_u32(Sequence::try_new_typed( 100u32, // base 10u32, // multiplier Nullability::NonNullable, 5 // length ).unwrap())] // Results in [100, 110, 120, 130, 140] - #[case::sequence_i16(SequenceData::try_new_typed( + #[case::sequence_i16(Sequence::try_new_typed( -10i16, // base 3i16, // multiplier Nullability::NonNullable, @@ -50,19 +50,19 @@ mod tests { ).unwrap())] // Results in [-10, -7, -4, -1, 2] // Edge cases - #[case::sequence_single(SequenceData::try_new_typed( + #[case::sequence_single(Sequence::try_new_typed( 42i32, 0i32, // multiplier of 0 means constant array Nullability::NonNullable, 1 ).unwrap())] - #[case::sequence_zero_multiplier(SequenceData::try_new_typed( + #[case::sequence_zero_multiplier(Sequence::try_new_typed( 100i32, 0i32, // All values will be 100 Nullability::NonNullable, 5 ).unwrap())] - #[case::sequence_negative_step(SequenceData::try_new_typed( + #[case::sequence_negative_step(Sequence::try_new_typed( 100i32, -10i32, // Decreasing sequence Nullability::NonNullable, @@ -70,13 +70,13 @@ mod tests { ).unwrap())] // Results in [100, 90, 80, 70, 60] // Large arrays - #[case::sequence_large(SequenceData::try_new_typed( + #[case::sequence_large(Sequence::try_new_typed( 0i64, 1i64, Nullability::NonNullable, 2000 ).unwrap())] // Results in [0, 1, 2, ..., 1999] - #[case::sequence_large_step(SequenceData::try_new_typed( + #[case::sequence_large_step(Sequence::try_new_typed( 1000i32, 100i32, Nullability::NonNullable, diff --git a/encodings/sequence/src/compute/slice.rs b/encodings/sequence/src/compute/slice.rs index 7ed33bd6c38..848f6b1a3d4 100644 --- a/encodings/sequence/src/compute/slice.rs +++ b/encodings/sequence/src/compute/slice.rs @@ -10,7 +10,6 @@ use vortex_array::vtable::Array; use vortex_error::VortexResult; use crate::Sequence; -use crate::SequenceArray; use crate::SequenceData; impl SliceReduce for Sequence { diff --git a/encodings/sequence/src/compute/take.rs b/encodings/sequence/src/compute/take.rs index e34d43494da..b79366f22c3 100644 --- a/encodings/sequence/src/compute/take.rs +++ b/encodings/sequence/src/compute/take.rs @@ -26,7 +26,6 @@ use vortex_mask::Mask; use crate::Sequence; use crate::SequenceArray; -use crate::SequenceData; fn take_inner( mul: S, @@ -111,52 +110,53 @@ mod test { use vortex_array::arrays::PrimitiveArray; use vortex_array::dtype::Nullability; + use crate::Sequence; use crate::SequenceArray; #[rstest] - #[case::basic_sequence(SequenceData::try_new_typed( + #[case::basic_sequence(Sequence::try_new_typed( 0i32, 1i32, Nullability::NonNullable, 10 ).unwrap())] - #[case::sequence_with_multiplier(SequenceData::try_new_typed( + #[case::sequence_with_multiplier(Sequence::try_new_typed( 10i32, 5i32, Nullability::Nullable, 20 ).unwrap())] - #[case::sequence_i64(SequenceData::try_new_typed( + #[case::sequence_i64(Sequence::try_new_typed( 100i64, 10i64, Nullability::NonNullable, 50 ).unwrap())] - #[case::sequence_u32(SequenceData::try_new_typed( + #[case::sequence_u32(Sequence::try_new_typed( 0u32, 2u32, Nullability::NonNullable, 100 ).unwrap())] - #[case::sequence_negative_step(SequenceData::try_new_typed( + #[case::sequence_negative_step(Sequence::try_new_typed( 1000i32, -10i32, Nullability::Nullable, 30 ).unwrap())] - #[case::sequence_constant(SequenceData::try_new_typed( + #[case::sequence_constant(Sequence::try_new_typed( 42i32, 0i32, // multiplier of 0 means all values are the same Nullability::Nullable, 15 ).unwrap())] - #[case::sequence_i16(SequenceData::try_new_typed( + #[case::sequence_i16(Sequence::try_new_typed( -100i16, 3i16, Nullability::NonNullable, 25 ).unwrap())] - #[case::sequence_large(SequenceData::try_new_typed( + #[case::sequence_large(Sequence::try_new_typed( 0i64, 1i64, Nullability::Nullable, @@ -170,7 +170,7 @@ mod test { #[test] #[should_panic(expected = "out of bounds")] fn test_bounds_check() { - let array = SequenceData::try_new_typed(0i32, 1i32, Nullability::NonNullable, 10).unwrap(); + let array = Sequence::try_new_typed(0i32, 1i32, Nullability::NonNullable, 10).unwrap(); let indices = PrimitiveArray::from_iter([0i32, 20]); let _array = array .take(indices.into_array()) diff --git a/encodings/sparse/src/canonical.rs b/encodings/sparse/src/canonical.rs index c63c5ef67cc..98c8ef5d133 100644 --- a/encodings/sparse/src/canonical.rs +++ b/encodings/sparse/src/canonical.rs @@ -576,7 +576,7 @@ mod test { use vortex_error::VortexResult; use vortex_mask::Mask; - use crate::SparseArray; + use crate::Sparse; #[rstest] #[case(Some(true))] @@ -585,8 +585,7 @@ mod test { fn test_sparse_bool(#[case] fill_value: Option) { let indices = buffer![0u64, 1, 7].into_array(); let values = BoolArray::from_iter([Some(true), None, Some(false)]).into_array(); - let sparse_bools = - SparseData::try_new(indices, values, 10, Scalar::from(fill_value)).unwrap(); + let sparse_bools = Sparse::try_new(indices, values, 10, Scalar::from(fill_value)).unwrap(); let actual = sparse_bools.to_bool(); let expected = BoolArray::from_iter([ @@ -612,8 +611,7 @@ mod test { fn test_sparse_primitive(#[case] fill_value: Option) { let indices = buffer![0u64, 1, 7].into_array(); let values = PrimitiveArray::from_option_iter([Some(0i32), None, Some(1)]).into_array(); - let sparse_ints = - SparseData::try_new(indices, values, 10, Scalar::from(fill_value)).unwrap(); + let sparse_ints = Sparse::try_new(indices, values, 10, Scalar::from(fill_value)).unwrap(); assert_eq!(*sparse_ints.dtype(), DType::Primitive(PType::I32, Nullable)); let flat_ints = sparse_ints.to_primitive(); @@ -664,7 +662,7 @@ mod test { vec![Scalar::from(Some(-10i32)), Scalar::from(Some(-1i32))], ); let len = 10; - let sparse_struct = SparseData::try_new(indices, patch_values, len, fill_scalar).unwrap(); + let sparse_struct = Sparse::try_new(indices, patch_values, len, fill_scalar).unwrap(); let expected_a = PrimitiveArray::from_option_iter((0..len).map(|i| { if i == 0 { @@ -731,7 +729,7 @@ mod test { let fill_scalar = Scalar::null(struct_dtype); let len = 10; - let sparse_struct = SparseData::try_new(indices, patch_values, len, fill_scalar).unwrap(); + let sparse_struct = Sparse::try_new(indices, patch_values, len, fill_scalar).unwrap(); let expected_a = PrimitiveArray::from_option_iter((0..len).map(|i| { if i == 0 { @@ -782,7 +780,7 @@ mod test { .into_array(); let len = 10; let fill_scalar = Scalar::decimal(DecimalValue::I32(123), decimal_dtype, Nullable); - let sparse_struct = SparseData::try_new(indices, patch_values, len, fill_scalar).unwrap(); + let sparse_struct = Sparse::try_new(indices, patch_values, len, fill_scalar).unwrap(); let expected = DecimalArray::new( buffer![100i128, 200, 123, 123, 123, 123, 123, 300, 4000, 123], @@ -817,7 +815,7 @@ mod test { ]) .into_array(); - let array = SparseData::try_new( + let array = Sparse::try_new( buffer![0u16, 3, 4, 5, 7, 9, 10].into_array(), strings, 12, @@ -858,7 +856,7 @@ mod test { ]) .into_array(); - let array = SparseData::try_new( + let array = Sparse::try_new( buffer![0u16, 3, 4, 5, 7, 9, 10].into_array(), strings, 12, @@ -892,7 +890,7 @@ mod test { VarBinViewArray::from_iter_str(["hello", "goodbye", "hello", "bonjour", "你好"]) .into_array(); - let array = SparseData::try_new( + let array = Sparse::try_new( buffer![0u16, 3, 4, 5, 8].into_array(), strings, 9, @@ -922,7 +920,7 @@ mod test { ]) .into_array(); - let array = SparseData::try_new( + let array = Sparse::try_new( buffer![0u16, 3, 4, 5, 7, 9, 10].into_array(), strings, 12, @@ -963,7 +961,7 @@ mod test { ]) .into_array(); - let array = SparseData::try_new( + let array = Sparse::try_new( buffer![0u16, 3, 4, 5, 7, 9, 10].into_array(), binaries, 12, @@ -1010,7 +1008,7 @@ mod test { let indices = buffer![0u8, 3u8, 4u8, 5u8].into_array(); let fill_value = Scalar::null(lists.dtype().clone()); - let sparse = SparseData::try_new(indices, lists, 6, fill_value) + let sparse = Sparse::try_new(indices, lists, 6, fill_value) .unwrap() .into_array(); @@ -1064,7 +1062,7 @@ mod test { let indices = buffer![0u8, 3u8, 4u8, 5u8].into_array(); let fill_value = Scalar::null(lists.dtype().clone()); - let sparse = SparseData::try_new(indices, lists, 6, fill_value) + let sparse = Sparse::try_new(indices, lists, 6, fill_value) .unwrap() .into_array(); @@ -1107,7 +1105,7 @@ mod test { let indices = buffer![0u8, 3u8, 4u8, 5u8].into_array(); let fill_value = Scalar::from(Some(vec![5i32, 6, 7, 8])); - let sparse = SparseData::try_new(indices, lists, 6, fill_value) + let sparse = Sparse::try_new(indices, lists, 6, fill_value) .unwrap() .into_array(); @@ -1176,7 +1174,7 @@ mod test { ]) .into_array(); - let array = SparseData::try_new( + let array = Sparse::try_new( buffer![0u16, 3, 4, 5, 7, 9, 10].into_array(), strings, 12, @@ -1218,7 +1216,7 @@ mod test { 3, Nullable, )); - let sparse = SparseData::try_new(indices, fsl, 5, fill_value) + let sparse = Sparse::try_new(indices, fsl, 5, fill_value) .unwrap() .into_array(); @@ -1256,7 +1254,7 @@ mod test { ], NonNullable, ); - let sparse = SparseData::try_new(indices, fsl, 6, fill_value) + let sparse = Sparse::try_new(indices, fsl, 6, fill_value) .unwrap() .into_array(); @@ -1294,7 +1292,7 @@ mod test { ], Nullable, ); - let sparse = SparseData::try_new(indices, fsl, 6, fill_value) + let sparse = Sparse::try_new(indices, fsl, 6, fill_value) .unwrap() .into_array(); @@ -1342,7 +1340,7 @@ mod test { NonNullable, ); - let sparse = SparseData::try_new(indices, fsl, 100, fill_value) + let sparse = Sparse::try_new(indices, fsl, 100, fill_value) .unwrap() .into_array(); @@ -1399,7 +1397,7 @@ mod test { ], NonNullable, ); - let sparse = SparseData::try_new(indices, fsl, 1, fill_value) + let sparse = Sparse::try_new(indices, fsl, 1, fill_value) .unwrap() .into_array(); @@ -1425,7 +1423,7 @@ mod test { let indices = buffer![0u8, 1u8, 2u8, 3u8].into_array(); let fill_value = Scalar::from(Some(vec![42i32; 252])); // 252 + 4 elements = 256 > u8::MAX - let sparse = SparseData::try_new(indices, lists, 5, fill_value) + let sparse = Sparse::try_new(indices, lists, 5, fill_value) .unwrap() .into_array(); @@ -1487,7 +1485,7 @@ mod test { // - Index 7: List 2 [30, 31, 32, 33] // - Index 8-9: null let indices = buffer![1u8, 4, 7].into_array(); - let sparse = SparseData::try_new( + let sparse = Sparse::try_new( indices, list_view.into_array(), 10, @@ -1573,7 +1571,7 @@ mod test { // Extract only the values we need from the sliced array let values = sliced.slice(0..2).unwrap(); let sparse = - SparseData::try_new(indices, values, 5, Scalar::null(sliced.dtype().clone())).unwrap(); + Sparse::try_new(indices, values, 5, Scalar::null(sliced.dtype().clone())).unwrap(); let canonical = sparse.to_canonical()?.into_array(); let result_listview = canonical.to_listview(); diff --git a/encodings/sparse/src/compute/cast.rs b/encodings/sparse/src/compute/cast.rs index 565a721ab7d..dd4be0511c8 100644 --- a/encodings/sparse/src/compute/cast.rs +++ b/encodings/sparse/src/compute/cast.rs @@ -48,11 +48,12 @@ mod tests { use vortex_array::scalar::Scalar; use vortex_buffer::buffer; + use crate::Sparse; use crate::SparseArray; #[test] fn test_cast_sparse_i32_to_i64() { - let sparse = SparseData::try_new( + let sparse = Sparse::try_new( buffer![2u64, 5, 8].into_array(), buffer![100i32, 200, 300].into_array(), 10, @@ -75,7 +76,7 @@ mod tests { #[test] fn test_cast_sparse_with_null_fill() { - let sparse = SparseData::try_new( + let sparse = Sparse::try_new( buffer![1u64, 3, 5].into_array(), PrimitiveArray::from_option_iter([Some(42i32), Some(84), Some(126)]).into_array(), 8, @@ -94,25 +95,25 @@ mod tests { } #[rstest] - #[case(SparseData::try_new( + #[case(Sparse::try_new( buffer![2u64, 5, 8].into_array(), buffer![100i32, 200, 300].into_array(), 10, Scalar::from(0i32) ).unwrap())] - #[case(SparseData::try_new( + #[case(Sparse::try_new( buffer![0u64, 4, 9].into_array(), buffer![1.5f32, 2.5, 3.5].into_array(), 10, Scalar::from(0.0f32) ).unwrap())] - #[case(SparseData::try_new( + #[case(Sparse::try_new( buffer![1u64, 3, 7].into_array(), PrimitiveArray::from_option_iter([Some(100i32), None, Some(300)]).into_array(), 10, Scalar::null_native::() ).unwrap())] - #[case(SparseData::try_new( + #[case(Sparse::try_new( buffer![5u64].into_array(), buffer![42u8].into_array(), 10, @@ -129,7 +130,7 @@ mod tests { // When all positions are patched the null fill is unused, so a cast to // non-nullable is valid. Sparse::cast detects this case, substitutes a // zero fill, and keeps the result in the Sparse encoding. - let sparse = SparseData::try_new( + let sparse = Sparse::try_new( buffer![0u64, 1, 2, 3, 4].into_array(), buffer![10u64, 20, 30, 40, 50].into_array(), 5, @@ -155,7 +156,7 @@ mod tests { // Regression test for https://github.com/vortex-data/vortex/issues/6932 // fill_null on a sparse array with null fill triggers an internal cast to // non-nullable, which must not panic. - let sparse = SparseData::try_new( + let sparse = Sparse::try_new( buffer![1u64, 3].into_array(), buffer![10u64, 20].into_array(), 5, diff --git a/encodings/sparse/src/compute/filter.rs b/encodings/sparse/src/compute/filter.rs index b9aaf0d459e..0e032d65461 100644 --- a/encodings/sparse/src/compute/filter.rs +++ b/encodings/sparse/src/compute/filter.rs @@ -52,11 +52,11 @@ mod tests { use vortex_buffer::buffer; use vortex_mask::Mask; - use crate::SparseArray; + use crate::Sparse; #[fixture] fn array() -> ArrayRef { - SparseData::try_new( + Sparse::try_new( buffer![2u64, 9, 15].into_array(), PrimitiveArray::new(buffer![33_i32, 44, 55], Validity::AllValid).into_array(), 20, @@ -76,7 +76,7 @@ mod tests { // Construct expected SparseArray: index 2 was kept, which had value 33. // The new index is 0 (since it's the only element). - let expected = SparseData::try_new( + let expected = Sparse::try_new( buffer![0u64].into_array(), PrimitiveArray::new(buffer![33_i32], Validity::AllValid).into_array(), 1, @@ -90,7 +90,7 @@ mod tests { #[test] fn true_fill_value() { let mask = Mask::from_iter([false, true, false, true, false, true, true]); - let array = SparseData::try_new( + let array = Sparse::try_new( buffer![0_u64, 3, 6].into_array(), PrimitiveArray::new(buffer![33_i32, 44, 55], Validity::AllValid).into_array(), 7, @@ -105,7 +105,7 @@ mod tests { // Mask keeps indices 1, 3, 5, 6 -> new indices 0, 1, 2, 3. // Index 3 (value 44) maps to new index 1. // Index 6 (value 55) maps to new index 3. - let expected = SparseData::try_new( + let expected = Sparse::try_new( buffer![1u64, 3].into_array(), PrimitiveArray::new(buffer![44_i32, 55], Validity::AllValid).into_array(), 4, @@ -120,7 +120,7 @@ mod tests { fn test_filter_sparse_array() { let null_fill_value = Scalar::null(DType::Primitive(PType::I32, Nullability::Nullable)); test_filter_conformance( - &SparseData::try_new( + &Sparse::try_new( buffer![1u64, 2, 4].into_array(), buffer![100i32, 200, 300] .into_array() @@ -135,7 +135,7 @@ mod tests { let ten_fill_value = Scalar::from(10i32); test_filter_conformance( - &SparseData::try_new( + &Sparse::try_new( buffer![1u64, 2, 4].into_array(), buffer![100i32, 200, 300].into_array(), 5, diff --git a/encodings/sparse/src/compute/mod.rs b/encodings/sparse/src/compute/mod.rs index 735a013301c..a303a06b58a 100644 --- a/encodings/sparse/src/compute/mod.rs +++ b/encodings/sparse/src/compute/mod.rs @@ -1,7 +1,6 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors -use crate::SparseData; mod cast; mod filter; mod take; @@ -25,11 +24,11 @@ mod test { use vortex_buffer::buffer; use vortex_mask::Mask; - use crate::SparseArray; + use crate::Sparse; #[fixture] fn array() -> ArrayRef { - SparseData::try_new( + Sparse::try_new( buffer![2u64, 9, 15].into_array(), PrimitiveArray::new(buffer![33_i32, 44, 55], Validity::AllValid).into_array(), 20, @@ -49,7 +48,7 @@ mod test { // Construct expected SparseArray: index 2 was kept, which had value 33. // The new index is 0 (since it's the only element). - let expected = SparseData::try_new( + let expected = Sparse::try_new( buffer![0u64].into_array(), PrimitiveArray::new(buffer![33_i32], Validity::AllValid).into_array(), 1, @@ -63,7 +62,7 @@ mod test { #[test] fn true_fill_value() { let mask = Mask::from_iter([false, true, false, true, false, true, true]); - let array = SparseData::try_new( + let array = Sparse::try_new( buffer![0_u64, 3, 6].into_array(), PrimitiveArray::new(buffer![33_i32, 44, 55], Validity::AllValid).into_array(), 7, @@ -78,7 +77,7 @@ mod test { // Mask keeps indices 1, 3, 5, 6 -> new indices 0, 1, 2, 3. // Index 3 (value 44) maps to new index 1. // Index 6 (value 55) maps to new index 3. - let expected = SparseData::try_new( + let expected = Sparse::try_new( buffer![1u64, 3].into_array(), PrimitiveArray::new(buffer![44_i32, 55], Validity::AllValid).into_array(), 4, @@ -98,7 +97,7 @@ mod test { fn test_mask_sparse_array() { let null_fill_value = Scalar::null(DType::Primitive(PType::I32, Nullability::Nullable)); test_mask_conformance( - &SparseData::try_new( + &Sparse::try_new( buffer![1u64, 2, 4].into_array(), buffer![100i32, 200, 300] .into_array() @@ -113,7 +112,7 @@ mod test { let ten_fill_value = Scalar::from(10i32); test_mask_conformance( - &SparseData::try_new( + &Sparse::try_new( buffer![1u64, 2, 4].into_array(), buffer![100i32, 200, 300].into_array(), 5, @@ -139,50 +138,51 @@ mod tests { use vortex_array::scalar::Scalar; use vortex_buffer::buffer; + use crate::Sparse; use crate::SparseArray; #[rstest] // Basic sparse arrays - #[case::sparse_i32_null_fill(SparseData::try_new( + #[case::sparse_i32_null_fill(Sparse::try_new( buffer![2u64, 5, 8].into_array(), PrimitiveArray::from_option_iter([Some(100i32), Some(200), Some(300)]).into_array(), 10, Scalar::null_native::() ).unwrap())] - #[case::sparse_i32_value_fill(SparseData::try_new( + #[case::sparse_i32_value_fill(Sparse::try_new( buffer![1u64, 3, 7].into_array(), buffer![42i32, 84, 126].into_array(), 10, Scalar::from(0i32) ).unwrap())] // Different types - #[case::sparse_u64(SparseData::try_new( + #[case::sparse_u64(Sparse::try_new( buffer![0u64, 4, 9].into_array(), buffer![1000u64, 2000, 3000].into_array(), 10, Scalar::from(999u64) ).unwrap())] - #[case::sparse_f32(SparseData::try_new( + #[case::sparse_f32(Sparse::try_new( buffer![2u64, 6].into_array(), buffer![std::f32::consts::PI, std::f32::consts::E].into_array(), 8, Scalar::from(0.0f32) ).unwrap())] // Edge cases - #[case::sparse_single_patch(SparseData::try_new( + #[case::sparse_single_patch(Sparse::try_new( buffer![5u64].into_array(), buffer![42i32].into_array(), 10, Scalar::from(-1i32) ).unwrap())] - #[case::sparse_dense_patches(SparseData::try_new( + #[case::sparse_dense_patches(Sparse::try_new( buffer![0u64, 1, 2, 3, 4].into_array(), PrimitiveArray::from_option_iter([Some(10i32), Some(20), Some(30), Some(40), Some(50)]).into_array(), 5, Scalar::null_native::() ).unwrap())] // Large sparse arrays - #[case::sparse_large(SparseData::try_new( + #[case::sparse_large(Sparse::try_new( buffer![100u64, 500, 900, 1500, 1999].into_array(), buffer![111i32, 222, 333, 444, 555].into_array(), 2000, @@ -191,7 +191,7 @@ mod tests { // Nullable patches #[case::sparse_nullable_patches({ let null_fill_value = Scalar::null(DType::Primitive(PType::I32, Nullability::Nullable)); - SparseData::try_new( + Sparse::try_new( buffer![1u64, 4, 7].into_array(), PrimitiveArray::from_option_iter([Some(100i32), None, Some(300)]) .into_array() @@ -207,37 +207,37 @@ mod tests { } #[rstest] - #[case::sparse_i32_basic(SparseData::try_new( + #[case::sparse_i32_basic(Sparse::try_new( buffer![2u64, 5, 8].into_array(), buffer![100i32, 200, 300].into_array(), 10, Scalar::from(0i32) ).unwrap())] - #[case::sparse_u32_basic(SparseData::try_new( + #[case::sparse_u32_basic(Sparse::try_new( buffer![1u64, 3, 7].into_array(), buffer![1000u32, 2000, 3000].into_array(), 10, Scalar::from(100u32) ).unwrap())] - #[case::sparse_i64_basic(SparseData::try_new( + #[case::sparse_i64_basic(Sparse::try_new( buffer![0u64, 4, 9].into_array(), buffer![5000i64, 6000, 7000].into_array(), 10, Scalar::from(1000i64) ).unwrap())] - #[case::sparse_f32_basic(SparseData::try_new( + #[case::sparse_f32_basic(Sparse::try_new( buffer![2u64, 6].into_array(), buffer![1.5f32, 2.5].into_array(), 8, Scalar::from(0.5f32) ).unwrap())] - #[case::sparse_f64_basic(SparseData::try_new( + #[case::sparse_f64_basic(Sparse::try_new( buffer![1u64, 5, 9].into_array(), buffer![10.1f64, 20.2, 30.3].into_array(), 10, Scalar::from(5.0f64) ).unwrap())] - #[case::sparse_i32_large(SparseData::try_new( + #[case::sparse_i32_large(Sparse::try_new( buffer![10u64, 50, 90, 150, 199].into_array(), buffer![111i32, 222, 333, 444, 555].into_array(), 200, diff --git a/encodings/sparse/src/compute/take.rs b/encodings/sparse/src/compute/take.rs index 3e87f86e85f..8dd7a969880 100644 --- a/encodings/sparse/src/compute/take.rs +++ b/encodings/sparse/src/compute/take.rs @@ -68,6 +68,7 @@ mod test { use vortex_array::validity::Validity; use vortex_buffer::buffer; + use crate::Sparse; use crate::SparseArray; fn test_array_fill_value() -> Scalar { @@ -76,7 +77,7 @@ mod test { } fn sparse_array() -> ArrayRef { - SparseData::try_new( + Sparse::try_new( buffer![0u64, 37, 47, 99].into_array(), PrimitiveArray::new(buffer![1.23f64, 0.47, 9.99, 3.5], Validity::AllValid).into_array(), 100, @@ -129,7 +130,7 @@ mod test { #[test] fn nullable_take() { - let arr = SparseData::try_new( + let arr = Sparse::try_new( buffer![1u32].into_array(), buffer![10].into_array(), 10, @@ -150,7 +151,7 @@ mod test { #[test] fn nullable_take_with_many_patches() { - let arr = SparseData::try_new( + let arr = Sparse::try_new( buffer![1u32, 3, 7, 8, 9].into_array(), buffer![10, 8, 3, 2, 1].into_array(), 10, @@ -170,13 +171,13 @@ mod test { } #[rstest] - #[case(SparseData::try_new( + #[case(Sparse::try_new( buffer![0u64, 37, 47, 99].into_array(), PrimitiveArray::new(buffer![1.23f64, 0.47, 9.99, 3.5], Validity::AllValid).into_array(), 100, Scalar::null_native::(), ).unwrap())] - #[case(SparseData::try_new( + #[case(Sparse::try_new( buffer![1u32, 3, 7, 8, 9].into_array(), buffer![10, 8, 3, 2, 1].into_array(), 10, @@ -184,14 +185,14 @@ mod test { ).unwrap())] #[case({ let nullable_values = PrimitiveArray::from_option_iter([Some(100i64), None, Some(300)]); - SparseData::try_new( + Sparse::try_new( buffer![2u64, 4, 6].into_array(), nullable_values.into_array(), 10, Scalar::null_native::(), ).unwrap() })] - #[case(SparseData::try_new( + #[case(Sparse::try_new( buffer![5u64].into_array(), buffer![999i32].into_array(), 20, diff --git a/encodings/sparse/src/lib.rs b/encodings/sparse/src/lib.rs index 507193e4676..a732a810ed5 100644 --- a/encodings/sparse/src/lib.rs +++ b/encodings/sparse/src/lib.rs @@ -546,6 +546,7 @@ mod test { use vortex_error::VortexExpect; use super::*; + use crate::Sparse; fn nullable_fill() -> Scalar { Scalar::null(DType::Primitive(PType::I32, Nullability::Nullable)) @@ -560,7 +561,7 @@ mod test { let mut values = buffer![100i32, 200, 300].into_array(); values = values.cast(fill_value.dtype().clone()).unwrap(); - SparseData::try_new(buffer![2u64, 5, 8].into_array(), values, 10, fill_value) + Sparse::try_new(buffer![2u64, 5, 8].into_array(), values, 10, fill_value) .unwrap() .into_array() } @@ -583,7 +584,7 @@ mod test { #[test] pub fn test_scalar_at_again() { - let arr = SparseData::try_new( + let arr = Sparse::try_new( ConstantArray::new(10u32, 1).into_array(), ConstantArray::new(Scalar::primitive(1234u32, Nullability::Nullable), 1).into_array(), 100, @@ -619,7 +620,7 @@ mod test { #[test] pub fn validity_mask_sliced_nonnull_fill() { - let sliced = SparseData::try_new( + let sliced = Sparse::try_new( buffer![2u64, 5, 8].into_array(), ConstantArray::new( Scalar::null(DType::Primitive(PType::F32, Nullability::Nullable)), @@ -682,7 +683,7 @@ mod test { let values = buffer![15_u32, 135, 13531, 42].into_array(); let indices = buffer![10_u64, 11, 50, 100].into_array(); - SparseData::try_new(indices, values, 100, 0_u32.into()).unwrap(); + Sparse::try_new(indices, values, 100, 0_u32.into()).unwrap(); } #[test] @@ -690,7 +691,7 @@ mod test { let values = buffer![15_u32, 135, 13531, 42].into_array(); let indices = buffer![10_u64, 11, 50, 100].into_array(); - SparseData::try_new(indices, values, 101, 0_u32.into()).unwrap(); + Sparse::try_new(indices, values, 101, 0_u32.into()).unwrap(); } #[test] @@ -701,8 +702,8 @@ mod test { true, true, false, true, false, true, false, true, true, false, true, false, ]), ); - let sparse = SparseData::encode(&original.clone().into_array(), None) - .vortex_expect("SparseData::encode should succeed for test data"); + let sparse = Sparse::encode(&original.clone().into_array(), None) + .vortex_expect("Sparse::encode should succeed for test data"); assert_eq!( sparse.validity_mask().unwrap(), Mask::from_iter(vec![ @@ -717,7 +718,7 @@ mod test { let indices = buffer![0u8, 2, 4, 6, 8].into_array(); let values = PrimitiveArray::from_option_iter([Some(0i16), Some(1), None, None, Some(4)]) .into_array(); - let array = SparseData::try_new(indices, values, 10, Scalar::null_native::()).unwrap(); + let array = Sparse::try_new(indices, values, 10, Scalar::null_native::()).unwrap(); let actual = array.validity_mask().unwrap(); let expected = Mask::from_iter([ true, false, true, false, false, false, false, false, true, false, diff --git a/encodings/sparse/src/ops.rs b/encodings/sparse/src/ops.rs index fe309cc6dff..01f6ec702b1 100644 --- a/encodings/sparse/src/ops.rs +++ b/encodings/sparse/src/ops.rs @@ -8,7 +8,6 @@ use vortex_array::vtable::OperationsVTable; use vortex_error::VortexResult; use crate::Sparse; -use crate::SparseData; impl OperationsVTable for Sparse { fn scalar_at( @@ -32,13 +31,14 @@ mod tests { use vortex_buffer::buffer; use super::*; + use crate::Sparse; #[test] fn slice_partially_invalid() { let values = buffer![0u64].into_array(); let indices = buffer![0u8].into_array(); - let sparse = SparseData::try_new(indices, values, 1000, 999u64.into()).unwrap(); + let sparse = Sparse::try_new(indices, values, 1000, 999u64.into()).unwrap(); let sliced = sparse.slice(0..1000).unwrap(); let mut expected = vec![999u64; 1000]; expected[0] = 0; diff --git a/encodings/zigzag/src/array.rs b/encodings/zigzag/src/array.rs index 7ebdd045442..6804ec16230 100644 --- a/encodings/zigzag/src/array.rs +++ b/encodings/zigzag/src/array.rs @@ -284,6 +284,7 @@ mod test { use vortex_buffer::buffer; use super::*; + use crate::ZigZagArray; use crate::zigzag_encode; #[test] @@ -291,7 +292,7 @@ mod test { let array = buffer![1i32, -5i32, 2, 3, 4, 5, 6, 7, 8, 9, 10] .into_array() .to_primitive(); - let zigzag = zigzag_encode(array.clone())?; + let zigzag = ZigZagArray::from_inner(zigzag_encode(array.clone())?); assert_eq!( zigzag.statistics().compute_max::(), diff --git a/encodings/zigzag/src/compress.rs b/encodings/zigzag/src/compress.rs index fc32b0184b9..09dde567f1b 100644 --- a/encodings/zigzag/src/compress.rs +++ b/encodings/zigzag/src/compress.rs @@ -13,7 +13,6 @@ use vortex_error::vortex_bail; use vortex_error::vortex_panic; use zigzag::ZigZag as ExternalZigZag; -use crate::ZigZagArray; use crate::ZigZagData; pub fn zigzag_encode(parray: PrimitiveArray) -> VortexResult { let validity = parray.validity().clone(); @@ -72,6 +71,7 @@ where #[cfg(test)] mod test { + use vortex_array::IntoArray; use vortex_array::ToCanonical; use vortex_array::assert_arrays_eq; @@ -80,7 +80,9 @@ mod test { #[test] fn test_compress_i8() { - let compressed = zigzag_encode(PrimitiveArray::from_iter(-100_i8..100)).unwrap(); + let compressed = zigzag_encode(PrimitiveArray::from_iter(-100_i8..100)) + .unwrap() + .into_array(); assert!(compressed.is::()); assert_arrays_eq!( compressed.to_primitive(), @@ -89,7 +91,9 @@ mod test { } #[test] fn test_compress_i16() { - let compressed = zigzag_encode(PrimitiveArray::from_iter(-100_i16..100)).unwrap(); + let compressed = zigzag_encode(PrimitiveArray::from_iter(-100_i16..100)) + .unwrap() + .into_array(); assert!(compressed.is::()); assert_arrays_eq!( compressed.to_primitive(), @@ -98,7 +102,9 @@ mod test { } #[test] fn test_compress_i32() { - let compressed = zigzag_encode(PrimitiveArray::from_iter(-100_i32..100)).unwrap(); + let compressed = zigzag_encode(PrimitiveArray::from_iter(-100_i32..100)) + .unwrap() + .into_array(); assert!(compressed.is::()); assert_arrays_eq!( compressed.to_primitive(), @@ -107,7 +113,9 @@ mod test { } #[test] fn test_compress_i64() { - let compressed = zigzag_encode(PrimitiveArray::from_iter(-100_i64..100)).unwrap(); + let compressed = zigzag_encode(PrimitiveArray::from_iter(-100_i64..100)) + .unwrap() + .into_array(); assert!(compressed.is::()); assert_arrays_eq!( compressed.to_primitive(), diff --git a/encodings/zigzag/src/compute/cast.rs b/encodings/zigzag/src/compute/cast.rs index bec3cc12ca5..22c791a2f02 100644 --- a/encodings/zigzag/src/compute/cast.rs +++ b/encodings/zigzag/src/compute/cast.rs @@ -123,10 +123,10 @@ mod tests { } #[rstest] - #[case(zigzag_encode(PrimitiveArray::from_iter([-100i32, -50, -1, 0, 1, 50, 100])).unwrap())] - #[case(zigzag_encode(PrimitiveArray::from_iter([-1000i64, -1, 0, 1, 1000])).unwrap())] - #[case(zigzag_encode(PrimitiveArray::from_option_iter([Some(-5i16), None, Some(0), Some(5), None])).unwrap())] - #[case(zigzag_encode(PrimitiveArray::from_iter([i32::MIN, -1, 0, 1, i32::MAX])).unwrap())] + #[case(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_iter([-100i32, -50, -1, 0, 1, 50, 100])).unwrap()))] + #[case(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_iter([-1000i64, -1, 0, 1, 1000])).unwrap()))] + #[case(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_option_iter([Some(-5i16), None, Some(0), Some(5), None])).unwrap()))] + #[case(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_iter([i32::MIN, -1, 0, 1, i32::MAX])).unwrap()))] fn test_cast_zigzag_conformance(#[case] array: ZigZagArray) { test_cast_conformance(&array.into_array()); } diff --git a/encodings/zigzag/src/compute/mod.rs b/encodings/zigzag/src/compute/mod.rs index f10e4fb5a13..c9b9ea030c4 100644 --- a/encodings/zigzag/src/compute/mod.rs +++ b/encodings/zigzag/src/compute/mod.rs @@ -92,10 +92,10 @@ mod tests { #[test] pub fn nullable_scalar_at() -> VortexResult<()> { - let zigzag = zigzag_encode(PrimitiveArray::new( + let zigzag = ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::new( buffer![-189, -160, 1], Validity::AllValid, - ))?; + ))?); assert_eq!( zigzag.scalar_at(1)?, Scalar::primitive(-160, Nullability::Nullable) @@ -105,24 +105,25 @@ mod tests { #[test] fn take_zigzag() -> VortexResult<()> { - let zigzag = zigzag_encode(PrimitiveArray::new( + let zigzag = ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::new( buffer![-189, -160, 1], Validity::AllValid, - ))?; + ))?); let indices = buffer![0, 2].into_array(); let actual = zigzag.take(indices.to_array()).unwrap(); - let expected = zigzag_encode(PrimitiveArray::new(buffer![-189, 1], Validity::AllValid))?; + let expected = + zigzag_encode(PrimitiveArray::new(buffer![-189, 1], Validity::AllValid))?.into_array(); assert_arrays_eq!(actual, expected); Ok(()) } #[test] fn filter_zigzag() -> VortexResult<()> { - let zigzag = zigzag_encode(PrimitiveArray::new( + let zigzag = ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::new( buffer![-189, -160, 1], Validity::AllValid, - ))?; + ))?); let filter_mask = BitBuffer::from(vec![true, false, true]).into(); let actual = zigzag.filter(filter_mask).unwrap(); @@ -194,41 +195,29 @@ mod tests { #[rstest] // Basic ZigZag arrays - #[case::zigzag_i8(zigzag_encode(PrimitiveArray::from_iter([-128i8, -1, 0, 1, 127])).unwrap())] - #[case::zigzag_i16(zigzag_encode(PrimitiveArray::from_iter([-1000i16, -100, 0, 100, 1000])).unwrap() - )] - #[case::zigzag_i32(zigzag_encode(PrimitiveArray::from_iter([-100000i32, -1000, 0, 1000, 100000])).unwrap() - )] - #[case::zigzag_i64(zigzag_encode(PrimitiveArray::from_iter([-1000000i64, -10000, 0, 10000, 1000000])).unwrap() - )] + #[case::zigzag_i8(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_iter([-128i8, -1, 0, 1, 127])).unwrap()))] + #[case::zigzag_i16(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_iter([-1000i16, -100, 0, 100, 1000])).unwrap()))] + #[case::zigzag_i32(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_iter([-100000i32, -1000, 0, 1000, 100000])).unwrap()))] + #[case::zigzag_i64(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_iter([-1000000i64, -10000, 0, 10000, 1000000])).unwrap()))] // Nullable arrays - #[case::zigzag_nullable_i32(zigzag_encode(PrimitiveArray::from_option_iter([Some(-100i32), None, Some(0), Some(100), None])).unwrap() - )] - #[case::zigzag_nullable_i64(zigzag_encode(PrimitiveArray::from_option_iter([Some(-1000i64), None, Some(0), Some(1000), None])).unwrap() - )] + #[case::zigzag_nullable_i32(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_option_iter([Some(-100i32), None, Some(0), Some(100), None])).unwrap()))] + #[case::zigzag_nullable_i64(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_option_iter([Some(-1000i64), None, Some(0), Some(1000), None])).unwrap()))] // Edge cases - #[case::zigzag_single(zigzag_encode(PrimitiveArray::from_iter([-42i32])).unwrap())] - #[case::zigzag_alternating(zigzag_encode(PrimitiveArray::from_iter([-1i32, 1, -2, 2, -3, 3])).unwrap() - )] + #[case::zigzag_single(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_iter([-42i32])).unwrap()))] + #[case::zigzag_alternating(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_iter([-1i32, 1, -2, 2, -3, 3])).unwrap()))] // Large arrays - #[case::zigzag_large_i32(zigzag_encode(PrimitiveArray::from_iter(-500..500)).unwrap())] - #[case::zigzag_large_i64(zigzag_encode(PrimitiveArray::from_iter((-1000..1000).map(|i| i as i64 * 100))).unwrap() - )] + #[case::zigzag_large_i32(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_iter(-500..500)).unwrap()))] + #[case::zigzag_large_i64(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_iter((-1000..1000).map(|i| i as i64 * 100))).unwrap()))] fn test_zigzag_consistency(#[case] array: ZigZagArray) { test_array_consistency(&array.into_array()); } #[rstest] - #[case::zigzag_i8_basic(zigzag_encode(PrimitiveArray::from_iter([-10i8, -5, 0, 5, 10])).unwrap() - )] - #[case::zigzag_i16_basic(zigzag_encode(PrimitiveArray::from_iter([-100i16, -50, 0, 50, 100])).unwrap() - )] - #[case::zigzag_i32_basic(zigzag_encode(PrimitiveArray::from_iter([-1000i32, -500, 0, 500, 1000])).unwrap() - )] - #[case::zigzag_i64_basic(zigzag_encode(PrimitiveArray::from_iter([-10000i64, -5000, 0, 5000, 10000])).unwrap() - )] - #[case::zigzag_i32_large(zigzag_encode(PrimitiveArray::from_iter((-50..50).map(|i| i * 10))).unwrap() - )] + #[case::zigzag_i8_basic(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_iter([-10i8, -5, 0, 5, 10])).unwrap()))] + #[case::zigzag_i16_basic(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_iter([-100i16, -50, 0, 50, 100])).unwrap()))] + #[case::zigzag_i32_basic(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_iter([-1000i32, -500, 0, 500, 1000])).unwrap()))] + #[case::zigzag_i64_basic(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_iter([-10000i64, -5000, 0, 5000, 10000])).unwrap()))] + #[case::zigzag_i32_large(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_iter((-50..50).map(|i| i * 10))).unwrap()))] fn test_zigzag_binary_numeric(#[case] array: ZigZagArray) { test_binary_numeric_array(array.into_array()); } diff --git a/encodings/zigzag/src/slice.rs b/encodings/zigzag/src/slice.rs index fe5433c7829..f2767d3b9d9 100644 --- a/encodings/zigzag/src/slice.rs +++ b/encodings/zigzag/src/slice.rs @@ -10,7 +10,6 @@ use vortex_array::vtable::Array; use vortex_error::VortexResult; use crate::ZigZag; -use crate::ZigZagArray; use crate::ZigZagData; impl SliceReduce for ZigZag { diff --git a/encodings/zstd/benches/listview_rebuild.rs b/encodings/zstd/benches/listview_rebuild.rs index 68147912f17..0e91342c8ac 100644 --- a/encodings/zstd/benches/listview_rebuild.rs +++ b/encodings/zstd/benches/listview_rebuild.rs @@ -10,13 +10,13 @@ use vortex_array::arrays::VarBinViewArray; use vortex_array::arrays::listview::ListViewRebuildMode; use vortex_array::validity::Validity; use vortex_buffer::Buffer; -use vortex_zstd::ZstdArray; +use vortex_zstd::ZstdData; #[divan::bench(sample_size = 1000)] fn rebuild_naive(bencher: Bencher) { let dudes = VarBinViewArray::from_iter_str(["Washington", "Adams", "Jefferson", "Madison"]) .into_array(); - let dudes = ZstdArray::from_array(dudes, 9, 1024).unwrap().into_array(); + let dudes = ZstdData::from_array(dudes, 9, 1024).unwrap().into_array(); let offsets = std::iter::repeat_n(0u32, 1024) .collect::>() diff --git a/encodings/zstd/src/array.rs b/encodings/zstd/src/array.rs index 81d1ebc8f9d..c6aa03181f6 100644 --- a/encodings/zstd/src/array.rs +++ b/encodings/zstd/src/array.rs @@ -390,12 +390,12 @@ fn choose_max_dict_size(uncompressed_size: usize) -> usize { } fn collect_valid_primitive(parray: &PrimitiveArray) -> VortexResult { - let mask = parray.validity_mask(); + let mask = parray.validity_mask()?; Ok(parray.clone().into_array().filter(mask)?.to_primitive()) } fn collect_valid_vbv(vbv: &VarBinViewArray) -> VortexResult<(ByteBuffer, Vec)> { - let mask = vbv.validity_mask(); + let mask = vbv.validity_mask()?; let buffer_and_value_byte_indices = match mask.bit_buffer() { AllOr::None => (Buffer::empty(), Vec::new()), _ => { diff --git a/encodings/zstd/src/compute/cast.rs b/encodings/zstd/src/compute/cast.rs index a3b57141595..65deefc7056 100644 --- a/encodings/zstd/src/compute/cast.rs +++ b/encodings/zstd/src/compute/cast.rs @@ -91,12 +91,13 @@ mod tests { use vortex_array::validity::Validity; use vortex_buffer::buffer; + use crate::Zstd; use crate::ZstdArray; #[test] fn test_cast_zstd_i32_to_i64() { let values = PrimitiveArray::from_iter([1i32, 2, 3, 4, 5]); - let zstd = ZstdData::from_primitive(&values, 0, 0).unwrap(); + let zstd = Zstd::from_primitive(&values, 0, 0).unwrap(); let casted = zstd .into_array() @@ -114,7 +115,7 @@ mod tests { #[test] fn test_cast_zstd_nullability_change() { let values = PrimitiveArray::from_iter([10u32, 20, 30, 40]); - let zstd = ZstdData::from_primitive(&values, 0, 0).unwrap(); + let zstd = Zstd::from_primitive(&values, 0, 0).unwrap(); let casted = zstd .into_array() @@ -132,7 +133,7 @@ mod tests { buffer![10u32, 20, 30, 40, 50, 60], Validity::from_iter([true, true, true, true, true, true]), ); - let zstd = ZstdData::from_primitive(&values, 0, 128).unwrap(); + let zstd = Zstd::from_primitive(&values, 0, 128).unwrap(); let sliced = zstd.slice(1..5).unwrap(); let casted = sliced .cast(DType::Primitive(PType::U32, Nullability::NonNullable)) @@ -156,7 +157,7 @@ mod tests { Some(50), Some(60), ]); - let zstd = ZstdData::from_primitive(&values, 0, 128).unwrap(); + let zstd = Zstd::from_primitive(&values, 0, 128).unwrap(); let sliced = zstd.slice(1..5).unwrap(); let casted = sliced .cast(DType::Primitive(PType::U32, Nullability::NonNullable)) @@ -188,7 +189,7 @@ mod tests { Validity::NonNullable, ))] fn test_cast_zstd_conformance(#[case] values: PrimitiveArray) { - let zstd = ZstdData::from_primitive(&values, 0, 0).unwrap(); + let zstd = Zstd::from_primitive(&values, 0, 0).unwrap(); test_cast_conformance(&zstd.into_array()); } } diff --git a/encodings/zstd/src/compute/mod.rs b/encodings/zstd/src/compute/mod.rs index ebb28b36043..adf6937c246 100644 --- a/encodings/zstd/src/compute/mod.rs +++ b/encodings/zstd/src/compute/mod.rs @@ -1,7 +1,6 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors -use crate::ZstdData; mod cast; #[cfg(test)] @@ -12,27 +11,28 @@ mod tests { use vortex_array::compute::conformance::consistency::test_array_consistency; use vortex_buffer::buffer; + use crate::Zstd; use crate::ZstdArray; fn zstd_i32() -> ZstdArray { let values = PrimitiveArray::from_iter([100i32, 200, 300, 400, 500]); - ZstdData::from_primitive(&values, 0, 0).unwrap() + Zstd::from_primitive(&values, 0, 0).unwrap() } fn zstd_f64() -> ZstdArray { let values = PrimitiveArray::from_iter([1.1f64, 2.2, 3.3, 4.4, 5.5]); - ZstdData::from_primitive(&values, 0, 0).unwrap() + Zstd::from_primitive(&values, 0, 0).unwrap() } fn zstd_u32() -> ZstdArray { let values = PrimitiveArray::from_iter([10u32, 20, 30, 40, 50]); - ZstdData::from_primitive(&values, 0, 0).unwrap() + Zstd::from_primitive(&values, 0, 0).unwrap() } fn zstd_nullable_i64() -> ZstdArray { let values = PrimitiveArray::from_option_iter([Some(1000i64), None, Some(3000), Some(4000), None]); - ZstdData::from_primitive(&values, 0, 0).unwrap() + Zstd::from_primitive(&values, 0, 0).unwrap() } fn zstd_single() -> ZstdArray { @@ -40,7 +40,7 @@ mod tests { buffer![42i64], vortex_array::validity::Validity::NonNullable, ); - ZstdData::from_primitive(&values, 0, 0).unwrap() + Zstd::from_primitive(&values, 0, 0).unwrap() } fn zstd_large() -> ZstdArray { @@ -48,7 +48,7 @@ mod tests { buffer![0u32..1000], vortex_array::validity::Validity::NonNullable, ); - ZstdData::from_primitive(&values, 3, 0).unwrap() + Zstd::from_primitive(&values, 3, 0).unwrap() } fn zstd_all_same() -> ZstdArray { @@ -56,12 +56,12 @@ mod tests { buffer![42i32; 100], vortex_array::validity::Validity::NonNullable, ); - ZstdData::from_primitive(&values, 0, 0).unwrap() + Zstd::from_primitive(&values, 0, 0).unwrap() } fn zstd_negative() -> ZstdArray { let values = PrimitiveArray::from_iter([-100i32, -50, 0, 50, 100]); - ZstdData::from_primitive(&values, 0, 0).unwrap() + Zstd::from_primitive(&values, 0, 0).unwrap() } #[rstest] diff --git a/encodings/zstd/src/test.rs b/encodings/zstd/src/test.rs index ce7d5346ee7..a55c2194367 100644 --- a/encodings/zstd/src/test.rs +++ b/encodings/zstd/src/test.rs @@ -2,6 +2,7 @@ // SPDX-FileCopyrightText: Copyright the Vortex contributors #![allow(clippy::cast_possible_truncation)] +use vortex_array::DynArray; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; use vortex_array::ToCanonical; @@ -19,17 +20,17 @@ use vortex_buffer::Alignment; use vortex_buffer::Buffer; use vortex_mask::Mask; +use crate::Zstd; use crate::ZstdArray; -use crate::ZstdData; #[test] fn test_zstd_compress_decompress() { let data: Vec = (0..200).collect(); let array = PrimitiveArray::from_iter(data.clone()); - let compressed = ZstdData::from_primitive(&array, 3, 0).unwrap(); + let compressed = Zstd::from_primitive(&array, 3, 0).unwrap(); // this data should be compressible - assert!(compressed.frames.len() < array.nbytes() as usize); + assert!(compressed.frames.len() < array.into_array().nbytes() as usize); assert!(compressed.dictionary.is_none()); // check full decompression works @@ -56,7 +57,7 @@ fn test_zstd_empty() { Validity::NonNullable, ); - let compressed = ZstdData::from_primitive(&array, 3, 100).unwrap(); + let compressed = Zstd::from_primitive(&array, 3, 100).unwrap(); assert_arrays_eq!(compressed, PrimitiveArray::from_iter(data)); } @@ -72,7 +73,7 @@ fn test_zstd_with_validity_and_multi_frame() { Validity::Array(BoolArray::from_iter(validity).into_array()), ); - let compressed = ZstdData::from_primitive(&array, 0, 30).unwrap(); + let compressed = Zstd::from_primitive(&array, 0, 30).unwrap(); assert!(compressed.dictionary.is_none()); assert_nth_scalar!(compressed, 0, None::); assert_nth_scalar!(compressed, 3, 3); @@ -117,7 +118,7 @@ fn test_zstd_with_dict() { Validity::NonNullable, ); - let compressed = ZstdData::from_primitive(&array, 0, 16).unwrap(); + let compressed = Zstd::from_primitive(&array, 0, 16).unwrap(); assert!(compressed.dictionary.is_some()); assert_nth_scalar!(compressed, 0, 0); assert_nth_scalar!(compressed, 199, 199); @@ -139,9 +140,9 @@ fn test_validity_vtable() { (0..5).collect::>(), Validity::Array(BoolArray::from_iter(mask_bools.clone()).into_array()), ); - let compressed = ZstdData::from_primitive(&array, 3, 0).unwrap(); + let compressed = Zstd::from_primitive(&array, 3, 0).unwrap(); assert_eq!( - compressed.validity_mask().unwrap(), + DynArray::validity_mask(&compressed).unwrap(), Mask::from_iter(mask_bools) ); assert_eq!( @@ -161,7 +162,7 @@ fn test_zstd_var_bin_view() { ]; let array = VarBinViewArray::from_iter(data, DType::Utf8(Nullability::Nullable)); - let compressed = ZstdData::from_var_bin_view(&array, 0, 3).unwrap(); + let compressed = Zstd::from_var_bin_view(&array, 0, 3).unwrap(); assert!(compressed.dictionary.is_none()); assert_nth_scalar!(compressed, 0, "foo"); assert_nth_scalar!(compressed, 1, "bar"); @@ -186,7 +187,7 @@ fn test_zstd_decompress_var_bin_view() { ]; let array = VarBinViewArray::from_iter(data, DType::Utf8(Nullability::Nullable)); - let compressed = ZstdData::from_var_bin_view(&array, 0, 3).unwrap(); + let compressed = Zstd::from_var_bin_view(&array, 0, 3).unwrap(); assert!(compressed.dictionary.is_none()); assert_nth_scalar!(compressed, 0, "foo"); assert_nth_scalar!(compressed, 1, "bar"); @@ -206,8 +207,7 @@ fn test_zstd_decompress_var_bin_view() { #[test] fn test_sliced_array_children() { let data: Vec> = (0..10).map(|v| (v != 5).then_some(v)).collect(); - let compressed = - ZstdData::from_primitive(&PrimitiveArray::from_option_iter(data), 0, 100).unwrap(); + let compressed = Zstd::from_primitive(&PrimitiveArray::from_option_iter(data), 0, 100).unwrap(); let sliced = compressed.slice(0..4).unwrap(); sliced.children(); } @@ -220,7 +220,7 @@ fn test_zstd_frame_start_buffer_alignment() { let aligned_buffer = Buffer::copy_from_aligned(&data, Alignment::new(8)); // u8 array now has a 8-byte alignment. let array = PrimitiveArray::new(aligned_buffer, Validity::NonNullable); - let compressed = ZstdData::from_primitive(&array, 0, 1); + let compressed = Zstd::from_primitive(&array, 0, 1); assert!(compressed.is_ok()); } diff --git a/encodings/zstd/src/zstd_buffers.rs b/encodings/zstd/src/zstd_buffers.rs index 79af2c4c95b..b79fec7c537 100644 --- a/encodings/zstd/src/zstd_buffers.rs +++ b/encodings/zstd/src/zstd_buffers.rs @@ -34,7 +34,6 @@ use vortex_error::vortex_ensure_eq; use vortex_error::vortex_err; use vortex_session::VortexSession; -use crate::ZstdBuffersData; use crate::ZstdBuffersMetadata; vtable!(ZstdBuffers, ZstdBuffers, ZstdBuffersData); @@ -467,7 +466,7 @@ impl VTable for ZstdBuffers { .map(|i| children.get(i, dtype, len)) .collect::>>()?; - let array = ZstdBuffersArray { + let data = ZstdBuffersData { inner_encoding_id: array_id_from_string(&metadata.0.inner_encoding_id), inner_metadata: metadata.0.inner_metadata.clone(), compressed_buffers, @@ -479,8 +478,8 @@ impl VTable for ZstdBuffers { stats_set: Default::default(), }; - array.validate()?; - Ok(array) + data.validate()?; + Ok(data) } fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { @@ -597,6 +596,7 @@ mod tests { input.statistics().set(Stat::Min, Precision::exact(0i32)); let compressed = ZstdBuffersData::compress(&input, 3)?; + let compressed = ZstdBuffersArray::from_inner(compressed); assert!(compressed.statistics().get(Stat::Min).is_some()); Ok(()) diff --git a/fuzz/fuzz_targets/file_io.rs b/fuzz/fuzz_targets/file_io.rs index e8013d7e132..b2877b62f33 100644 --- a/fuzz/fuzz_targets/file_io.rs +++ b/fuzz/fuzz_targets/file_io.rs @@ -114,7 +114,6 @@ fuzz_target!(|fuzz: FuzzFileAction| -> Corpus { let true_count = bool_result.to_bit_buffer().true_count(); if true_count != expected_array.len() && (bool_result - .clone() .into_array() .all_valid() .vortex_expect("all_valid") diff --git a/fuzz/src/array/search_sorted.rs b/fuzz/src/array/search_sorted.rs index 603a04de240..0bad7191bb8 100644 --- a/fuzz/src/array/search_sorted.rs +++ b/fuzz/src/array/search_sorted.rs @@ -64,7 +64,7 @@ pub fn search_sorted_canonical_array( match array.dtype() { DType::Bool(_) => { let bool_array = array.to_bool(); - let validity = bool_array.validity_mask().to_bit_buffer(); + let validity = bool_array.validity_mask()?.to_bit_buffer(); let opt_values = bool_array .to_bit_buffer() .iter() @@ -76,7 +76,7 @@ pub fn search_sorted_canonical_array( } DType::Primitive(p, _) => { let primitive_array = array.to_primitive(); - let validity = primitive_array.validity_mask().to_bit_buffer(); + let validity = primitive_array.validity_mask()?.to_bit_buffer(); match_each_native_ptype!(p, |P| { let opt_values = primitive_array .as_slice::

() @@ -91,7 +91,7 @@ pub fn search_sorted_canonical_array( } DType::Decimal(d, _) => { let decimal_array = array.to_decimal(); - let validity = decimal_array.validity_mask().to_bit_buffer(); + let validity = decimal_array.validity_mask()?.to_bit_buffer(); match_each_decimal_value_type!(decimal_array.values_type(), |D| { let buf = decimal_array.buffer::(); let opt_values = buf diff --git a/fuzz/src/array/sort.rs b/fuzz/src/array/sort.rs index b2d673ff57a..6c1da201fca 100644 --- a/fuzz/src/array/sort.rs +++ b/fuzz/src/array/sort.rs @@ -28,7 +28,7 @@ pub fn sort_canonical_array(array: &ArrayRef) -> VortexResult { let mut opt_values = bool_array .to_bit_buffer() .iter() - .zip(bool_array.validity_mask().to_bit_buffer().iter()) + .zip(bool_array.validity_mask()?.to_bit_buffer().iter()) .map(|(b, v)| v.then_some(b)) .collect::>(); opt_values.sort(); @@ -41,7 +41,7 @@ pub fn sort_canonical_array(array: &ArrayRef) -> VortexResult { .as_slice::

() .iter() .copied() - .zip(primitive_array.validity_mask().to_bit_buffer().iter()) + .zip(primitive_array.validity_mask()?.to_bit_buffer().iter()) .map(|(p, v)| v.then_some(p)) .collect::>(); sort_primitive_slice(&mut opt_values); @@ -56,7 +56,7 @@ pub fn sort_canonical_array(array: &ArrayRef) -> VortexResult { .as_slice() .iter() .copied() - .zip(decimal_array.validity_mask().to_bit_buffer().iter()) + .zip(decimal_array.validity_mask()?.to_bit_buffer().iter()) .map(|(p, v)| v.then_some(p)) .collect::>(); opt_values.sort(); diff --git a/vortex-array/src/aggregate_fn/fns/is_sorted/bool.rs b/vortex-array/src/aggregate_fn/fns/is_sorted/bool.rs index 87a1009ea79..ab515e713d9 100644 --- a/vortex-array/src/aggregate_fn/fns/is_sorted/bool.rs +++ b/vortex-array/src/aggregate_fn/fns/is_sorted/bool.rs @@ -8,7 +8,7 @@ use super::IsSortedIteratorExt; use crate::arrays::BoolArray; pub(super) fn check_bool_sorted(array: &BoolArray, strict: bool) -> VortexResult { - match array.validity_mask() { + match array.validity_mask()? { Mask::AllFalse(_) => Ok(!strict), Mask::AllTrue(_) => { let values = array.to_bit_buffer(); diff --git a/vortex-array/src/aggregate_fn/fns/is_sorted/decimal.rs b/vortex-array/src/aggregate_fn/fns/is_sorted/decimal.rs index ae7a119a091..e56858fd015 100644 --- a/vortex-array/src/aggregate_fn/fns/is_sorted/decimal.rs +++ b/vortex-array/src/aggregate_fn/fns/is_sorted/decimal.rs @@ -20,7 +20,7 @@ fn compute_is_sorted(array: &DecimalArray, strict: bool) - where dyn Iterator: IsSortedIteratorExt, { - match array.validity_mask() { + match array.validity_mask()? { Mask::AllFalse(_) => Ok(!strict), Mask::AllTrue(_) => { let buf = array.buffer::(); diff --git a/vortex-array/src/aggregate_fn/fns/is_sorted/primitive.rs b/vortex-array/src/aggregate_fn/fns/is_sorted/primitive.rs index b441f331eab..21c80e7bd45 100644 --- a/vortex-array/src/aggregate_fn/fns/is_sorted/primitive.rs +++ b/vortex-array/src/aggregate_fn/fns/is_sorted/primitive.rs @@ -16,7 +16,7 @@ pub(super) fn check_primitive_sorted(array: &PrimitiveArray, strict: bool) -> Vo } fn compute_is_sorted(array: &PrimitiveArray, strict: bool) -> VortexResult { - match array.validity_mask() { + match array.validity_mask()? { Mask::AllFalse(_) => Ok(!strict), Mask::AllTrue(_) => { let slice = array.as_slice::(); diff --git a/vortex-array/src/aggregate_fn/fns/min_max/bool.rs b/vortex-array/src/aggregate_fn/fns/min_max/bool.rs index 4e04d77df00..6a118788d4e 100644 --- a/vortex-array/src/aggregate_fn/fns/min_max/bool.rs +++ b/vortex-array/src/aggregate_fn/fns/min_max/bool.rs @@ -17,7 +17,7 @@ pub(super) fn accumulate_bool(partial: &mut MinMaxPartial, array: &BoolArray) -> return Ok(()); } - let mask = array.validity_mask(); + let mask = array.validity_mask()?; let true_non_null = match &mask { Mask::AllTrue(_) => array.to_bit_buffer(), Mask::AllFalse(_) => return Ok(()), diff --git a/vortex-array/src/aggregate_fn/fns/min_max/decimal.rs b/vortex-array/src/aggregate_fn/fns/min_max/decimal.rs index c7650a3acc9..93400f37275 100644 --- a/vortex-array/src/aggregate_fn/fns/min_max/decimal.rs +++ b/vortex-array/src/aggregate_fn/fns/min_max/decimal.rs @@ -30,7 +30,7 @@ fn compute_min_max_with_validity(array: &DecimalArray) -> VortexResult

(), self.validity_mask()); + let (top, count) = typed_top_value(self.as_slice::

(), self.validity_mask()?); Ok(Some((top.into(), count))) }) } diff --git a/vortex-array/src/arrays/primitive/compute/cast.rs b/vortex-array/src/arrays/primitive/compute/cast.rs index 13544a638dc..e5691288875 100644 --- a/vortex-array/src/arrays/primitive/compute/cast.rs +++ b/vortex-array/src/arrays/primitive/compute/cast.rs @@ -79,7 +79,7 @@ impl CastKernel for Primitive { })); } - let mask = array.validity_mask(); + let mask = array.validity_mask()?; // Otherwise, we need to cast the values one-by-one. Ok(Some(match_each_native_ptype!(new_ptype, |T| { @@ -249,7 +249,7 @@ mod test { PrimitiveArray::from_option_iter([None, Some(0u32), Some(10)]) ); assert_eq!( - p.validity_mask(), + p.validity_mask().unwrap(), Mask::from(BitBuffer::from(vec![false, true, true])) ); } diff --git a/vortex-array/src/arrays/primitive/compute/fill_null.rs b/vortex-array/src/arrays/primitive/compute/fill_null.rs index 039e2fd3a2a..651e3a20462 100644 --- a/vortex-array/src/arrays/primitive/compute/fill_null.rs +++ b/vortex-array/src/arrays/primitive/compute/fill_null.rs @@ -72,7 +72,7 @@ mod test { .unwrap() .to_primitive(); assert_arrays_eq!(p, PrimitiveArray::from_iter([42u8, 8, 42, 10, 42])); - assert!(p.validity_mask().all_true()); + assert!(p.validity_mask().unwrap().all_true()); } #[test] @@ -85,7 +85,7 @@ mod test { .unwrap() .to_primitive(); assert_arrays_eq!(p, PrimitiveArray::from_iter([255u8, 255, 255, 255, 255])); - assert!(p.validity_mask().all_true()); + assert!(p.validity_mask().unwrap().all_true()); } #[test] @@ -100,7 +100,7 @@ mod test { .unwrap() .to_primitive(); assert_arrays_eq!(p, PrimitiveArray::from_iter([8u8, 10, 12, 14, 16])); - assert!(p.validity_mask().all_true()); + assert!(p.validity_mask().unwrap().all_true()); } #[test] @@ -108,6 +108,6 @@ mod test { let arr = buffer![8u8, 10, 12, 14, 16].into_array(); let p = arr.fill_null(Scalar::from(255u8)).unwrap().to_primitive(); assert_arrays_eq!(p, PrimitiveArray::from_iter([8u8, 10, 12, 14, 16])); - assert!(p.validity_mask().all_true()); + assert!(p.validity_mask().unwrap().all_true()); } } diff --git a/vortex-array/src/arrays/varbin/compute/compare.rs b/vortex-array/src/arrays/varbin/compute/compare.rs index 5bb411a1602..2b67bd29d1a 100644 --- a/vortex-array/src/arrays/varbin/compute/compare.rs +++ b/vortex-array/src/arrays/varbin/compute/compare.rs @@ -177,7 +177,7 @@ mod test { .to_bool(); assert_eq!( - &result.validity_mask().to_bit_buffer(), + &result.validity_mask().unwrap().to_bit_buffer(), &BitBuffer::from_iter([true, false, true]) ); assert_eq!( @@ -203,7 +203,7 @@ mod test { .to_bool(); assert_eq!( - result.validity_mask().to_bit_buffer(), + result.validity_mask().unwrap().to_bit_buffer(), BitBuffer::from_iter([false, false, true]) ); assert_eq!( diff --git a/vortex-array/src/arrays/varbin/compute/filter.rs b/vortex-array/src/arrays/varbin/compute/filter.rs index 09dae40b4bf..c9ed97a8fc4 100644 --- a/vortex-array/src/arrays/varbin/compute/filter.rs +++ b/vortex-array/src/arrays/varbin/compute/filter.rs @@ -67,7 +67,7 @@ fn filter_select_var_bin_by_slice( offsets.as_slice::(), values.bytes().as_slice(), mask_slices, - values.validity_mask(), + values.validity_mask()?, selection_count, ) }) diff --git a/vortex-array/src/arrays/varbin/compute/take.rs b/vortex-array/src/arrays/varbin/compute/take.rs index 8fd91af909f..c81ff679497 100644 --- a/vortex-array/src/arrays/varbin/compute/take.rs +++ b/vortex-array/src/arrays/varbin/compute/take.rs @@ -36,8 +36,8 @@ impl TakeExecute for VarBin { .dtype() .clone() .union_nullability(indices.dtype().nullability()); - let array_validity = array.validity_mask(); - let indices_validity = indices.validity_mask(); + let array_validity = array.validity_mask()?; + let indices_validity = indices.validity_mask()?; let array = match_each_integer_ptype!(indices.ptype(), |I| { // On take, offsets get widened to either 32- or 64-bit based on the original type, diff --git a/vortex-array/src/arrays/varbinview/compact.rs b/vortex-array/src/arrays/varbinview/compact.rs index f48925eb77a..e446f6ae789 100644 --- a/vortex-array/src/arrays/varbinview/compact.rs +++ b/vortex-array/src/arrays/varbinview/compact.rs @@ -63,7 +63,7 @@ impl VarBinViewArray { where F: FnMut(&Ref), { - match self.validity_mask() { + match self.validity_mask()? { Mask::AllTrue(_) => { for &view in self.views().iter() { if !view.is_inlined() { diff --git a/vortex-array/src/arrays/varbinview/compute/take.rs b/vortex-array/src/arrays/varbinview/compute/take.rs index a1a091df541..c3a70a82e6a 100644 --- a/vortex-array/src/arrays/varbinview/compute/take.rs +++ b/vortex-array/src/arrays/varbinview/compute/take.rs @@ -31,7 +31,7 @@ impl TakeExecute for VarBinView { let validity = array.validity().take(indices)?; let indices = indices.to_array().execute::(ctx)?; - let indices_mask = indices.validity_mask(); + let indices_mask = indices.validity_mask()?; let views_buffer = match_each_integer_ptype!(indices.ptype(), |I| { take_views(array.views(), indices.as_slice::(), &indices_mask) }); diff --git a/vortex-array/src/arrays/varbinview/compute/zip.rs b/vortex-array/src/arrays/varbinview/compute/zip.rs index 00c702ae1ae..0fbf26274be 100644 --- a/vortex-array/src/arrays/varbinview/compute/zip.rs +++ b/vortex-array/src/arrays/varbinview/compute/zip.rs @@ -53,8 +53,8 @@ impl ZipKernel for VarBinView { let mut views_builder = BufferMut::::with_capacity(len); let mut validity_builder = LazyBitBufferBuilder::new(len); - let true_validity = if_true.validity_mask(); - let false_validity = if_false.validity_mask(); + let true_validity = if_true.validity_mask()?; + let false_validity = if_false.validity_mask()?; let mask = mask.try_to_mask_fill_null_false(ctx)?; match mask.slices() { diff --git a/vortex-array/src/arrow/executor/bool.rs b/vortex-array/src/arrow/executor/bool.rs index a6e6a5576bd..e47f85bf0bf 100644 --- a/vortex-array/src/arrow/executor/bool.rs +++ b/vortex-array/src/arrow/executor/bool.rs @@ -16,7 +16,7 @@ use crate::arrow::null_buffer::to_null_buffer; pub fn canonical_bool_to_arrow(array: &BoolArray) -> VortexResult { Ok(Arc::new(ArrowBooleanArray::new( array.to_bit_buffer().into(), - to_null_buffer(array.validity_mask()), + to_null_buffer(array.validity_mask()?), ))) } diff --git a/vortex-array/src/arrow/executor/byte_view.rs b/vortex-array/src/arrow/executor/byte_view.rs index 2839384e706..0595a3ae975 100644 --- a/vortex-array/src/arrow/executor/byte_view.rs +++ b/vortex-array/src/arrow/executor/byte_view.rs @@ -30,7 +30,7 @@ pub fn canonical_varbinview_to_arrow( .iter() .map(|buffer| buffer.as_host().clone().into_arrow_buffer()) .collect(); - let nulls = to_null_buffer(array.validity_mask()); + let nulls = to_null_buffer(array.validity_mask()?); // SAFETY: our own VarBinView array is considered safe. Ok(Arc::new(unsafe { diff --git a/vortex-array/src/arrow/executor/decimal.rs b/vortex-array/src/arrow/executor/decimal.rs index 52e37544db2..234b253f903 100644 --- a/vortex-array/src/arrow/executor/decimal.rs +++ b/vortex-array/src/arrow/executor/decimal.rs @@ -41,7 +41,7 @@ pub(super) fn to_arrow_decimal( } fn to_arrow_decimal32(array: DecimalArray) -> VortexResult { - let null_buffer = to_null_buffer(array.validity_mask()); + let null_buffer = to_null_buffer(array.validity_mask()?); let buffer: Buffer = match array.values_type() { DecimalType::I8 => { Buffer::from_trusted_len_iter(array.buffer::().into_iter().map(|x| x.as_())) @@ -85,7 +85,7 @@ fn to_arrow_decimal32(array: DecimalArray) -> VortexResult { } fn to_arrow_decimal64(array: DecimalArray) -> VortexResult { - let null_buffer = to_null_buffer(array.validity_mask()); + let null_buffer = to_null_buffer(array.validity_mask()?); let buffer: Buffer = match array.values_type() { DecimalType::I8 => { Buffer::from_trusted_len_iter(array.buffer::().into_iter().map(|x| x.as_())) @@ -124,7 +124,7 @@ fn to_arrow_decimal64(array: DecimalArray) -> VortexResult { } fn to_arrow_decimal128(array: DecimalArray) -> VortexResult { - let null_buffer = to_null_buffer(array.validity_mask()); + let null_buffer = to_null_buffer(array.validity_mask()?); let buffer: Buffer = match array.values_type() { DecimalType::I8 => { Buffer::from_trusted_len_iter(array.buffer::().into_iter().map(|x| x.as_())) @@ -158,7 +158,7 @@ fn to_arrow_decimal128(array: DecimalArray) -> VortexResult { } fn to_arrow_decimal256(array: DecimalArray) -> VortexResult { - let null_buffer = to_null_buffer(array.validity_mask()); + let null_buffer = to_null_buffer(array.validity_mask()?); let buffer: Buffer = match array.values_type() { DecimalType::I8 => { Buffer::from_trusted_len_iter(array.buffer::().into_iter().map(|x| x.as_())) diff --git a/vortex-array/src/arrow/executor/primitive.rs b/vortex-array/src/arrow/executor/primitive.rs index b19f1f66168..7910ed5fa31 100644 --- a/vortex-array/src/arrow/executor/primitive.rs +++ b/vortex-array/src/arrow/executor/primitive.rs @@ -24,7 +24,7 @@ pub fn canonical_primitive_to_arrow( where T::Native: NativePType, { - let validity = array.validity_mask(); + let validity = array.validity_mask()?; let null_buffer = to_null_buffer(validity); let buffer = array.into_buffer::().into_arrow_scalar_buffer(); Ok(Arc::new(ArrowPrimitiveArray::::new(buffer, null_buffer))) diff --git a/vortex-array/src/arrow/executor/temporal.rs b/vortex-array/src/arrow/executor/temporal.rs index 9f966265ec7..a9316f9568e 100644 --- a/vortex-array/src/arrow/executor/temporal.rs +++ b/vortex-array/src/arrow/executor/temporal.rs @@ -157,7 +157,7 @@ where primitive.ptype() ); - let validity = primitive.validity_mask(); + let validity = primitive.validity_mask()?; let buffer = primitive.to_buffer::(); let values = buffer.into_arrow_scalar_buffer(); diff --git a/vortex-array/src/builders/bool.rs b/vortex-array/src/builders/bool.rs index 3675ec3b046..a4ffbef92af 100644 --- a/vortex-array/src/builders/bool.rs +++ b/vortex-array/src/builders/bool.rs @@ -5,6 +5,7 @@ use std::any::Any; use std::mem; use vortex_buffer::BitBufferMut; +use vortex_error::VortexExpect; use vortex_error::VortexResult; use vortex_error::vortex_ensure; use vortex_mask::Mask; @@ -114,7 +115,8 @@ impl ArrayBuilder for BoolBuilder { let bool_array = array.to_bool(); self.inner.append_buffer(&bool_array.to_bit_buffer()); - self.nulls.append_validity_mask(bool_array.validity_mask()); + self.nulls + .append_validity_mask(bool_array.validity_mask().vortex_expect("validity_mask")); } fn reserve_exact(&mut self, additional: usize) { diff --git a/vortex-array/src/builders/decimal.rs b/vortex-array/src/builders/decimal.rs index 509af272229..d3811314a04 100644 --- a/vortex-array/src/builders/decimal.rs +++ b/vortex-array/src/builders/decimal.rs @@ -203,7 +203,7 @@ impl ArrayBuilder for DecimalBuilder { }); self.nulls - .append_validity_mask(decimal_array.validity_mask()); + .append_validity_mask(decimal_array.validity_mask().vortex_expect("validity_mask")); } fn reserve_exact(&mut self, additional: usize) { diff --git a/vortex-array/src/builders/primitive.rs b/vortex-array/src/builders/primitive.rs index b6aa3a7dc75..9a6957f9350 100644 --- a/vortex-array/src/builders/primitive.rs +++ b/vortex-array/src/builders/primitive.rs @@ -5,6 +5,7 @@ use std::any::Any; use std::mem::MaybeUninit; use vortex_buffer::BufferMut; +use vortex_error::VortexExpect; use vortex_error::VortexResult; use vortex_error::vortex_ensure; use vortex_mask::Mask; @@ -179,7 +180,8 @@ impl ArrayBuilder for PrimitiveBuilder { ); self.values.extend_from_slice(array.as_slice::()); - self.nulls.append_validity_mask(array.validity_mask()); + self.nulls + .append_validity_mask(array.validity_mask().vortex_expect("validity_mask")); } fn reserve_exact(&mut self, additional: usize) { diff --git a/vortex-array/src/builders/struct_.rs b/vortex-array/src/builders/struct_.rs index 1eb536926d0..ed8dbbfc2ff 100644 --- a/vortex-array/src/builders/struct_.rs +++ b/vortex-array/src/builders/struct_.rs @@ -175,7 +175,8 @@ impl ArrayBuilder for StructBuilder { builder.extend_from_array(a); } - self.nulls.append_validity_mask(array.validity_mask()); + self.nulls + .append_validity_mask(array.validity_mask().vortex_expect("validity_mask")); } fn reserve_exact(&mut self, capacity: usize) { diff --git a/vortex-array/src/builders/varbinview.rs b/vortex-array/src/builders/varbinview.rs index 5cb157116e6..3375a6c9e96 100644 --- a/vortex-array/src/builders/varbinview.rs +++ b/vortex-array/src/builders/varbinview.rs @@ -289,7 +289,7 @@ impl ArrayBuilder for VarBinViewBuilder { let array = array.to_varbinview(); self.flush_in_progress(); - self.push_only_validity_mask(array.validity_mask()); + self.push_only_validity_mask(array.validity_mask().vortex_expect("validity_mask")); let view_adjustment = self.completed @@ -305,30 +305,32 @@ impl ArrayBuilder for VarBinViewBuilder { .iter() .map(|view| adjustment.adjust_view(view)), ), - ViewAdjustment::Rewriting(adjustment) => match array.validity_mask() { - Mask::AllTrue(_) => { - for (idx, &view) in array.views().iter().enumerate() { - let new_view = self.push_view(view, &adjustment, &array, idx); - self.views_builder.push(new_view); + ViewAdjustment::Rewriting(adjustment) => { + match array.validity_mask().vortex_expect("validity_mask") { + Mask::AllTrue(_) => { + for (idx, &view) in array.views().iter().enumerate() { + let new_view = self.push_view(view, &adjustment, &array, idx); + self.views_builder.push(new_view); + } } - } - Mask::AllFalse(_) => { - self.views_builder - .push_n(BinaryView::empty_view(), array.len()); - } - Mask::Values(v) => { - for (idx, (&view, is_valid)) in - array.views().iter().zip(v.bit_buffer().iter()).enumerate() - { - let new_view = if !is_valid { - BinaryView::empty_view() - } else { - self.push_view(view, &adjustment, &array, idx) - }; - self.views_builder.push(new_view); + Mask::AllFalse(_) => { + self.views_builder + .push_n(BinaryView::empty_view(), array.len()); + } + Mask::Values(v) => { + for (idx, (&view, is_valid)) in + array.views().iter().zip(v.bit_buffer().iter()).enumerate() + { + let new_view = if !is_valid { + BinaryView::empty_view() + } else { + self.push_view(view, &adjustment, &array, idx) + }; + self.views_builder.push(new_view); + } } } - }, + } } } diff --git a/vortex-array/src/mask.rs b/vortex-array/src/mask.rs index 87de2067267..33d02311262 100644 --- a/vortex-array/src/mask.rs +++ b/vortex-array/src/mask.rs @@ -35,7 +35,7 @@ impl Executable for Mask { } Columnar::Canonical(a) => { let bool = a.into_array().execute::(ctx)?; - let mask = bool.validity_mask(); + let mask = bool.validity_mask()?; let bits = bool.into_bit_buffer(); // To handle nullable boolean arrays, we treat nulls as false in the mask. // TODO(ngates): is this correct? Feels like we should just force the caller to diff --git a/vortex-array/src/patches.rs b/vortex-array/src/patches.rs index 388ac1966ae..c176718fe98 100644 --- a/vortex-array/src/patches.rs +++ b/vortex-array/src/patches.rs @@ -768,7 +768,7 @@ impl Patches { take_indices_with_search_fn( patch_indices_slice, take_slice, - take_indices.validity_mask(), + take_indices.validity_mask()?, include_nulls, |take_idx| { self.search_index_chunked_batch( @@ -783,7 +783,7 @@ impl Patches { take_indices_with_search_fn( patch_indices_slice, take_slice, - take_indices.validity_mask(), + take_indices.validity_mask()?, include_nulls, |take_idx| { let Some(offset) = ::from(self.offset) else { @@ -1289,7 +1289,7 @@ mod test { ); assert_arrays_eq!(primitive_indices, PrimitiveArray::from_iter([0u64])); assert_eq!( - primitive_values.validity_mask(), + primitive_values.validity_mask().unwrap(), Mask::from_iter(vec![true]) ); } @@ -1323,7 +1323,7 @@ mod test { assert_arrays_eq!(taken.indices(), PrimitiveArray::from_iter([0u64, 1])); assert_eq!( - primitive_values.validity_mask(), + primitive_values.validity_mask().unwrap(), Mask::from_iter([true, false]) ); } diff --git a/vortex-array/src/test_harness.rs b/vortex-array/src/test_harness.rs index bdb3b2b189e..348f79829fd 100644 --- a/vortex-array/src/test_harness.rs +++ b/vortex-array/src/test_harness.rs @@ -32,7 +32,7 @@ where /// Outputs the indices of the true values in a BoolArray pub fn to_int_indices(indices_bits: BoolArray) -> VortexResult> { let buffer = indices_bits.to_bit_buffer(); - let mask = indices_bits.validity_mask(); + let mask = indices_bits.validity_mask()?; Ok(buffer .iter() .enumerate() diff --git a/vortex-array/src/vtable/typed.rs b/vortex-array/src/vtable/typed.rs index e1e07ba4ad8..b79136d28ee 100644 --- a/vortex-array/src/vtable/typed.rs +++ b/vortex-array/src/vtable/typed.rs @@ -135,12 +135,9 @@ where } /// Returns the validity mask for this array. - /// - /// This inherent method shadows `DynArray::validity_mask()` to provide direct access - /// to the concrete validity mask without going through `VortexResult`. #[allow(clippy::same_name_method)] - pub fn validity_mask(&self) -> vortex_mask::Mask { - self.validity().to_mask(self.len) + pub fn validity_mask(&self) -> VortexResult { + Ok(self.validity().to_mask(self.len)) } } diff --git a/vortex-btrblocks/src/compressor/float/stats.rs b/vortex-btrblocks/src/compressor/float/stats.rs index a073603fea8..ecde6d73328 100644 --- a/vortex-btrblocks/src/compressor/float/stats.rs +++ b/vortex-btrblocks/src/compressor/float/stats.rs @@ -168,7 +168,7 @@ where HashSet::with_hasher(FxBuildHasher) }; - let validity = array.validity_mask(); + let validity = array.validity_mask()?; let mut runs = 1; let head_idx = validity diff --git a/vortex-btrblocks/src/compressor/integer/stats.rs b/vortex-btrblocks/src/compressor/integer/stats.rs index d5e1597e106..9cb70720b8d 100644 --- a/vortex-btrblocks/src/compressor/integer/stats.rs +++ b/vortex-btrblocks/src/compressor/integer/stats.rs @@ -255,7 +255,7 @@ where }); } - let validity = array.validity_mask(); + let validity = array.validity_mask()?; let null_count = validity.false_count(); let value_count = validity.true_count(); diff --git a/vortex-btrblocks/src/compressor/rle.rs b/vortex-btrblocks/src/compressor/rle.rs index 2bd07830bdc..908a032e8a7 100644 --- a/vortex-btrblocks/src/compressor/rle.rs +++ b/vortex-btrblocks/src/compressor/rle.rs @@ -187,11 +187,11 @@ fn try_compress_delta( let compressed_deltas = compressor.compress_canonical(Canonical::Primitive(deltas), ctx, excludes)?; - vortex_fastlanes::DeltaArray::try_new( + vortex_fastlanes::DeltaData::try_new( compressed_bases, compressed_deltas, 0, primitive_array.len(), ) - .map(vortex_fastlanes::DeltaArray::into_array) + .map(vortex_fastlanes::DeltaData::into_array) } diff --git a/vortex-cuda/benches/bitpacked_cuda.rs b/vortex-cuda/benches/bitpacked_cuda.rs index 44c911f545c..d0ea0104ee4 100644 --- a/vortex-cuda/benches/bitpacked_cuda.rs +++ b/vortex-cuda/benches/bitpacked_cuda.rs @@ -24,6 +24,7 @@ use vortex::array::validity::Validity::NonNullable; use vortex::buffer::Buffer; use vortex::dtype::NativePType; use vortex::encodings::fastlanes::BitPackedArray; +use vortex::encodings::fastlanes::BitPackedData; use vortex::encodings::fastlanes::unpack_iter::BitPacked; use vortex::error::VortexExpect; use vortex::session::VortexSession; @@ -56,8 +57,10 @@ where .collect(); let primitive_array = PrimitiveArray::new(Buffer::from(values), NonNullable); - BitPackedArray::encode(&primitive_array.into_array(), bit_width) - .vortex_expect("failed to create BitPacked array") + BitPackedArray::from_inner( + BitPackedData::encode(&primitive_array.into_array(), bit_width) + .vortex_expect("failed to create BitPacked array"), + ) } /// Create a bit-packed array with the given bit width and patch frequency. @@ -96,8 +99,10 @@ where .collect(); let primitive_array = PrimitiveArray::new(Buffer::from(values), NonNullable).into_array(); - BitPackedArray::encode(&primitive_array, bit_width) - .vortex_expect("failed to create BitPacked array with patches") + BitPackedArray::from_inner( + BitPackedData::encode(&primitive_array, bit_width) + .vortex_expect("failed to create BitPacked array with patches"), + ) } /// Generic benchmark function for a specific type and bit width diff --git a/vortex-cuda/benches/date_time_parts_cuda.rs b/vortex-cuda/benches/date_time_parts_cuda.rs index b4c15496865..dfb0d71e332 100644 --- a/vortex-cuda/benches/date_time_parts_cuda.rs +++ b/vortex-cuda/benches/date_time_parts_cuda.rs @@ -25,6 +25,7 @@ use vortex::buffer::Buffer; use vortex::dtype::DType; use vortex::dtype::Nullability; use vortex::encodings::datetime_parts::DateTimePartsArray; +use vortex::encodings::datetime_parts::DateTimePartsData; use vortex::error::VortexExpect; use vortex::extension::datetime::TimeUnit; use vortex::extension::datetime::Timestamp; @@ -44,8 +45,10 @@ fn make_datetimeparts_array(len: usize, time_unit: TimeUnit) -> DateTimePartsArr let dtype = DType::Extension(Timestamp::new(time_unit, Nullability::NonNullable).erased()); - DateTimePartsArray::try_new(dtype, days_arr, seconds_arr, subseconds_arr) - .vortex_expect("Failed to create DateTimePartsArray") + DateTimePartsArray::from_inner( + DateTimePartsData::try_new(dtype, days_arr, seconds_arr, subseconds_arr) + .vortex_expect("Failed to create DateTimePartsArray"), + ) } fn benchmark_datetimeparts(c: &mut Criterion) { diff --git a/vortex-cuda/benches/dynamic_dispatch_cuda.rs b/vortex-cuda/benches/dynamic_dispatch_cuda.rs index bf6fada88ab..6afc79aea22 100644 --- a/vortex-cuda/benches/dynamic_dispatch_cuda.rs +++ b/vortex-cuda/benches/dynamic_dispatch_cuda.rs @@ -24,13 +24,13 @@ use vortex::array::scalar::Scalar; use vortex::array::validity::Validity::NonNullable; use vortex::buffer::Buffer; use vortex::dtype::PType; -use vortex::encodings::alp::ALPArray; +use vortex::encodings::alp::ALP; use vortex::encodings::alp::ALPFloat; use vortex::encodings::alp::Exponents; use vortex::encodings::alp::alp_encode; -use vortex::encodings::fastlanes::BitPackedArray; -use vortex::encodings::fastlanes::FoRArray; -use vortex::encodings::runend::RunEndArray; +use vortex::encodings::fastlanes::BitPackedData; +use vortex::encodings::fastlanes::FoRData; +use vortex::encodings::runend::RunEnd; use vortex::error::VortexExpect; use vortex::error::VortexResult; use vortex::error::vortex_err; @@ -184,9 +184,9 @@ fn bench_for_bitpacked(c: &mut Criterion) { .map(|i| (i as u64 % (max_val + 1)) as u32) .collect(); let prim = PrimitiveArray::new(Buffer::from(residuals), NonNullable); - let bp = BitPackedArray::encode(&prim.into_array(), bit_width).vortex_expect("bitpack"); + let bp = BitPackedData::encode(&prim.into_array(), bit_width).vortex_expect("bitpack"); let for_arr = - FoRArray::try_new(bp.into_array(), Scalar::from(reference)).vortex_expect("for"); + FoRData::try_new(bp.into_array(), Scalar::from(reference)).vortex_expect("for"); let array = for_arr.into_array(); group.bench_with_input( @@ -228,7 +228,7 @@ fn bench_dict_bp_codes(c: &mut Criterion) { let codes: Vec = (0..*len).map(|i| (i % dict_size) as u32).collect(); let codes_prim = PrimitiveArray::new(Buffer::from(codes), NonNullable); - let codes_bp = BitPackedArray::encode(&codes_prim.into_array(), dict_bit_width) + let codes_bp = BitPackedData::encode(&codes_prim.into_array(), dict_bit_width) .vortex_expect("bitpack codes"); let values_prim = PrimitiveArray::new(Buffer::from(dict_values.clone()), NonNullable); let dict = DictArray::new(codes_bp.into_array(), values_prim.into_array()); @@ -275,7 +275,7 @@ fn bench_runend(c: &mut Criterion) { let ends_arr = PrimitiveArray::new(Buffer::from(ends), NonNullable).into_array(); let values_arr = PrimitiveArray::new(Buffer::from(values), NonNullable).into_array(); - let re = RunEndArray::new(ends_arr, values_arr); + let re = RunEnd::new(ends_arr, values_arr); let array = re.into_array(); group.bench_with_input( @@ -316,9 +316,9 @@ fn bench_dict_bp_codes_bp_for_values(c: &mut Criterion) { // Dict values: residuals 0..63 bitpacked, FoR adds 1_000_000 let dict_residuals: Vec = (0..dict_size as u32).collect(); let dict_prim = PrimitiveArray::new(Buffer::from(dict_residuals), NonNullable); - let dict_bp = BitPackedArray::encode(&dict_prim.into_array(), dict_bit_width) + let dict_bp = BitPackedData::encode(&dict_prim.into_array(), dict_bit_width) .vortex_expect("bitpack dict"); - let dict_for = FoRArray::try_new(dict_bp.into_array(), Scalar::from(dict_reference)) + let dict_for = FoRData::try_new(dict_bp.into_array(), Scalar::from(dict_reference)) .vortex_expect("for dict"); for (len, len_str) in BENCH_ARGS { @@ -326,7 +326,7 @@ fn bench_dict_bp_codes_bp_for_values(c: &mut Criterion) { let codes: Vec = (0..*len).map(|i| (i % dict_size) as u32).collect(); let codes_prim = PrimitiveArray::new(Buffer::from(codes), NonNullable); - let codes_bp = BitPackedArray::encode(&codes_prim.into_array(), codes_bit_width) + let codes_bp = BitPackedData::encode(&codes_prim.into_array(), codes_bit_width) .vortex_expect("bitpack codes"); let dict = DictArray::new(codes_bp.into_array(), dict_for.clone().into_array()); @@ -377,12 +377,12 @@ fn bench_alp_for_bitpacked(c: &mut Criterion) { // Encode: ALP → FoR → BitPacked let alp = alp_encode(&float_prim, Some(exponents)).vortex_expect("alp_encode"); assert!(alp.patches().is_none()); - let for_arr = FoRArray::encode(alp.encoded().to_primitive()).vortex_expect("for encode"); + let for_arr = FoRData::encode(alp.encoded().to_primitive()).vortex_expect("for encode"); let bp = - BitPackedArray::encode(for_arr.encoded(), bit_width).vortex_expect("bitpack encode"); + BitPackedData::encode(for_arr.encoded(), bit_width).vortex_expect("bitpack encode"); - let tree = ALPArray::new( - FoRArray::try_new(bp.into_array(), for_arr.reference_scalar().clone()) + let tree = ALP::new( + FoRData::try_new(bp.into_array(), for_arr.reference_scalar().clone()) .vortex_expect("for_new") .into_array(), exponents, diff --git a/vortex-cuda/benches/for_cuda.rs b/vortex-cuda/benches/for_cuda.rs index 31f7b270e92..6ffe9d6fd53 100644 --- a/vortex-cuda/benches/for_cuda.rs +++ b/vortex-cuda/benches/for_cuda.rs @@ -25,8 +25,9 @@ use vortex::array::validity::Validity; use vortex::buffer::Buffer; use vortex::dtype::NativePType; use vortex::dtype::PType; -use vortex::encodings::fastlanes::BitPackedArray; +use vortex::encodings::fastlanes::BitPackedData; use vortex::encodings::fastlanes::FoRArray; +use vortex::encodings::fastlanes::FoRData; use vortex::error::VortexExpect; use vortex::scalar::Scalar; use vortex::session::VortexSession; @@ -55,12 +56,16 @@ where PrimitiveArray::new(Buffer::from(data), Validity::NonNullable).into_array(); if bp && T::PTYPE != PType::U8 { - let child = BitPackedArray::encode(&primitive_array, 8).vortex_expect("failed to bitpack"); - FoRArray::try_new(child.into_array(), reference.into()) - .vortex_expect("failed to create FoR array") + let child = BitPackedData::encode(&primitive_array, 8).vortex_expect("failed to bitpack"); + FoRArray::from_inner( + FoRData::try_new(child.into_array(), reference.into()) + .vortex_expect("failed to create FoR array"), + ) } else { - FoRArray::try_new(primitive_array, reference.into()) - .vortex_expect("failed to create FoR array") + FoRArray::from_inner( + FoRData::try_new(primitive_array, reference.into()) + .vortex_expect("failed to create FoR array"), + ) } } diff --git a/vortex-cuda/benches/runend_cuda.rs b/vortex-cuda/benches/runend_cuda.rs index ced52c19c40..c073f60634c 100644 --- a/vortex-cuda/benches/runend_cuda.rs +++ b/vortex-cuda/benches/runend_cuda.rs @@ -23,6 +23,7 @@ use vortex::array::arrays::PrimitiveArray; use vortex::array::validity::Validity; use vortex::buffer::Buffer; use vortex::dtype::NativePType; +use vortex::encodings::runend::RunEnd; use vortex::encodings::runend::RunEndArray; use vortex::session::VortexSession; use vortex_cuda::CudaSession; @@ -54,7 +55,7 @@ where let ends_array = PrimitiveArray::new(Buffer::from(ends), Validity::NonNullable).into_array(); let values_array = PrimitiveArray::new(Buffer::from(values), Validity::NonNullable).into_array(); - RunEndArray::new(ends_array, values_array) + RunEnd::new(ends_array, values_array) } /// Benchmark run-end decoding for a specific type with varying run lengths diff --git a/vortex-cuda/benches/zstd_cuda.rs b/vortex-cuda/benches/zstd_cuda.rs index 41be9fa8cf9..baf7d02c745 100644 --- a/vortex-cuda/benches/zstd_cuda.rs +++ b/vortex-cuda/benches/zstd_cuda.rs @@ -13,6 +13,7 @@ use cudarc::driver::DevicePtrMut; use cudarc::driver::sys::CUevent_flags; use futures::executor::block_on; use vortex::array::arrays::VarBinViewArray; +use vortex::encodings::zstd::Zstd; use vortex::encodings::zstd::ZstdArray; use vortex::encodings::zstd::ZstdArrayParts; use vortex::error::VortexExpect; @@ -58,7 +59,7 @@ fn make_zstd_array(num_strings: usize) -> VortexResult<(ZstdArray, usize)> { let zstd_compression_level = -10; // Less compression but faster. let zstd_array = // Disable dictionary as nvCOMP doesn't support ZSTD dictionaries. - ZstdArray::from_var_bin_view_without_dict(&var_bin_view, zstd_compression_level, 2048)?; + Zstd::from_var_bin_view_without_dict(&var_bin_view, zstd_compression_level, 2048)?; Ok((zstd_array, uncompressed_size)) } @@ -139,7 +140,7 @@ fn benchmark_zstd_cuda_decompress(c: &mut Criterion) { for _ in 0..iters { let ZstdArrayParts { frames, metadata, .. - } = zstd_array.clone().into_parts(); + } = zstd_array.clone().into_inner().into_parts(); let exec = block_on(zstd_kernel_prepare(frames, &metadata, &mut cuda_ctx)) .vortex_expect("kernel setup failed"); let kernel_time = block_on(execute_zstd_kernel(exec, &mut cuda_ctx)) diff --git a/vortex-cuda/src/hybrid_dispatch/mod.rs b/vortex-cuda/src/hybrid_dispatch/mod.rs index c0f5b3aa9bb..9733b5ee1e5 100644 --- a/vortex-cuda/src/hybrid_dispatch/mod.rs +++ b/vortex-cuda/src/hybrid_dispatch/mod.rs @@ -269,7 +269,7 @@ mod tests { use vortex::array::session::ArraySessionExt; use vortex::encodings::fastlanes; use vortex::encodings::zstd::ZstdBuffers; - use vortex::encodings::zstd::ZstdBuffersArray; + use vortex::encodings::zstd::ZstdBuffersData; let mut session = VortexSession::empty(); fastlanes::initialize(&mut session); @@ -290,7 +290,7 @@ mod tests { 0u32.into(), ) .vortex_expect("for"); - let vals = ZstdBuffersArray::compress(&vals.into_array(), 3).vortex_expect("zstd"); + let vals = ZstdBuffersData::compress(&vals.into_array(), 3).vortex_expect("zstd"); // codes = FoR(BitPacked) let codes = PrimitiveArray::new( diff --git a/vortex-cuda/src/kernel/encodings/zstd_buffers.rs b/vortex-cuda/src/kernel/encodings/zstd_buffers.rs index c2ef46458a5..ecec758f090 100644 --- a/vortex-cuda/src/kernel/encodings/zstd_buffers.rs +++ b/vortex-cuda/src/kernel/encodings/zstd_buffers.rs @@ -18,6 +18,7 @@ use vortex::buffer::Alignment; use vortex::buffer::Buffer; use vortex::encodings::zstd::ZstdBuffers; use vortex::encodings::zstd::ZstdBuffersArray; +use vortex::encodings::zstd::ZstdBuffersData; use vortex::error::VortexResult; use vortex::error::vortex_err; use vortex_nvcomp::sys; @@ -223,7 +224,7 @@ mod tests { use vortex::array::arrays::PrimitiveArray; use vortex::array::arrays::VarBinViewArray; use vortex::array::assert_arrays_eq; - use vortex::encodings::zstd::ZstdBuffersArray; + use vortex::encodings::zstd::ZstdBuffersData; use vortex::error::VortexExpect; use vortex::error::VortexResult; use vortex::session::VortexSession; @@ -238,7 +239,7 @@ mod tests { .vortex_expect("failed to create execution context"); let input = PrimitiveArray::from_iter(0i64..1024).into_array(); - let compressed = ZstdBuffersArray::compress(&input, 3)?; + let compressed = ZstdBuffersData::compress(&input, 3)?; let cpu_result = compressed.clone().into_array().to_canonical()?; let gpu_result = ZstdBuffersExecutor @@ -265,7 +266,7 @@ mod tests { "baz", ]) .into_array(); - let compressed = ZstdBuffersArray::compress(&input, 3)?; + let compressed = ZstdBuffersData::compress(&input, 3)?; let cpu_result = compressed.clone().into_array().to_canonical()?; let gpu_result = ZstdBuffersExecutor diff --git a/vortex-duckdb/src/exporter/sequence.rs b/vortex-duckdb/src/exporter/sequence.rs index 468f3ee1457..15afb5d753c 100644 --- a/vortex-duckdb/src/exporter/sequence.rs +++ b/vortex-duckdb/src/exporter/sequence.rs @@ -3,6 +3,7 @@ use bitvec::macros::internal::funty::Fundamental; use vortex::array::ExecutionCtx; +use vortex::encodings::sequence::Sequence; use vortex::encodings::sequence::SequenceArray; use vortex::error::VortexExpect; use vortex::error::VortexResult; diff --git a/vortex-ipc/src/messages/decoder.rs b/vortex-ipc/src/messages/decoder.rs index ca863410855..48b326b1a2d 100644 --- a/vortex-ipc/src/messages/decoder.rs +++ b/vortex-ipc/src/messages/decoder.rs @@ -213,7 +213,11 @@ mod test { fn array_no_buffers() { // Constant arrays have a single buffer let array = ConstantArray::new(10i32, 20); - assert_eq!(array.nbuffers(), 1, "Array should have a single buffer"); + assert_eq!( + array.clone().into_array().nbuffers(), + 1, + "Array should have a single buffer" + ); write_and_read(&array.into_array()); } } diff --git a/vortex/benches/common_encoding_tree_throughput.rs b/vortex/benches/common_encoding_tree_throughput.rs index e13a9763b18..b8c31b6a282 100644 --- a/vortex/benches/common_encoding_tree_throughput.rs +++ b/vortex/benches/common_encoding_tree_throughput.rs @@ -26,16 +26,17 @@ use vortex::array::builtins::ArrayBuiltins; use vortex::array::vtable::ValidityHelper; use vortex::dtype::DType; use vortex::dtype::PType; +use vortex::encodings::alp::ALP; use vortex::encodings::alp::alp_encode; -use vortex::encodings::datetime_parts::DateTimePartsArray; +use vortex::encodings::datetime_parts::DateTimeParts; use vortex::encodings::datetime_parts::split_temporal; -use vortex::encodings::fastlanes::FoRArray; -use vortex::encodings::fsst::FSSTArray; +use vortex::encodings::fastlanes::BitPacked; +use vortex::encodings::fastlanes::FoR; +use vortex::encodings::fsst::FSST; use vortex::encodings::fsst::fsst_compress; use vortex::encodings::fsst::fsst_train_compressor; -use vortex::encodings::runend::RunEndArray; +use vortex::encodings::runend::RunEnd; use vortex::extension::datetime::TimeUnit; -use vortex_fastlanes::BitPackedArray; #[global_allocator] static GLOBAL: MiMalloc = MiMalloc; @@ -86,10 +87,10 @@ mod setup { /// Create FoR <- BitPacked encoding tree for u64 pub fn for_bp_u64() -> ArrayRef { let (uint_array, ..) = setup_primitive_arrays(); - let compressed = FoRArray::encode(uint_array).unwrap(); + let compressed = FoR::encode(uint_array).unwrap(); let inner = compressed.encoded(); - let bp = BitPackedArray::encode(inner, 8).unwrap(); - FoRArray::try_new(bp.into_array(), compressed.reference_scalar().clone()) + let bp = BitPacked::encode(inner, 8).unwrap(); + FoR::try_new(bp.into_array(), compressed.reference_scalar().clone()) .unwrap() .into_array() } @@ -100,13 +101,13 @@ mod setup { let alp_compressed = alp_encode(&float_array, None).unwrap(); // Manually construct ALP <- FoR <- BitPacked tree - let for_array = FoRArray::encode(alp_compressed.encoded().to_primitive()).unwrap(); + let for_array = FoR::encode(alp_compressed.encoded().to_primitive()).unwrap(); let inner = for_array.encoded(); - let bp = BitPackedArray::encode(inner, 8).unwrap(); + let bp = BitPacked::encode(inner, 8).unwrap(); let for_with_bp = - FoRArray::try_new(bp.into_array(), for_array.reference_scalar().clone()).unwrap(); + FoR::try_new(bp.into_array(), for_array.reference_scalar().clone()).unwrap(); - vortex::encodings::alp::ALPArray::try_new( + ALP::try_new( for_with_bp.into_array(), alp_compressed.exponents(), alp_compressed.patches().cloned(), @@ -137,7 +138,7 @@ mod setup { let codes_prim = PrimitiveArray::from_iter(codes); // Compress codes with BitPacked (6 bits should be enough for ~50 unique values) - let codes_bp = BitPackedArray::encode(&codes_prim.into_array(), 6) + let codes_bp = BitPacked::encode(&codes_prim.into_array(), 6) .unwrap() .into_array(); @@ -168,25 +169,25 @@ mod setup { } let prim_array = PrimitiveArray::from_iter(values); - let runend = RunEndArray::encode(prim_array.into_array()).unwrap(); + let runend = RunEnd::encode(prim_array.into_array()).unwrap(); // Compress the ends with FoR <- BitPacked let ends_prim = runend.ends().to_primitive(); - let ends_for = FoRArray::encode(ends_prim).unwrap(); + let ends_for = FoR::encode(ends_prim).unwrap(); let ends_inner = ends_for.encoded(); - let ends_bp = BitPackedArray::encode(ends_inner, 8).unwrap(); + let ends_bp = BitPacked::encode(ends_inner, 8).unwrap(); let compressed_ends = - FoRArray::try_new(ends_bp.into_array(), ends_for.reference_scalar().clone()) + FoR::try_new(ends_bp.into_array(), ends_for.reference_scalar().clone()) .unwrap() .into_array(); // Compress the values with BitPacked let values_prim = runend.values().to_primitive(); - let compressed_values = BitPackedArray::encode(&values_prim.into_array(), 8) + let compressed_values = BitPacked::encode(&values_prim.into_array(), 8) .unwrap() .into_array(); - RunEndArray::try_new(compressed_ends, compressed_values) + RunEnd::try_new(compressed_ends, compressed_values) .unwrap() .into_array() } @@ -256,7 +257,7 @@ mod setup { // Compress the VarBin offsets with BitPacked let codes = fsst.codes(); let offsets_prim = codes.offsets().to_primitive(); - let offsets_bp = BitPackedArray::encode(&offsets_prim.into_array(), 20).unwrap(); + let offsets_bp = BitPacked::encode(&offsets_prim.into_array(), 20).unwrap(); // Rebuild VarBin with compressed offsets let compressed_codes = VarBinArray::try_new( @@ -268,7 +269,7 @@ mod setup { .unwrap(); // Rebuild FSST with compressed codes - let compressed_fsst = FSSTArray::try_new( + let compressed_fsst = FSST::try_new( fsst.dtype().clone(), fsst.symbols().clone(), fsst.symbol_lengths().clone(), @@ -307,20 +308,20 @@ mod setup { // Compress days with FoR <- BitPacked let days_prim = parts.days.to_primitive(); - let days_for = FoRArray::encode(days_prim).unwrap(); + let days_for = FoR::encode(days_prim).unwrap(); let days_inner = days_for.encoded(); - let days_bp = BitPackedArray::encode(days_inner, 16).unwrap(); + let days_bp = BitPacked::encode(days_inner, 16).unwrap(); let compressed_days = - FoRArray::try_new(days_bp.into_array(), days_for.reference_scalar().clone()) + FoR::try_new(days_bp.into_array(), days_for.reference_scalar().clone()) .unwrap() .into_array(); // Compress seconds with FoR <- BitPacked let seconds_prim = parts.seconds.to_primitive(); - let seconds_for = FoRArray::encode(seconds_prim).unwrap(); + let seconds_for = FoR::encode(seconds_prim).unwrap(); let seconds_inner = seconds_for.encoded(); - let seconds_bp = BitPackedArray::encode(seconds_inner, 17).unwrap(); - let compressed_seconds = FoRArray::try_new( + let seconds_bp = BitPacked::encode(seconds_inner, 17).unwrap(); + let compressed_seconds = FoR::try_new( seconds_bp.into_array(), seconds_for.reference_scalar().clone(), ) @@ -329,17 +330,17 @@ mod setup { // Compress subseconds with FoR <- BitPacked let subseconds_prim = parts.subseconds.to_primitive(); - let subseconds_for = FoRArray::encode(subseconds_prim).unwrap(); + let subseconds_for = FoR::encode(subseconds_prim).unwrap(); let subseconds_inner = subseconds_for.encoded(); - let subseconds_bp = BitPackedArray::encode(subseconds_inner, 20).unwrap(); - let compressed_subseconds = FoRArray::try_new( + let subseconds_bp = BitPacked::encode(subseconds_inner, 20).unwrap(); + let compressed_subseconds = FoR::try_new( subseconds_bp.into_array(), subseconds_for.reference_scalar().clone(), ) .unwrap() .into_array(); - DateTimePartsArray::try_new( + DateTimeParts::try_new( DType::Extension(temporal_array.ext_dtype()), compressed_days, compressed_seconds, diff --git a/vortex/benches/single_encoding_throughput.rs b/vortex/benches/single_encoding_throughput.rs index ff15dbdacf9..8664383170b 100644 --- a/vortex/benches/single_encoding_throughput.rs +++ b/vortex/benches/single_encoding_throughput.rs @@ -24,20 +24,22 @@ use vortex::array::builtins::ArrayBuiltins; use vortex::dtype::PType; use vortex::encodings::alp::RDEncoder; use vortex::encodings::alp::alp_encode; -use vortex::encodings::fastlanes::DeltaArray; -use vortex::encodings::fastlanes::FoRArray; +use vortex::encodings::fastlanes::DeltaData; +use vortex::encodings::fastlanes::FoR; use vortex::encodings::fastlanes::delta_compress; +use vortex::encodings::fsst::FSSTArray; use vortex::encodings::fsst::fsst_compress; use vortex::encodings::fsst::fsst_train_compressor; -use vortex::encodings::pco::PcoArray; -use vortex::encodings::runend::RunEndArray; +use vortex::encodings::pco::Pco; +use vortex::encodings::runend::RunEnd; use vortex::encodings::sequence::sequence_encode; use vortex::encodings::zigzag::zigzag_encode; -use vortex::encodings::zstd::ZstdArray; +use vortex::encodings::zstd::ZstdData; +use vortex_array::DynArray; use vortex_array::VortexSessionExecute; use vortex_array::dtype::Nullability; use vortex_array::session::ArraySession; -use vortex_sequence::SequenceArray; +use vortex_sequence::Sequence; use vortex_session::VortexSession; #[global_allocator] @@ -118,7 +120,9 @@ fn bench_bitpacked_decompress_u32(bencher: Bencher) { let (uint_array, ..) = setup_primitive_arrays(); let bit_width = 8; - let compressed = bitpack_encode(&uint_array, bit_width, None).unwrap(); + let compressed = bitpack_encode(&uint_array, bit_width, None) + .unwrap() + .into_array(); with_byte_counter(bencher, NUM_VALUES * 4) .with_inputs(|| &compressed) @@ -131,13 +135,13 @@ fn bench_runend_compress_u32(bencher: Bencher) { with_byte_counter(bencher, NUM_VALUES * 4) .with_inputs(|| uint_array.clone()) - .bench_values(|a| RunEndArray::encode(a.into_array()).unwrap()); + .bench_values(|a| RunEnd::encode(a.into_array()).unwrap()); } #[divan::bench(name = "runend_decompress_u32")] fn bench_runend_decompress_u32(bencher: Bencher) { let (uint_array, ..) = setup_primitive_arrays(); - let compressed = RunEndArray::encode(uint_array.into_array()).unwrap(); + let compressed = RunEnd::encode(uint_array.into_array()).unwrap(); with_byte_counter(bencher, NUM_VALUES * 4) .with_inputs(|| &compressed) @@ -152,7 +156,7 @@ fn bench_delta_compress_u32(bencher: Bencher) { .with_inputs(|| &uint_array) .bench_refs(|a| { let (bases, deltas) = delta_compress(a, &mut SESSION.create_execution_ctx()).unwrap(); - DeltaArray::try_new(bases.into_array(), deltas.into_array(), 0, a.len()).unwrap() + DeltaData::try_new(bases.into_array(), deltas.into_array(), 0, a.len()).unwrap() }); } @@ -161,7 +165,9 @@ fn bench_delta_decompress_u32(bencher: Bencher) { let (uint_array, ..) = setup_primitive_arrays(); let (bases, deltas) = delta_compress(&uint_array, &mut SESSION.create_execution_ctx()).unwrap(); let compressed = - DeltaArray::try_new(bases.into_array(), deltas.into_array(), 0, uint_array.len()).unwrap(); + DeltaData::try_new(bases.into_array(), deltas.into_array(), 0, uint_array.len()) + .unwrap() + .into_array(); with_byte_counter(bencher, NUM_VALUES * 4) .with_inputs(|| &compressed) @@ -174,13 +180,13 @@ fn bench_for_compress_i32(bencher: Bencher) { with_byte_counter(bencher, NUM_VALUES * 4) .with_inputs(|| int_array.clone()) - .bench_values(|a| FoRArray::encode(a).unwrap()); + .bench_values(|a| FoR::encode(a).unwrap()); } #[divan::bench(name = "for_decompress_i32")] fn bench_for_decompress_i32(bencher: Bencher) { let (_, int_array, _) = setup_primitive_arrays(); - let compressed = FoRArray::encode(int_array).unwrap(); + let compressed = FoR::encode(int_array).unwrap(); with_byte_counter(bencher, NUM_VALUES * 4) .with_inputs(|| &compressed) @@ -218,7 +224,7 @@ fn bench_zigzag_compress_i32(bencher: Bencher) { #[divan::bench(name = "zigzag_decompress_i32")] fn bench_zigzag_decompress_i32(bencher: Bencher) { let (_, int_array, _) = setup_primitive_arrays(); - let compressed = zigzag_encode(int_array).unwrap(); + let compressed = zigzag_encode(int_array).unwrap().into_array(); with_byte_counter(bencher, NUM_VALUES * 4) .with_inputs(|| &compressed) @@ -238,10 +244,9 @@ fn bench_sequence_compress_u32(bencher: Bencher) { #[expect(clippy::cast_possible_truncation)] #[divan::bench(name = "sequence_decompress_u32")] fn bench_sequence_decompress_u32(bencher: Bencher) { - let compressed = - SequenceArray::try_new_typed(0, 1, Nullability::NonNullable, NUM_VALUES as usize) - .unwrap() - .into_array(); + let compressed = Sequence::try_new_typed(0, 1, Nullability::NonNullable, NUM_VALUES as usize) + .unwrap() + .into_array(); with_byte_counter(bencher, NUM_VALUES * 4) .with_inputs(|| &compressed) @@ -296,13 +301,13 @@ fn bench_pcodec_compress_f64(bencher: Bencher) { with_byte_counter(bencher, NUM_VALUES * 8) .with_inputs(|| &float_array) - .bench_refs(|a| PcoArray::from_primitive(a, 3, 0).unwrap()); + .bench_refs(|a| Pco::from_primitive(a, 3, 0).unwrap()); } #[divan::bench(name = "pcodec_decompress_f64")] fn bench_pcodec_decompress_f64(bencher: Bencher) { let (_, _, float_array) = setup_primitive_arrays(); - let compressed = PcoArray::from_primitive(&float_array, 3, 0).unwrap(); + let compressed = Pco::from_primitive(&float_array, 3, 0).unwrap(); with_byte_counter(bencher, NUM_VALUES * 8) .with_inputs(|| &compressed) @@ -317,14 +322,16 @@ fn bench_zstd_compress_u32(bencher: Bencher) { with_byte_counter(bencher, NUM_VALUES * 4) .with_inputs(|| array.clone()) - .bench_values(|a| ZstdArray::from_array(a, 3, 8192).unwrap()); + .bench_values(|a| ZstdData::from_array(a, 3, 8192).unwrap()); } #[cfg(feature = "zstd")] #[divan::bench(name = "zstd_decompress_u32")] fn bench_zstd_decompress_u32(bencher: Bencher) { let (uint_array, ..) = setup_primitive_arrays(); - let compressed = ZstdArray::from_array(uint_array.into_array(), 3, 8192).unwrap(); + let compressed = ZstdData::from_array(uint_array.into_array(), 3, 8192) + .unwrap() + .into_array(); with_byte_counter(bencher, NUM_VALUES * 4) .with_inputs(|| &compressed) @@ -336,7 +343,7 @@ fn bench_zstd_decompress_u32(bencher: Bencher) { fn bench_dict_compress_string(bencher: Bencher) { let varbinview_arr = VarBinViewArray::from_iter_str(gen_varbin_words(NUM_VALUES as usize, 0.00005)); - let nbytes = varbinview_arr.nbytes() as u64; + let nbytes = varbinview_arr.clone().into_array().nbytes() as u64; with_byte_counter(bencher, nbytes) .with_inputs(|| &varbinview_arr) @@ -360,7 +367,7 @@ fn bench_fsst_compress_string(bencher: Bencher) { let varbinview_arr = VarBinViewArray::from_iter_str(gen_varbin_words(NUM_VALUES as usize, 0.00005)); let fsst_compressor = fsst_train_compressor(&varbinview_arr); - let nbytes = varbinview_arr.nbytes() as u64; + let nbytes = varbinview_arr.clone().into_array().nbytes() as u64; with_byte_counter(bencher, nbytes) .with_inputs(|| &varbinview_arr) @@ -372,12 +379,12 @@ fn bench_fsst_decompress_string(bencher: Bencher) { let varbinview_arr = VarBinViewArray::from_iter_str(gen_varbin_words(NUM_VALUES as usize, 0.00005)); let fsst_compressor = fsst_train_compressor(&varbinview_arr); - let fsst_array = fsst_compress( + let fsst_array = FSSTArray::from_inner(fsst_compress( &varbinview_arr, varbinview_arr.len(), varbinview_arr.dtype(), &fsst_compressor, - ); + )); let nbytes = varbinview_arr.into_array().nbytes() as u64; with_byte_counter(bencher, nbytes) @@ -390,12 +397,12 @@ fn bench_fsst_decompress_string(bencher: Bencher) { fn bench_zstd_compress_string(bencher: Bencher) { let varbinview_arr = VarBinViewArray::from_iter_str(gen_varbin_words(NUM_VALUES as usize, 0.00005)); - let nbytes = varbinview_arr.nbytes() as u64; + let nbytes = varbinview_arr.clone().into_array().nbytes() as u64; let array = varbinview_arr.into_array(); with_byte_counter(bencher, nbytes) .with_inputs(|| array.clone()) - .bench_values(|a| ZstdArray::from_array(a, 3, 8192).unwrap()); + .bench_values(|a| ZstdData::from_array(a, 3, 8192).unwrap()); } #[cfg(feature = "zstd")] @@ -403,7 +410,9 @@ fn bench_zstd_compress_string(bencher: Bencher) { fn bench_zstd_decompress_string(bencher: Bencher) { let varbinview_arr = VarBinViewArray::from_iter_str(gen_varbin_words(NUM_VALUES as usize, 0.00005)); - let compressed = ZstdArray::from_array(varbinview_arr.clone().into_array(), 3, 8192).unwrap(); + let compressed = ZstdData::from_array(varbinview_arr.clone().into_array(), 3, 8192) + .unwrap() + .into_array(); let nbytes = varbinview_arr.into_array().nbytes() as u64; with_byte_counter(bencher, nbytes) diff --git a/vortex/src/lib.rs b/vortex/src/lib.rs index 961a750ba36..c5f53d4bc90 100644 --- a/vortex/src/lib.rs +++ b/vortex/src/lib.rs @@ -253,7 +253,7 @@ mod test { println!( "BtrBlocks size: {} / {}", compressed.nbytes(), - array.clone().into_array().nbytes() + array.into_array().nbytes() ); // [compress] From 6857bdc370db360b2d8a20330dea02ddd82708b8 Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Mon, 30 Mar 2026 11:44:22 +0100 Subject: [PATCH 04/11] Array VTables 5 Signed-off-by: Nicholas Gates --- encodings/fastlanes/public-api.lock | 2 ++ encodings/runend/public-api.lock | 4 ++++ vortex-array/public-api.lock | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/encodings/fastlanes/public-api.lock b/encodings/fastlanes/public-api.lock index fad72159867..9834dfbf33c 100644 --- a/encodings/fastlanes/public-api.lock +++ b/encodings/fastlanes/public-api.lock @@ -122,6 +122,8 @@ impl vortex_fastlanes::BitPacked pub const vortex_fastlanes::BitPacked::ID: vortex_array::vtable::dyn_::ArrayId +pub fn vortex_fastlanes::BitPacked::encode(array: &vortex_array::array::ArrayRef, bit_width: u8) -> vortex_error::VortexResult + impl core::clone::Clone for vortex_fastlanes::BitPacked pub fn vortex_fastlanes::BitPacked::clone(&self) -> vortex_fastlanes::BitPacked diff --git a/encodings/runend/public-api.lock b/encodings/runend/public-api.lock index aa50aac4ec1..e067e4a7e9f 100644 --- a/encodings/runend/public-api.lock +++ b/encodings/runend/public-api.lock @@ -22,6 +22,10 @@ impl vortex_runend::RunEnd pub const vortex_runend::RunEnd::ID: vortex_array::vtable::dyn_::ArrayId +pub fn vortex_runend::RunEnd::encode(array: vortex_array::array::ArrayRef) -> vortex_error::VortexResult + +pub fn vortex_runend::RunEnd::new(ends: vortex_array::array::ArrayRef, values: vortex_array::array::ArrayRef) -> vortex_runend::RunEndArray + pub unsafe fn vortex_runend::RunEnd::new_unchecked(ends: vortex_array::array::ArrayRef, values: vortex_array::array::ArrayRef, offset: usize, length: usize) -> vortex_runend::RunEndArray pub fn vortex_runend::RunEnd::try_new(ends: vortex_array::array::ArrayRef, values: vortex_array::array::ArrayRef) -> vortex_error::VortexResult diff --git a/vortex-array/public-api.lock b/vortex-array/public-api.lock index 4c89999a99b..d630873075b 100644 --- a/vortex-array/public-api.lock +++ b/vortex-array/public-api.lock @@ -20434,7 +20434,7 @@ impl vortex_array::vtable::Array where ::validity(&self) -> &vortex_array::validity::Validity -pub fn vortex_array::vtable::Array::validity_mask(&self) -> vortex_mask::Mask +pub fn vortex_array::vtable::Array::validity_mask(&self) -> vortex_error::VortexResult impl vortex_array::vtable::Array From e5d0ff98538a0cfc29b7684e89dc2cb8cfce1cf0 Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Mon, 30 Mar 2026 12:57:40 +0100 Subject: [PATCH 05/11] Array VTables 5 Signed-off-by: Nicholas Gates --- encodings/alp/src/alp/array.rs | 17 +++--- encodings/alp/src/alp_rd/array.rs | 7 ++- encodings/bytebool/src/array.rs | 12 ++-- encodings/bytebool/src/compute.rs | 7 ++- encodings/datetime-parts/src/array.rs | 11 +++- encodings/datetime-parts/src/canonical.rs | 4 +- encodings/datetime-parts/src/compute/cast.rs | 12 ++-- encodings/datetime-parts/src/compute/mod.rs | 32 +++++------ encodings/datetime-parts/src/compute/rules.rs | 3 +- encodings/datetime-parts/src/compute/take.rs | 12 ++-- .../src/decimal_byte_parts/compute/compare.rs | 2 +- .../src/decimal_byte_parts/mod.rs | 5 +- .../fastlanes/benches/bitpacking_take.rs | 57 ++++++++++++++----- .../bitpacking/array/bitpack_decompress.rs | 14 ++--- .../fastlanes/src/bitpacking/array/mod.rs | 10 +++- .../fastlanes/src/bitpacking/compute/cast.rs | 4 +- .../src/bitpacking/compute/filter.rs | 49 ++++++++++------ .../src/bitpacking/compute/is_constant.rs | 6 +- .../fastlanes/src/bitpacking/compute/mod.rs | 4 +- .../fastlanes/src/bitpacking/compute/take.rs | 45 +++++++++------ .../fastlanes/src/bitpacking/vtable/mod.rs | 2 +- .../src/bitpacking/vtable/operations.rs | 13 +++-- .../src/delta/array/delta_compress.rs | 10 ++-- encodings/fastlanes/src/delta/vtable/mod.rs | 4 +- .../fastlanes/src/delta/vtable/operations.rs | 4 +- .../fastlanes/src/for/array/for_compress.rs | 20 ++++--- encodings/fastlanes/src/for/compute/cast.rs | 4 +- .../fastlanes/src/for/compute/compare.rs | 3 +- encodings/fastlanes/src/for/compute/mod.rs | 8 ++- encodings/fastlanes/src/for/vtable/mod.rs | 4 +- .../fastlanes/src/for/vtable/operations.rs | 6 +- encodings/fastlanes/src/rle/array/mod.rs | 55 +++++++++++------- .../fastlanes/src/rle/array/rle_compress.rs | 48 ++++++++++------ encodings/fastlanes/src/rle/compute/cast.rs | 4 +- encodings/fastlanes/src/rle/vtable/mod.rs | 6 +- .../fastlanes/src/rle/vtable/operations.rs | 12 ++-- encodings/fsst/benches/fsst_compress.rs | 9 ++- encodings/fsst/benches/fsst_url_compare.rs | 11 ++-- encodings/fsst/src/array.rs | 4 +- encodings/fsst/src/compress.rs | 6 +- encodings/fsst/src/compute/like.rs | 4 +- encodings/fsst/src/compute/mod.rs | 21 ++++--- encodings/fsst/src/dfa/tests.rs | 4 +- encodings/fsst/src/ops.rs | 3 +- encodings/fsst/src/test_utils.rs | 28 ++++++--- encodings/pco/src/array.rs | 8 +-- encodings/pco/src/compute/cast.rs | 2 +- encodings/pco/src/test.rs | 6 +- encodings/runend/src/array.rs | 14 +++-- encodings/runend/src/compute/is_sorted.rs | 5 +- encodings/sequence/src/array.rs | 8 +-- encodings/sequence/src/compress.rs | 2 +- encodings/sparse/src/canonical.rs | 9 +-- encodings/sparse/src/lib.rs | 4 +- encodings/zigzag/src/array.rs | 4 +- encodings/zigzag/src/compute/cast.rs | 8 +-- encodings/zigzag/src/compute/mod.rs | 42 +++++++------- encodings/zstd/src/array.rs | 24 +++----- encodings/zstd/src/zstd_buffers.rs | 2 +- fuzz/src/fsst_like.rs | 6 +- vortex-array/benches/take_primitive.rs | 4 +- vortex-array/src/aliases/mod.rs | 5 ++ vortex-array/src/array/mod.rs | 14 ++--- vortex-array/src/arrays/bool/array.rs | 9 ++- vortex-array/src/arrays/chunked/array.rs | 11 ++-- vortex-array/src/arrays/constant/array.rs | 5 +- vortex-array/src/arrays/decimal/array.rs | 24 ++++---- vortex-array/src/arrays/dict/array.rs | 10 ++-- vortex-array/src/arrays/extension/array.rs | 8 +-- vortex-array/src/arrays/filter/array.rs | 5 +- vortex-array/src/arrays/filter/execute/mod.rs | 2 +- .../src/arrays/fixed_size_list/array.rs | 10 ++-- vortex-array/src/arrays/list/array.rs | 10 ++-- vortex-array/src/arrays/listview/array.rs | 13 +++-- .../src/arrays/listview/conversion.rs | 2 +- vortex-array/src/arrays/masked/array.rs | 2 +- vortex-array/src/arrays/null/mod.rs | 3 +- .../src/arrays/primitive/array/mod.rs | 23 +++++--- vortex-array/src/arrays/scalar_fn/array.rs | 4 +- vortex-array/src/arrays/scalar_fn/rules.rs | 2 +- vortex-array/src/arrays/shared/array.rs | 3 +- vortex-array/src/arrays/slice/array.rs | 5 +- vortex-array/src/arrays/struct_/array.rs | 25 ++++---- vortex-array/src/arrays/varbin/array.rs | 50 +++++++++------- vortex-array/src/arrays/varbinview/array.rs | 42 +++++++++----- vortex-array/src/arrays/variant/mod.rs | 4 +- vortex-array/src/arrow/record_batch.rs | 2 +- .../src/scalar_fn/fns/list_contains/mod.rs | 2 +- vortex-array/src/vtable/dyn_.rs | 2 +- vortex-array/src/vtable/mod.rs | 6 +- vortex-array/src/vtable/typed.rs | 46 ++++++++++----- .../src/compressor/float/stats.rs | 5 +- .../src/compressor/integer/stats.rs | 5 +- vortex-btrblocks/src/compressor/string.rs | 3 +- vortex-cuda/benches/bitpacked_cuda.rs | 6 +- vortex-cuda/benches/date_time_parts_cuda.rs | 3 +- vortex-cuda/benches/for_cuda.rs | 6 +- vortex-cuda/src/kernel/encodings/bitpacked.rs | 2 +- .../src/kernel/encodings/zstd_buffers.rs | 1 - vortex-duckdb/src/exporter/sequence.rs | 2 +- vortex-ipc/src/messages/decoder.rs | 6 +- vortex/benches/single_encoding_throughput.rs | 12 ++-- 102 files changed, 681 insertions(+), 473 deletions(-) diff --git a/encodings/alp/src/alp/array.rs b/encodings/alp/src/alp/array.rs index 83777fe11bd..06ebe27e44d 100644 --- a/encodings/alp/src/alp/array.rs +++ b/encodings/alp/src/alp/array.rs @@ -414,7 +414,7 @@ impl ALPData { /// assert!(result.is_err()); /// /// // Success! - /// let value = ALPArray::from_inner(ALPData::try_new( + /// let value = ALPArray::try_from_data(ALPData::try_new( /// buffer![0i32].into_array(), /// Exponents { e: 1, f: 1 }, /// None @@ -467,7 +467,8 @@ impl ALPData { /// Constructors for [`ALPArray`]. impl ALP { pub fn new(encoded: ArrayRef, exponents: Exponents, patches: Option) -> ALPArray { - Array::from_inner(ALPData::new(encoded, exponents, patches)) + Array::try_from_data(ALPData::new(encoded, exponents, patches)) + .vortex_expect("ALPData is always valid") } pub fn try_new( @@ -475,9 +476,7 @@ impl ALP { exponents: Exponents, patches: Option, ) -> VortexResult { - Ok(Array::from_inner(ALPData::try_new( - encoded, exponents, patches, - )?)) + Array::try_from_data(ALPData::try_new(encoded, exponents, patches)?) } /// # Safety @@ -488,7 +487,8 @@ impl ALP { patches: Option, dtype: DType, ) -> ALPArray { - Array::from_inner(unsafe { ALPData::new_unchecked(encoded, exponents, patches, dtype) }) + Array::try_from_data(unsafe { ALPData::new_unchecked(encoded, exponents, patches, dtype) }) + .vortex_expect("ALPData is always valid") } } @@ -853,11 +853,12 @@ mod tests { .unwrap(); // Build a new ALPArray with the same encoded data but patches without chunk_offsets. - let alp_without_chunk_offsets = ALPArray::from_inner(ALPData::new( + let alp_without_chunk_offsets = ALPArray::try_from_data(ALPData::new( normally_encoded.encoded().clone(), normally_encoded.exponents(), Some(patches_without_chunk_offsets), - )); + )) + .vortex_expect("ALPData is always valid"); // The legacy decompress_into_array path should work correctly. let result_legacy = decompress_into_array( diff --git a/encodings/alp/src/alp_rd/array.rs b/encodings/alp/src/alp_rd/array.rs index 23e99df5cbf..c9a14b92e60 100644 --- a/encodings/alp/src/alp_rd/array.rs +++ b/encodings/alp/src/alp_rd/array.rs @@ -413,14 +413,14 @@ impl ALPRD { right_bit_width: u8, left_parts_patches: Option, ) -> VortexResult { - Ok(Array::from_inner(ALPRDData::try_new( + Array::try_from_data(ALPRDData::try_new( dtype, left_parts, left_parts_dictionary, right_parts, right_bit_width, left_parts_patches, - )?)) + )?) } /// # Safety @@ -433,7 +433,7 @@ impl ALPRD { right_bit_width: u8, left_parts_patches: Option, ) -> ALPRDArray { - Array::from_inner(unsafe { + Array::try_from_data(unsafe { ALPRDData::new_unchecked( dtype, left_parts, @@ -443,6 +443,7 @@ impl ALPRD { left_parts_patches, ) }) + .vortex_expect("ALPRDData is always valid") } } diff --git a/encodings/bytebool/src/array.rs b/encodings/bytebool/src/array.rs index 937bc34ab31..443245dc01e 100644 --- a/encodings/bytebool/src/array.rs +++ b/encodings/bytebool/src/array.rs @@ -219,7 +219,8 @@ impl ByteBool { /// Construct a [`ByteBoolArray`] from a `Vec` and validity. pub fn from_vec>(data: Vec, validity: V) -> ByteBoolArray { - Array::from_inner(ByteBoolData::from_vec(data, validity)) + Array::try_from_data(ByteBoolData::from_vec(data, validity)) + .vortex_expect("ByteBoolData is always valid") } } @@ -326,7 +327,8 @@ mod tests { let v = vec![true, false]; let v_len = v.len(); - let arr = ByteBoolArray::from_inner(ByteBoolData::from(v)); + let arr = ByteBoolArray::try_from_data(ByteBoolData::from(v)) + .vortex_expect("ByteBoolData is always valid"); assert_eq!(v_len, arr.len()); for idx in 0..arr.len() { @@ -334,7 +336,8 @@ mod tests { } let v = vec![Some(true), None, Some(false)]; - let arr = ByteBoolArray::from_inner(ByteBoolData::from(v)); + let arr = ByteBoolArray::try_from_data(ByteBoolData::from(v)) + .vortex_expect("ByteBoolData is always valid"); assert!(arr.is_valid(0).unwrap()); assert!(!arr.is_valid(1).unwrap()); assert!(arr.is_valid(2).unwrap()); @@ -343,7 +346,8 @@ mod tests { let v: Vec> = vec![None, None]; let v_len = v.len(); - let arr = ByteBoolArray::from_inner(ByteBoolData::from(v)); + let arr = ByteBoolArray::try_from_data(ByteBoolData::from(v)) + .vortex_expect("ByteBoolData is always valid"); assert_eq!(v_len, arr.len()); for idx in 0..arr.len() { diff --git a/encodings/bytebool/src/compute.rs b/encodings/bytebool/src/compute.rs index b91142a9bde..052f7c56b43 100644 --- a/encodings/bytebool/src/compute.rs +++ b/encodings/bytebool/src/compute.rs @@ -99,15 +99,18 @@ mod tests { use vortex_array::dtype::DType; use vortex_array::dtype::Nullability; use vortex_array::scalar_fn::fns::operators::Operator; + use vortex_error::VortexExpect; use super::*; fn bb(v: Vec) -> ByteBoolArray { - ByteBoolArray::from_inner(ByteBoolData::from(v)) + ByteBoolArray::try_from_data(ByteBoolData::from(v)) + .vortex_expect("ByteBoolData is always valid") } fn bb_opt(v: Vec>) -> ByteBoolArray { - ByteBoolArray::from_inner(ByteBoolData::from(v)) + ByteBoolArray::try_from_data(ByteBoolData::from(v)) + .vortex_expect("ByteBoolData is always valid") } #[test] diff --git a/encodings/datetime-parts/src/array.rs b/encodings/datetime-parts/src/array.rs index c775970e3eb..fdadea1db29 100644 --- a/encodings/datetime-parts/src/array.rs +++ b/encodings/datetime-parts/src/array.rs @@ -273,9 +273,16 @@ impl DateTimeParts { seconds: ArrayRef, subseconds: ArrayRef, ) -> VortexResult { - Ok(Array::from_inner(DateTimePartsData::try_new( + Array::try_from_data(DateTimePartsData::try_new( dtype, days, seconds, subseconds, - )?)) + )?) + } + + /// Construct a [`DateTimePartsArray`] from a [`TemporalArray`]. + pub fn try_from_temporal( + temporal: vortex_array::arrays::TemporalArray, + ) -> VortexResult { + Array::try_from_data(DateTimePartsData::try_from(temporal)?) } } diff --git a/encodings/datetime-parts/src/canonical.rs b/encodings/datetime-parts/src/canonical.rs index 2e8dc6b81a6..5424098fab6 100644 --- a/encodings/datetime-parts/src/canonical.rs +++ b/encodings/datetime-parts/src/canonical.rs @@ -142,14 +142,14 @@ mod test { ], validity.clone(), ); - let date_times = DateTimePartsArray::from_inner( + let date_times = DateTimePartsArray::try_from_data( DateTimePartsData::try_from(TemporalArray::new_timestamp( milliseconds.clone().into_array(), TimeUnit::Milliseconds, Some("UTC".into()), )) .unwrap(), - ); + )?; let mut ctx = ExecutionCtx::new(VortexSession::empty()); diff --git a/encodings/datetime-parts/src/compute/cast.rs b/encodings/datetime-parts/src/compute/cast.rs index 11e4dbe70b5..c00bf5586fe 100644 --- a/encodings/datetime-parts/src/compute/cast.rs +++ b/encodings/datetime-parts/src/compute/cast.rs @@ -106,7 +106,7 @@ mod tests { } #[rstest] - #[case(DateTimePartsArray::from_inner(DateTimePartsData::try_from(TemporalArray::new_timestamp( + #[case(DateTimePartsArray::try_from_data(DateTimePartsData::try_from(TemporalArray::new_timestamp( buffer![ 0i64, 86_400_000, // 1 day in ms @@ -116,8 +116,8 @@ mod tests { ].into_array(), TimeUnit::Milliseconds, Some("UTC".into()) - )).unwrap()))] - #[case(DateTimePartsArray::from_inner(DateTimePartsData::try_from(TemporalArray::new_timestamp( + )).unwrap()).unwrap())] + #[case(DateTimePartsArray::try_from_data(DateTimePartsData::try_from(TemporalArray::new_timestamp( PrimitiveArray::from_option_iter([ Some(0i64), None, @@ -127,12 +127,12 @@ mod tests { ]).into_array(), TimeUnit::Milliseconds, Some("UTC".into()) - )).unwrap()))] - #[case(DateTimePartsArray::from_inner(DateTimePartsData::try_from(TemporalArray::new_timestamp( + )).unwrap()).unwrap())] + #[case(DateTimePartsArray::try_from_data(DateTimePartsData::try_from(TemporalArray::new_timestamp( buffer![86_400_000_000_000i64].into_array(), // 1 day in ns TimeUnit::Nanoseconds, Some("UTC".into()) - )).unwrap()))] + )).unwrap()).unwrap())] fn test_cast_datetime_parts_conformance(#[case] array: DateTimePartsArray) { use vortex_array::compute::conformance::cast::test_cast_conformance; test_cast_conformance(&array.into_array()); diff --git a/encodings/datetime-parts/src/compute/mod.rs b/encodings/datetime-parts/src/compute/mod.rs index 8086c573c3f..4ca8398fd6b 100644 --- a/encodings/datetime-parts/src/compute/mod.rs +++ b/encodings/datetime-parts/src/compute/mod.rs @@ -26,50 +26,50 @@ mod tests { #[rstest] // Basic datetime arrays - #[case::datetime_seconds(DateTimePartsArray::from_inner(DateTimePartsData::try_from(TemporalArray::new_timestamp( + #[case::datetime_seconds(DateTimePartsArray::try_from_data(DateTimePartsData::try_from(TemporalArray::new_timestamp( buffer![0i64, 86400, 172800, 259200, 345600].into_array(), TimeUnit::Seconds, Some("UTC".into()), - )).unwrap()))] - #[case::datetime_millis(DateTimePartsArray::from_inner(DateTimePartsData::try_from(TemporalArray::new_timestamp( + )).unwrap()).unwrap())] + #[case::datetime_millis(DateTimePartsArray::try_from_data(DateTimePartsData::try_from(TemporalArray::new_timestamp( buffer![0i64, 86400000, 172800000].into_array(), TimeUnit::Milliseconds, Some("UTC".into()), - )).unwrap()))] - #[case::datetime_micros(DateTimePartsArray::from_inner(DateTimePartsData::try_from(TemporalArray::new_timestamp( + )).unwrap()).unwrap())] + #[case::datetime_micros(DateTimePartsArray::try_from_data(DateTimePartsData::try_from(TemporalArray::new_timestamp( buffer![0i64, 86400000000, 172800000000].into_array(), TimeUnit::Microseconds, Some("UTC".into()), - )).unwrap()))] - #[case::datetime_nanos(DateTimePartsArray::from_inner(DateTimePartsData::try_from(TemporalArray::new_timestamp( + )).unwrap()).unwrap())] + #[case::datetime_nanos(DateTimePartsArray::try_from_data(DateTimePartsData::try_from(TemporalArray::new_timestamp( buffer![0i64, 86400000000000].into_array(), TimeUnit::Nanoseconds, Some("UTC".into()), - )).unwrap()))] + )).unwrap()).unwrap())] // Nullable arrays - #[case::datetime_nullable_seconds(DateTimePartsArray::from_inner(DateTimePartsData::try_from(TemporalArray::new_timestamp( + #[case::datetime_nullable_seconds(DateTimePartsArray::try_from_data(DateTimePartsData::try_from(TemporalArray::new_timestamp( PrimitiveArray::from_option_iter([Some(0i64), None, Some(86400), Some(172800), None]).into_array(), TimeUnit::Seconds, Some("UTC".into()), - )).unwrap()))] + )).unwrap()).unwrap())] // Edge cases - #[case::datetime_single(DateTimePartsArray::from_inner(DateTimePartsData::try_from(TemporalArray::new_timestamp( + #[case::datetime_single(DateTimePartsArray::try_from_data(DateTimePartsData::try_from(TemporalArray::new_timestamp( buffer![1234567890i64].into_array(), TimeUnit::Seconds, Some("UTC".into()), - )).unwrap()))] + )).unwrap()).unwrap())] // Large arrays (> 1024 elements) - #[case::datetime_large(DateTimePartsArray::from_inner(DateTimePartsData::try_from(TemporalArray::new_timestamp( + #[case::datetime_large(DateTimePartsArray::try_from_data(DateTimePartsData::try_from(TemporalArray::new_timestamp( PrimitiveArray::from_iter((0..1500).map(|i| i as i64 * 86400)).into_array(), TimeUnit::Seconds, Some("UTC".into()), - )).unwrap()))] + )).unwrap()).unwrap())] // Different time patterns - #[case::datetime_with_subseconds(DateTimePartsArray::from_inner(DateTimePartsData::try_from(TemporalArray::new_timestamp( + #[case::datetime_with_subseconds(DateTimePartsArray::try_from_data(DateTimePartsData::try_from(TemporalArray::new_timestamp( buffer![123456789i64, 234567890, 345678901, 456789012, 567890123].into_array(), TimeUnit::Milliseconds, Some("UTC".into()), - )).unwrap()))] + )).unwrap()).unwrap())] fn test_datetime_parts_consistency(#[case] array: DateTimePartsArray) { test_array_consistency(&array.into_array()); diff --git a/encodings/datetime-parts/src/compute/rules.rs b/encodings/datetime-parts/src/compute/rules.rs index d3ceb76db9a..d095060d6cb 100644 --- a/encodings/datetime-parts/src/compute/rules.rs +++ b/encodings/datetime-parts/src/compute/rules.rs @@ -216,7 +216,8 @@ mod tests { time_unit, None, ); - DateTimePartsArray::from_inner(DateTimePartsData::try_from(temporal).unwrap()) + DateTimePartsArray::try_from_data(DateTimePartsData::try_from(temporal).unwrap()) + .vortex_expect("DateTimePartsData is always valid") } /// Create a constant timestamp scalar at midnight for the given day. diff --git a/encodings/datetime-parts/src/compute/take.rs b/encodings/datetime-parts/src/compute/take.rs index 3d123e9c8ed..c2a3b418830 100644 --- a/encodings/datetime-parts/src/compute/take.rs +++ b/encodings/datetime-parts/src/compute/take.rs @@ -106,7 +106,7 @@ mod tests { use crate::DateTimePartsData; #[rstest] - #[case(DateTimePartsArray::from_inner(DateTimePartsData::try_from(TemporalArray::new_timestamp( + #[case(DateTimePartsArray::try_from_data(DateTimePartsData::try_from(TemporalArray::new_timestamp( buffer![ 0i64, 86_400_000, // 1 day in ms @@ -116,8 +116,8 @@ mod tests { ].into_array(), TimeUnit::Milliseconds, Some("UTC".into()) - )).unwrap()))] - #[case(DateTimePartsArray::from_inner(DateTimePartsData::try_from(TemporalArray::new_timestamp( + )).unwrap()).unwrap())] + #[case(DateTimePartsArray::try_from_data(DateTimePartsData::try_from(TemporalArray::new_timestamp( PrimitiveArray::from_option_iter([ Some(0i64), None, @@ -127,12 +127,12 @@ mod tests { ]).into_array(), TimeUnit::Milliseconds, Some("UTC".into()) - )).unwrap()))] - #[case(DateTimePartsArray::from_inner(DateTimePartsData::try_from(TemporalArray::new_timestamp( + )).unwrap()).unwrap())] + #[case(DateTimePartsArray::try_from_data(DateTimePartsData::try_from(TemporalArray::new_timestamp( buffer![86_400_000i64].into_array(), TimeUnit::Milliseconds, Some("UTC".into()) - )).unwrap()))] + )).unwrap()).unwrap())] fn test_take_datetime_parts_conformance(#[case] array: DateTimePartsArray) { test_take_conformance(&array.into_array()); } diff --git a/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/compare.rs b/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/compare.rs index f94e55df7b5..9b474feff6d 100644 --- a/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/compare.rs +++ b/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/compare.rs @@ -63,7 +63,7 @@ impl CompareKernel for DecimalByteParts { // (depending on the `sign`) than all values in MSP. // If the LHS or the RHS contain nulls, then we must fallback to the canonicalized // implementation which does null-checking instead. - if lhs.clone().into_array().all_valid()? && rhs.all_valid()? { + if lhs.all_valid()? && rhs.all_valid()? { Ok(Some( ConstantArray::new( unconvertible_value(sign, operator, nullability), diff --git a/encodings/decimal-byte-parts/src/decimal_byte_parts/mod.rs b/encodings/decimal-byte-parts/src/decimal_byte_parts/mod.rs index e4745f9d386..bedab00f881 100644 --- a/encodings/decimal-byte-parts/src/decimal_byte_parts/mod.rs +++ b/encodings/decimal-byte-parts/src/decimal_byte_parts/mod.rs @@ -293,10 +293,7 @@ impl DecimalByteParts { msp: ArrayRef, decimal_dtype: DecimalDType, ) -> VortexResult { - Ok(Array::from_inner(DecimalBytePartsData::try_new( - msp, - decimal_dtype, - )?)) + Array::try_from_data(DecimalBytePartsData::try_new(msp, decimal_dtype)?) } } diff --git a/encodings/fastlanes/benches/bitpacking_take.rs b/encodings/fastlanes/benches/bitpacking_take.rs index 373cb558a91..0cae7b3c8db 100644 --- a/encodings/fastlanes/benches/bitpacking_take.rs +++ b/encodings/fastlanes/benches/bitpacking_take.rs @@ -19,6 +19,7 @@ use vortex_array::validity::Validity; use vortex_array::vtable::Array; use vortex_buffer::Buffer; use vortex_buffer::buffer; +use vortex_error::VortexExpect; use vortex_fastlanes::BitPacked; use vortex_fastlanes::bitpack_compress::bitpack_to_best_bit_width; @@ -30,7 +31,9 @@ fn main() { fn take_10_stratified(bencher: Bencher) { let values = fixture(65_536, 8); let uncompressed = PrimitiveArray::new(values, Validity::NonNullable); - let packed = Array::::from_inner(bitpack_to_best_bit_width(&uncompressed).unwrap()); + let packed = + Array::::try_from_data(bitpack_to_best_bit_width(&uncompressed).unwrap()) + .unwrap(); let indices = PrimitiveArray::from_iter((0..10).map(|i| i * 6_553)); bencher @@ -48,7 +51,9 @@ fn take_10_stratified(bencher: Bencher) { fn take_10_contiguous(bencher: Bencher) { let values = fixture(65_536, 8); let uncompressed = PrimitiveArray::new(values, Validity::NonNullable); - let packed = Array::::from_inner(bitpack_to_best_bit_width(&uncompressed).unwrap()); + let packed = + Array::::try_from_data(bitpack_to_best_bit_width(&uncompressed).unwrap()) + .unwrap(); let indices = buffer![0..10].into_array(); bencher @@ -67,7 +72,9 @@ fn take_10k_random(bencher: Bencher) { let values = fixture(65_536, 8); let range = Uniform::new(0, values.len()).unwrap(); let uncompressed = PrimitiveArray::new(values, Validity::NonNullable); - let packed = Array::::from_inner(bitpack_to_best_bit_width(&uncompressed).unwrap()); + let packed = + Array::::try_from_data(bitpack_to_best_bit_width(&uncompressed).unwrap()) + .unwrap(); let rng = StdRng::seed_from_u64(0); let indices = PrimitiveArray::from_iter(rng.sample_iter(range).take(10_000).map(|i| i as u32)); @@ -87,7 +94,9 @@ fn take_10k_random(bencher: Bencher) { fn take_10k_contiguous(bencher: Bencher) { let values = fixture(65_536, 8); let uncompressed = PrimitiveArray::new(values, Validity::NonNullable); - let packed = Array::::from_inner(bitpack_to_best_bit_width(&uncompressed).unwrap()); + let packed = + Array::::try_from_data(bitpack_to_best_bit_width(&uncompressed).unwrap()) + .unwrap(); let indices = PrimitiveArray::from_iter(0..10_000); bencher @@ -105,7 +114,9 @@ fn take_10k_contiguous(bencher: Bencher) { fn take_10k_dispersed(bencher: Bencher) { let values = fixture(65_536, 8); let uncompressed = PrimitiveArray::new(values.clone(), Validity::NonNullable); - let packed = Array::::from_inner(bitpack_to_best_bit_width(&uncompressed).unwrap()); + let packed = + Array::::try_from_data(bitpack_to_best_bit_width(&uncompressed).unwrap()) + .unwrap(); let indices = PrimitiveArray::from_iter((0..10_000).map(|i| (i * 42) % values.len() as u64)); bencher @@ -123,7 +134,9 @@ fn take_10k_dispersed(bencher: Bencher) { fn take_10k_first_chunk_only(bencher: Bencher) { let values = fixture(65_536, 8); let uncompressed = PrimitiveArray::new(values, Validity::NonNullable); - let packed = Array::::from_inner(bitpack_to_best_bit_width(&uncompressed).unwrap()); + let packed = + Array::::try_from_data(bitpack_to_best_bit_width(&uncompressed).unwrap()) + .unwrap(); let indices = PrimitiveArray::from_iter((0..10_000).map(|i| ((i * 42) % 1024) as u64)); bencher @@ -161,7 +174,9 @@ const NUM_EXCEPTIONS: u32 = 1024; fn patched_take_10_stratified(bencher: Bencher) { let values = (0u32..BIG_BASE2 + NUM_EXCEPTIONS).collect::>(); let uncompressed = PrimitiveArray::new(values, Validity::NonNullable); - let packed = Array::::from_inner(bitpack_to_best_bit_width(&uncompressed).unwrap()); + let packed = + Array::::try_from_data(bitpack_to_best_bit_width(&uncompressed).unwrap()) + .unwrap(); assert!(packed.patches().is_some()); assert_eq!( @@ -186,7 +201,9 @@ fn patched_take_10_stratified(bencher: Bencher) { fn patched_take_10_contiguous(bencher: Bencher) { let values = (0u32..BIG_BASE2 + NUM_EXCEPTIONS).collect::>(); let uncompressed = PrimitiveArray::new(values, Validity::NonNullable); - let packed = Array::::from_inner(bitpack_to_best_bit_width(&uncompressed).unwrap()); + let packed = + Array::::try_from_data(bitpack_to_best_bit_width(&uncompressed).unwrap()) + .unwrap(); assert!(packed.patches().is_some()); assert_eq!( @@ -211,7 +228,9 @@ fn patched_take_10_contiguous(bencher: Bencher) { fn patched_take_10k_random(bencher: Bencher) { let values = (0u32..BIG_BASE2 + NUM_EXCEPTIONS).collect::>(); let uncompressed = PrimitiveArray::new(values.clone(), Validity::NonNullable); - let packed = Array::::from_inner(bitpack_to_best_bit_width(&uncompressed).unwrap()); + let packed = + Array::::try_from_data(bitpack_to_best_bit_width(&uncompressed).unwrap()) + .unwrap(); let rng = StdRng::seed_from_u64(0); let range = Uniform::new(0, values.len()).unwrap(); @@ -232,7 +251,9 @@ fn patched_take_10k_random(bencher: Bencher) { fn patched_take_10k_contiguous_not_patches(bencher: Bencher) { let values = (0u32..BIG_BASE2 + NUM_EXCEPTIONS).collect::>(); let uncompressed = PrimitiveArray::new(values, Validity::NonNullable); - let packed = Array::::from_inner(bitpack_to_best_bit_width(&uncompressed).unwrap()); + let packed = + Array::::try_from_data(bitpack_to_best_bit_width(&uncompressed).unwrap()) + .unwrap(); let indices = PrimitiveArray::from_iter((0u32..NUM_EXCEPTIONS).cycle().take(10000)); bencher @@ -250,7 +271,9 @@ fn patched_take_10k_contiguous_not_patches(bencher: Bencher) { fn patched_take_10k_contiguous_patches(bencher: Bencher) { let values = (0u32..BIG_BASE2 + NUM_EXCEPTIONS).collect::>(); let uncompressed = PrimitiveArray::new(values, Validity::NonNullable); - let packed = Array::::from_inner(bitpack_to_best_bit_width(&uncompressed).unwrap()); + let packed = + Array::::try_from_data(bitpack_to_best_bit_width(&uncompressed).unwrap()) + .unwrap(); assert!(packed.patches().is_some()); assert_eq!( @@ -276,7 +299,9 @@ fn patched_take_10k_contiguous_patches(bencher: Bencher) { fn patched_take_10k_dispersed(bencher: Bencher) { let values = (0u32..BIG_BASE2 + NUM_EXCEPTIONS).collect::>(); let uncompressed = PrimitiveArray::new(values.clone(), Validity::NonNullable); - let packed = Array::::from_inner(bitpack_to_best_bit_width(&uncompressed).unwrap()); + let packed = + Array::::try_from_data(bitpack_to_best_bit_width(&uncompressed).unwrap()) + .unwrap(); let indices = PrimitiveArray::from_iter((0..10_000).map(|i| (i * 42) % values.len() as u64)); bencher @@ -294,7 +319,9 @@ fn patched_take_10k_dispersed(bencher: Bencher) { fn patched_take_10k_first_chunk_only(bencher: Bencher) { let values = (0u32..BIG_BASE2 + NUM_EXCEPTIONS).collect::>(); let uncompressed = PrimitiveArray::new(values, Validity::NonNullable); - let packed = Array::::from_inner(bitpack_to_best_bit_width(&uncompressed).unwrap()); + let packed = + Array::::try_from_data(bitpack_to_best_bit_width(&uncompressed).unwrap()) + .unwrap(); let indices = PrimitiveArray::from_iter((0..10_000).map(|i| ((i * 42) % 1024) as u64)); bencher @@ -312,7 +339,9 @@ fn patched_take_10k_first_chunk_only(bencher: Bencher) { fn patched_take_10k_adversarial(bencher: Bencher) { let values = (0u32..BIG_BASE2 + NUM_EXCEPTIONS).collect::>(); let uncompressed = PrimitiveArray::new(values, Validity::NonNullable); - let packed = Array::::from_inner(bitpack_to_best_bit_width(&uncompressed).unwrap()); + let packed = + Array::::try_from_data(bitpack_to_best_bit_width(&uncompressed).unwrap()) + .unwrap(); let per_chunk_count = 100; let indices = PrimitiveArray::from_iter( (0..(NUM_EXCEPTIONS + 1024) / 1024) diff --git a/encodings/fastlanes/src/bitpacking/array/bitpack_decompress.rs b/encodings/fastlanes/src/bitpacking/array/bitpack_decompress.rs index 999b26f9d34..85c18cd442f 100644 --- a/encodings/fastlanes/src/bitpacking/array/bitpack_decompress.rs +++ b/encodings/fastlanes/src/bitpacking/array/bitpack_decompress.rs @@ -5,7 +5,6 @@ use fastlanes::BitPacking; use itertools::Itertools; use num_traits::AsPrimitive; use vortex_array::ExecutionCtx; -use vortex_array::IntoArray; use vortex_array::arrays::PrimitiveArray; use vortex_array::builders::ArrayBuilder; use vortex_array::builders::PrimitiveBuilder; @@ -96,10 +95,7 @@ pub fn apply_patches_to_uninit_range_fn T>( let indices = patches.indices().clone().execute::(ctx)?; let values = patches.values().clone().execute::(ctx)?; - assert!( - values.clone().into_array().all_valid()?, - "Patch values must be all valid" - ); + assert!(values.all_valid()?, "Patch values must be all valid"); let values = values.as_slice::(); match_each_unsigned_integer_ptype!(indices.ptype(), |P| { @@ -179,7 +175,8 @@ mod tests { use crate::bitpack_compress::bitpack_encode; fn encode(array: &PrimitiveArray, bit_width: u8) -> BitPackedArray { - BitPackedArray::from_inner(bitpack_encode(array, bit_width, None).unwrap()) + BitPackedArray::try_from_data(bitpack_encode(array, bit_width, None).unwrap()) + .vortex_expect("data is always valid") } static SESSION: LazyLock = @@ -187,9 +184,10 @@ mod tests { fn compression_roundtrip(n: usize) { let values = PrimitiveArray::from_iter((0..n).map(|i| (i % 2047) as u16)); - let compressed = BitPackedArray::from_inner( + let compressed = BitPackedArray::try_from_data( BitPackedData::encode(&values.clone().into_array(), 11).unwrap(), - ); + ) + .vortex_expect("BitPackedData is always valid"); assert_arrays_eq!(compressed, values); values diff --git a/encodings/fastlanes/src/bitpacking/array/mod.rs b/encodings/fastlanes/src/bitpacking/array/mod.rs index 58a726d1b67..33bdd1197b8 100644 --- a/encodings/fastlanes/src/bitpacking/array/mod.rs +++ b/encodings/fastlanes/src/bitpacking/array/mod.rs @@ -11,6 +11,7 @@ use vortex_array::dtype::PType; use vortex_array::patches::Patches; use vortex_array::stats::ArrayStats; use vortex_array::validity::Validity; +use vortex_error::VortexExpect; use vortex_error::VortexResult; use vortex_error::vortex_bail; use vortex_error::vortex_ensure; @@ -333,6 +334,7 @@ mod test { use vortex_array::arrays::PrimitiveArray; use vortex_array::assert_arrays_eq; use vortex_buffer::Buffer; + use vortex_error::VortexExpect; use crate::BitPackedArray; use crate::BitPackedData; @@ -349,9 +351,10 @@ mod test { Some(u64::MAX), ]; let uncompressed = PrimitiveArray::from_option_iter(values); - let packed = BitPackedArray::from_inner( + let packed = BitPackedArray::try_from_data( BitPackedData::encode(&uncompressed.into_array(), 1).unwrap(), - ); + ) + .vortex_expect("BitPackedData is always valid"); let expected = PrimitiveArray::from_option_iter(values); assert_arrays_eq!(packed.to_primitive(), expected); } @@ -372,7 +375,8 @@ mod test { let parray = values.clone().into_array(); let packed_with_patches = - BitPackedArray::from_inner(BitPackedData::encode(&parray, 9).unwrap()); + BitPackedArray::try_from_data(BitPackedData::encode(&parray, 9).unwrap()) + .vortex_expect("BitPackedData is always valid"); assert!(packed_with_patches.patches().is_some()); assert_arrays_eq!( packed_with_patches.to_primitive(), diff --git a/encodings/fastlanes/src/bitpacking/compute/cast.rs b/encodings/fastlanes/src/bitpacking/compute/cast.rs index a5d350ef2a8..b42dbfb0638 100644 --- a/encodings/fastlanes/src/bitpacking/compute/cast.rs +++ b/encodings/fastlanes/src/bitpacking/compute/cast.rs @@ -62,12 +62,14 @@ mod tests { use vortex_array::dtype::Nullability; use vortex_array::dtype::PType; use vortex_buffer::buffer; + use vortex_error::VortexExpect; use crate::BitPackedArray; use crate::BitPackedData; fn bp(array: &ArrayRef, bit_width: u8) -> BitPackedArray { - BitPackedArray::from_inner(BitPackedData::encode(array, bit_width).unwrap()) + BitPackedArray::try_from_data(BitPackedData::encode(array, bit_width).unwrap()) + .vortex_expect("BitPackedData is always valid") } #[test] diff --git a/encodings/fastlanes/src/bitpacking/compute/filter.rs b/encodings/fastlanes/src/bitpacking/compute/filter.rs index 48173fd41b3..ea13750c7ee 100644 --- a/encodings/fastlanes/src/bitpacking/compute/filter.rs +++ b/encodings/fastlanes/src/bitpacking/compute/filter.rs @@ -170,6 +170,7 @@ mod test { use vortex_array::validity::Validity; use vortex_buffer::Buffer; use vortex_buffer::buffer; + use vortex_error::VortexExpect; use vortex_mask::Mask; use crate::BitPackedArray; @@ -179,8 +180,10 @@ mod test { fn take_indices() { // Create a u8 array modulo 63. let unpacked = PrimitiveArray::from_iter((0..4096).map(|i| (i % 63) as u8)); - let bitpacked = - BitPackedArray::from_inner(BitPackedData::encode(&unpacked.into_array(), 6).unwrap()); + let bitpacked = BitPackedArray::try_from_data( + BitPackedData::encode(&unpacked.into_array(), 6).unwrap(), + ) + .vortex_expect("BitPackedData is always valid"); let mask = Mask::from_indices(bitpacked.len(), vec![0, 125, 2047, 2049, 2151, 2790]); @@ -195,8 +198,10 @@ mod test { fn take_sliced_indices() { // Create a u8 array modulo 63. let unpacked = PrimitiveArray::from_iter((0..4096).map(|i| (i % 63) as u8)); - let bitpacked = - BitPackedArray::from_inner(BitPackedData::encode(&unpacked.into_array(), 6).unwrap()); + let bitpacked = BitPackedArray::try_from_data( + BitPackedData::encode(&unpacked.into_array(), 6).unwrap(), + ) + .vortex_expect("BitPackedData is always valid"); let sliced = bitpacked.slice(128..2050).unwrap(); let mask = Mask::from_indices(sliced.len(), vec![1919, 1921]); @@ -208,8 +213,10 @@ mod test { #[test] fn filter_bitpacked() { let unpacked = PrimitiveArray::from_iter((0..4096).map(|i| (i % 63) as u8)); - let bitpacked = - BitPackedArray::from_inner(BitPackedData::encode(&unpacked.into_array(), 6).unwrap()); + let bitpacked = BitPackedArray::try_from_data( + BitPackedData::encode(&unpacked.into_array(), 6).unwrap(), + ) + .vortex_expect("BitPackedData is always valid"); let filtered = bitpacked .filter(Mask::from_indices(4096, (0..1024).collect())) .unwrap(); @@ -223,8 +230,10 @@ mod test { fn filter_bitpacked_signed() { let values: Buffer = (0..500).collect(); let unpacked = PrimitiveArray::new(values.clone(), Validity::NonNullable); - let bitpacked = - BitPackedArray::from_inner(BitPackedData::encode(&unpacked.into_array(), 9).unwrap()); + let bitpacked = BitPackedArray::try_from_data( + BitPackedData::encode(&unpacked.into_array(), 9).unwrap(), + ) + .vortex_expect("BitPackedData is always valid"); let filtered = bitpacked .filter(Mask::from_indices(values.len(), (0..250).collect())) .unwrap() @@ -240,18 +249,22 @@ mod test { fn test_filter_bitpacked_conformance() { // Test with u8 values let unpacked = buffer![1u8, 2, 3, 4, 5].into_array(); - let bitpacked = BitPackedArray::from_inner(BitPackedData::encode(&unpacked, 3).unwrap()); + let bitpacked = BitPackedArray::try_from_data(BitPackedData::encode(&unpacked, 3).unwrap()) + .vortex_expect("BitPackedData is always valid"); test_filter_conformance(&bitpacked.into_array()); // Test with u32 values let unpacked = buffer![100u32, 200, 300, 400, 500].into_array(); - let bitpacked = BitPackedArray::from_inner(BitPackedData::encode(&unpacked, 9).unwrap()); + let bitpacked = BitPackedArray::try_from_data(BitPackedData::encode(&unpacked, 9).unwrap()) + .vortex_expect("BitPackedData is always valid"); test_filter_conformance(&bitpacked.into_array()); // Test with nullable values let unpacked = PrimitiveArray::from_option_iter([Some(1u16), None, Some(3), Some(4), None]); - let bitpacked = - BitPackedArray::from_inner(BitPackedData::encode(&unpacked.into_array(), 3).unwrap()); + let bitpacked = BitPackedArray::try_from_data( + BitPackedData::encode(&unpacked.into_array(), 3).unwrap(), + ) + .vortex_expect("BitPackedData is always valid"); test_filter_conformance(&bitpacked.into_array()); } @@ -266,8 +279,10 @@ mod test { // Values 0-127 fit in 7 bits, but 1000 and 2000 do not. let values: Vec = vec![0, 10, 1000, 20, 30, 2000, 40, 50, 60, 70]; let unpacked = PrimitiveArray::from_iter(values.clone()); - let bitpacked = - BitPackedArray::from_inner(BitPackedData::encode(&unpacked.into_array(), 7).unwrap()); + let bitpacked = BitPackedArray::try_from_data( + BitPackedData::encode(&unpacked.into_array(), 7).unwrap(), + ) + .vortex_expect("BitPackedData is always valid"); assert!( bitpacked.patches().is_some(), "Expected patches for values exceeding bit width" @@ -299,8 +314,10 @@ mod test { }) .collect(); let unpacked = PrimitiveArray::from_iter(values.clone()); - let bitpacked = - BitPackedArray::from_inner(BitPackedData::encode(&unpacked.into_array(), 7).unwrap()); + let bitpacked = BitPackedArray::try_from_data( + BitPackedData::encode(&unpacked.into_array(), 7).unwrap(), + ) + .vortex_expect("BitPackedData is always valid"); assert!( bitpacked.patches().is_some(), "Expected patches for values exceeding bit width" diff --git a/encodings/fastlanes/src/bitpacking/compute/is_constant.rs b/encodings/fastlanes/src/bitpacking/compute/is_constant.rs index d2becbb2b6a..f223d3231e5 100644 --- a/encodings/fastlanes/src/bitpacking/compute/is_constant.rs +++ b/encodings/fastlanes/src/bitpacking/compute/is_constant.rs @@ -192,8 +192,10 @@ mod tests { #[test] fn is_constant_with_patches() -> VortexResult<()> { - let array = - BitPackedArray::from_inner(BitPackedData::encode(&buffer![4; 1025].into_array(), 2)?); + let array = BitPackedArray::try_from_data(BitPackedData::encode( + &buffer![4; 1025].into_array(), + 2, + )?)?; let mut ctx = LEGACY_SESSION.create_execution_ctx(); assert!(is_constant(&array.into_array(), &mut ctx)?); Ok(()) diff --git a/encodings/fastlanes/src/bitpacking/compute/mod.rs b/encodings/fastlanes/src/bitpacking/compute/mod.rs index 35b633c5885..226d5ce37bb 100644 --- a/encodings/fastlanes/src/bitpacking/compute/mod.rs +++ b/encodings/fastlanes/src/bitpacking/compute/mod.rs @@ -45,13 +45,15 @@ mod tests { use vortex_array::arrays::PrimitiveArray; use vortex_array::compute::conformance::binary_numeric::test_binary_numeric_array; use vortex_array::compute::conformance::consistency::test_array_consistency; + use vortex_error::VortexExpect; use crate::BitPackedArray; use crate::bitpack_compress::bitpack_encode; use crate::bitpacking::compute::chunked_indices; fn bp(array: &PrimitiveArray, bit_width: u8) -> BitPackedArray { - BitPackedArray::from_inner(bitpack_encode(array, bit_width, None).unwrap()) + BitPackedArray::try_from_data(bitpack_encode(array, bit_width, None).unwrap()) + .vortex_expect("data is always valid") } #[test] diff --git a/encodings/fastlanes/src/bitpacking/compute/take.rs b/encodings/fastlanes/src/bitpacking/compute/take.rs index b0fa2579a62..45bc0d877fe 100644 --- a/encodings/fastlanes/src/bitpacking/compute/take.rs +++ b/encodings/fastlanes/src/bitpacking/compute/take.rs @@ -160,6 +160,7 @@ mod test { use vortex_array::validity::Validity; use vortex_buffer::Buffer; use vortex_buffer::buffer; + use vortex_error::VortexExpect; use crate::BitPackedArray; use crate::BitPackedData; @@ -171,8 +172,10 @@ mod test { // Create a u8 array modulo 63. let unpacked = PrimitiveArray::from_iter((0..4096).map(|i| (i % 63) as u8)); - let bitpacked = - BitPackedArray::from_inner(BitPackedData::encode(&unpacked.into_array(), 6).unwrap()); + let bitpacked = BitPackedArray::try_from_data( + BitPackedData::encode(&unpacked.into_array(), 6).unwrap(), + ) + .vortex_expect("BitPackedData is always valid"); let primitive_result = bitpacked.take(indices.to_array()).unwrap(); assert_arrays_eq!( @@ -184,7 +187,8 @@ mod test { #[test] fn take_with_patches() { let unpacked = Buffer::from_iter(0u32..1024).into_array(); - let bitpacked = BitPackedArray::from_inner(BitPackedData::encode(&unpacked, 2).unwrap()); + let bitpacked = BitPackedArray::try_from_data(BitPackedData::encode(&unpacked, 2).unwrap()) + .vortex_expect("BitPackedData is always valid"); let indices = buffer![0, 2, 4, 6].into_array(); @@ -198,8 +202,10 @@ mod test { // Create a u8 array modulo 63. let unpacked = PrimitiveArray::from_iter((0..4096).map(|i| (i % 63) as u8)); - let bitpacked = - BitPackedArray::from_inner(BitPackedData::encode(&unpacked.into_array(), 6).unwrap()); + let bitpacked = BitPackedArray::try_from_data( + BitPackedData::encode(&unpacked.into_array(), 6).unwrap(), + ) + .vortex_expect("BitPackedData is always valid"); let sliced = bitpacked.slice(128..2050).unwrap(); let primitive_result = sliced.take(indices.to_array()).unwrap(); @@ -212,9 +218,10 @@ mod test { let num_patches: usize = 128; let values = (0..u16::MAX as u32 + num_patches as u32).collect::>(); let uncompressed = PrimitiveArray::new(values.clone(), Validity::NonNullable); - let packed = BitPackedArray::from_inner( + let packed = BitPackedArray::try_from_data( BitPackedData::encode(&uncompressed.into_array(), 16).unwrap(), - ); + ) + .vortex_expect("BitPackedData is always valid"); assert!(packed.patches().is_some()); let rng = rng(); @@ -243,9 +250,10 @@ mod test { #[test] #[cfg_attr(miri, ignore)] fn take_signed_with_patches() { - let start = BitPackedArray::from_inner( + let start = BitPackedArray::try_from_data( BitPackedData::encode(&buffer![1i32, 2i32, 3i32, 4i32].into_array(), 1).unwrap(), - ); + ) + .vortex_expect("BitPackedData is always valid"); let taken_primitive = take_primitive::( &start, @@ -259,9 +267,10 @@ mod test { #[test] fn take_nullable_with_nullables() { - let start = BitPackedArray::from_inner( + let start = BitPackedArray::try_from_data( BitPackedData::encode(&buffer![1i32, 2i32, 3i32, 4i32].into_array(), 1).unwrap(), - ); + ) + .vortex_expect("BitPackedData is always valid"); let taken_primitive = start .take( @@ -276,15 +285,15 @@ mod test { } #[rstest] - #[case(BitPackedArray::from_inner(BitPackedData::encode(&PrimitiveArray::from_iter((0..100).map(|i| (i % 63) as u8)).into_array(), 6).unwrap()))] - #[case(BitPackedArray::from_inner(BitPackedData::encode(&PrimitiveArray::from_iter((0..256).map(|i| i as u32)).into_array(), 8).unwrap()))] - #[case(BitPackedArray::from_inner(BitPackedData::encode(&buffer![1i32, 2, 3, 4, 5, 6, 7, 8].into_array(), 3).unwrap()))] - #[case(BitPackedArray::from_inner(BitPackedData::encode( + #[case(BitPackedArray::try_from_data(BitPackedData::encode(&PrimitiveArray::from_iter((0..100).map(|i| (i % 63) as u8)).into_array(), 6).unwrap()).unwrap())] + #[case(BitPackedArray::try_from_data(BitPackedData::encode(&PrimitiveArray::from_iter((0..256).map(|i| i as u32)).into_array(), 8).unwrap()).unwrap())] + #[case(BitPackedArray::try_from_data(BitPackedData::encode(&buffer![1i32, 2, 3, 4, 5, 6, 7, 8].into_array(), 3).unwrap()).unwrap())] + #[case(BitPackedArray::try_from_data(BitPackedData::encode( &PrimitiveArray::from_option_iter([Some(10u16), None, Some(20), Some(30), None]).into_array(), 5 - ).unwrap()))] - #[case(BitPackedArray::from_inner(BitPackedData::encode(&buffer![42u32].into_array(), 6).unwrap()))] - #[case(BitPackedArray::from_inner(BitPackedData::encode(&PrimitiveArray::from_iter((0..1024).map(|i| i as u32)).into_array(), 8).unwrap()))] + ).unwrap()).unwrap())] + #[case(BitPackedArray::try_from_data(BitPackedData::encode(&buffer![42u32].into_array(), 6).unwrap()).unwrap())] + #[case(BitPackedArray::try_from_data(BitPackedData::encode(&PrimitiveArray::from_iter((0..1024).map(|i| i as u32)).into_array(), 8).unwrap()).unwrap())] fn test_take_bitpacked_conformance(#[case] bitpacked: BitPackedArray) { use vortex_array::compute::conformance::take::test_take_conformance; test_take_conformance(&bitpacked.into_array()); diff --git a/encodings/fastlanes/src/bitpacking/vtable/mod.rs b/encodings/fastlanes/src/bitpacking/vtable/mod.rs index 219d25d92ff..4519fb54dee 100644 --- a/encodings/fastlanes/src/bitpacking/vtable/mod.rs +++ b/encodings/fastlanes/src/bitpacking/vtable/mod.rs @@ -380,6 +380,6 @@ impl BitPacked { /// Encode an array into a bitpacked representation with the given bit width. pub fn encode(array: &ArrayRef, bit_width: u8) -> VortexResult { - Ok(Array::from_inner(BitPackedData::encode(array, bit_width)?)) + Array::try_from_data(BitPackedData::encode(array, bit_width)?) } } diff --git a/encodings/fastlanes/src/bitpacking/vtable/operations.rs b/encodings/fastlanes/src/bitpacking/vtable/operations.rs index adec08dd5d5..27ba6afaf19 100644 --- a/encodings/fastlanes/src/bitpacking/vtable/operations.rs +++ b/encodings/fastlanes/src/bitpacking/vtable/operations.rs @@ -52,6 +52,7 @@ mod test { use vortex_buffer::Buffer; use vortex_buffer::ByteBuffer; use vortex_buffer::buffer; + use vortex_error::VortexExpect; use crate::BitPacked; use crate::BitPackedArray; @@ -61,7 +62,8 @@ mod test { LazyLock::new(|| vortex_session::VortexSession::empty().with::()); fn bp(array: &ArrayRef, bit_width: u8) -> BitPackedArray { - BitPackedArray::from_inner(BitPackedData::encode(array, bit_width).unwrap()) + BitPackedArray::try_from_data(BitPackedData::encode(array, bit_width).unwrap()) + .vortex_expect("BitPackedData is always valid") } fn slice_via_kernel(array: &BitPackedArray, range: Range) -> BitPackedArray { @@ -147,9 +149,10 @@ mod test { #[test] fn slice_empty_patches() { // We create an array that has 1 element that does not fit in the 6-bit range. - let array = BitPackedArray::from_inner( + let array = BitPackedArray::try_from_data( BitPackedData::encode(&buffer![0u32..=64].into_array(), 6).unwrap(), - ); + ) + .vortex_expect("BitPackedData is always valid"); assert!(array.patches().is_some()); @@ -221,7 +224,9 @@ mod test { fn scalar_at() { let values = (0u32..257).collect::>(); let uncompressed = values.clone().into_array(); - let packed = BitPackedArray::from_inner(BitPackedData::encode(&uncompressed, 8).unwrap()); + let packed = + BitPackedArray::try_from_data(BitPackedData::encode(&uncompressed, 8).unwrap()) + .vortex_expect("BitPackedData is always valid"); assert!(packed.patches().is_some()); let patches = packed.patches().unwrap().indices().clone(); diff --git a/encodings/fastlanes/src/delta/array/delta_compress.rs b/encodings/fastlanes/src/delta/array/delta_compress.rs index be7183f21e1..030d3fda4ff 100644 --- a/encodings/fastlanes/src/delta/array/delta_compress.rs +++ b/encodings/fastlanes/src/delta/array/delta_compress.rs @@ -100,6 +100,7 @@ mod tests { use vortex_array::arrays::PrimitiveArray; use vortex_array::assert_arrays_eq; use vortex_array::session::ArraySession; + use vortex_error::VortexExpect; use vortex_error::VortexResult; use vortex_session::VortexSession; @@ -119,10 +120,10 @@ mod tests { (0u32..10_000).map(|i| (i % 2 == 0).then_some(i)), ))] fn test_compress(#[case] array: PrimitiveArray) -> VortexResult<()> { - let delta = DeltaArray::from_inner(DeltaData::try_from_primitive_array( + let delta = DeltaArray::try_from_data(DeltaData::try_from_primitive_array( &array, &mut SESSION.create_execution_ctx(), - )?); + )?)?; assert_eq!(delta.len(), array.len()); let decompressed = delta_decompress(&delta, &mut SESSION.create_execution_ctx())?; assert_arrays_eq!(decompressed, array); @@ -139,7 +140,7 @@ mod tests { ); let (bases, deltas) = delta_compress(&array, &mut SESSION.create_execution_ctx()).unwrap(); let bitpacked_deltas = bitpack_encode(&deltas, 1, None).unwrap(); - let packed_delta = DeltaArray::from_inner( + let packed_delta = DeltaArray::try_from_data( DeltaData::try_new( bases.into_array(), bitpacked_deltas.into_array(), @@ -147,7 +148,8 @@ mod tests { array.len(), ) .unwrap(), - ); + ) + .vortex_expect("DeltaData is always valid"); assert_arrays_eq!(packed_delta.to_primitive(), array); } } diff --git a/encodings/fastlanes/src/delta/vtable/mod.rs b/encodings/fastlanes/src/delta/vtable/mod.rs index b1608faacfb..736d728f938 100644 --- a/encodings/fastlanes/src/delta/vtable/mod.rs +++ b/encodings/fastlanes/src/delta/vtable/mod.rs @@ -214,9 +214,7 @@ impl Delta { array: &PrimitiveArray, ctx: &mut ExecutionCtx, ) -> VortexResult { - Ok(Array::from_inner(DeltaData::try_from_primitive_array( - array, ctx, - )?)) + Array::try_from_data(DeltaData::try_from_primitive_array(array, ctx)?) } } diff --git a/encodings/fastlanes/src/delta/vtable/operations.rs b/encodings/fastlanes/src/delta/vtable/operations.rs index 92ad4df22a1..8c60e9e9f24 100644 --- a/encodings/fastlanes/src/delta/vtable/operations.rs +++ b/encodings/fastlanes/src/delta/vtable/operations.rs @@ -36,6 +36,7 @@ mod tests { use vortex_array::session::ArraySession; use vortex_array::validity::Validity; use vortex_buffer::buffer; + use vortex_error::VortexExpect; use vortex_session::VortexSession; use crate::DeltaArray; @@ -45,10 +46,11 @@ mod tests { LazyLock::new(|| VortexSession::empty().with::()); fn da(array: &PrimitiveArray) -> DeltaArray { - DeltaArray::from_inner( + DeltaArray::try_from_data( DeltaData::try_from_primitive_array(array, &mut SESSION.create_execution_ctx()) .unwrap(), ) + .vortex_expect("DeltaData is always valid") } #[test] diff --git a/encodings/fastlanes/src/for/array/for_compress.rs b/encodings/fastlanes/src/for/array/for_compress.rs index 48ad7ee4207..1373a983100 100644 --- a/encodings/fastlanes/src/for/array/for_compress.rs +++ b/encodings/fastlanes/src/for/array/for_compress.rs @@ -10,6 +10,7 @@ use vortex_array::dtype::NativePType; use vortex_array::expr::stats::Stat; use vortex_array::match_each_integer_ptype; use vortex_array::stats::ArrayStats; +use vortex_error::VortexExpect; use vortex_error::VortexResult; use vortex_error::vortex_err; @@ -101,7 +102,8 @@ mod test { .collect::>(), Validity::NonNullable, ); - let compressed = FoRArray::from_inner(FoRData::encode(array).unwrap()); + let compressed = FoRArray::try_from_data(FoRData::encode(array).unwrap()) + .vortex_expect("FoRData is always valid"); assert_eq!( u32::try_from(compressed.reference_scalar()).unwrap(), 1_000_000u32 @@ -114,7 +116,8 @@ mod test { assert_eq!(array.statistics().len(), 0); let dtype = array.dtype().clone(); - let compressed = FoRArray::from_inner(FoRData::encode(array).unwrap()); + let compressed = FoRArray::try_from_data(FoRData::encode(array).unwrap()) + .vortex_expect("FoRData is always valid"); assert_eq!(compressed.reference_scalar().dtype(), &dtype); assert!(compressed.reference_scalar().dtype().is_signed_int()); assert!(compressed.encoded().dtype().is_signed_int()); @@ -138,7 +141,8 @@ mod test { let array = PrimitiveArray::from_iter((0u32..1024).map(|x| x % 7)); let bp = BitPackedData::encode(&array.into_array(), 3).unwrap(); let compressed = - FoRArray::from_inner(FoRData::try_new(bp.into_array(), 10u32.into()).unwrap()); + FoRArray::try_from_data(FoRData::try_new(bp.into_array(), 10u32.into()).unwrap()) + .vortex_expect("FoRData is always valid"); assert_arrays_eq!(compressed, expect); } @@ -147,9 +151,11 @@ mod test { // Create a range offset by a million. let expect = PrimitiveArray::from_iter((0u32..1024).map(|x| x % 7 + 10)); let array = PrimitiveArray::from_iter((0u32..1024).map(|x| x % 7)); - let bp = BitPackedArray::from_inner(BitPackedData::encode(&array.into_array(), 2).unwrap()); - let compressed = - FoRArray::from_inner(FoRData::try_new(bp.clone().into_array(), 10u32.into()).unwrap()); + let bp = + BitPackedArray::try_from_data(BitPackedData::encode(&array.into_array(), 2).unwrap())?; + let compressed = FoRArray::try_from_data( + FoRData::try_new(bp.clone().into_array(), 10u32.into()).unwrap(), + )?; let decompressed = fused_decompress::(&compressed, &bp, &mut SESSION.create_execution_ctx())?; assert_arrays_eq!(decompressed, expect); @@ -159,7 +165,7 @@ mod test { #[test] fn test_overflow() -> VortexResult<()> { let array = PrimitiveArray::from_iter(i8::MIN..=i8::MAX); - let compressed = FoRArray::from_inner(FoRData::encode(array.clone()).unwrap()); + let compressed = FoRArray::try_from_data(FoRData::encode(array.clone()).unwrap())?; assert_eq!( i8::MIN, compressed diff --git a/encodings/fastlanes/src/for/compute/cast.rs b/encodings/fastlanes/src/for/compute/cast.rs index 211e4d5d0ce..90a734fa92d 100644 --- a/encodings/fastlanes/src/for/compute/cast.rs +++ b/encodings/fastlanes/src/for/compute/cast.rs @@ -42,12 +42,14 @@ mod tests { use vortex_array::dtype::PType; use vortex_array::scalar::Scalar; use vortex_buffer::buffer; + use vortex_error::VortexExpect; use crate::FoRArray; use crate::FoRData; fn for_arr(encoded: ArrayRef, reference: Scalar) -> FoRArray { - FoRArray::from_inner(FoRData::try_new(encoded, reference).unwrap()) + FoRArray::try_from_data(FoRData::try_new(encoded, reference).unwrap()) + .vortex_expect("FoRData is always valid") } #[test] diff --git a/encodings/fastlanes/src/for/compute/compare.rs b/encodings/fastlanes/src/for/compute/compare.rs index 4e54c282fbe..69786572d0a 100644 --- a/encodings/fastlanes/src/for/compute/compare.rs +++ b/encodings/fastlanes/src/for/compute/compare.rs @@ -103,7 +103,8 @@ mod tests { use crate::FoRData; fn for_arr(encoded: ArrayRef, reference: Scalar) -> FoRArray { - FoRArray::from_inner(FoRData::try_new(encoded, reference).unwrap()) + FoRArray::try_from_data(FoRData::try_new(encoded, reference).unwrap()) + .vortex_expect("FoRData is always valid") } #[test] diff --git a/encodings/fastlanes/src/for/compute/mod.rs b/encodings/fastlanes/src/for/compute/mod.rs index 9957cccccd7..8bd599a625f 100644 --- a/encodings/fastlanes/src/for/compute/mod.rs +++ b/encodings/fastlanes/src/for/compute/mod.rs @@ -54,12 +54,14 @@ mod test { use vortex_array::compute::conformance::filter::test_filter_conformance; use vortex_array::scalar::Scalar; use vortex_buffer::buffer; + use vortex_error::VortexExpect; use crate::FoRArray; use crate::FoRData; fn fa(encoded: ArrayRef, reference: Scalar) -> FoRArray { - FoRArray::from_inner(FoRData::try_new(encoded, reference).unwrap()) + FoRArray::try_from_data(FoRData::try_new(encoded, reference).unwrap()) + .vortex_expect("FoRData is always valid") } #[test] @@ -107,12 +109,14 @@ mod tests { use vortex_array::compute::conformance::consistency::test_array_consistency; use vortex_array::scalar::Scalar; use vortex_buffer::buffer; + use vortex_error::VortexExpect; use crate::FoRArray; use crate::FoRData; fn fa(encoded: ArrayRef, reference: Scalar) -> FoRArray { - FoRArray::from_inner(FoRData::try_new(encoded, reference).unwrap()) + FoRArray::try_from_data(FoRData::try_new(encoded, reference).unwrap()) + .vortex_expect("FoRData is always valid") } #[rstest] diff --git a/encodings/fastlanes/src/for/vtable/mod.rs b/encodings/fastlanes/src/for/vtable/mod.rs index 2f3284471f6..fa931422fca 100644 --- a/encodings/fastlanes/src/for/vtable/mod.rs +++ b/encodings/fastlanes/src/for/vtable/mod.rs @@ -195,11 +195,11 @@ impl FoR { /// Construct a new FoR array from an encoded array and a reference scalar. pub fn try_new(encoded: ArrayRef, reference: Scalar) -> VortexResult { - Ok(Array::from_inner(FoRData::try_new(encoded, reference)?)) + Array::try_from_data(FoRData::try_new(encoded, reference)?) } /// Encode a primitive array using Frame of Reference encoding. pub fn encode(array: PrimitiveArray) -> VortexResult { - Ok(Array::from_inner(FoRData::encode(array)?)) + Array::try_from_data(FoRData::encode(array)?) } } diff --git a/encodings/fastlanes/src/for/vtable/operations.rs b/encodings/fastlanes/src/for/vtable/operations.rs index 1eb4086643e..a251180ea27 100644 --- a/encodings/fastlanes/src/for/vtable/operations.rs +++ b/encodings/fastlanes/src/for/vtable/operations.rs @@ -41,15 +41,17 @@ impl OperationsVTable for FoR { mod test { use vortex_array::arrays::PrimitiveArray; use vortex_array::assert_arrays_eq; + use vortex_error::VortexExpect; use crate::FoRArray; use crate::FoRData; #[test] fn for_scalar_at() { - let for_arr = FoRArray::from_inner( + let for_arr = FoRArray::try_from_data( FoRData::encode(PrimitiveArray::from_iter([-100, 1100, 1500, 1900])).unwrap(), - ); + ) + .vortex_expect("FoRData is always valid"); let expected = PrimitiveArray::from_iter([-100, 1100, 1500, 1900]); assert_arrays_eq!(for_arr, expected); } diff --git a/encodings/fastlanes/src/rle/array/mod.rs b/encodings/fastlanes/src/rle/array/mod.rs index ce6eb493dc1..070ec13ab5e 100644 --- a/encodings/fastlanes/src/rle/array/mod.rs +++ b/encodings/fastlanes/src/rle/array/mod.rs @@ -230,6 +230,7 @@ mod tests { use vortex_array::validity::Validity; use vortex_buffer::Buffer; use vortex_buffer::ByteBufferMut; + use vortex_error::VortexExpect; use vortex_error::VortexResult; use vortex_session::registry::ReadContext; @@ -247,9 +248,10 @@ mod tests { PrimitiveArray::from_iter([0u16, 0, 1, 1, 2].iter().cycle().take(1024).copied()) .into_array(); let values_idx_offsets = PrimitiveArray::from_iter([0u64]).into_array(); - let rle_array = RLEArray::from_inner( + let rle_array = RLEArray::try_from_data( RLEData::try_new(values, indices, values_idx_offsets, 0, 5).unwrap(), - ); + ) + .vortex_expect("RLEData is always valid"); assert_eq!(rle_array.len(), 5); assert_eq!(rle_array.values().len(), 3); @@ -276,7 +278,7 @@ mod tests { ) .into_array(); - let rle_array = RLEArray::from_inner( + let rle_array = RLEArray::try_from_data( RLEData::try_new( values.clone(), indices_with_validity, @@ -285,7 +287,8 @@ mod tests { 3, ) .unwrap(), - ); + ) + .vortex_expect("RLEData is always valid"); assert_eq!(rle_array.len(), 3); assert_eq!(rle_array.values().len(), 2); @@ -314,7 +317,7 @@ mod tests { ) .into_array(); - let rle_array = RLEArray::from_inner( + let rle_array = RLEArray::try_from_data( RLEData::try_new( values.clone(), indices_with_validity, @@ -323,7 +326,8 @@ mod tests { 5, ) .unwrap(), - ); + ) + .vortex_expect("RLEData is always valid"); let valid_slice = rle_array.slice(0..3).unwrap().to_primitive(); // TODO(joe): replace with compute null count @@ -353,7 +357,7 @@ mod tests { ) .into_array(); - let rle_array = RLEArray::from_inner( + let rle_array = RLEArray::try_from_data( RLEData::try_new( values.clone(), indices_with_validity, @@ -362,7 +366,8 @@ mod tests { 5, ) .unwrap(), - ); + ) + .vortex_expect("RLEData is always valid"); // TODO(joe): replace with compute null count let invalid_slice = rle_array @@ -397,7 +402,7 @@ mod tests { ) .into_array(); - let rle_array = RLEArray::from_inner( + let rle_array = RLEArray::try_from_data( RLEData::try_new( values.clone(), indices_with_validity, @@ -406,7 +411,8 @@ mod tests { 4, ) .unwrap(), - ); + ) + .vortex_expect("RLEData is always valid"); let sliced_array = rle_array.slice(1..4).unwrap(); let validity_mask = sliced_array.validity_mask().unwrap(); @@ -426,7 +432,7 @@ mod tests { let values = PrimitiveArray::from_iter(Vec::::new()).into_array(); let indices = PrimitiveArray::from_iter(Vec::::new()).into_array(); let values_idx_offsets = PrimitiveArray::from_iter(Vec::::new()).into_array(); - let rle_array = RLEArray::from_inner( + let rle_array = RLEArray::try_from_data( RLEData::try_new( values, indices.clone(), @@ -435,7 +441,8 @@ mod tests { indices.len(), ) .unwrap(), - ); + ) + .vortex_expect("RLEData is always valid"); assert_eq!(rle_array.len(), 0); assert_eq!(rle_array.values().len(), 0); @@ -446,9 +453,10 @@ mod tests { let values = PrimitiveArray::from_iter([10u32, 20, 30, 40]).into_array(); let indices = PrimitiveArray::from_iter([0u16, 1].repeat(1024)).into_array(); let values_idx_offsets = PrimitiveArray::from_iter([0u64, 2]).into_array(); - let rle_array = RLEArray::from_inner( + let rle_array = RLEArray::try_from_data( RLEData::try_new(values, indices, values_idx_offsets, 0, 2048).unwrap(), - ); + ) + .vortex_expect("RLEData is always valid"); assert_eq!(rle_array.len(), 2048); assert_eq!(rle_array.values().len(), 4); @@ -460,7 +468,8 @@ mod tests { #[test] fn test_rle_serialization() { let primitive = PrimitiveArray::from_iter((0..2048).map(|i| (i / 100) as u32)); - let rle_array = RLEArray::from_inner(RLEData::encode(&primitive).unwrap()); + let rle_array = RLEArray::try_from_data(RLEData::encode(&primitive).unwrap()) + .vortex_expect("RLEData is always valid"); assert_eq!(rle_array.len(), 2048); let original_data = rle_array.to_primitive(); @@ -495,9 +504,10 @@ mod tests { #[test] fn test_rle_serialization_slice() { let primitive = PrimitiveArray::from_iter((0..2048).map(|i| (i / 100) as u32)); - let rle_array = RLEArray::from_inner(RLEData::encode(&primitive).unwrap()); + let rle_array = RLEArray::try_from_data(RLEData::encode(&primitive).unwrap()) + .vortex_expect("RLEData is always valid"); - let sliced = RLEArray::from_inner( + let sliced = RLEArray::try_from_data( RLEData::try_new( rle_array.values().clone(), rle_array.indices().clone(), @@ -506,7 +516,8 @@ mod tests { 100, ) .unwrap(), - ); + ) + .vortex_expect("RLEData is always valid"); assert_eq!(sliced.len(), 100); let ctx = ArrayContext::empty(); @@ -556,16 +567,16 @@ mod tests { // Chunk 1 (positions 1024..) is all-null. let original = PrimitiveArray::from_option_iter(values); - let rle = RLEArray::from_inner(RLEData::encode(&original)?); + let rle = RLEArray::try_from_data(RLEData::encode(&original)?)?; // Simulate cascading compression: narrow u16→u8 then re-encode with RLE, // matching the path taken by the BtrBlocks compressor. let indices_prim = rle.indices().to_primitive().narrow()?; - let re_encoded = RLEArray::from_inner(RLEData::encode(&indices_prim)?); + let re_encoded = RLEArray::try_from_data(RLEData::encode(&indices_prim)?)?; // Reconstruct the outer RLE with re-encoded indices. // SAFETY: we only replace the indices child; all other invariants hold. - let reconstructed = RLEArray::from_inner(unsafe { + let reconstructed = RLEArray::try_from_data(unsafe { RLEData::new_unchecked( rle.values().clone(), re_encoded.into_array(), @@ -574,7 +585,7 @@ mod tests { rle.offset(), rle.len(), ) - }); + })?; // Decompress — panicked before the fill_forward_nulls chunk-boundary fix. let decoded = reconstructed.to_primitive(); diff --git a/encodings/fastlanes/src/rle/array/rle_compress.rs b/encodings/fastlanes/src/rle/array/rle_compress.rs index a269f763b22..ec593846db2 100644 --- a/encodings/fastlanes/src/rle/array/rle_compress.rs +++ b/encodings/fastlanes/src/rle/array/rle_compress.rs @@ -12,6 +12,7 @@ use vortex_array::match_each_native_ptype; use vortex_array::validity::Validity; use vortex_buffer::BitBufferMut; use vortex_buffer::BufferMut; +use vortex_error::VortexExpect; use vortex_error::VortexResult; use crate::FL_CHUNK_SIZE; @@ -148,27 +149,30 @@ mod tests { fn test_encode_decode() { // u8 let array_u8: Buffer = buffer![1, 1, 2, 2, 3, 3]; - let encoded_u8 = RLEArray::from_inner( + let encoded_u8 = RLEArray::try_from_data( RLEData::encode(&PrimitiveArray::new(array_u8, Validity::NonNullable)).unwrap(), - ); + ) + .vortex_expect("RLEData is always valid"); let decoded_u8 = encoded_u8.to_primitive(); let expected_u8 = PrimitiveArray::from_iter(vec![1u8, 1, 2, 2, 3, 3]); assert_arrays_eq!(decoded_u8, expected_u8); // u16 let array_u16: Buffer = buffer![100, 100, 200, 200]; - let encoded_u16 = RLEArray::from_inner( + let encoded_u16 = RLEArray::try_from_data( RLEData::encode(&PrimitiveArray::new(array_u16, Validity::NonNullable)).unwrap(), - ); + ) + .vortex_expect("RLEData is always valid"); let decoded_u16 = encoded_u16.to_primitive(); let expected_u16 = PrimitiveArray::from_iter(vec![100u16, 100, 200, 200]); assert_arrays_eq!(decoded_u16, expected_u16); // u64 let array_u64: Buffer = buffer![1000, 1000, 2000]; - let encoded_u64 = RLEArray::from_inner( + let encoded_u64 = RLEArray::try_from_data( RLEData::encode(&PrimitiveArray::new(array_u64, Validity::NonNullable)).unwrap(), - ); + ) + .vortex_expect("RLEData is always valid"); let decoded_u64 = encoded_u64.to_primitive(); let expected_u64 = PrimitiveArray::from_iter(vec![1000u64, 1000, 2000]); assert_arrays_eq!(decoded_u64, expected_u64); @@ -177,18 +181,20 @@ mod tests { #[test] fn test_length() { let values: Buffer = buffer![1, 1, 2, 2, 2, 3]; - let encoded = RLEArray::from_inner( + let encoded = RLEArray::try_from_data( RLEData::encode(&PrimitiveArray::new(values, Validity::NonNullable)).unwrap(), - ); + ) + .vortex_expect("RLEData is always valid"); assert_eq!(encoded.len(), 6); } #[test] fn test_empty_length() { let values: Buffer = Buffer::empty(); - let encoded = RLEArray::from_inner( + let encoded = RLEArray::try_from_data( RLEData::encode(&PrimitiveArray::new(values, Validity::NonNullable)).unwrap(), - ); + ) + .vortex_expect("RLEData is always valid"); assert_eq!(encoded.len(), 0); assert_eq!(encoded.values().len(), 0); @@ -198,9 +204,10 @@ mod tests { fn test_single_value() { let values: Buffer = vec![42; 2000].into_iter().collect(); - let encoded = RLEArray::from_inner( + let encoded = RLEArray::try_from_data( RLEData::encode(&PrimitiveArray::new(values, Validity::NonNullable)).unwrap(), - ); + ) + .vortex_expect("RLEData is always valid"); assert_eq!(encoded.values().len(), 2); // 2 chunks, each storing value 42 let decoded = encoded.to_primitive(); // Verify round-trip @@ -212,9 +219,10 @@ mod tests { fn test_all_different() { let values: Buffer = (0u8..=255).collect(); - let encoded = RLEArray::from_inner( + let encoded = RLEArray::try_from_data( RLEData::encode(&PrimitiveArray::new(values, Validity::NonNullable)).unwrap(), - ); + ) + .vortex_expect("RLEData is always valid"); assert_eq!(encoded.values().len(), 256); let decoded = encoded.to_primitive(); // Verify round-trip @@ -228,7 +236,8 @@ mod tests { let values: Buffer = (0..1500).map(|i| (i / 100) as u32).collect(); let array = PrimitiveArray::new(values, Validity::NonNullable); - let encoded = RLEArray::from_inner(RLEData::encode(&array).unwrap()); + let encoded = RLEArray::try_from_data(RLEData::encode(&array).unwrap()) + .vortex_expect("RLEData is always valid"); assert_eq!(encoded.len(), 1500); assert_arrays_eq!(encoded, array); @@ -242,7 +251,8 @@ mod tests { let values: Buffer = (0..2048).map(|i| (i / 100) as u32).collect(); let array = PrimitiveArray::new(values, Validity::NonNullable); - let encoded = RLEArray::from_inner(RLEData::encode(&array).unwrap()); + let encoded = RLEArray::try_from_data(RLEData::encode(&array).unwrap()) + .vortex_expect("RLEData is always valid"); assert_eq!(encoded.len(), 2048); assert_arrays_eq!(encoded, array); @@ -263,7 +273,8 @@ mod tests { #[case::f64((-2000..2000).map(|i| i as f64).collect::>())] fn test_roundtrip_primitive_types(#[case] values: Buffer) { let primitive = values.clone().into_array().to_primitive(); - let result = RLEArray::from_inner(RLEData::encode(&primitive).unwrap()); + let result = RLEArray::try_from_data(RLEData::encode(&primitive).unwrap()) + .vortex_expect("RLEData is always valid"); let decoded = result.to_primitive(); let expected = PrimitiveArray::new(values, primitive.validity().clone()); assert_arrays_eq!(decoded, expected); @@ -277,7 +288,8 @@ mod tests { #[case(vec![0f64, -0f64])] fn test_float_zeros(#[case] values: Vec) { let primitive = PrimitiveArray::from_iter(values); - let rle = RLEArray::from_inner(RLEData::encode(&primitive).unwrap()); + let rle = RLEArray::try_from_data(RLEData::encode(&primitive).unwrap()) + .vortex_expect("RLEData is always valid"); let decoded = rle.to_primitive(); assert_arrays_eq!(primitive, decoded); } diff --git a/encodings/fastlanes/src/rle/compute/cast.rs b/encodings/fastlanes/src/rle/compute/cast.rs index 40bc6c6ab5c..bd18100c961 100644 --- a/encodings/fastlanes/src/rle/compute/cast.rs +++ b/encodings/fastlanes/src/rle/compute/cast.rs @@ -54,12 +54,14 @@ mod tests { use vortex_array::dtype::PType; use vortex_array::validity::Validity; use vortex_buffer::Buffer; + use vortex_error::VortexExpect; use crate::RLEData; use crate::rle::RLEArray; fn rle(primitive: &PrimitiveArray) -> RLEArray { - RLEArray::from_inner(RLEData::encode(primitive).unwrap()) + RLEArray::try_from_data(RLEData::encode(primitive).unwrap()) + .vortex_expect("RLEData is always valid") } #[test] diff --git a/encodings/fastlanes/src/rle/vtable/mod.rs b/encodings/fastlanes/src/rle/vtable/mod.rs index d93561d6421..3bf09296b8a 100644 --- a/encodings/fastlanes/src/rle/vtable/mod.rs +++ b/encodings/fastlanes/src/rle/vtable/mod.rs @@ -25,6 +25,7 @@ use vortex_array::vtable::Array; use vortex_array::vtable::ArrayId; use vortex_array::vtable::VTable; use vortex_array::vtable::ValidityVTableFromChildSliceHelper; +use vortex_error::VortexExpect; use vortex_error::VortexResult; use vortex_error::vortex_ensure; use vortex_error::vortex_panic; @@ -263,14 +264,15 @@ impl RLE { offset: usize, length: usize, ) -> RLEArray { - Array::from_inner(unsafe { + Array::try_from_data(unsafe { RLEData::new_unchecked(values, indices, values_idx_offsets, dtype, offset, length) }) + .vortex_expect("RLEData is always valid") } /// Encode a primitive array using FastLanes RLE. pub fn encode(array: &PrimitiveArray) -> VortexResult { - Ok(Array::from_inner(RLEData::encode(array)?)) + Array::try_from_data(RLEData::encode(array)?) } } diff --git a/encodings/fastlanes/src/rle/vtable/operations.rs b/encodings/fastlanes/src/rle/vtable/operations.rs index ffa0a15f5e0..3c5e57305a1 100644 --- a/encodings/fastlanes/src/rle/vtable/operations.rs +++ b/encodings/fastlanes/src/rle/vtable/operations.rs @@ -66,7 +66,7 @@ mod tests { .into_array(); let values_idx_offsets = PrimitiveArray::from_iter([0u64]).into_array(); - RLEArray::from_inner( + RLEArray::try_from_data( RLEData::try_new( values, indices.clone(), @@ -76,6 +76,7 @@ mod tests { ) .unwrap(), ) + .vortex_expect("RLEData is always valid") } pub(super) fn rle_array_with_nulls() -> RLEArray { @@ -103,7 +104,7 @@ mod tests { ) .into_array(); - RLEArray::from_inner( + RLEArray::try_from_data( RLEData::try_new( values, indices.clone(), @@ -113,6 +114,7 @@ mod tests { ) .unwrap(), ) + .vortex_expect("RLEData is always valid") } } @@ -173,7 +175,8 @@ mod tests { let expected: Vec = (0..3000).map(|i| (i / 50) as u16).collect(); let array = values.into_array(); - let encoded = RLEArray::from_inner(RLEData::encode(&array.to_primitive()).unwrap()); + let encoded = RLEArray::try_from_data(RLEData::encode(&array.to_primitive()).unwrap()) + .vortex_expect("RLEData is always valid"); // Access scalars from multiple chunks. for &idx in &[1023, 1024, 1025, 2047, 2048, 2049] { @@ -279,7 +282,8 @@ mod tests { let expected: Vec = (0..2100).map(|i| (i / 100) as u32).collect(); let array = values.into_array(); - let encoded = RLEArray::from_inner(RLEData::encode(&array.to_primitive()).unwrap()); + let encoded = RLEArray::try_from_data(RLEData::encode(&array.to_primitive()).unwrap()) + .vortex_expect("RLEData is always valid"); // Slice across first and second chunk. let slice = encoded.slice(500..1500).unwrap(); diff --git a/encodings/fsst/benches/fsst_compress.rs b/encodings/fsst/benches/fsst_compress.rs index ec3f7dffb31..3bd94850f72 100644 --- a/encodings/fsst/benches/fsst_compress.rs +++ b/encodings/fsst/benches/fsst_compress.rs @@ -25,6 +25,7 @@ use vortex_array::dtype::Nullability; use vortex_array::scalar::Scalar; use vortex_array::scalar_fn::fns::operators::Operator; use vortex_array::session::ArraySession; +use vortex_error::VortexExpect; use vortex_fsst::fsst_compress; use vortex_fsst::fsst_train_compressor; use vortex_session::VortexSession; @@ -70,7 +71,8 @@ fn decompress_fsst(bencher: Bencher, (string_count, avg_len, unique_chars): (usi let len = array.len(); let dtype = array.dtype().clone(); let encoded = - vortex_fsst::FSSTArray::from_inner(fsst_compress(array, len, &dtype, &compressor)); + vortex_fsst::FSSTArray::try_from_data(fsst_compress(array, len, &dtype, &compressor)) + .vortex_expect("data is always valid"); bencher .with_inputs(|| &encoded) @@ -118,12 +120,13 @@ fn canonicalize_compare( ) { let array = generate_test_data(string_count, avg_len, unique_chars); let compressor = fsst_train_compressor(&array); - let fsst_array = vortex_fsst::FSSTArray::from_inner(fsst_compress( + let fsst_array = vortex_fsst::FSSTArray::try_from_data(fsst_compress( &array, array.len(), array.dtype(), &compressor, - )); + )) + .vortex_expect("data is always valid"); let constant = ConstantArray::new(Scalar::from(&b"const"[..]), array.len()); bencher diff --git a/encodings/fsst/benches/fsst_url_compare.rs b/encodings/fsst/benches/fsst_url_compare.rs index fecf8c008a2..466e35cde50 100644 --- a/encodings/fsst/benches/fsst_url_compare.rs +++ b/encodings/fsst/benches/fsst_url_compare.rs @@ -18,6 +18,7 @@ use vortex_array::expr::root; use vortex_array::scalar::Scalar; use vortex_array::scalar_fn::fns::operators::Operator; use vortex_array::session::ArraySession; +use vortex_error::VortexExpect; use vortex_fsst::fsst_compress; use vortex_fsst::fsst_train_compressor; use vortex_fsst::test_utils::HIGH_MATCH_DOMAIN; @@ -98,12 +99,13 @@ fn eq_pushdown_low_match(bencher: Bencher) { fn eq_canonicalize_high_match(bencher: Bencher) { let data = &*URL_DATA; let compressor = fsst_train_compressor(data); - let fsst_array = vortex_fsst::FSSTArray::from_inner(fsst_compress( + let fsst_array = vortex_fsst::FSSTArray::try_from_data(fsst_compress( data, data.len(), data.dtype(), &compressor, - )); + )) + .vortex_expect("data is always valid"); let match_url = pick_url_with_domain(data, HIGH_MATCH_DOMAIN); let constant = ConstantArray::new(Scalar::from(match_url.as_str()), NUM_URLS); @@ -125,12 +127,13 @@ fn eq_canonicalize_high_match(bencher: Bencher) { fn eq_canonicalize_low_match(bencher: Bencher) { let data = &*URL_DATA; let compressor = fsst_train_compressor(data); - let fsst_array = vortex_fsst::FSSTArray::from_inner(fsst_compress( + let fsst_array = vortex_fsst::FSSTArray::try_from_data(fsst_compress( data, data.len(), data.dtype(), &compressor, - )); + )) + .vortex_expect("data is always valid"); let match_url = pick_url_with_domain(data, LOW_MATCH_DOMAIN); let constant = ConstantArray::new(Scalar::from(match_url.as_str()), NUM_URLS); diff --git a/encodings/fsst/src/array.rs b/encodings/fsst/src/array.rs index 78e8d8edaf4..8da05a6845c 100644 --- a/encodings/fsst/src/array.rs +++ b/encodings/fsst/src/array.rs @@ -412,13 +412,13 @@ impl FSST { codes: VarBinArray, uncompressed_lengths: ArrayRef, ) -> VortexResult { - Ok(Array::from_inner(FSSTData::try_new( + Array::try_from_data(FSSTData::try_new( dtype, symbols, symbol_lengths, codes, uncompressed_lengths, - )?)) + )?) } } diff --git a/encodings/fsst/src/compress.rs b/encodings/fsst/src/compress.rs index ce568ca0d74..28c2fb41e09 100644 --- a/encodings/fsst/src/compress.rs +++ b/encodings/fsst/src/compress.rs @@ -111,6 +111,7 @@ mod tests { use vortex_array::dtype::DType; use vortex_array::dtype::Nullability; use vortex_array::scalar::Scalar; + use vortex_error::VortexExpect; use crate::FSSTArray; use crate::compress::DEFAULT_BUFFER_LEN; @@ -133,7 +134,10 @@ mod tests { &compressor, ); - let decoded = FSSTArray::from_inner(compressed).scalar_at(0).unwrap(); + let decoded = FSSTArray::try_from_data(compressed) + .vortex_expect("data is always valid") + .scalar_at(0) + .unwrap(); let expected = Scalar::utf8(big_string, Nullability::NonNullable); diff --git a/encodings/fsst/src/compute/like.rs b/encodings/fsst/src/compute/like.rs index 6bb6cf7169e..8db501e996c 100644 --- a/encodings/fsst/src/compute/like.rs +++ b/encodings/fsst/src/compute/like.rs @@ -98,6 +98,7 @@ mod tests { use vortex_array::scalar_fn::fns::like::LikeKernel; use vortex_array::scalar_fn::fns::like::LikeOptions; use vortex_array::session::ArraySession; + use vortex_error::VortexExpect; use vortex_error::VortexResult; use vortex_session::VortexSession; @@ -114,7 +115,8 @@ mod tests { let compressor = fsst_train_compressor(&varbin); let len = varbin.len(); let dtype = varbin.dtype().clone(); - FSSTArray::from_inner(fsst_compress(varbin, len, &dtype, &compressor)) + FSSTArray::try_from_data(fsst_compress(varbin, len, &dtype, &compressor)) + .vortex_expect("data is always valid") } fn run_like(array: FSSTArray, pattern: &str, opts: LikeOptions) -> VortexResult { diff --git a/encodings/fsst/src/compute/mod.rs b/encodings/fsst/src/compute/mod.rs index 9ced229e603..29da66d8773 100644 --- a/encodings/fsst/src/compute/mod.rs +++ b/encodings/fsst/src/compute/mod.rs @@ -63,6 +63,7 @@ mod tests { use vortex_array::compute::conformance::take::test_take_conformance; use vortex_array::dtype::DType; use vortex_array::dtype::Nullability; + use vortex_error::VortexExpect; use crate::FSSTArray; use crate::fsst_compress; @@ -72,7 +73,8 @@ mod tests { fn test_take_null() { let arr = VarBinArray::from_iter([Some("h")], DType::Utf8(Nullability::NonNullable)); let compr = fsst_train_compressor(&arr); - let fsst = FSSTArray::from_inner(fsst_compress(&arr, arr.len(), arr.dtype(), &compr)); + let fsst = FSSTArray::try_from_data(fsst_compress(&arr, arr.len(), arr.dtype(), &compr)) + .vortex_expect("data is always valid"); let idx1: PrimitiveArray = (0..1).collect(); @@ -104,12 +106,13 @@ mod tests { ))] fn test_take_fsst_conformance(#[case] varbin: VarBinArray) { let compressor = fsst_train_compressor(&varbin); - let array = FSSTArray::from_inner(fsst_compress( + let array = FSSTArray::try_from_data(fsst_compress( &varbin, varbin.len(), varbin.dtype(), &compressor, - )); + )) + .vortex_expect("data is always valid"); test_take_conformance(&array.into_array()); } @@ -121,7 +124,7 @@ mod tests { DType::Utf8(Nullability::NonNullable), ); let compressor = fsst_train_compressor(&varbin); - FSSTArray::from_inner(fsst_compress(&varbin, varbin.len(), varbin.dtype(), &compressor)) + FSSTArray::try_from_data(fsst_compress(&varbin, varbin.len(), varbin.dtype(), &compressor)).vortex_expect("data is always valid") })] // Nullable strings #[case::fsst_nullable({ @@ -132,7 +135,7 @@ mod tests { let compressor = fsst_train_compressor(&varbin); let len = varbin.len(); let dtype = varbin.dtype().clone(); - FSSTArray::from_inner(fsst_compress(varbin, len, &dtype, &compressor)) + FSSTArray::try_from_data(fsst_compress(varbin, len, &dtype, &compressor)).vortex_expect("data is always valid") })] // Repetitive patterns (good for FSST compression) #[case::fsst_repetitive({ @@ -141,7 +144,7 @@ mod tests { DType::Utf8(Nullability::NonNullable), ); let compressor = fsst_train_compressor(&varbin); - FSSTArray::from_inner(fsst_compress(&varbin, varbin.len(), varbin.dtype(), &compressor)) + FSSTArray::try_from_data(fsst_compress(&varbin, varbin.len(), varbin.dtype(), &compressor)).vortex_expect("data is always valid") })] // Edge cases #[case::fsst_single({ @@ -150,7 +153,7 @@ mod tests { DType::Utf8(Nullability::NonNullable), ); let compressor = fsst_train_compressor(&varbin); - FSSTArray::from_inner(fsst_compress(&varbin, varbin.len(), varbin.dtype(), &compressor)) + FSSTArray::try_from_data(fsst_compress(&varbin, varbin.len(), varbin.dtype(), &compressor)).vortex_expect("data is always valid") })] #[case::fsst_empty_strings({ let varbin = VarBinArray::from_iter( @@ -160,7 +163,7 @@ mod tests { let compressor = fsst_train_compressor(&varbin); let len = varbin.len(); let dtype = varbin.dtype().clone(); - FSSTArray::from_inner(fsst_compress(varbin, len, &dtype, &compressor)) + FSSTArray::try_from_data(fsst_compress(varbin, len, &dtype, &compressor)).vortex_expect("data is always valid") })] // Large arrays #[case::fsst_large({ @@ -182,7 +185,7 @@ mod tests { let compressor = fsst_train_compressor(&varbin); let len = varbin.len(); let dtype = varbin.dtype().clone(); - FSSTArray::from_inner(fsst_compress(varbin, len, &dtype, &compressor)) + FSSTArray::try_from_data(fsst_compress(varbin, len, &dtype, &compressor)).vortex_expect("data is always valid") })] fn test_fsst_consistency(#[case] array: FSSTArray) { diff --git a/encodings/fsst/src/dfa/tests.rs b/encodings/fsst/src/dfa/tests.rs index c9c39f455dd..fd23c69f978 100644 --- a/encodings/fsst/src/dfa/tests.rs +++ b/encodings/fsst/src/dfa/tests.rs @@ -20,6 +20,7 @@ use vortex_array::dtype::Nullability; use vortex_array::scalar_fn::fns::like::Like; use vortex_array::scalar_fn::fns::like::LikeOptions; use vortex_array::session::ArraySession; +use vortex_error::VortexExpect; use vortex_error::VortexResult; use vortex_session::VortexSession; @@ -229,7 +230,8 @@ fn make_fsst_str(strings: &[Option<&str>]) -> FSSTArray { let compressor = fsst_train_compressor(&varbin); let len = varbin.len(); let dtype = varbin.dtype().clone(); - FSSTArray::from_inner(fsst_compress(varbin, len, &dtype, &compressor)) + FSSTArray::try_from_data(fsst_compress(varbin, len, &dtype, &compressor)) + .vortex_expect("data is always valid") } fn run_like(array: FSSTArray, pattern_arr: ArrayRef) -> VortexResult { diff --git a/encodings/fsst/src/ops.rs b/encodings/fsst/src/ops.rs index 6bebf49bc96..39186c0d44d 100644 --- a/encodings/fsst/src/ops.rs +++ b/encodings/fsst/src/ops.rs @@ -2,7 +2,6 @@ // SPDX-FileCopyrightText: Copyright the Vortex contributors use vortex_array::ExecutionCtx; -use vortex_array::IntoArray; use vortex_array::arrays::varbin::varbin_scalar; use vortex_array::scalar::Scalar; use vortex_array::vtable::Array; @@ -19,7 +18,7 @@ impl OperationsVTable for FSST { index: usize, _ctx: &mut ExecutionCtx, ) -> VortexResult { - let compressed = array.codes().clone().into_array().scalar_at(index)?; + let compressed = array.codes().scalar_at(index)?; let binary_datum = compressed.as_binary().value().vortex_expect("non-null"); let decoded_buffer = ByteBuffer::from(array.decompressor().decompress(binary_datum)); diff --git a/encodings/fsst/src/test_utils.rs b/encodings/fsst/src/test_utils.rs index f4f1597a7d5..645957088fd 100644 --- a/encodings/fsst/src/test_utils.rs +++ b/encodings/fsst/src/test_utils.rs @@ -46,7 +46,9 @@ pub fn gen_fsst_test_data(len: usize, avg_str_len: usize, unique_chars: u8) -> A let len = varbin.len(); let dtype = varbin.dtype().clone(); - FSSTArray::from_inner(fsst_compress(varbin, len, &dtype, &compressor)).into_array() + FSSTArray::try_from_data(fsst_compress(varbin, len, &dtype, &compressor)) + .vortex_expect("data is always valid") + .into_array() } pub fn gen_dict_fsst_test_data( @@ -142,7 +144,8 @@ pub fn make_fsst_urls(n: usize) -> FSSTArray { let compressor = fsst_train_compressor(&varbin); let len = varbin.len(); let dtype = varbin.dtype().clone(); - Array::from_inner(fsst_compress(varbin, len, &dtype, &compressor)) + Array::try_from_data(fsst_compress(varbin, len, &dtype, &compressor)) + .vortex_expect("data is always valid") } // --------------------------------------------------------------------------- @@ -238,7 +241,8 @@ pub fn make_fsst_clickbench_urls(n: usize) -> FSSTArray { let compressor = fsst_train_compressor(&varbin); let len = varbin.len(); let dtype = varbin.dtype().clone(); - Array::from_inner(fsst_compress(varbin, len, &dtype, &compressor)) + Array::try_from_data(fsst_compress(varbin, len, &dtype, &compressor)) + .vortex_expect("data is always valid") } // --------------------------------------------------------------------------- @@ -306,7 +310,8 @@ pub fn make_fsst_short_urls(n: usize) -> FSSTArray { let compressor = fsst_train_compressor(&varbin); let len = varbin.len(); let dtype = varbin.dtype().clone(); - Array::from_inner(fsst_compress(varbin, len, &dtype, &compressor)) + Array::try_from_data(fsst_compress(varbin, len, &dtype, &compressor)) + .vortex_expect("data is always valid") } // --------------------------------------------------------------------------- @@ -378,7 +383,8 @@ pub fn make_fsst_log_lines(n: usize) -> FSSTArray { let compressor = fsst_train_compressor(&varbin); let len = varbin.len(); let dtype = varbin.dtype().clone(); - Array::from_inner(fsst_compress(varbin, len, &dtype, &compressor)) + Array::try_from_data(fsst_compress(varbin, len, &dtype, &compressor)) + .vortex_expect("data is always valid") } // --------------------------------------------------------------------------- @@ -437,7 +443,8 @@ pub fn make_fsst_json_strings(n: usize) -> FSSTArray { let compressor = fsst_train_compressor(&varbin); let len = varbin.len(); let dtype = varbin.dtype().clone(); - Array::from_inner(fsst_compress(varbin, len, &dtype, &compressor)) + Array::try_from_data(fsst_compress(varbin, len, &dtype, &compressor)) + .vortex_expect("data is always valid") } // --------------------------------------------------------------------------- @@ -509,7 +516,8 @@ pub fn make_fsst_file_paths(n: usize) -> FSSTArray { let compressor = fsst_train_compressor(&varbin); let len = varbin.len(); let dtype = varbin.dtype().clone(); - Array::from_inner(fsst_compress(varbin, len, &dtype, &compressor)) + Array::try_from_data(fsst_compress(varbin, len, &dtype, &compressor)) + .vortex_expect("data is always valid") } // --------------------------------------------------------------------------- @@ -562,7 +570,8 @@ pub fn make_fsst_emails(n: usize) -> FSSTArray { let compressor = fsst_train_compressor(&varbin); let len = varbin.len(); let dtype = varbin.dtype().clone(); - Array::from_inner(fsst_compress(varbin, len, &dtype, &compressor)) + Array::try_from_data(fsst_compress(varbin, len, &dtype, &compressor)) + .vortex_expect("data is always valid") } // --------------------------------------------------------------------------- @@ -601,5 +610,6 @@ pub fn make_fsst_rare_match(n: usize) -> FSSTArray { let compressor = fsst_train_compressor(&varbin); let len = varbin.len(); let dtype = varbin.dtype().clone(); - Array::from_inner(fsst_compress(varbin, len, &dtype, &compressor)) + Array::try_from_data(fsst_compress(varbin, len, &dtype, &compressor)) + .vortex_expect("data is always valid") } diff --git a/encodings/pco/src/array.rs b/encodings/pco/src/array.rs index a2437be32aa..cc9bd6e8488 100644 --- a/encodings/pco/src/array.rs +++ b/encodings/pco/src/array.rs @@ -301,7 +301,7 @@ pub(crate) fn number_type_from_dtype(dtype: &DType) -> NumberType { fn collect_valid(parray: &PrimitiveArray) -> VortexResult { let mask = parray.validity_mask()?; - Ok(parray.clone().into_array().filter(mask)?.to_primitive()) + Ok(parray.filter(mask)?.to_primitive()) } pub(crate) fn vortex_err_from_pco(err: PcoError) -> VortexError { @@ -325,11 +325,7 @@ impl Pco { level: usize, values_per_page: usize, ) -> VortexResult { - Ok(Array::from_inner(PcoData::from_primitive( - parray, - level, - values_per_page, - )?)) + Array::try_from_data(PcoData::from_primitive(parray, level, values_per_page)?) } } diff --git a/encodings/pco/src/compute/cast.rs b/encodings/pco/src/compute/cast.rs index 28dfddd4344..d11dcabddf0 100644 --- a/encodings/pco/src/compute/cast.rs +++ b/encodings/pco/src/compute/cast.rs @@ -12,7 +12,7 @@ use crate::PcoArray; use crate::PcoData; impl CastReduce for Pco { fn cast(array: &PcoArray, dtype: &DType) -> VortexResult> { - if !dtype.is_nullable() || !array.clone().into_array().all_valid()? { + if !dtype.is_nullable() || !array.all_valid()? { // TODO(joe): fixme // We cannot cast to non-nullable since the validity containing nulls is used to decode // the PCO array, this would require rewriting tables. diff --git a/encodings/pco/src/test.rs b/encodings/pco/src/test.rs index 7d647d2e728..d4fab23824a 100644 --- a/encodings/pco/src/test.rs +++ b/encodings/pco/src/test.rs @@ -26,6 +26,7 @@ use vortex_array::validity::Validity; use vortex_array::vtable::ValidityHelper; use vortex_buffer::Buffer; use vortex_buffer::BufferMut; +use vortex_error::VortexExpect; use vortex_error::VortexResult; use vortex_mask::Mask; use vortex_session::VortexSession; @@ -102,7 +103,7 @@ fn test_validity_and_multiple_chunks_and_pages() { let compression_level = 3; let values_per_chunk = 33; let values_per_page = 10; - let compressed = PcoArray::from_inner( + let compressed = PcoArray::try_from_data( PcoData::from_primitive_with_values_per_chunk( &array, compression_level, @@ -110,7 +111,8 @@ fn test_validity_and_multiple_chunks_and_pages() { values_per_page, ) .unwrap(), - ); + ) + .vortex_expect("PcoData is always valid"); assert_eq!(compressed.metadata.chunks.len(), 6); // 191 values / 33 rounds up to 6 assert_eq!(compressed.metadata.chunks[0].pages.len(), 4); // 33 / 10 rounds up to 4 diff --git a/encodings/runend/src/array.rs b/encodings/runend/src/array.rs index 73ad5bda9a1..ad27cb3fd8f 100644 --- a/encodings/runend/src/array.rs +++ b/encodings/runend/src/array.rs @@ -243,12 +243,13 @@ impl RunEnd { offset: usize, length: usize, ) -> RunEndArray { - Array::from_inner(unsafe { RunEndData::new_unchecked(ends, values, offset, length) }) + Array::try_from_data(unsafe { RunEndData::new_unchecked(ends, values, offset, length) }) + .vortex_expect("RunEndData is always valid") } /// Build a new [`RunEndArray`] from ends and values. pub fn try_new(ends: ArrayRef, values: ArrayRef) -> VortexResult { - Ok(Array::from_inner(RunEndData::try_new(ends, values)?)) + Array::try_from_data(RunEndData::try_new(ends, values)?) } /// Build a new [`RunEndArray`] from ends, values, offset, and length. @@ -258,19 +259,20 @@ impl RunEnd { offset: usize, length: usize, ) -> VortexResult { - Ok(Array::from_inner(RunEndData::try_new_offset_length( + Array::try_from_data(RunEndData::try_new_offset_length( ends, values, offset, length, - )?)) + )?) } /// Build a new [`RunEndArray`] from ends and values (panics on invalid input). pub fn new(ends: ArrayRef, values: ArrayRef) -> RunEndArray { - Array::from_inner(RunEndData::new(ends, values)) + Array::try_from_data(RunEndData::new(ends, values)) + .vortex_expect("RunEndData is always valid") } /// Run the array through run-end encoding. pub fn encode(array: ArrayRef) -> VortexResult { - Ok(Array::from_inner(RunEndData::encode(array)?)) + Array::try_from_data(RunEndData::encode(array)?) } } diff --git a/encodings/runend/src/compute/is_sorted.rs b/encodings/runend/src/compute/is_sorted.rs index fdad432d19b..b0d00bfb146 100644 --- a/encodings/runend/src/compute/is_sorted.rs +++ b/encodings/runend/src/compute/is_sorted.rs @@ -39,10 +39,7 @@ impl DynAggregateKernel for RunEndIsSortedKernel { let result = if options.strict { // Strict sort with run-end encoding means we need to canonicalize // since run-end encoding repeats values. - is_strict_sorted( - &array.clone().into_array().to_canonical()?.into_array(), - ctx, - )? + is_strict_sorted(&array.to_canonical()?.into_array(), ctx)? } else { is_sorted(array.values(), ctx)? }; diff --git a/encodings/sequence/src/array.rs b/encodings/sequence/src/array.rs index 0de6847de28..e7fbc0078ae 100644 --- a/encodings/sequence/src/array.rs +++ b/encodings/sequence/src/array.rs @@ -455,13 +455,13 @@ impl Sequence { nullability: Nullability, length: usize, ) -> VortexResult { - Ok(Array::from_inner(SequenceData::try_new( + Array::try_from_data(SequenceData::try_new( base, multiplier, ptype, nullability, length, - )?)) + )?) } /// Construct a new typed [`SequenceArray`] from base/multiplier values. @@ -471,12 +471,12 @@ impl Sequence { nullability: Nullability, length: usize, ) -> VortexResult { - Ok(Array::from_inner(SequenceData::try_new_typed( + Array::try_from_data(SequenceData::try_new_typed( base, multiplier, nullability, length, - )?)) + )?) } } diff --git a/encodings/sequence/src/compress.rs b/encodings/sequence/src/compress.rs index 1696e7f678e..b073ace8dc2 100644 --- a/encodings/sequence/src/compress.rs +++ b/encodings/sequence/src/compress.rs @@ -89,7 +89,7 @@ pub fn sequence_encode(primitive_array: &PrimitiveArray) -> VortexResult(ctx)?; let fill_value = array.fill_scalar().as_list(); - let validity = Validity::from_mask(array.clone().into_array().validity_mask()?, nullability); + let validity = Validity::from_mask(array.validity_mask()?, nullability); Ok(match_each_integer_ptype!(indices.ptype(), |I| { execute_sparse_fixed_size_list_inner::( @@ -491,10 +491,7 @@ fn execute_varbin( let patches = array.resolved_patches()?; let indices = patches.indices().clone().execute::(ctx)?; let values = patches.values().clone().execute::(ctx)?; - let validity = Validity::from_mask( - array.clone().into_array().validity_mask()?, - dtype.nullability(), - ); + let validity = Validity::from_mask(array.validity_mask()?, dtype.nullability()); let len = array.len(); Ok(match_each_integer_ptype!(indices.ptype(), |I| { diff --git a/encodings/sparse/src/lib.rs b/encodings/sparse/src/lib.rs index a732a810ed5..e4b6c9b675d 100644 --- a/encodings/sparse/src/lib.rs +++ b/encodings/sparse/src/lib.rs @@ -285,9 +285,7 @@ impl Sparse { len: usize, fill_value: Scalar, ) -> VortexResult { - Ok(Array::from_inner(SparseData::try_new( - indices, values, len, fill_value, - )?)) + Array::try_from_data(SparseData::try_new(indices, values, len, fill_value)?) } /// Encode the given array as a [`SparseArray`]. diff --git a/encodings/zigzag/src/array.rs b/encodings/zigzag/src/array.rs index 6804ec16230..db40430ee78 100644 --- a/encodings/zigzag/src/array.rs +++ b/encodings/zigzag/src/array.rs @@ -193,7 +193,7 @@ impl ZigZag { /// Construct a new [`ZigZagArray`] from an encoded unsigned integer array. pub fn try_new(encoded: ArrayRef) -> VortexResult { - Ok(Array::from_inner(ZigZagData::try_new(encoded)?)) + Array::try_from_data(ZigZagData::try_new(encoded)?) } } @@ -292,7 +292,7 @@ mod test { let array = buffer![1i32, -5i32, 2, 3, 4, 5, 6, 7, 8, 9, 10] .into_array() .to_primitive(); - let zigzag = ZigZagArray::from_inner(zigzag_encode(array.clone())?); + let zigzag = ZigZagArray::try_from_data(zigzag_encode(array.clone())?)?; assert_eq!( zigzag.statistics().compute_max::(), diff --git a/encodings/zigzag/src/compute/cast.rs b/encodings/zigzag/src/compute/cast.rs index 22c791a2f02..993ce925b5d 100644 --- a/encodings/zigzag/src/compute/cast.rs +++ b/encodings/zigzag/src/compute/cast.rs @@ -123,10 +123,10 @@ mod tests { } #[rstest] - #[case(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_iter([-100i32, -50, -1, 0, 1, 50, 100])).unwrap()))] - #[case(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_iter([-1000i64, -1, 0, 1, 1000])).unwrap()))] - #[case(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_option_iter([Some(-5i16), None, Some(0), Some(5), None])).unwrap()))] - #[case(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_iter([i32::MIN, -1, 0, 1, i32::MAX])).unwrap()))] + #[case(ZigZagArray::try_from_data(zigzag_encode(PrimitiveArray::from_iter([-100i32, -50, -1, 0, 1, 50, 100])).unwrap()).unwrap())] + #[case(ZigZagArray::try_from_data(zigzag_encode(PrimitiveArray::from_iter([-1000i64, -1, 0, 1, 1000])).unwrap()).unwrap())] + #[case(ZigZagArray::try_from_data(zigzag_encode(PrimitiveArray::from_option_iter([Some(-5i16), None, Some(0), Some(5), None])).unwrap()).unwrap())] + #[case(ZigZagArray::try_from_data(zigzag_encode(PrimitiveArray::from_iter([i32::MIN, -1, 0, 1, i32::MAX])).unwrap()).unwrap())] fn test_cast_zigzag_conformance(#[case] array: ZigZagArray) { test_cast_conformance(&array.into_array()); } diff --git a/encodings/zigzag/src/compute/mod.rs b/encodings/zigzag/src/compute/mod.rs index c9b9ea030c4..31e7a271ae4 100644 --- a/encodings/zigzag/src/compute/mod.rs +++ b/encodings/zigzag/src/compute/mod.rs @@ -92,10 +92,10 @@ mod tests { #[test] pub fn nullable_scalar_at() -> VortexResult<()> { - let zigzag = ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::new( + let zigzag = ZigZagArray::try_from_data(zigzag_encode(PrimitiveArray::new( buffer![-189, -160, 1], Validity::AllValid, - ))?); + ))?)?; assert_eq!( zigzag.scalar_at(1)?, Scalar::primitive(-160, Nullability::Nullable) @@ -105,10 +105,10 @@ mod tests { #[test] fn take_zigzag() -> VortexResult<()> { - let zigzag = ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::new( + let zigzag = ZigZagArray::try_from_data(zigzag_encode(PrimitiveArray::new( buffer![-189, -160, 1], Validity::AllValid, - ))?); + ))?)?; let indices = buffer![0, 2].into_array(); let actual = zigzag.take(indices.to_array()).unwrap(); @@ -120,10 +120,10 @@ mod tests { #[test] fn filter_zigzag() -> VortexResult<()> { - let zigzag = ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::new( + let zigzag = ZigZagArray::try_from_data(zigzag_encode(PrimitiveArray::new( buffer![-189, -160, 1], Validity::AllValid, - ))?); + ))?)?; let filter_mask = BitBuffer::from(vec![true, false, true]).into(); let actual = zigzag.filter(filter_mask).unwrap(); @@ -195,29 +195,29 @@ mod tests { #[rstest] // Basic ZigZag arrays - #[case::zigzag_i8(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_iter([-128i8, -1, 0, 1, 127])).unwrap()))] - #[case::zigzag_i16(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_iter([-1000i16, -100, 0, 100, 1000])).unwrap()))] - #[case::zigzag_i32(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_iter([-100000i32, -1000, 0, 1000, 100000])).unwrap()))] - #[case::zigzag_i64(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_iter([-1000000i64, -10000, 0, 10000, 1000000])).unwrap()))] + #[case::zigzag_i8(ZigZagArray::try_from_data(zigzag_encode(PrimitiveArray::from_iter([-128i8, -1, 0, 1, 127])).unwrap()).unwrap())] + #[case::zigzag_i16(ZigZagArray::try_from_data(zigzag_encode(PrimitiveArray::from_iter([-1000i16, -100, 0, 100, 1000])).unwrap()).unwrap())] + #[case::zigzag_i32(ZigZagArray::try_from_data(zigzag_encode(PrimitiveArray::from_iter([-100000i32, -1000, 0, 1000, 100000])).unwrap()).unwrap())] + #[case::zigzag_i64(ZigZagArray::try_from_data(zigzag_encode(PrimitiveArray::from_iter([-1000000i64, -10000, 0, 10000, 1000000])).unwrap()).unwrap())] // Nullable arrays - #[case::zigzag_nullable_i32(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_option_iter([Some(-100i32), None, Some(0), Some(100), None])).unwrap()))] - #[case::zigzag_nullable_i64(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_option_iter([Some(-1000i64), None, Some(0), Some(1000), None])).unwrap()))] + #[case::zigzag_nullable_i32(ZigZagArray::try_from_data(zigzag_encode(PrimitiveArray::from_option_iter([Some(-100i32), None, Some(0), Some(100), None])).unwrap()).unwrap())] + #[case::zigzag_nullable_i64(ZigZagArray::try_from_data(zigzag_encode(PrimitiveArray::from_option_iter([Some(-1000i64), None, Some(0), Some(1000), None])).unwrap()).unwrap())] // Edge cases - #[case::zigzag_single(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_iter([-42i32])).unwrap()))] - #[case::zigzag_alternating(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_iter([-1i32, 1, -2, 2, -3, 3])).unwrap()))] + #[case::zigzag_single(ZigZagArray::try_from_data(zigzag_encode(PrimitiveArray::from_iter([-42i32])).unwrap()).unwrap())] + #[case::zigzag_alternating(ZigZagArray::try_from_data(zigzag_encode(PrimitiveArray::from_iter([-1i32, 1, -2, 2, -3, 3])).unwrap()).unwrap())] // Large arrays - #[case::zigzag_large_i32(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_iter(-500..500)).unwrap()))] - #[case::zigzag_large_i64(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_iter((-1000..1000).map(|i| i as i64 * 100))).unwrap()))] + #[case::zigzag_large_i32(ZigZagArray::try_from_data(zigzag_encode(PrimitiveArray::from_iter(-500..500)).unwrap()).unwrap())] + #[case::zigzag_large_i64(ZigZagArray::try_from_data(zigzag_encode(PrimitiveArray::from_iter((-1000..1000).map(|i| i as i64 * 100))).unwrap()).unwrap())] fn test_zigzag_consistency(#[case] array: ZigZagArray) { test_array_consistency(&array.into_array()); } #[rstest] - #[case::zigzag_i8_basic(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_iter([-10i8, -5, 0, 5, 10])).unwrap()))] - #[case::zigzag_i16_basic(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_iter([-100i16, -50, 0, 50, 100])).unwrap()))] - #[case::zigzag_i32_basic(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_iter([-1000i32, -500, 0, 500, 1000])).unwrap()))] - #[case::zigzag_i64_basic(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_iter([-10000i64, -5000, 0, 5000, 10000])).unwrap()))] - #[case::zigzag_i32_large(ZigZagArray::from_inner(zigzag_encode(PrimitiveArray::from_iter((-50..50).map(|i| i * 10))).unwrap()))] + #[case::zigzag_i8_basic(ZigZagArray::try_from_data(zigzag_encode(PrimitiveArray::from_iter([-10i8, -5, 0, 5, 10])).unwrap()).unwrap())] + #[case::zigzag_i16_basic(ZigZagArray::try_from_data(zigzag_encode(PrimitiveArray::from_iter([-100i16, -50, 0, 50, 100])).unwrap()).unwrap())] + #[case::zigzag_i32_basic(ZigZagArray::try_from_data(zigzag_encode(PrimitiveArray::from_iter([-1000i32, -500, 0, 500, 1000])).unwrap()).unwrap())] + #[case::zigzag_i64_basic(ZigZagArray::try_from_data(zigzag_encode(PrimitiveArray::from_iter([-10000i64, -5000, 0, 5000, 10000])).unwrap()).unwrap())] + #[case::zigzag_i32_large(ZigZagArray::try_from_data(zigzag_encode(PrimitiveArray::from_iter((-50..50).map(|i| i * 10))).unwrap()).unwrap())] fn test_zigzag_binary_numeric(#[case] array: ZigZagArray) { test_binary_numeric_array(array.into_array()); } diff --git a/encodings/zstd/src/array.rs b/encodings/zstd/src/array.rs index c6aa03181f6..42f0281f90d 100644 --- a/encodings/zstd/src/array.rs +++ b/encodings/zstd/src/array.rs @@ -307,11 +307,11 @@ impl Zstd { level: i32, values_per_frame: usize, ) -> VortexResult { - Ok(Array::from_inner(ZstdData::from_var_bin_view_without_dict( + Array::try_from_data(ZstdData::from_var_bin_view_without_dict( vbv, level, values_per_frame, - )?)) + )?) } /// Compress a [`PrimitiveArray`] using Zstd. @@ -320,11 +320,7 @@ impl Zstd { level: i32, values_per_frame: usize, ) -> VortexResult { - Ok(Array::from_inner(ZstdData::from_primitive( - parray, - level, - values_per_frame, - )?)) + Array::try_from_data(ZstdData::from_primitive(parray, level, values_per_frame)?) } /// Compress a [`VarBinViewArray`] using Zstd. @@ -333,11 +329,7 @@ impl Zstd { level: i32, values_per_frame: usize, ) -> VortexResult { - Ok(Array::from_inner(ZstdData::from_var_bin_view( - vbv, - level, - values_per_frame, - )?)) + Array::try_from_data(ZstdData::from_var_bin_view(vbv, level, values_per_frame)?) } } @@ -391,7 +383,7 @@ fn choose_max_dict_size(uncompressed_size: usize) -> usize { fn collect_valid_primitive(parray: &PrimitiveArray) -> VortexResult { let mask = parray.validity_mask()?; - Ok(parray.clone().into_array().filter(mask)?.to_primitive()) + Ok(parray.filter(mask)?.to_primitive()) } fn collect_valid_vbv(vbv: &VarBinViewArray) -> VortexResult<(ByteBuffer, Vec)> { @@ -400,8 +392,7 @@ fn collect_valid_vbv(vbv: &VarBinViewArray) -> VortexResult<(ByteBuffer, Vec (Buffer::empty(), Vec::new()), _ => { let mut buffer = BufferMut::with_capacity( - usize::try_from(vbv.clone().into_array().nbytes()) - .vortex_expect("must fit into buffer") + usize::try_from(vbv.nbytes()).vortex_expect("must fit into buffer") + mask.true_count() * size_of::(), ); let mut value_byte_indices = Vec::new(); @@ -956,12 +947,13 @@ impl ZstdData { self.slice_stop ); - Array::from_inner(ZstdData { + Array::try_from_data(ZstdData { slice_start: self.slice_start + start, slice_stop: self.slice_start + stop, stats_set: Default::default(), ..self.clone() }) + .vortex_expect("ZstdData is always valid") } /// Consumes the array and returns its parts. diff --git a/encodings/zstd/src/zstd_buffers.rs b/encodings/zstd/src/zstd_buffers.rs index b79fec7c537..c1d6d1e838b 100644 --- a/encodings/zstd/src/zstd_buffers.rs +++ b/encodings/zstd/src/zstd_buffers.rs @@ -596,7 +596,7 @@ mod tests { input.statistics().set(Stat::Min, Precision::exact(0i32)); let compressed = ZstdBuffersData::compress(&input, 3)?; - let compressed = ZstdBuffersArray::from_inner(compressed); + let compressed = ZstdBuffersArray::try_from_data(compressed)?; assert!(compressed.statistics().get(Stat::Min).is_some()); Ok(()) diff --git a/fuzz/src/fsst_like.rs b/fuzz/src/fsst_like.rs index 3c7fc966ddd..a91255405c3 100644 --- a/fuzz/src/fsst_like.rs +++ b/fuzz/src/fsst_like.rs @@ -20,6 +20,7 @@ use vortex_array::dtype::Nullability; use vortex_array::scalar_fn::fns::like::Like; use vortex_array::scalar_fn::fns::like::LikeOptions; use vortex_array::session::ArraySession; +use vortex_error::VortexExpect; use vortex_error::VortexResult; use vortex_fsst::FSSTArray; use vortex_fsst::fsst_compress; @@ -111,12 +112,13 @@ pub fn run_fsst_like_fuzz(fuzz: FuzzFsstLike) -> VortexFuzzResult { // Train FSST compressor and compress. let compressor = fsst_train_compressor(&varbin); - let fsst_array: FSSTArray = vortex_array::vtable::Array::from_inner(fsst_compress( + let fsst_array: FSSTArray = vortex_array::vtable::Array::try_from_data(fsst_compress( varbin.clone(), varbin.len(), varbin.dtype(), &compressor, - )); + )) + .vortex_expect("data is always valid"); let opts = LikeOptions { negated, diff --git a/vortex-array/benches/take_primitive.rs b/vortex-array/benches/take_primitive.rs index 826d3e0b7da..42d47e4b52c 100644 --- a/vortex-array/benches/take_primitive.rs +++ b/vortex-array/benches/take_primitive.rs @@ -42,7 +42,7 @@ fn dict_canonicalize_uniform(bencher: Bencher, num_indi bencher .with_inputs(|| &dict) - .bench_refs(|dict| dict.clone().into_array().to_canonical()); + .bench_refs(|dict| dict.to_canonical()); } #[divan::bench(args = NUM_INDICES, consts = VECTOR_SIZE, sample_count = 100_000)] @@ -61,5 +61,5 @@ fn dict_canonicalize_zipfian(bencher: Bencher, num_indi bencher .with_inputs(|| &dict) - .bench_refs(|dict| dict.clone().into_array().to_canonical()); + .bench_refs(|dict| dict.to_canonical()); } diff --git a/vortex-array/src/aliases/mod.rs b/vortex-array/src/aliases/mod.rs index de68213a51f..d001e0402e2 100644 --- a/vortex-array/src/aliases/mod.rs +++ b/vortex-array/src/aliases/mod.rs @@ -11,3 +11,8 @@ pub mod paste { // Re-export of [`inventory`](https://docs.rs/inventory/latest/inventory/). pub use inventory; + +pub mod vortex_error { + //! Re-export of [`vortex_error`](https://docs.rs/vortex-error/latest/vortex_error/). + pub use vortex_error::VortexExpect; +} diff --git a/vortex-array/src/array/mod.rs b/vortex-array/src/array/mod.rs index 6c6e94ad59b..de866cc9adc 100644 --- a/vortex-array/src/array/mod.rs +++ b/vortex-array/src/array/mod.rs @@ -421,11 +421,11 @@ impl DynArray for Array { } fn vtable(&self) -> &dyn DynVTable { - self.typed_vtable() + self.vtable() } fn encoding_id(&self) -> ArrayId { - self.typed_vtable().id() + self.vtable().id() } fn slice(&self, range: Range) -> VortexResult { @@ -576,7 +576,7 @@ impl DynArray for Array { vortex_ensure!( matches!(array.dtype(), DType::Bool(Nullability::NonNullable)), "Validity array is not non-nullable boolean: {}", - self.typed_vtable().id(), + self.vtable().id(), ); } Ok(validity) @@ -618,7 +618,7 @@ impl DynArray for Array { len + self.len, builder.len(), "Builder length mismatch after writing array for encoding {}", - self.typed_vtable().id(), + self.vtable().id(), ); Ok(()) } @@ -632,8 +632,8 @@ impl DynArray for Array { V::with_children(&mut inner, children)?; // SAFETY: with_children preserves dtype and len. Ok(unsafe { - Array::from_parts_unchecked( - self.typed_vtable().clone(), + Array::from_data_unchecked( + self.vtable().clone(), self.dtype.clone(), self.len, inner, @@ -646,7 +646,7 @@ impl DynArray for Array { impl ArrayHash for Array { fn array_hash(&self, state: &mut H, precision: hash::Precision) { - self.typed_vtable().id().hash(state); + self.vtable().id().hash(state); V::array_hash(self, state, precision); } } diff --git a/vortex-array/src/arrays/bool/array.rs b/vortex-array/src/arrays/bool/array.rs index 2d5c18f72a1..50ad9824031 100644 --- a/vortex-array/src/arrays/bool/array.rs +++ b/vortex-array/src/arrays/bool/array.rs @@ -172,7 +172,7 @@ impl Array { /// /// Returns an error if the provided components do not satisfy the invariants. pub fn try_new(bits: BitBuffer, validity: Validity) -> VortexResult { - Ok(Array::from_inner(BoolData::try_new(bits, validity)?)) + Array::try_from_data(BoolData::try_new(bits, validity)?) } /// Build a new bool array from a `BufferHandle`, returning an error if the offset is @@ -183,9 +183,7 @@ impl Array { len: usize, validity: Validity, ) -> VortexResult { - Ok(Array::from_inner(BoolData::try_new_from_handle( - bits, offset, len, validity, - )?)) + Array::try_from_data(BoolData::try_new_from_handle(bits, offset, len, validity)?) } /// Creates a new [`BoolArray`] without validation. @@ -195,7 +193,8 @@ impl Array { /// The caller must ensure that the validity length is equal to the bit buffer length. pub unsafe fn new_unchecked(bits: BitBuffer, validity: Validity) -> Self { // SAFETY: caller guarantees validity length equals bit buffer length. - Array::from_inner(unsafe { BoolData::new_unchecked(bits, validity) }) + Array::try_from_data(unsafe { BoolData::new_unchecked(bits, validity) }) + .vortex_expect("BoolData is always valid") } /// Validates the components that would be used to create a [`BoolArray`]. diff --git a/vortex-array/src/arrays/chunked/array.rs b/vortex-array/src/arrays/chunked/array.rs index 70e7354cab6..d39138f060b 100644 --- a/vortex-array/src/arrays/chunked/array.rs +++ b/vortex-array/src/arrays/chunked/array.rs @@ -230,7 +230,7 @@ impl ChunkedData { impl Array { /// Constructs a new `ChunkedArray`. pub fn try_new(chunks: Vec, dtype: DType) -> VortexResult { - Ok(Array::from_inner(ChunkedData::try_new(chunks, dtype)?)) + Array::try_from_data(ChunkedData::try_new(chunks, dtype)?) } /// Creates a new [`ChunkedArray`] without validation. @@ -239,7 +239,8 @@ impl Array { /// /// See [`ChunkedData::new_unchecked`]. pub unsafe fn new_unchecked(chunks: Vec, dtype: DType) -> Self { - Array::from_inner(unsafe { ChunkedData::new_unchecked(chunks, dtype) }) + Array::try_from_data(unsafe { ChunkedData::new_unchecked(chunks, dtype) }) + .vortex_expect("ChunkedData is always valid") } } @@ -350,7 +351,7 @@ mod test { ChunkedArray::try_new(chunks, DType::Primitive(PType::U64, Nullability::Nullable))?; // Should be all_valid since all non-empty chunks are all_valid - assert!(chunked.clone().into_array().all_valid().unwrap()); + assert!(chunked.all_valid().unwrap()); assert!(!chunked.into_array().all_invalid().unwrap()); Ok(()) @@ -370,7 +371,7 @@ mod test { ChunkedArray::try_new(chunks, DType::Primitive(PType::U64, Nullability::Nullable))?; // Should be all_invalid since all non-empty chunks are all_invalid - assert!(!chunked.clone().into_array().all_valid().unwrap()); + assert!(!chunked.all_valid().unwrap()); assert!(chunked.into_array().all_invalid().unwrap()); Ok(()) @@ -390,7 +391,7 @@ mod test { ChunkedArray::try_new(chunks, DType::Primitive(PType::U64, Nullability::Nullable))?; // Should be neither all_valid nor all_invalid - assert!(!chunked.clone().into_array().all_valid().unwrap()); + assert!(!chunked.all_valid().unwrap()); assert!(!chunked.into_array().all_invalid().unwrap()); Ok(()) diff --git a/vortex-array/src/arrays/constant/array.rs b/vortex-array/src/arrays/constant/array.rs index a58ad7354ad..189d9046985 100644 --- a/vortex-array/src/arrays/constant/array.rs +++ b/vortex-array/src/arrays/constant/array.rs @@ -1,6 +1,8 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors +use vortex_error::VortexExpect; + use crate::arrays::Constant; use crate::dtype::DType; use crate::scalar::Scalar; @@ -57,6 +59,7 @@ impl Array { where S: Into, { - Array::from_inner(ConstantData::new(scalar, len)) + Array::try_from_data(ConstantData::new(scalar, len)) + .vortex_expect("ConstantData is always valid") } } diff --git a/vortex-array/src/arrays/decimal/array.rs b/vortex-array/src/arrays/decimal/array.rs index c0b7a666ca5..3d13ea11a5e 100644 --- a/vortex-array/src/arrays/decimal/array.rs +++ b/vortex-array/src/arrays/decimal/array.rs @@ -441,7 +441,8 @@ impl Array { decimal_dtype: DecimalDType, validity: Validity, ) -> Self { - Array::from_inner(DecimalData::new(buffer, decimal_dtype, validity)) + Array::try_from_data(DecimalData::new(buffer, decimal_dtype, validity)) + .vortex_expect("DecimalData is always valid") } /// Creates a new [`DecimalArray`] without validation. @@ -454,7 +455,8 @@ impl Array { decimal_dtype: DecimalDType, validity: Validity, ) -> Self { - Array::from_inner(unsafe { DecimalData::new_unchecked(buffer, decimal_dtype, validity) }) + Array::try_from_data(unsafe { DecimalData::new_unchecked(buffer, decimal_dtype, validity) }) + .vortex_expect("DecimalData is always valid") } /// Creates a new [`DecimalArray`] from a host-native buffer with validation. @@ -463,11 +465,7 @@ impl Array { decimal_dtype: DecimalDType, validity: Validity, ) -> VortexResult { - Ok(Array::from_inner(DecimalData::try_new( - buffer, - decimal_dtype, - validity, - )?)) + Array::try_from_data(DecimalData::try_new(buffer, decimal_dtype, validity)?) } /// Creates a new [`DecimalArray`] from an iterator of values. @@ -479,7 +477,8 @@ impl Array { iter: I, decimal_dtype: DecimalDType, ) -> Self { - Array::from_inner(DecimalData::from_iter(iter, decimal_dtype)) + Array::try_from_data(DecimalData::from_iter(iter, decimal_dtype)) + .vortex_expect("DecimalData is always valid") } /// Creates a new [`DecimalArray`] from an iterator of optional values. @@ -487,7 +486,8 @@ impl Array { iter: I, decimal_dtype: DecimalDType, ) -> Self { - Array::from_inner(DecimalData::from_option_iter(iter, decimal_dtype)) + Array::try_from_data(DecimalData::from_option_iter(iter, decimal_dtype)) + .vortex_expect("DecimalData is always valid") } /// Creates a new [`DecimalArray`] from a [`BufferHandle`]. @@ -497,12 +497,13 @@ impl Array { decimal_dtype: DecimalDType, validity: Validity, ) -> Self { - Array::from_inner(DecimalData::new_handle( + Array::try_from_data(DecimalData::new_handle( values, values_type, decimal_dtype, validity, )) + .vortex_expect("DecimalData is always valid") } /// Creates a new [`DecimalArray`] without validation from a [`BufferHandle`]. @@ -516,9 +517,10 @@ impl Array { decimal_dtype: DecimalDType, validity: Validity, ) -> Self { - Array::from_inner(unsafe { + Array::try_from_data(unsafe { DecimalData::new_unchecked_handle(values, values_type, decimal_dtype, validity) }) + .vortex_expect("DecimalData is always valid") } } diff --git a/vortex-array/src/arrays/dict/array.rs b/vortex-array/src/arrays/dict/array.rs index c3882c15831..71707f721e0 100644 --- a/vortex-array/src/arrays/dict/array.rs +++ b/vortex-array/src/arrays/dict/array.rs @@ -191,12 +191,12 @@ impl DictData { impl Array { /// Build a new `DictArray` from its components, `codes` and `values`. pub fn new(codes: ArrayRef, values: ArrayRef) -> Self { - Array::from_inner(DictData::new(codes, values)) + Array::try_from_data(DictData::new(codes, values)).vortex_expect("DictData is always valid") } /// Build a new `DictArray` from its components, `codes` and `values`. pub fn try_new(codes: ArrayRef, values: ArrayRef) -> VortexResult { - Ok(Array::from_inner(DictData::try_new(codes, values)?)) + Array::try_from_data(DictData::try_new(codes, values)?) } /// Build a new `DictArray` without validating the codes or values. @@ -205,7 +205,8 @@ impl Array { /// /// See [`DictData::new_unchecked`]. pub unsafe fn new_unchecked(codes: ArrayRef, values: ArrayRef) -> Self { - Array::from_inner(unsafe { DictData::new_unchecked(codes, values) }) + Array::try_from_data(unsafe { DictData::new_unchecked(codes, values) }) + .vortex_expect("DictData is always valid") } /// Set whether all values in the dictionary are referenced by at least one code. @@ -214,10 +215,11 @@ impl Array { /// /// See [`DictData::set_all_values_referenced`]. pub unsafe fn set_all_values_referenced(self, all_values_referenced: bool) -> Self { - Array::from_inner(unsafe { + Array::try_from_data(unsafe { self.into_inner() .set_all_values_referenced(all_values_referenced) }) + .vortex_expect("data is always valid") } } diff --git a/vortex-array/src/arrays/extension/array.rs b/vortex-array/src/arrays/extension/array.rs index 18e914be083..93af835b41e 100644 --- a/vortex-array/src/arrays/extension/array.rs +++ b/vortex-array/src/arrays/extension/array.rs @@ -151,14 +151,12 @@ impl Array { /// /// Panics if the storage array is not compatible with the extension dtype. pub fn new(ext_dtype: ExtDTypeRef, storage_array: ArrayRef) -> Self { - Array::from_inner(ExtensionData::new(ext_dtype, storage_array)) + Array::try_from_data(ExtensionData::new(ext_dtype, storage_array)) + .vortex_expect("ExtensionData is always valid") } /// Tries to construct a new `ExtensionArray`. pub fn try_new(ext_dtype: ExtDTypeRef, storage_array: ArrayRef) -> VortexResult { - Ok(Array::from_inner(ExtensionData::try_new( - ext_dtype, - storage_array, - )?)) + Array::try_from_data(ExtensionData::try_new(ext_dtype, storage_array)?) } } diff --git a/vortex-array/src/arrays/filter/array.rs b/vortex-array/src/arrays/filter/array.rs index 604bfd51274..4cbf77c05cf 100644 --- a/vortex-array/src/arrays/filter/array.rs +++ b/vortex-array/src/arrays/filter/array.rs @@ -87,12 +87,13 @@ impl FilterData { impl Array { /// Creates a new [`FilterArray`]. pub fn new(array: ArrayRef, mask: Mask) -> Self { - Array::from_inner(FilterData::new(array, mask)) + Array::try_from_data(FilterData::new(array, mask)) + .vortex_expect("FilterData is always valid") } /// Constructs a new `FilterArray`. pub fn try_new(array: ArrayRef, mask: Mask) -> VortexResult { - Ok(Array::from_inner(FilterData::try_new(array, mask)?)) + Array::try_from_data(FilterData::try_new(array, mask)?) } } diff --git a/vortex-array/src/arrays/filter/execute/mod.rs b/vortex-array/src/arrays/filter/execute/mod.rs index 6281ad7a42f..4eabaa90119 100644 --- a/vortex-array/src/arrays/filter/execute/mod.rs +++ b/vortex-array/src/arrays/filter/execute/mod.rs @@ -67,7 +67,7 @@ pub(super) fn execute_filter_fast_paths( // Also check if the array itself is completely null, in which case we only care about the total // number of nulls, not the values. - if array.clone().into_array().validity_mask()?.true_count() == 0 { + if array.validity_mask()?.true_count() == 0 { return Ok(Some( ConstantArray::new(Scalar::null(array.dtype().clone()), true_count).into_array(), )); diff --git a/vortex-array/src/arrays/fixed_size_list/array.rs b/vortex-array/src/arrays/fixed_size_list/array.rs index 369de4c0cf1..ca478d69cb2 100644 --- a/vortex-array/src/arrays/fixed_size_list/array.rs +++ b/vortex-array/src/arrays/fixed_size_list/array.rs @@ -251,7 +251,8 @@ impl FixedSizeListData { impl Array { /// Creates a new [`FixedSizeListArray`]. pub fn new(elements: ArrayRef, list_size: u32, validity: Validity, len: usize) -> Self { - Array::from_inner(FixedSizeListData::new(elements, list_size, validity, len)) + Array::try_from_data(FixedSizeListData::new(elements, list_size, validity, len)) + .vortex_expect("FixedSizeListData is always valid") } /// Constructs a new `FixedSizeListArray`. @@ -261,9 +262,9 @@ impl Array { validity: Validity, len: usize, ) -> VortexResult { - Ok(Array::from_inner(FixedSizeListData::try_new( + Array::try_from_data(FixedSizeListData::try_new( elements, list_size, validity, len, - )?)) + )?) } /// Creates a new [`FixedSizeListArray`] without validation. @@ -277,9 +278,10 @@ impl Array { validity: Validity, len: usize, ) -> Self { - Array::from_inner(unsafe { + Array::try_from_data(unsafe { FixedSizeListData::new_unchecked(elements, list_size, validity, len) }) + .vortex_expect("FixedSizeListData is always valid") } } diff --git a/vortex-array/src/arrays/list/array.rs b/vortex-array/src/arrays/list/array.rs index 569483a6f40..74e1429761b 100644 --- a/vortex-array/src/arrays/list/array.rs +++ b/vortex-array/src/arrays/list/array.rs @@ -345,7 +345,8 @@ impl ListData { impl Array { /// Creates a new [`ListArray`]. pub fn new(elements: ArrayRef, offsets: ArrayRef, validity: Validity) -> Self { - Array::from_inner(ListData::new(elements, offsets, validity)) + Array::try_from_data(ListData::new(elements, offsets, validity)) + .vortex_expect("ListData is always valid") } /// Constructs a new `ListArray`. @@ -354,9 +355,7 @@ impl Array { offsets: ArrayRef, validity: Validity, ) -> VortexResult { - Ok(Array::from_inner(ListData::try_new( - elements, offsets, validity, - )?)) + Array::try_from_data(ListData::try_new(elements, offsets, validity)?) } /// Creates a new [`ListArray`] without validation. @@ -365,7 +364,8 @@ impl Array { /// /// See [`ListData::new_unchecked`]. pub unsafe fn new_unchecked(elements: ArrayRef, offsets: ArrayRef, validity: Validity) -> Self { - Array::from_inner(unsafe { ListData::new_unchecked(elements, offsets, validity) }) + Array::try_from_data(unsafe { ListData::new_unchecked(elements, offsets, validity) }) + .vortex_expect("ListData is always valid") } } diff --git a/vortex-array/src/arrays/listview/array.rs b/vortex-array/src/arrays/listview/array.rs index b20609808f5..eebed90a4b3 100644 --- a/vortex-array/src/arrays/listview/array.rs +++ b/vortex-array/src/arrays/listview/array.rs @@ -473,7 +473,8 @@ impl ListViewData { impl Array { /// Creates a new [`ListViewArray`]. pub fn new(elements: ArrayRef, offsets: ArrayRef, sizes: ArrayRef, validity: Validity) -> Self { - Array::from_inner(ListViewData::new(elements, offsets, sizes, validity)) + Array::try_from_data(ListViewData::new(elements, offsets, sizes, validity)) + .vortex_expect("ListViewData is always valid") } /// Constructs a new `ListViewArray`. @@ -483,9 +484,7 @@ impl Array { sizes: ArrayRef, validity: Validity, ) -> VortexResult { - Ok(Array::from_inner(ListViewData::try_new( - elements, offsets, sizes, validity, - )?)) + Array::try_from_data(ListViewData::try_new(elements, offsets, sizes, validity)?) } /// Creates a new [`ListViewArray`] without validation. @@ -499,9 +498,10 @@ impl Array { sizes: ArrayRef, validity: Validity, ) -> Self { - Array::from_inner(unsafe { + Array::try_from_data(unsafe { ListViewData::new_unchecked(elements, offsets, sizes, validity) }) + .vortex_expect("ListViewData is always valid") } /// Mark whether this list view can be zero-copy converted to a list. @@ -510,7 +510,8 @@ impl Array { /// /// See [`ListViewData::with_zero_copy_to_list`]. pub unsafe fn with_zero_copy_to_list(self, is_zctl: bool) -> Self { - Array::from_inner(unsafe { self.into_inner().with_zero_copy_to_list(is_zctl) }) + Array::try_from_data(unsafe { self.into_inner().with_zero_copy_to_list(is_zctl) }) + .vortex_expect("data is always valid") } } diff --git a/vortex-array/src/arrays/listview/conversion.rs b/vortex-array/src/arrays/listview/conversion.rs index 719f975cda5..4be91eec2a4 100644 --- a/vortex-array/src/arrays/listview/conversion.rs +++ b/vortex-array/src/arrays/listview/conversion.rs @@ -40,7 +40,7 @@ pub fn list_view_from_list(list: ListArray, ctx: &mut ExecutionCtx) -> VortexRes // function might not expect the output `ListViewArray` to have a bunch of leading and trailing // garbage data when they turn it back into a `ListArray`. let list: ListArray = - Array::from_inner(list.reset_offsets(false).vortex_expect("This can't fail")); + Array::try_from_data(list.reset_offsets(false).vortex_expect("This can't fail"))?; let list_offsets = list.offsets().clone(); diff --git a/vortex-array/src/arrays/masked/array.rs b/vortex-array/src/arrays/masked/array.rs index ca5d5bfd6fa..02be15ceee2 100644 --- a/vortex-array/src/arrays/masked/array.rs +++ b/vortex-array/src/arrays/masked/array.rs @@ -81,6 +81,6 @@ impl MaskedData { impl Array { /// Constructs a new `MaskedArray`. pub fn try_new(child: ArrayRef, validity: Validity) -> VortexResult { - Ok(Array::from_inner(MaskedData::try_new(child, validity)?)) + Array::try_from_data(MaskedData::try_new(child, validity)?) } } diff --git a/vortex-array/src/arrays/null/mod.rs b/vortex-array/src/arrays/null/mod.rs index 295ec5cab79..6f13a360966 100644 --- a/vortex-array/src/arrays/null/mod.rs +++ b/vortex-array/src/arrays/null/mod.rs @@ -4,6 +4,7 @@ use std::hash::Hash; use std::sync::Arc; +use vortex_error::VortexExpect; use vortex_error::VortexResult; use vortex_error::vortex_ensure; use vortex_error::vortex_panic; @@ -183,7 +184,7 @@ impl Null { impl Array { pub fn new(len: usize) -> Self { - Array::from_inner(NullData::new(len)) + Array::try_from_data(NullData::new(len)).vortex_expect("NullData is always valid") } } diff --git a/vortex-array/src/arrays/primitive/array/mod.rs b/vortex-array/src/arrays/primitive/array/mod.rs index 7ec7f1f4de1..b790f884da3 100644 --- a/vortex-array/src/arrays/primitive/array/mod.rs +++ b/vortex-array/src/arrays/primitive/array/mod.rs @@ -183,7 +183,8 @@ impl PrimitiveData { impl Array { pub fn empty(nullability: Nullability) -> Self { - Array::from_inner(PrimitiveData::empty::(nullability)) + Array::try_from_data(PrimitiveData::empty::(nullability)) + .vortex_expect("PrimitiveData is always valid") } /// Creates a new [`PrimitiveArray`]. @@ -192,12 +193,13 @@ impl Array { /// /// Panics if the provided components do not satisfy the invariants. pub fn new(buffer: impl Into>, validity: Validity) -> Self { - Array::from_inner(PrimitiveData::new(buffer, validity)) + Array::try_from_data(PrimitiveData::new(buffer, validity)) + .vortex_expect("PrimitiveData is always valid") } /// Constructs a new `PrimitiveArray`. pub fn try_new(buffer: Buffer, validity: Validity) -> VortexResult { - Ok(Array::from_inner(PrimitiveData::try_new(buffer, validity)?)) + Array::try_from_data(PrimitiveData::try_new(buffer, validity)?) } /// Creates a new [`PrimitiveArray`] without validation. @@ -206,7 +208,8 @@ impl Array { /// /// See [`PrimitiveData::new_unchecked`]. pub unsafe fn new_unchecked(buffer: Buffer, validity: Validity) -> Self { - Array::from_inner(unsafe { PrimitiveData::new_unchecked(buffer, validity) }) + Array::try_from_data(unsafe { PrimitiveData::new_unchecked(buffer, validity) }) + .vortex_expect("PrimitiveData is always valid") } /// Create a new array from a buffer handle. @@ -219,19 +222,22 @@ impl Array { ptype: PType, validity: Validity, ) -> Self { - Array::from_inner(unsafe { + Array::try_from_data(unsafe { PrimitiveData::new_unchecked_from_handle(handle, ptype, validity) }) + .vortex_expect("PrimitiveData is always valid") } /// Creates a new [`PrimitiveArray`] from a [`BufferHandle`]. pub fn from_buffer_handle(handle: BufferHandle, ptype: PType, validity: Validity) -> Self { - Array::from_inner(PrimitiveData::from_buffer_handle(handle, ptype, validity)) + Array::try_from_data(PrimitiveData::from_buffer_handle(handle, ptype, validity)) + .vortex_expect("PrimitiveData is always valid") } /// Creates a new [`PrimitiveArray`] from a [`ByteBuffer`]. pub fn from_byte_buffer(buffer: ByteBuffer, ptype: PType, validity: Validity) -> Self { - Array::from_inner(PrimitiveData::from_byte_buffer(buffer, ptype, validity)) + Array::try_from_data(PrimitiveData::from_byte_buffer(buffer, ptype, validity)) + .vortex_expect("PrimitiveData is always valid") } /// Create a PrimitiveArray from a byte buffer containing only the valid elements. @@ -241,12 +247,13 @@ impl Array { validity: Validity, n_rows: usize, ) -> Self { - Array::from_inner(PrimitiveData::from_values_byte_buffer( + Array::try_from_data(PrimitiveData::from_values_byte_buffer( valid_elems_buffer, ptype, validity, n_rows, )) + .vortex_expect("PrimitiveData is always valid") } /// Validates the components that would be used to create a [`PrimitiveArray`]. diff --git a/vortex-array/src/arrays/scalar_fn/array.rs b/vortex-array/src/arrays/scalar_fn/array.rs index 3de685d94f0..cf155bfec4c 100644 --- a/vortex-array/src/arrays/scalar_fn/array.rs +++ b/vortex-array/src/arrays/scalar_fn/array.rs @@ -93,8 +93,6 @@ impl Array { children: Vec, len: usize, ) -> VortexResult { - Ok(Array::from_inner(ScalarFnData::try_new( - scalar_fn, children, len, - )?)) + Array::try_from_data(ScalarFnData::try_new(scalar_fn, children, len)?) } } diff --git a/vortex-array/src/arrays/scalar_fn/rules.rs b/vortex-array/src/arrays/scalar_fn/rules.rs index e033d34ffec..fcea0a83a8f 100644 --- a/vortex-array/src/arrays/scalar_fn/rules.rs +++ b/vortex-array/src/arrays/scalar_fn/rules.rs @@ -82,7 +82,7 @@ impl ArrayReduceRule for ScalarFnConstantRule { if array.is_empty() { Ok(Some(Canonical::empty(array.dtype()).into_array())) } else { - let result = array.clone().into_array().scalar_at(0)?; + let result = array.scalar_at(0)?; Ok(Some(ConstantArray::new(result, array.len).into_array())) } } diff --git a/vortex-array/src/arrays/shared/array.rs b/vortex-array/src/arrays/shared/array.rs index af9661c6dd7..99091602e1e 100644 --- a/vortex-array/src/arrays/shared/array.rs +++ b/vortex-array/src/arrays/shared/array.rs @@ -7,6 +7,7 @@ use std::sync::OnceLock; use async_lock::Mutex as AsyncMutex; use vortex_error::SharedVortexResult; +use vortex_error::VortexExpect; use vortex_error::VortexResult; use crate::ArrayRef; @@ -112,7 +113,7 @@ impl SharedData { impl Array { /// Creates a new `SharedArray`. pub fn new(source: ArrayRef) -> Self { - Array::from_inner(SharedData::new(source)) + Array::try_from_data(SharedData::new(source)).vortex_expect("SharedData is always valid") } } diff --git a/vortex-array/src/arrays/slice/array.rs b/vortex-array/src/arrays/slice/array.rs index 35a0e6d5ced..64ce20a6b12 100644 --- a/vortex-array/src/arrays/slice/array.rs +++ b/vortex-array/src/arrays/slice/array.rs @@ -74,12 +74,13 @@ impl SliceData { impl Array { /// Constructs a new `SliceArray`. pub fn try_new(child: ArrayRef, range: Range) -> VortexResult { - Ok(Array::from_inner(SliceData::try_new(child, range)?)) + Array::try_from_data(SliceData::try_new(child, range)?) } /// Constructs a new `SliceArray`. pub fn new(child: ArrayRef, range: Range) -> Self { - Array::from_inner(SliceData::new(child, range)) + Array::try_from_data(SliceData::new(child, range)) + .vortex_expect("SliceData is always valid") } } diff --git a/vortex-array/src/arrays/struct_/array.rs b/vortex-array/src/arrays/struct_/array.rs index a382b694107..bcd5ba919f6 100644 --- a/vortex-array/src/arrays/struct_/array.rs +++ b/vortex-array/src/arrays/struct_/array.rs @@ -493,7 +493,8 @@ impl Array { length: usize, validity: Validity, ) -> Self { - Array::from_inner(StructData::new(names, fields, length, validity)) + Array::try_from_data(StructData::new(names, fields, length, validity)) + .vortex_expect("StructData is always valid") } /// Constructs a new `StructArray`. @@ -503,9 +504,7 @@ impl Array { length: usize, validity: Validity, ) -> VortexResult { - Ok(Array::from_inner(StructData::try_new( - names, fields, length, validity, - )?)) + Array::try_from_data(StructData::try_new(names, fields, length, validity)?) } /// Creates a new [`StructArray`] without validation. @@ -519,7 +518,8 @@ impl Array { length: usize, validity: Validity, ) -> Self { - Array::from_inner(unsafe { StructData::new_unchecked(fields, dtype, length, validity) }) + Array::try_from_data(unsafe { StructData::new_unchecked(fields, dtype, length, validity) }) + .vortex_expect("StructData is always valid") } /// Constructs a new `StructArray` with an explicit dtype. @@ -529,14 +529,14 @@ impl Array { length: usize, validity: Validity, ) -> VortexResult { - Ok(Array::from_inner(StructData::try_new_with_dtype( + Array::try_from_data(StructData::try_new_with_dtype( fields, dtype, length, validity, - )?)) + )?) } /// Construct a [`StructArray`] from named fields. pub fn from_fields>(items: &[(N, ArrayRef)]) -> VortexResult { - Ok(Array::from_inner(StructData::from_fields(items)?)) + Array::try_from_data(StructData::from_fields(items)?) } /// Decompose this struct array into its constituent parts. @@ -553,21 +553,20 @@ impl Array { iter: T, validity: Validity, ) -> VortexResult { - Ok(Array::from_inner(StructData::try_from_iter_with_validity( - iter, validity, - )?)) + Array::try_from_data(StructData::try_from_iter_with_validity(iter, validity)?) } /// Create a [`StructArray`] from an iterator of (name, array) pairs. pub fn try_from_iter, A: IntoArray, T: IntoIterator>( iter: T, ) -> VortexResult { - Ok(Array::from_inner(StructData::try_from_iter(iter)?)) + Array::try_from_data(StructData::try_from_iter(iter)?) } /// Create a fieldless [`StructArray`] with the given length. pub fn new_fieldless_with_len(len: usize) -> Self { - Array::from_inner(StructData::new_fieldless_with_len(len)) + Array::try_from_data(StructData::new_fieldless_with_len(len)) + .vortex_expect("StructData is always valid") } } diff --git a/vortex-array/src/arrays/varbin/array.rs b/vortex-array/src/arrays/varbin/array.rs index 49961c39d91..5e2ea5a71b7 100644 --- a/vortex-array/src/arrays/varbin/array.rs +++ b/vortex-array/src/arrays/varbin/array.rs @@ -371,7 +371,8 @@ impl VarBinData { /// Forwarding constructors for `VarBinArray` (= `Array`). impl Array { pub fn from_vec>(vec: Vec, dtype: DType) -> Self { - Array::from_inner(VarBinData::from_vec(vec, dtype)) + Array::try_from_data(VarBinData::from_vec(vec, dtype)) + .vortex_expect("VarBinData is always valid") } #[expect( @@ -382,14 +383,16 @@ impl Array { iter: I, dtype: DType, ) -> Self { - Array::from_inner(VarBinData::from_iter(iter, dtype)) + Array::try_from_data(VarBinData::from_iter(iter, dtype)) + .vortex_expect("VarBinData is always valid") } pub fn from_iter_nonnull, I: IntoIterator>( iter: I, dtype: DType, ) -> Self { - Array::from_inner(VarBinData::from_iter_nonnull(iter, dtype)) + Array::try_from_data(VarBinData::from_iter_nonnull(iter, dtype)) + .vortex_expect("VarBinData is always valid") } /// Create from a vector of string slices. @@ -454,7 +457,8 @@ impl VarBinData { impl Array { /// Creates a new [`VarBinArray`]. pub fn new(offsets: ArrayRef, bytes: ByteBuffer, dtype: DType, validity: Validity) -> Self { - Array::from_inner(VarBinData::new(offsets, bytes, dtype, validity)) + Array::try_from_data(VarBinData::new(offsets, bytes, dtype, validity)) + .vortex_expect("VarBinData is always valid") } /// Creates a new [`VarBinArray`] without validation. @@ -468,7 +472,8 @@ impl Array { dtype: DType, validity: Validity, ) -> Self { - Array::from_inner(unsafe { VarBinData::new_unchecked(offsets, bytes, dtype, validity) }) + Array::try_from_data(unsafe { VarBinData::new_unchecked(offsets, bytes, dtype, validity) }) + .vortex_expect("VarBinData is always valid") } /// Creates a new [`VarBinArray`] without validation from a [`BufferHandle`]. @@ -482,9 +487,10 @@ impl Array { dtype: DType, validity: Validity, ) -> Self { - Array::from_inner(unsafe { + Array::try_from_data(unsafe { VarBinData::new_unchecked_from_handle(offsets, bytes, dtype, validity) }) + .vortex_expect("VarBinData is always valid") } /// Constructs a new `VarBinArray`. @@ -494,9 +500,7 @@ impl Array { dtype: DType, validity: Validity, ) -> VortexResult { - Ok(Array::from_inner(VarBinData::try_new( - offsets, bytes, dtype, validity, - )?)) + Array::try_from_data(VarBinData::try_new(offsets, bytes, dtype, validity)?) } } @@ -576,72 +580,76 @@ impl<'a> FromIterator> for VarBinData { impl From> for Array { fn from(value: Vec<&[u8]>) -> Self { - Array::from_inner(VarBinData::from(value)) + Array::try_from_data(VarBinData::from(value)).vortex_expect("VarBinData is always valid") } } impl From>> for Array { fn from(value: Vec>) -> Self { - Array::from_inner(VarBinData::from(value)) + Array::try_from_data(VarBinData::from(value)).vortex_expect("VarBinData is always valid") } } impl From> for Array { fn from(value: Vec) -> Self { - Array::from_inner(VarBinData::from(value)) + Array::try_from_data(VarBinData::from(value)).vortex_expect("VarBinData is always valid") } } impl From> for Array { fn from(value: Vec<&str>) -> Self { - Array::from_inner(VarBinData::from(value)) + Array::try_from_data(VarBinData::from(value)).vortex_expect("VarBinData is always valid") } } impl From>> for Array { fn from(value: Vec>) -> Self { - Array::from_inner(VarBinData::from(value)) + Array::try_from_data(VarBinData::from(value)).vortex_expect("VarBinData is always valid") } } impl From>>> for Array { fn from(value: Vec>>) -> Self { - Array::from_inner(VarBinData::from(value)) + Array::try_from_data(VarBinData::from(value)).vortex_expect("VarBinData is always valid") } } impl From>> for Array { fn from(value: Vec>) -> Self { - Array::from_inner(VarBinData::from(value)) + Array::try_from_data(VarBinData::from(value)).vortex_expect("VarBinData is always valid") } } impl From>> for Array { fn from(value: Vec>) -> Self { - Array::from_inner(VarBinData::from(value)) + Array::try_from_data(VarBinData::from(value)).vortex_expect("VarBinData is always valid") } } impl<'a> FromIterator> for Array { fn from_iter>>(iter: T) -> Self { - Array::from_inner(>::from_iter(iter)) + Array::try_from_data(>::from_iter(iter)) + .vortex_expect(" is always valid") } } impl FromIterator>> for Array { fn from_iter>>>(iter: T) -> Self { - Array::from_inner(>::from_iter(iter)) + Array::try_from_data(>::from_iter(iter)) + .vortex_expect(" is always valid") } } impl FromIterator> for Array { fn from_iter>>(iter: T) -> Self { - Array::from_inner(>::from_iter(iter)) + Array::try_from_data(>::from_iter(iter)) + .vortex_expect(" is always valid") } } impl<'a> FromIterator> for Array { fn from_iter>>(iter: T) -> Self { - Array::from_inner(>::from_iter(iter)) + Array::try_from_data(>::from_iter(iter)) + .vortex_expect(" is always valid") } } diff --git a/vortex-array/src/arrays/varbinview/array.rs b/vortex-array/src/arrays/varbinview/array.rs index 74794a4621a..dbd7842d65b 100644 --- a/vortex-array/src/arrays/varbinview/array.rs +++ b/vortex-array/src/arrays/varbinview/array.rs @@ -550,27 +550,32 @@ impl Array { iter: I, dtype: DType, ) -> Self { - Array::from_inner(VarBinViewData::from_iter(iter, dtype)) + Array::try_from_data(VarBinViewData::from_iter(iter, dtype)) + .vortex_expect("VarBinViewData is always valid") } pub fn from_iter_str, I: IntoIterator>(iter: I) -> Self { - Array::from_inner(VarBinViewData::from_iter_str(iter)) + Array::try_from_data(VarBinViewData::from_iter_str(iter)) + .vortex_expect("VarBinViewData is always valid") } pub fn from_iter_nullable_str, I: IntoIterator>>( iter: I, ) -> Self { - Array::from_inner(VarBinViewData::from_iter_nullable_str(iter)) + Array::try_from_data(VarBinViewData::from_iter_nullable_str(iter)) + .vortex_expect("VarBinViewData is always valid") } pub fn from_iter_bin, I: IntoIterator>(iter: I) -> Self { - Array::from_inner(VarBinViewData::from_iter_bin(iter)) + Array::try_from_data(VarBinViewData::from_iter_bin(iter)) + .vortex_expect("VarBinViewData is always valid") } pub fn from_iter_nullable_bin, I: IntoIterator>>( iter: I, ) -> Self { - Array::from_inner(VarBinViewData::from_iter_nullable_bin(iter)) + Array::try_from_data(VarBinViewData::from_iter_nullable_bin(iter)) + .vortex_expect("VarBinViewData is always valid") } /// Creates a new [`VarBinViewArray`]. @@ -580,9 +585,7 @@ impl Array { dtype: DType, validity: Validity, ) -> VortexResult { - Ok(Array::from_inner(VarBinViewData::try_new( - views, buffers, dtype, validity, - )?)) + Array::try_from_data(VarBinViewData::try_new(views, buffers, dtype, validity)?) } /// Creates a new [`VarBinViewArray`] without validation. @@ -596,7 +599,10 @@ impl Array { dtype: DType, validity: Validity, ) -> Self { - Array::from_inner(unsafe { VarBinViewData::new_unchecked(views, buffers, dtype, validity) }) + Array::try_from_data(unsafe { + VarBinViewData::new_unchecked(views, buffers, dtype, validity) + }) + .vortex_expect("VarBinViewData is always valid") } /// Creates a new [`VarBinViewArray`] with device or host memory. @@ -606,7 +612,8 @@ impl Array { dtype: DType, validity: Validity, ) -> Self { - Array::from_inner(VarBinViewData::new_handle(views, buffers, dtype, validity)) + Array::try_from_data(VarBinViewData::new_handle(views, buffers, dtype, validity)) + .vortex_expect("VarBinViewData is always valid") } /// Construct a new array from `BufferHandle`s without validation. @@ -620,9 +627,10 @@ impl Array { dtype: DType, validity: Validity, ) -> Self { - Array::from_inner(unsafe { + Array::try_from_data(unsafe { VarBinViewData::new_handle_unchecked(views, buffers, dtype, validity) }) + .vortex_expect("VarBinViewData is always valid") } } @@ -654,24 +662,28 @@ impl<'a> FromIterator> for VarBinViewData { impl<'a> FromIterator> for Array { fn from_iter>>(iter: T) -> Self { - Array::from_inner(>::from_iter(iter)) + Array::try_from_data(>::from_iter(iter)) + .vortex_expect(" is always valid") } } impl FromIterator>> for Array { fn from_iter>>>(iter: T) -> Self { - Array::from_inner(>::from_iter(iter)) + Array::try_from_data(>::from_iter(iter)) + .vortex_expect(" is always valid") } } impl FromIterator> for Array { fn from_iter>>(iter: T) -> Self { - Array::from_inner(>::from_iter(iter)) + Array::try_from_data(>::from_iter(iter)) + .vortex_expect(" is always valid") } } impl<'a> FromIterator> for Array { fn from_iter>>(iter: T) -> Self { - Array::from_inner(>::from_iter(iter)) + Array::try_from_data(>::from_iter(iter)) + .vortex_expect(" is always valid") } } diff --git a/vortex-array/src/arrays/variant/mod.rs b/vortex-array/src/arrays/variant/mod.rs index 37dde56ab22..666098ae83d 100644 --- a/vortex-array/src/arrays/variant/mod.rs +++ b/vortex-array/src/arrays/variant/mod.rs @@ -3,6 +3,8 @@ mod vtable; +use vortex_error::VortexExpect; + pub use self::vtable::Variant; pub use self::vtable::VariantArray; use crate::ArrayRef; @@ -55,6 +57,6 @@ impl VariantData { impl Array { /// Creates a new `VariantArray`. pub fn new(child: ArrayRef) -> Self { - Array::from_inner(VariantData::new(child)) + Array::try_from_data(VariantData::new(child)).vortex_expect("VariantData is always valid") } } diff --git a/vortex-array/src/arrow/record_batch.rs b/vortex-array/src/arrow/record_batch.rs index cf9f37de60f..b5a1f1c23ef 100644 --- a/vortex-array/src/arrow/record_batch.rs +++ b/vortex-array/src/arrow/record_batch.rs @@ -27,7 +27,7 @@ impl TryFrom<&dyn DynArray> for RecordBatch { }; vortex_ensure!( - struct_array.clone().into_array().all_valid()?, + struct_array.all_valid()?, "RecordBatch can only be constructed from StructArray with no nulls" ); diff --git a/vortex-array/src/scalar_fn/fns/list_contains/mod.rs b/vortex-array/src/scalar_fn/fns/list_contains/mod.rs index 31f1a4c5b56..b83826cd35f 100644 --- a/vortex-array/src/scalar_fn/fns/list_contains/mod.rs +++ b/vortex-array/src/scalar_fn/fns/list_contains/mod.rs @@ -299,7 +299,7 @@ fn list_contains_scalar( let matches = matching_elements.execute::(ctx)?; // Fast path: no elements match. - if let Some(pred) = matches.clone().into_array().as_constant() { + if let Some(pred) = matches.as_constant() { return match pred.as_bool().value() { // All comparisons are invalid (result in `null`), and search is not null because // we already checked for null above. diff --git a/vortex-array/src/vtable/dyn_.rs b/vortex-array/src/vtable/dyn_.rs index 91e178e271a..bad5667f845 100644 --- a/vortex-array/src/vtable/dyn_.rs +++ b/vortex-array/src/vtable/dyn_.rs @@ -101,7 +101,7 @@ impl DynVTable for V { // Wrap in Array for safe downcasting. // SAFETY: We just validated that V::len(&inner) == len and V::dtype(&inner) == dtype. let array = unsafe { - Array::from_parts_unchecked( + Array::from_data_unchecked( self.clone(), dtype.clone(), len, diff --git a/vortex-array/src/vtable/mod.rs b/vortex-array/src/vtable/mod.rs index cc254ed8253..27de4f82b53 100644 --- a/vortex-array/src/vtable/mod.rs +++ b/vortex-array/src/vtable/mod.rs @@ -251,7 +251,8 @@ macro_rules! vtable { $crate::aliases::paste::paste! { impl $crate::IntoArray for [<$Base Array>] { fn into_array(self) -> $crate::ArrayRef { - std::sync::Arc::new($crate::vtable::Array::<$VT>::from_inner(self)) + use $crate::aliases::vortex_error::VortexExpect; + std::sync::Arc::new($crate::vtable::Array::<$VT>::try_from_data(self).vortex_expect("data is always valid")) } } @@ -279,7 +280,8 @@ macro_rules! vtable { impl $crate::IntoArray for $Data { fn into_array(self) -> $crate::ArrayRef { - std::sync::Arc::new($crate::vtable::Array::<$VT>::from_inner(self)) + use $crate::aliases::vortex_error::VortexExpect; + std::sync::Arc::new($crate::vtable::Array::<$VT>::try_from_data(self).vortex_expect("data is always valid")) } } diff --git a/vortex-array/src/vtable/typed.rs b/vortex-array/src/vtable/typed.rs index b79136d28ee..fecc402497e 100644 --- a/vortex-array/src/vtable/typed.rs +++ b/vortex-array/src/vtable/typed.rs @@ -37,41 +37,41 @@ pub struct Array { #[allow(clippy::same_name_method)] impl Array { - /// Create a new typed array from inner encoding-specific data. + /// Create a new typed array from encoding-specific data. /// - /// Extracts dtype, len, vtable, and stats from the inner array via [`VTable`] methods. - pub fn from_inner(array: V::Array) -> Self { - let vtable = V::vtable(&array).clone(); - let dtype = V::dtype(&array).clone(); - let len = V::len(&array); - let stats = V::stats(&array).clone(); - // SAFETY: dtype and len are extracted from `array` via VTable methods. - unsafe { Self::from_parts_unchecked(vtable, dtype, len, array, stats) } + /// Extracts dtype, len, vtable, and stats from the data via [`VTable`] methods. + pub fn try_from_data(data: V::Array) -> VortexResult { + let vtable = V::vtable(&data).clone(); + let dtype = V::dtype(&data).clone(); + let len = V::len(&data); + let stats = V::stats(&data).clone(); + // SAFETY: dtype and len are extracted from `data` via VTable methods. + Ok(unsafe { Self::from_data_unchecked(vtable, dtype, len, data, stats) }) } - /// Create a new typed array without validating that the inner array's dtype/len match. + /// Create a new typed array without validation. /// /// # Safety /// - /// The caller must ensure that `V::dtype(&array) == &dtype` and `V::len(&array) == len`. - pub unsafe fn from_parts_unchecked( + /// The caller must ensure that `V::dtype(&data) == &dtype` and `V::len(&data) == len`. + pub unsafe fn from_data_unchecked( vtable: V, dtype: DType, len: usize, - array: V::Array, + data: V::Array, stats: ArrayStats, ) -> Self { Self { vtable, dtype, len, - array, + array: data, stats, } } /// Returns a reference to the vtable. - pub fn typed_vtable(&self) -> &V { + pub fn vtable(&self) -> &V { &self.vtable } @@ -197,6 +197,22 @@ impl Array { pub fn to_canonical(&self) -> VortexResult { ::to_canonical(self) } + + /// Total size of the array in bytes, including all children and buffers. + pub fn nbytes(&self) -> u64 { + self.to_array_ref().nbytes() + } + + /// Returns the number of buffers in this array. + #[allow(clippy::same_name_method)] + pub fn nbuffers(&self) -> usize { + V::nbuffers(self) + } + + /// If this array is a constant, returns the scalar value. + pub fn as_constant(&self) -> Option { + self.to_array_ref().as_constant() + } } impl Deref for Array { diff --git a/vortex-btrblocks/src/compressor/float/stats.rs b/vortex-btrblocks/src/compressor/float/stats.rs index ecde6d73328..6502e62b0ea 100644 --- a/vortex-btrblocks/src/compressor/float/stats.rs +++ b/vortex-btrblocks/src/compressor/float/stats.rs @@ -86,7 +86,8 @@ impl CompressorStats for FloatStats { type ArrayVTable = Primitive; fn generate_opts(input: &PrimitiveData, opts: GenerateStatsOptions) -> Self { - let array = PrimitiveArray::from_inner(input.clone()); + let array = + PrimitiveArray::try_from_data(input.clone()).vortex_expect("data is always valid"); Self::generate_opts_fallible(&array, opts) .vortex_expect("FloatStats::generate_opts should not fail") } @@ -138,7 +139,7 @@ where } .into(), }); - } else if array.clone().into_array().all_invalid()? { + } else if array.all_invalid()? { return Ok(FloatStats { src: array.clone(), null_count: u32::try_from(array.len())?, diff --git a/vortex-btrblocks/src/compressor/integer/stats.rs b/vortex-btrblocks/src/compressor/integer/stats.rs index 9cb70720b8d..da24f43e62b 100644 --- a/vortex-btrblocks/src/compressor/integer/stats.rs +++ b/vortex-btrblocks/src/compressor/integer/stats.rs @@ -180,7 +180,8 @@ impl CompressorStats for IntegerStats { type ArrayVTable = Primitive; fn generate_opts(input: &PrimitiveData, opts: GenerateStatsOptions) -> Self { - let array = PrimitiveArray::from_inner(input.clone()); + let array = + PrimitiveArray::try_from_data(input.clone()).vortex_expect("data is always valid"); Self::generate_opts_fallible(&array, opts) .vortex_expect("IntegerStats::generate_opts should not fail") } @@ -237,7 +238,7 @@ where } .into(), }); - } else if array.clone().into_array().all_invalid()? { + } else if array.all_invalid()? { return Ok(IntegerStats { src: array.clone(), null_count: u32::try_from(array.len())?, diff --git a/vortex-btrblocks/src/compressor/string.rs b/vortex-btrblocks/src/compressor/string.rs index 5642ee38d0e..a9167cb04d4 100644 --- a/vortex-btrblocks/src/compressor/string.rs +++ b/vortex-btrblocks/src/compressor/string.rs @@ -106,7 +106,8 @@ impl CompressorStats for StringStats { type ArrayVTable = VarBinView; fn generate_opts(input: &VarBinViewData, opts: GenerateStatsOptions) -> Self { - let array = VarBinViewArray::from_inner(input.clone()); + let array = + VarBinViewArray::try_from_data(input.clone()).vortex_expect("data is always valid"); Self::generate_opts_fallible(&array, opts) .vortex_expect("StringStats::generate_opts should not fail") } diff --git a/vortex-cuda/benches/bitpacked_cuda.rs b/vortex-cuda/benches/bitpacked_cuda.rs index d0ea0104ee4..620596f76eb 100644 --- a/vortex-cuda/benches/bitpacked_cuda.rs +++ b/vortex-cuda/benches/bitpacked_cuda.rs @@ -57,10 +57,11 @@ where .collect(); let primitive_array = PrimitiveArray::new(Buffer::from(values), NonNullable); - BitPackedArray::from_inner( + BitPackedArray::try_from_data( BitPackedData::encode(&primitive_array.into_array(), bit_width) .vortex_expect("failed to create BitPacked array"), ) + .vortex_expect("BitPackedData is always valid") } /// Create a bit-packed array with the given bit width and patch frequency. @@ -99,10 +100,11 @@ where .collect(); let primitive_array = PrimitiveArray::new(Buffer::from(values), NonNullable).into_array(); - BitPackedArray::from_inner( + BitPackedArray::try_from_data( BitPackedData::encode(&primitive_array, bit_width) .vortex_expect("failed to create BitPacked array with patches"), ) + .vortex_expect("BitPackedData is always valid") } /// Generic benchmark function for a specific type and bit width diff --git a/vortex-cuda/benches/date_time_parts_cuda.rs b/vortex-cuda/benches/date_time_parts_cuda.rs index dfb0d71e332..a91111e3f8a 100644 --- a/vortex-cuda/benches/date_time_parts_cuda.rs +++ b/vortex-cuda/benches/date_time_parts_cuda.rs @@ -45,10 +45,11 @@ fn make_datetimeparts_array(len: usize, time_unit: TimeUnit) -> DateTimePartsArr let dtype = DType::Extension(Timestamp::new(time_unit, Nullability::NonNullable).erased()); - DateTimePartsArray::from_inner( + DateTimePartsArray::try_from_data( DateTimePartsData::try_new(dtype, days_arr, seconds_arr, subseconds_arr) .vortex_expect("Failed to create DateTimePartsArray"), ) + .vortex_expect("DateTimePartsData is always valid") } fn benchmark_datetimeparts(c: &mut Criterion) { diff --git a/vortex-cuda/benches/for_cuda.rs b/vortex-cuda/benches/for_cuda.rs index 6ffe9d6fd53..eb87eb6d770 100644 --- a/vortex-cuda/benches/for_cuda.rs +++ b/vortex-cuda/benches/for_cuda.rs @@ -57,15 +57,17 @@ where if bp && T::PTYPE != PType::U8 { let child = BitPackedData::encode(&primitive_array, 8).vortex_expect("failed to bitpack"); - FoRArray::from_inner( + FoRArray::try_from_data( FoRData::try_new(child.into_array(), reference.into()) .vortex_expect("failed to create FoR array"), ) + .vortex_expect("FoRData is always valid") } else { - FoRArray::from_inner( + FoRArray::try_from_data( FoRData::try_new(primitive_array, reference.into()) .vortex_expect("failed to create FoR array"), ) + .vortex_expect("FoRData is always valid") } } diff --git a/vortex-cuda/src/kernel/encodings/bitpacked.rs b/vortex-cuda/src/kernel/encodings/bitpacked.rs index cfecd926ccf..dfbfd3f2c44 100644 --- a/vortex-cuda/src/kernel/encodings/bitpacked.rs +++ b/vortex-cuda/src/kernel/encodings/bitpacked.rs @@ -519,7 +519,7 @@ mod tests { let bitpacked_array = BitPacked::encode(&primitive_array.into_array(), bit_width) .vortex_expect("operation should succeed in test"); - let slice_ref = bitpacked_array.clone().into_array().slice(67..3969)?; + let slice_ref = bitpacked_array.slice(67..3969)?; let bitpacked_ref = bitpacked_array.into_array(); let mut exec_ctx = ExecutionCtx::new(VortexSession::empty().with::()); let sliced_array = bitpacked_ref diff --git a/vortex-cuda/src/kernel/encodings/zstd_buffers.rs b/vortex-cuda/src/kernel/encodings/zstd_buffers.rs index ecec758f090..1891ee2375c 100644 --- a/vortex-cuda/src/kernel/encodings/zstd_buffers.rs +++ b/vortex-cuda/src/kernel/encodings/zstd_buffers.rs @@ -18,7 +18,6 @@ use vortex::buffer::Alignment; use vortex::buffer::Buffer; use vortex::encodings::zstd::ZstdBuffers; use vortex::encodings::zstd::ZstdBuffersArray; -use vortex::encodings::zstd::ZstdBuffersData; use vortex::error::VortexResult; use vortex::error::vortex_err; use vortex_nvcomp::sys; diff --git a/vortex-duckdb/src/exporter/sequence.rs b/vortex-duckdb/src/exporter/sequence.rs index 15afb5d753c..e5dd29cbf76 100644 --- a/vortex-duckdb/src/exporter/sequence.rs +++ b/vortex-duckdb/src/exporter/sequence.rs @@ -3,7 +3,6 @@ use bitvec::macros::internal::funty::Fundamental; use vortex::array::ExecutionCtx; -use vortex::encodings::sequence::Sequence; use vortex::encodings::sequence::SequenceArray; use vortex::error::VortexExpect; use vortex::error::VortexResult; @@ -45,6 +44,7 @@ impl ColumnExporter for SequenceExporter { #[cfg(test)] mod tests { use vortex::dtype::Nullability; + use vortex::encodings::sequence::Sequence; use vortex_array::VortexSessionExecute; use super::*; diff --git a/vortex-ipc/src/messages/decoder.rs b/vortex-ipc/src/messages/decoder.rs index 48b326b1a2d..ca863410855 100644 --- a/vortex-ipc/src/messages/decoder.rs +++ b/vortex-ipc/src/messages/decoder.rs @@ -213,11 +213,7 @@ mod test { fn array_no_buffers() { // Constant arrays have a single buffer let array = ConstantArray::new(10i32, 20); - assert_eq!( - array.clone().into_array().nbuffers(), - 1, - "Array should have a single buffer" - ); + assert_eq!(array.nbuffers(), 1, "Array should have a single buffer"); write_and_read(&array.into_array()); } } diff --git a/vortex/benches/single_encoding_throughput.rs b/vortex/benches/single_encoding_throughput.rs index 8664383170b..8e19d6e7f66 100644 --- a/vortex/benches/single_encoding_throughput.rs +++ b/vortex/benches/single_encoding_throughput.rs @@ -39,6 +39,7 @@ use vortex_array::DynArray; use vortex_array::VortexSessionExecute; use vortex_array::dtype::Nullability; use vortex_array::session::ArraySession; +use vortex_error::VortexExpect; use vortex_sequence::Sequence; use vortex_session::VortexSession; @@ -343,7 +344,7 @@ fn bench_zstd_decompress_u32(bencher: Bencher) { fn bench_dict_compress_string(bencher: Bencher) { let varbinview_arr = VarBinViewArray::from_iter_str(gen_varbin_words(NUM_VALUES as usize, 0.00005)); - let nbytes = varbinview_arr.clone().into_array().nbytes() as u64; + let nbytes = varbinview_arr.nbytes() as u64; with_byte_counter(bencher, nbytes) .with_inputs(|| &varbinview_arr) @@ -367,7 +368,7 @@ fn bench_fsst_compress_string(bencher: Bencher) { let varbinview_arr = VarBinViewArray::from_iter_str(gen_varbin_words(NUM_VALUES as usize, 0.00005)); let fsst_compressor = fsst_train_compressor(&varbinview_arr); - let nbytes = varbinview_arr.clone().into_array().nbytes() as u64; + let nbytes = varbinview_arr.nbytes() as u64; with_byte_counter(bencher, nbytes) .with_inputs(|| &varbinview_arr) @@ -379,12 +380,13 @@ fn bench_fsst_decompress_string(bencher: Bencher) { let varbinview_arr = VarBinViewArray::from_iter_str(gen_varbin_words(NUM_VALUES as usize, 0.00005)); let fsst_compressor = fsst_train_compressor(&varbinview_arr); - let fsst_array = FSSTArray::from_inner(fsst_compress( + let fsst_array = FSSTArray::try_from_data(fsst_compress( &varbinview_arr, varbinview_arr.len(), varbinview_arr.dtype(), &fsst_compressor, - )); + )) + .vortex_expect("data is always valid"); let nbytes = varbinview_arr.into_array().nbytes() as u64; with_byte_counter(bencher, nbytes) @@ -397,7 +399,7 @@ fn bench_fsst_decompress_string(bencher: Bencher) { fn bench_zstd_compress_string(bencher: Bencher) { let varbinview_arr = VarBinViewArray::from_iter_str(gen_varbin_words(NUM_VALUES as usize, 0.00005)); - let nbytes = varbinview_arr.clone().into_array().nbytes() as u64; + let nbytes = varbinview_arr.nbytes() as u64; let array = varbinview_arr.into_array(); with_byte_counter(bencher, nbytes) From 7c78812de84539df58f62445469c3cf6d5b52288 Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Mon, 30 Mar 2026 14:18:48 +0100 Subject: [PATCH 06/11] Array VTables 5 Signed-off-by: Nicholas Gates --- encodings/alp/public-api.lock | 12 +- encodings/alp/src/alp/array.rs | 6 +- encodings/alp/src/alp/decompress.rs | 4 +- encodings/alp/src/alp_rd/array.rs | 8 +- encodings/bytebool/public-api.lock | 6 +- encodings/bytebool/src/array.rs | 6 +- encodings/datetime-parts/public-api.lock | 8 +- encodings/datetime-parts/src/array.rs | 6 +- encodings/datetime-parts/src/compute/mask.rs | 2 +- encodings/decimal-byte-parts/public-api.lock | 6 +- .../src/decimal_byte_parts/mod.rs | 6 +- encodings/fastlanes/public-api.lock | 8 +- .../fastlanes/src/bitpacking/vtable/mod.rs | 2 +- encodings/fastlanes/src/delta/vtable/mod.rs | 2 +- .../fastlanes/src/for/array/for_compress.rs | 2 +- encodings/fastlanes/src/for/vtable/mod.rs | 2 +- encodings/fastlanes/src/rle/vtable/mod.rs | 2 +- encodings/fsst/public-api.lock | 6 +- encodings/fsst/src/array.rs | 6 +- encodings/pco/public-api.lock | 6 +- encodings/pco/src/array.rs | 6 +- encodings/runend/public-api.lock | 6 +- encodings/runend/src/array.rs | 6 +- encodings/runend/src/compress.rs | 10 +- encodings/runend/src/compute/fill_null.rs | 2 +- encodings/sequence/public-api.lock | 6 +- encodings/sequence/src/array.rs | 6 +- encodings/sparse/public-api.lock | 6 +- encodings/sparse/src/canonical.rs | 8 +- encodings/sparse/src/lib.rs | 6 +- encodings/zigzag/public-api.lock | 6 +- encodings/zigzag/src/array.rs | 6 +- encodings/zstd/public-api.lock | 6 +- encodings/zstd/src/array.rs | 6 +- encodings/zstd/src/zstd_buffers.rs | 6 +- fuzz/src/array/fill_null.rs | 4 +- fuzz/src/array/mask.rs | 2 +- vortex-array/benches/filter_bool.rs | 17 - vortex-array/benches/take_fsl.rs | 2 - vortex-array/public-api.lock | 544 +++++++++--------- vortex-array/src/array/mod.rs | 2 +- vortex-array/src/arrays/bool/array.rs | 4 +- vortex-array/src/arrays/bool/vtable/mod.rs | 6 +- vortex-array/src/arrays/chunked/vtable/mod.rs | 6 +- .../src/arrays/constant/vtable/mod.rs | 6 +- vortex-array/src/arrays/decimal/vtable/mod.rs | 6 +- vortex-array/src/arrays/dict/array.rs | 2 +- vortex-array/src/arrays/dict/vtable/mod.rs | 8 +- .../src/arrays/extension/vtable/mod.rs | 6 +- vortex-array/src/arrays/filter/vtable.rs | 4 +- .../src/arrays/fixed_size_list/vtable/mod.rs | 4 +- vortex-array/src/arrays/list/vtable/mod.rs | 4 +- vortex-array/src/arrays/listview/array.rs | 10 +- .../src/arrays/listview/vtable/mod.rs | 4 +- vortex-array/src/arrays/masked/execute.rs | 2 +- vortex-array/src/arrays/masked/vtable/mod.rs | 6 +- vortex-array/src/arrays/null/mod.rs | 6 +- .../src/arrays/primitive/array/conversion.rs | 6 +- .../src/arrays/primitive/vtable/mod.rs | 6 +- vortex-array/src/arrays/scalar_fn/array.rs | 4 +- .../src/arrays/scalar_fn/vtable/mod.rs | 6 +- vortex-array/src/arrays/shared/vtable.rs | 4 +- vortex-array/src/arrays/slice/vtable.rs | 6 +- vortex-array/src/arrays/struct_/array.rs | 2 +- vortex-array/src/arrays/struct_/vtable/mod.rs | 6 +- vortex-array/src/arrays/varbin/array.rs | 6 +- vortex-array/src/arrays/varbin/builder.rs | 8 +- .../src/arrays/varbin/vtable/canonical.rs | 2 +- vortex-array/src/arrays/varbin/vtable/mod.rs | 4 +- .../src/arrays/varbinview/accessor.rs | 2 +- vortex-array/src/arrays/varbinview/array.rs | 23 +- vortex-array/src/arrays/varbinview/compact.rs | 40 +- .../src/arrays/varbinview/compute/cast.rs | 2 +- .../src/arrays/varbinview/compute/mask.rs | 2 +- .../src/arrays/varbinview/compute/slice.rs | 2 +- .../src/arrays/varbinview/compute/take.rs | 2 +- .../src/arrays/varbinview/compute/zip.rs | 4 +- .../src/arrays/varbinview/vtable/mod.rs | 12 +- vortex-array/src/arrays/variant/vtable/mod.rs | 14 +- vortex-array/src/arrow/convert.rs | 8 +- vortex-array/src/arrow/executor/byte_view.rs | 4 +- vortex-array/src/arrow/executor/dictionary.rs | 2 +- vortex-array/src/arrow/executor/list.rs | 2 +- vortex-array/src/arrow/executor/list_view.rs | 2 +- vortex-array/src/builders/listview.rs | 2 - vortex-array/src/builders/varbinview.rs | 31 +- vortex-array/src/canonical.rs | 20 +- vortex-array/src/scalar_fn/fns/zip/mod.rs | 2 +- vortex-array/src/vtable/mod.rs | 14 +- vortex-array/src/vtable/typed.rs | 36 +- vortex-array/src/vtable/validity.rs | 16 +- vortex-btrblocks/public-api.lock | 10 +- vortex-btrblocks/src/compressor/float/mod.rs | 4 +- .../src/compressor/float/stats.rs | 3 - .../src/compressor/integer/mod.rs | 4 +- vortex-btrblocks/src/compressor/mod.rs | 4 +- vortex-btrblocks/src/compressor/string.rs | 4 +- vortex-btrblocks/src/stats.rs | 6 +- vortex-cuda/benches/zstd_cuda.rs | 2 +- vortex-cuda/src/arrow/canonical.rs | 6 +- vortex-cuda/src/arrow/varbinview.rs | 2 +- vortex-cuda/src/canonical.rs | 6 +- .../src/dynamic_dispatch/plan_builder.rs | 8 +- vortex-cuda/src/hybrid_dispatch/mod.rs | 2 +- vortex-cuda/src/kernel/arrays/dict.rs | 18 +- vortex-cuda/src/kernel/encodings/alp.rs | 2 +- vortex-cuda/src/kernel/encodings/bitpacked.rs | 2 +- .../src/kernel/encodings/date_time_parts.rs | 6 +- .../kernel/encodings/decimal_byte_parts.rs | 4 +- vortex-cuda/src/kernel/encodings/for_.rs | 2 +- vortex-cuda/src/kernel/encodings/runend.rs | 6 +- vortex-cuda/src/kernel/encodings/sequence.rs | 2 +- vortex-cuda/src/kernel/encodings/zigzag.rs | 2 +- vortex-cuda/src/kernel/encodings/zstd.rs | 2 +- vortex-cuda/src/kernel/filter/decimal.rs | 2 +- vortex-cuda/src/kernel/filter/mod.rs | 2 +- vortex-cuda/src/kernel/filter/primitive.rs | 2 +- vortex-cuda/src/kernel/filter/varbinview.rs | 2 +- vortex-cuda/src/kernel/patches/mod.rs | 6 +- vortex-cuda/src/kernel/slice/mod.rs | 2 +- vortex-duckdb/src/exporter/decimal.rs | 2 +- vortex-duckdb/src/exporter/fixed_size_list.rs | 2 +- vortex-duckdb/src/exporter/list.rs | 2 +- vortex-duckdb/src/exporter/list_view.rs | 2 +- vortex-duckdb/src/exporter/run_end.rs | 2 +- vortex-duckdb/src/exporter/varbinview.rs | 2 +- vortex-python/src/arrays/native.rs | 6 +- vortex-python/src/arrays/py/vtable.rs | 6 +- 128 files changed, 627 insertions(+), 675 deletions(-) diff --git a/encodings/alp/public-api.lock b/encodings/alp/public-api.lock index e352a064723..e1117947bdc 100644 --- a/encodings/alp/public-api.lock +++ b/encodings/alp/public-api.lock @@ -58,7 +58,7 @@ pub fn vortex_alp::ALP::mask(array: &vortex_alp::ALPArray, mask: &vortex_array:: impl vortex_array::vtable::VTable for vortex_alp::ALP -pub type vortex_alp::ALP::Array = vortex_alp::ALPData +pub type vortex_alp::ALP::ArrayData = vortex_alp::ALPData pub type vortex_alp::ALP::Metadata = vortex_array::metadata::ProstMetadata @@ -104,9 +104,9 @@ pub fn vortex_alp::ALP::serialize(metadata: Self::Metadata) -> vortex_error::Vor pub fn vortex_alp::ALP::stats(array: &vortex_alp::ALPData) -> &vortex_array::stats::array::ArrayStats -pub fn vortex_alp::ALP::vtable(_array: &Self::Array) -> &Self +pub fn vortex_alp::ALP::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_alp::ALP::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_alp::ALP::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::operations::OperationsVTable for vortex_alp::ALP @@ -218,7 +218,7 @@ pub fn vortex_alp::ALPRD::mask(array: &vortex_alp::ALPRDArray, mask: &vortex_arr impl vortex_array::vtable::VTable for vortex_alp::ALPRD -pub type vortex_alp::ALPRD::Array = vortex_alp::ALPRDData +pub type vortex_alp::ALPRD::ArrayData = vortex_alp::ALPRDData pub type vortex_alp::ALPRD::Metadata = vortex_array::metadata::ProstMetadata @@ -264,9 +264,9 @@ pub fn vortex_alp::ALPRD::serialize(metadata: Self::Metadata) -> vortex_error::V pub fn vortex_alp::ALPRD::stats(array: &vortex_alp::ALPRDData) -> &vortex_array::stats::array::ArrayStats -pub fn vortex_alp::ALPRD::vtable(_array: &Self::Array) -> &Self +pub fn vortex_alp::ALPRD::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_alp::ALPRD::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_alp::ALPRD::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::operations::OperationsVTable for vortex_alp::ALPRD diff --git a/encodings/alp/src/alp/array.rs b/encodings/alp/src/alp/array.rs index 06ebe27e44d..e00fca19e86 100644 --- a/encodings/alp/src/alp/array.rs +++ b/encodings/alp/src/alp/array.rs @@ -49,13 +49,13 @@ use crate::alp::rules::RULES; vtable!(ALP, ALP, ALPData); impl VTable for ALP { - type Array = ALPData; + type ArrayData = ALPData; type Metadata = ProstMetadata; type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromChild; - fn vtable(_array: &Self::Array) -> &Self { + fn vtable(_array: &Self::ArrayData) -> &Self { &ALP } @@ -195,7 +195,7 @@ impl VTable for ALP { ) } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { // Children: encoded, patches (if present): indices, values, chunk_offsets (optional) let patches_info = array .patches diff --git a/encodings/alp/src/alp/decompress.rs b/encodings/alp/src/alp/decompress.rs index cf678d9908c..bedc128771f 100644 --- a/encodings/alp/src/alp/decompress.rs +++ b/encodings/alp/src/alp/decompress.rs @@ -28,7 +28,7 @@ pub fn decompress_into_array( array: ALPArray, ctx: &mut ExecutionCtx, ) -> VortexResult { - let (encoded, exponents, patches, dtype) = array.into_inner().into_parts(); + let (encoded, exponents, patches, dtype) = array.into_data().into_parts(); if let Some(ref patches) = patches && let Some(chunk_offsets) = patches.chunk_offsets() { @@ -60,7 +60,7 @@ pub fn decompress_into_array( /// /// A `PrimitiveArray` containing the decompressed floating-point values with all patches applied. pub fn execute_decompress(array: ALPArray, ctx: &mut ExecutionCtx) -> VortexResult { - let (encoded, exponents, patches, dtype) = array.into_inner().into_parts(); + let (encoded, exponents, patches, dtype) = array.into_data().into_parts(); if let Some(ref patches) = patches && let Some(chunk_offsets) = patches.chunk_offsets() { diff --git a/encodings/alp/src/alp_rd/array.rs b/encodings/alp/src/alp_rd/array.rs index c9a14b92e60..a27ded9ce42 100644 --- a/encodings/alp/src/alp_rd/array.rs +++ b/encodings/alp/src/alp_rd/array.rs @@ -68,13 +68,13 @@ pub struct ALPRDMetadata { } impl VTable for ALPRD { - type Array = ALPRDData; + type ArrayData = ALPRDData; type Metadata = ProstMetadata; type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromChild; - fn vtable(_array: &Self::Array) -> &Self { + fn vtable(_array: &Self::ArrayData) -> &Self { &ALPRD } @@ -262,7 +262,7 @@ impl VTable for ALPRD { ) } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { // Children: left_parts, right_parts, patches (if present): indices, values let patches_info = array .left_parts_patches @@ -315,7 +315,7 @@ impl VTable for ALPRD { left_parts_patches, dtype, .. - } = Arc::unwrap_or_clone(array).into_inner().into_parts(); + } = Arc::unwrap_or_clone(array).into_data().into_parts(); let ptype = dtype.as_ptype(); let left_parts = left_parts diff --git a/encodings/bytebool/public-api.lock b/encodings/bytebool/public-api.lock index a569077a057..ddcb3c594d1 100644 --- a/encodings/bytebool/public-api.lock +++ b/encodings/bytebool/public-api.lock @@ -34,7 +34,7 @@ pub fn vortex_bytebool::ByteBool::mask(array: &vortex_bytebool::ByteBoolArray, m impl vortex_array::vtable::VTable for vortex_bytebool::ByteBool -pub type vortex_bytebool::ByteBool::Array = vortex_bytebool::ByteBoolData +pub type vortex_bytebool::ByteBool::ArrayData = vortex_bytebool::ByteBoolData pub type vortex_bytebool::ByteBool::Metadata = vortex_array::metadata::EmptyMetadata @@ -80,9 +80,9 @@ pub fn vortex_bytebool::ByteBool::serialize(_metadata: Self::Metadata) -> vortex pub fn vortex_bytebool::ByteBool::stats(array: &vortex_bytebool::ByteBoolData) -> &vortex_array::stats::array::ArrayStats -pub fn vortex_bytebool::ByteBool::vtable(_array: &Self::Array) -> &Self +pub fn vortex_bytebool::ByteBool::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_bytebool::ByteBool::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_bytebool::ByteBool::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::operations::OperationsVTable for vortex_bytebool::ByteBool diff --git a/encodings/bytebool/src/array.rs b/encodings/bytebool/src/array.rs index 443245dc01e..eb797b2a970 100644 --- a/encodings/bytebool/src/array.rs +++ b/encodings/bytebool/src/array.rs @@ -44,13 +44,13 @@ use crate::kernel::PARENT_KERNELS; vtable!(ByteBool, ByteBool, ByteBoolData); impl VTable for ByteBool { - type Array = ByteBoolData; + type ArrayData = ByteBoolData; type Metadata = EmptyMetadata; type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromValidityHelper; - fn vtable(_array: &Self::Array) -> &Self { + fn vtable(_array: &Self::ArrayData) -> &Self { &ByteBool } @@ -161,7 +161,7 @@ impl VTable for ByteBool { Ok(ByteBoolData::new(buffer, validity)) } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { vortex_ensure!( children.len() <= 1, "ByteBoolArray expects at most 1 child (validity), got {}", diff --git a/encodings/datetime-parts/public-api.lock b/encodings/datetime-parts/public-api.lock index dc3c752f77e..ff6be8037c4 100644 --- a/encodings/datetime-parts/public-api.lock +++ b/encodings/datetime-parts/public-api.lock @@ -6,6 +6,8 @@ impl vortex_datetime_parts::DateTimeParts pub const vortex_datetime_parts::DateTimeParts::ID: vortex_array::vtable::dyn_::ArrayId +pub fn vortex_datetime_parts::DateTimeParts::try_from_temporal(temporal: vortex_array::arrays::datetime::TemporalArray) -> vortex_error::VortexResult + pub fn vortex_datetime_parts::DateTimeParts::try_new(dtype: vortex_array::dtype::DType, days: vortex_array::array::ArrayRef, seconds: vortex_array::array::ArrayRef, subseconds: vortex_array::array::ArrayRef) -> vortex_error::VortexResult impl core::clone::Clone for vortex_datetime_parts::DateTimeParts @@ -42,7 +44,7 @@ pub fn vortex_datetime_parts::DateTimeParts::mask(array: &vortex_datetime_parts: impl vortex_array::vtable::VTable for vortex_datetime_parts::DateTimeParts -pub type vortex_datetime_parts::DateTimeParts::Array = vortex_datetime_parts::DateTimePartsData +pub type vortex_datetime_parts::DateTimeParts::ArrayData = vortex_datetime_parts::DateTimePartsData pub type vortex_datetime_parts::DateTimeParts::Metadata = vortex_array::metadata::ProstMetadata @@ -88,9 +90,9 @@ pub fn vortex_datetime_parts::DateTimeParts::serialize(metadata: Self::Metadata) pub fn vortex_datetime_parts::DateTimeParts::stats(array: &vortex_datetime_parts::DateTimePartsData) -> &vortex_array::stats::array::ArrayStats -pub fn vortex_datetime_parts::DateTimeParts::vtable(_array: &Self::Array) -> &Self +pub fn vortex_datetime_parts::DateTimeParts::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_datetime_parts::DateTimeParts::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_datetime_parts::DateTimeParts::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::operations::OperationsVTable for vortex_datetime_parts::DateTimeParts diff --git a/encodings/datetime-parts/src/array.rs b/encodings/datetime-parts/src/array.rs index fdadea1db29..24bc8b80d34 100644 --- a/encodings/datetime-parts/src/array.rs +++ b/encodings/datetime-parts/src/array.rs @@ -73,13 +73,13 @@ impl DateTimePartsMetadata { } impl VTable for DateTimeParts { - type Array = DateTimePartsData; + type ArrayData = DateTimePartsData; type Metadata = ProstMetadata; type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromChild; - fn vtable(_array: &Self::Array) -> &Self { + fn vtable(_array: &Self::ArrayData) -> &Self { &DateTimeParts } @@ -204,7 +204,7 @@ impl VTable for DateTimeParts { DateTimePartsData::try_new(dtype.clone(), days, seconds, subseconds) } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { vortex_ensure!( children.len() == 3, "DateTimePartsArray expects exactly 3 children (days, seconds, subseconds), got {}", diff --git a/encodings/datetime-parts/src/compute/mask.rs b/encodings/datetime-parts/src/compute/mask.rs index 94de496d538..7bb50c451f5 100644 --- a/encodings/datetime-parts/src/compute/mask.rs +++ b/encodings/datetime-parts/src/compute/mask.rs @@ -19,7 +19,7 @@ impl MaskReduce for DateTimeParts { days, seconds, subseconds, - } = array.clone().into_inner().into_parts(); + } = array.clone().into_data().into_parts(); let masked_days = days.mask(mask.clone())?; Ok(Some( DateTimePartsData::try_new(dtype.as_nullable(), masked_days, seconds, subseconds)? diff --git a/encodings/decimal-byte-parts/public-api.lock b/encodings/decimal-byte-parts/public-api.lock index daf7dbe98ad..38c1613ffc8 100644 --- a/encodings/decimal-byte-parts/public-api.lock +++ b/encodings/decimal-byte-parts/public-api.lock @@ -42,7 +42,7 @@ pub fn vortex_decimal_byte_parts::DecimalByteParts::mask(array: &vortex_decimal_ impl vortex_array::vtable::VTable for vortex_decimal_byte_parts::DecimalByteParts -pub type vortex_decimal_byte_parts::DecimalByteParts::Array = vortex_decimal_byte_parts::DecimalBytePartsData +pub type vortex_decimal_byte_parts::DecimalByteParts::ArrayData = vortex_decimal_byte_parts::DecimalBytePartsData pub type vortex_decimal_byte_parts::DecimalByteParts::Metadata = vortex_array::metadata::ProstMetadata @@ -88,9 +88,9 @@ pub fn vortex_decimal_byte_parts::DecimalByteParts::serialize(metadata: Self::Me pub fn vortex_decimal_byte_parts::DecimalByteParts::stats(array: &vortex_decimal_byte_parts::DecimalBytePartsData) -> &vortex_array::stats::array::ArrayStats -pub fn vortex_decimal_byte_parts::DecimalByteParts::vtable(_array: &Self::Array) -> &Self +pub fn vortex_decimal_byte_parts::DecimalByteParts::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_decimal_byte_parts::DecimalByteParts::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_decimal_byte_parts::DecimalByteParts::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::operations::OperationsVTable for vortex_decimal_byte_parts::DecimalByteParts diff --git a/encodings/decimal-byte-parts/src/decimal_byte_parts/mod.rs b/encodings/decimal-byte-parts/src/decimal_byte_parts/mod.rs index bedab00f881..96311e34bb8 100644 --- a/encodings/decimal-byte-parts/src/decimal_byte_parts/mod.rs +++ b/encodings/decimal-byte-parts/src/decimal_byte_parts/mod.rs @@ -60,13 +60,13 @@ pub struct DecimalBytesPartsMetadata { } impl VTable for DecimalByteParts { - type Array = DecimalBytePartsData; + type ArrayData = DecimalBytePartsData; type Metadata = ProstMetadata; type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromChild; - fn vtable(_array: &Self::Array) -> &Self { + fn vtable(_array: &Self::ArrayData) -> &Self { &DecimalByteParts } @@ -169,7 +169,7 @@ impl VTable for DecimalByteParts { DecimalBytePartsData::try_new(msp, *decimal_dtype) } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { vortex_ensure!( children.len() == 1, "DecimalBytePartsArray expects exactly 1 child (msp), got {}", diff --git a/encodings/fastlanes/public-api.lock b/encodings/fastlanes/public-api.lock index 9834dfbf33c..6f44fa378c3 100644 --- a/encodings/fastlanes/public-api.lock +++ b/encodings/fastlanes/public-api.lock @@ -150,7 +150,7 @@ pub fn vortex_fastlanes::BitPacked::cast(array: &vortex_fastlanes::BitPackedArra impl vortex_array::vtable::VTable for vortex_fastlanes::BitPacked -pub type vortex_fastlanes::BitPacked::Array = vortex_fastlanes::BitPackedData +pub type vortex_fastlanes::BitPacked::ArrayData = vortex_fastlanes::BitPackedData pub type vortex_fastlanes::BitPacked::Metadata = vortex_array::metadata::ProstMetadata @@ -304,7 +304,7 @@ pub fn vortex_fastlanes::Delta::cast(array: &vortex_fastlanes::DeltaArray, dtype impl vortex_array::vtable::VTable for vortex_fastlanes::Delta -pub type vortex_fastlanes::Delta::Array = vortex_fastlanes::DeltaData +pub type vortex_fastlanes::Delta::ArrayData = vortex_fastlanes::DeltaData pub type vortex_fastlanes::Delta::Metadata = vortex_array::metadata::ProstMetadata @@ -436,7 +436,7 @@ pub fn vortex_fastlanes::FoR::cast(array: &vortex_fastlanes::FoRArray, dtype: &v impl vortex_array::vtable::VTable for vortex_fastlanes::FoR -pub type vortex_fastlanes::FoR::Array = vortex_fastlanes::FoRData +pub type vortex_fastlanes::FoR::ArrayData = vortex_fastlanes::FoRData pub type vortex_fastlanes::FoR::Metadata = vortex_array::scalar::Scalar @@ -560,7 +560,7 @@ pub fn vortex_fastlanes::RLE::cast(array: &vortex_fastlanes::RLEArray, dtype: &v impl vortex_array::vtable::VTable for vortex_fastlanes::RLE -pub type vortex_fastlanes::RLE::Array = vortex_fastlanes::RLEData +pub type vortex_fastlanes::RLE::ArrayData = vortex_fastlanes::RLEData pub type vortex_fastlanes::RLE::Metadata = vortex_array::metadata::ProstMetadata diff --git a/encodings/fastlanes/src/bitpacking/vtable/mod.rs b/encodings/fastlanes/src/bitpacking/vtable/mod.rs index 4519fb54dee..353cc4742cc 100644 --- a/encodings/fastlanes/src/bitpacking/vtable/mod.rs +++ b/encodings/fastlanes/src/bitpacking/vtable/mod.rs @@ -65,7 +65,7 @@ pub struct BitPackedMetadata { } impl VTable for BitPacked { - type Array = BitPackedData; + type ArrayData = BitPackedData; type Metadata = ProstMetadata; diff --git a/encodings/fastlanes/src/delta/vtable/mod.rs b/encodings/fastlanes/src/delta/vtable/mod.rs index 736d728f938..0e81396055e 100644 --- a/encodings/fastlanes/src/delta/vtable/mod.rs +++ b/encodings/fastlanes/src/delta/vtable/mod.rs @@ -51,7 +51,7 @@ pub struct DeltaMetadata { } impl VTable for Delta { - type Array = DeltaData; + type ArrayData = DeltaData; type Metadata = ProstMetadata; diff --git a/encodings/fastlanes/src/for/array/for_compress.rs b/encodings/fastlanes/src/for/array/for_compress.rs index 1373a983100..7f5d480541f 100644 --- a/encodings/fastlanes/src/for/array/for_compress.rs +++ b/encodings/fastlanes/src/for/array/for_compress.rs @@ -44,7 +44,7 @@ fn compress_primitive( // Set null values to the min value, ensuring that decompress into a value in the primitive // range (and stop them wrapping around). parray - .into_inner() + .into_data() .map_each_with_validity::(|(v, bool)| { if bool { v.wrapping_sub(&min) diff --git a/encodings/fastlanes/src/for/vtable/mod.rs b/encodings/fastlanes/src/for/vtable/mod.rs index fa931422fca..0ae8823c36b 100644 --- a/encodings/fastlanes/src/for/vtable/mod.rs +++ b/encodings/fastlanes/src/for/vtable/mod.rs @@ -44,7 +44,7 @@ mod validity; vtable!(FoR, FoR, FoRData); impl VTable for FoR { - type Array = FoRData; + type ArrayData = FoRData; type Metadata = Scalar; diff --git a/encodings/fastlanes/src/rle/vtable/mod.rs b/encodings/fastlanes/src/rle/vtable/mod.rs index 3bf09296b8a..8968394f7f8 100644 --- a/encodings/fastlanes/src/rle/vtable/mod.rs +++ b/encodings/fastlanes/src/rle/vtable/mod.rs @@ -59,7 +59,7 @@ pub struct RLEMetadata { } impl VTable for RLE { - type Array = RLEData; + type ArrayData = RLEData; type Metadata = ProstMetadata; diff --git a/encodings/fsst/public-api.lock b/encodings/fsst/public-api.lock index 22b93348204..c750e33b888 100644 --- a/encodings/fsst/public-api.lock +++ b/encodings/fsst/public-api.lock @@ -42,7 +42,7 @@ pub fn vortex_fsst::FSST::like(array: &vortex_fsst::FSSTArray, pattern: &vortex_ impl vortex_array::vtable::VTable for vortex_fsst::FSST -pub type vortex_fsst::FSST::Array = vortex_fsst::FSSTData +pub type vortex_fsst::FSST::ArrayData = vortex_fsst::FSSTData pub type vortex_fsst::FSST::Metadata = vortex_array::metadata::ProstMetadata @@ -90,9 +90,9 @@ pub fn vortex_fsst::FSST::serialize(metadata: Self::Metadata) -> vortex_error::V pub fn vortex_fsst::FSST::stats(array: &vortex_fsst::FSSTData) -> &vortex_array::stats::array::ArrayStats -pub fn vortex_fsst::FSST::vtable(_array: &Self::Array) -> &Self +pub fn vortex_fsst::FSST::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_fsst::FSST::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_fsst::FSST::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::operations::OperationsVTable for vortex_fsst::FSST diff --git a/encodings/fsst/src/array.rs b/encodings/fsst/src/array.rs index 8da05a6845c..5a185597750 100644 --- a/encodings/fsst/src/array.rs +++ b/encodings/fsst/src/array.rs @@ -75,13 +75,13 @@ impl FSSTMetadata { } impl VTable for FSST { - type Array = FSSTData; + type ArrayData = FSSTData; type Metadata = ProstMetadata; type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromChild; - fn vtable(_array: &Self::Array) -> &Self { + fn vtable(_array: &Self::ArrayData) -> &Self { &FSST } @@ -317,7 +317,7 @@ impl VTable for FSST { ); } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { vortex_ensure!( children.len() == 2, "FSSTArray expects 2 children, got {}", diff --git a/encodings/pco/public-api.lock b/encodings/pco/public-api.lock index a082dd0f400..57140df9304 100644 --- a/encodings/pco/public-api.lock +++ b/encodings/pco/public-api.lock @@ -26,7 +26,7 @@ pub fn vortex_pco::Pco::cast(array: &vortex_pco::PcoArray, dtype: &vortex_array: impl vortex_array::vtable::VTable for vortex_pco::Pco -pub type vortex_pco::Pco::Array = vortex_pco::PcoData +pub type vortex_pco::Pco::ArrayData = vortex_pco::PcoData pub type vortex_pco::Pco::Metadata = vortex_array::metadata::ProstMetadata @@ -70,9 +70,9 @@ pub fn vortex_pco::Pco::serialize(metadata: Self::Metadata) -> vortex_error::Vor pub fn vortex_pco::Pco::stats(array: &vortex_pco::PcoData) -> &vortex_array::stats::array::ArrayStats -pub fn vortex_pco::Pco::vtable(_array: &Self::Array) -> &Self +pub fn vortex_pco::Pco::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_pco::Pco::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_pco::Pco::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::operations::OperationsVTable for vortex_pco::Pco diff --git a/encodings/pco/src/array.rs b/encodings/pco/src/array.rs index cc9bd6e8488..c1f7710a162 100644 --- a/encodings/pco/src/array.rs +++ b/encodings/pco/src/array.rs @@ -87,13 +87,13 @@ const VALUES_PER_CHUNK: usize = pco::DEFAULT_MAX_PAGE_N; vtable!(Pco, Pco, PcoData); impl VTable for Pco { - type Array = PcoData; + type ArrayData = PcoData; type Metadata = ProstMetadata; type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromValiditySliceHelper; - fn vtable(_array: &Self::Array) -> &Self { + fn vtable(_array: &Self::ArrayData) -> &Self { &Pco } @@ -253,7 +253,7 @@ impl VTable for Pco { )) } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { vortex_ensure!( children.len() <= 1, "PcoArray expects 0 or 1 children, got {}", diff --git a/encodings/runend/public-api.lock b/encodings/runend/public-api.lock index e067e4a7e9f..b7831f28858 100644 --- a/encodings/runend/public-api.lock +++ b/encodings/runend/public-api.lock @@ -62,7 +62,7 @@ pub fn vortex_runend::RunEnd::fill_null(array: &vortex_runend::RunEndArray, fill impl vortex_array::vtable::VTable for vortex_runend::RunEnd -pub type vortex_runend::RunEnd::Array = vortex_runend::RunEndData +pub type vortex_runend::RunEnd::ArrayData = vortex_runend::RunEndData pub type vortex_runend::RunEnd::Metadata = vortex_array::metadata::ProstMetadata @@ -108,9 +108,9 @@ pub fn vortex_runend::RunEnd::serialize(metadata: Self::Metadata) -> vortex_erro pub fn vortex_runend::RunEnd::stats(array: &vortex_runend::RunEndData) -> &vortex_array::stats::array::ArrayStats -pub fn vortex_runend::RunEnd::vtable(_array: &Self::Array) -> &Self +pub fn vortex_runend::RunEnd::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_runend::RunEnd::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_runend::RunEnd::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::operations::OperationsVTable for vortex_runend::RunEnd diff --git a/encodings/runend/src/array.rs b/encodings/runend/src/array.rs index ad27cb3fd8f..9a5e4418c56 100644 --- a/encodings/runend/src/array.rs +++ b/encodings/runend/src/array.rs @@ -60,13 +60,13 @@ pub struct RunEndMetadata { } impl VTable for RunEnd { - type Array = RunEndData; + type ArrayData = RunEndData; type Metadata = ProstMetadata; type OperationsVTable = Self; type ValidityVTable = Self; - fn vtable(_array: &Self::Array) -> &Self { + fn vtable(_array: &Self::ArrayData) -> &Self { &RunEnd } @@ -177,7 +177,7 @@ impl VTable for RunEnd { ) } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { vortex_ensure!( children.len() == 2, "RunEndArray expects 2 children, got {}", diff --git a/encodings/runend/src/compress.rs b/encodings/runend/src/compress.rs index ddd31c601c9..d2b711767f3 100644 --- a/encodings/runend/src/compress.rs +++ b/encodings/runend/src/compress.rs @@ -38,9 +38,7 @@ pub fn runend_encode(array: &PrimitiveArray) -> (PrimitiveArray, ArrayRef) { Validity::AllInvalid => { // We can trivially return an all-null REE array let ends = PrimitiveArray::new(buffer![array.len() as u64], Validity::NonNullable); - ends.clone() - .into_array() - .statistics() + ends.statistics() .set(Stat::IsStrictSorted, Precision::Exact(true.into())); return ( ends, @@ -74,9 +72,7 @@ pub fn runend_encode(array: &PrimitiveArray) -> (PrimitiveArray, ArrayRef) { let ends = ends.narrow().vortex_expect("Ends must succeed downcasting"); - ends.clone() - .into_array() - .statistics() + ends.statistics() .set(Stat::IsStrictSorted, Precision::Exact(true.into())); (ends, values) @@ -288,7 +284,7 @@ pub fn runend_decode_varbinview( ) }); - let parts = values.into_inner().into_parts(); + let parts = values.into_data().into_parts(); let view_handle = BufferHandle::new_host(decoded_views.into_byte_buffer()); // SAFETY: we are expanding views from a valid VarBinViewArray with the same diff --git a/encodings/runend/src/compute/fill_null.rs b/encodings/runend/src/compute/fill_null.rs index 4348c102d36..cc4d7b459ea 100644 --- a/encodings/runend/src/compute/fill_null.rs +++ b/encodings/runend/src/compute/fill_null.rs @@ -15,7 +15,7 @@ use crate::RunEndData; impl FillNullReduce for RunEnd { fn fill_null(array: &RunEndArray, fill_value: &Scalar) -> VortexResult> { - let RunEndArrayParts { values, ends } = array.clone().into_inner().into_parts(); + let RunEndArrayParts { values, ends } = array.clone().into_data().into_parts(); let new_values = values.fill_null(fill_value.clone())?; // SAFETY: modifying values only, does not affect ends Ok(Some( diff --git a/encodings/sequence/public-api.lock b/encodings/sequence/public-api.lock index 1983e53e73f..88802653758 100644 --- a/encodings/sequence/public-api.lock +++ b/encodings/sequence/public-api.lock @@ -44,7 +44,7 @@ pub fn vortex_sequence::Sequence::list_contains(list: &vortex_array::array::Arra impl vortex_array::vtable::VTable for vortex_sequence::Sequence -pub type vortex_sequence::Sequence::Array = vortex_sequence::SequenceData +pub type vortex_sequence::Sequence::ArrayData = vortex_sequence::SequenceData pub type vortex_sequence::Sequence::Metadata = vortex_sequence::array::SequenceMetadata @@ -90,9 +90,9 @@ pub fn vortex_sequence::Sequence::serialize(metadata: Self::Metadata) -> vortex_ pub fn vortex_sequence::Sequence::stats(array: &vortex_sequence::SequenceData) -> &vortex_array::stats::array::ArrayStats -pub fn vortex_sequence::Sequence::vtable(_array: &Self::Array) -> &Self +pub fn vortex_sequence::Sequence::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_sequence::Sequence::with_children(_array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_sequence::Sequence::with_children(_array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::operations::OperationsVTable for vortex_sequence::Sequence diff --git a/encodings/sequence/src/array.rs b/encodings/sequence/src/array.rs index e7fbc0078ae..7f7cd953a15 100644 --- a/encodings/sequence/src/array.rs +++ b/encodings/sequence/src/array.rs @@ -255,13 +255,13 @@ impl SequenceData { } impl VTable for Sequence { - type Array = SequenceData; + type ArrayData = SequenceData; type Metadata = SequenceMetadata; type OperationsVTable = Self; type ValidityVTable = Self; - fn vtable(_array: &Self::Array) -> &Self { + fn vtable(_array: &Self::ArrayData) -> &Self { &Sequence } @@ -391,7 +391,7 @@ impl VTable for Sequence { ) } - fn with_children(_array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(_array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { vortex_ensure!( children.is_empty(), "SequenceArray expects 0 children, got {}", diff --git a/encodings/sparse/public-api.lock b/encodings/sparse/public-api.lock index 057bc07197d..1409d0e099b 100644 --- a/encodings/sparse/public-api.lock +++ b/encodings/sparse/public-api.lock @@ -60,7 +60,7 @@ pub fn vortex_sparse::Sparse::invert(array: &vortex_sparse::SparseArray) -> vort impl vortex_array::vtable::VTable for vortex_sparse::Sparse -pub type vortex_sparse::Sparse::Array = vortex_sparse::SparseData +pub type vortex_sparse::Sparse::ArrayData = vortex_sparse::SparseData pub type vortex_sparse::Sparse::Metadata = vortex_sparse::SparseMetadata @@ -106,9 +106,9 @@ pub fn vortex_sparse::Sparse::serialize(metadata: Self::Metadata) -> vortex_erro pub fn vortex_sparse::Sparse::stats(array: &vortex_sparse::SparseData) -> &vortex_array::stats::array::ArrayStats -pub fn vortex_sparse::Sparse::vtable(_array: &Self::Array) -> &Self +pub fn vortex_sparse::Sparse::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_sparse::Sparse::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_sparse::Sparse::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::operations::OperationsVTable for vortex_sparse::Sparse diff --git a/encodings/sparse/src/canonical.rs b/encodings/sparse/src/canonical.rs index 895a063934d..895868f931e 100644 --- a/encodings/sparse/src/canonical.rs +++ b/encodings/sparse/src/canonical.rs @@ -198,8 +198,6 @@ fn execute_sparse_lists_inner( builder .append_value( patch_values - .clone() - .into_array() .scalar_at(patch_idx) .vortex_expect("scalar_at") .as_list(), @@ -478,7 +476,7 @@ fn execute_sparse_decimal( } } let filled_array = builder.finish_into_decimal(); - let array = filled_array.into_inner().patch(patches, ctx)?; + let array = filled_array.into_data().patch(patches, ctx)?; Ok(array.into_array()) } @@ -510,8 +508,8 @@ fn execute_varbin_inner( ) -> VarBinViewArray { assert_eq!(dtype.nullability(), validity.nullability()); - let n_patch_buffers = values.buffers().len(); - let mut buffers = values.buffers().to_vec(); + let n_patch_buffers = values.data_buffers().len(); + let mut buffers = values.data_buffers().to_vec(); let fill = if let Some(buffer) = &fill_value { buffers.push(BufferHandle::new_host(buffer.clone())); diff --git a/encodings/sparse/src/lib.rs b/encodings/sparse/src/lib.rs index e4b6c9b675d..34df0e7a650 100644 --- a/encodings/sparse/src/lib.rs +++ b/encodings/sparse/src/lib.rs @@ -75,13 +75,13 @@ pub struct ProstPatchesMetadata { } impl VTable for Sparse { - type Array = SparseData; + type ArrayData = SparseData; type Metadata = SparseMetadata; type OperationsVTable = Self; type ValidityVTable = Self; - fn vtable(_array: &Self::Array) -> &Self { + fn vtable(_array: &Self::ArrayData) -> &Self { &Sparse } @@ -220,7 +220,7 @@ impl VTable for Sparse { ) } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { vortex_ensure_eq!( children.len(), 2, diff --git a/encodings/zigzag/public-api.lock b/encodings/zigzag/public-api.lock index b0e432975bf..ce8716e9991 100644 --- a/encodings/zigzag/public-api.lock +++ b/encodings/zigzag/public-api.lock @@ -38,7 +38,7 @@ pub fn vortex_zigzag::ZigZag::mask(array: &vortex_zigzag::ZigZagArray, mask: &vo impl vortex_array::vtable::VTable for vortex_zigzag::ZigZag -pub type vortex_zigzag::ZigZag::Array = vortex_zigzag::ZigZagData +pub type vortex_zigzag::ZigZag::ArrayData = vortex_zigzag::ZigZagData pub type vortex_zigzag::ZigZag::Metadata = vortex_array::metadata::EmptyMetadata @@ -84,9 +84,9 @@ pub fn vortex_zigzag::ZigZag::serialize(_metadata: Self::Metadata) -> vortex_err pub fn vortex_zigzag::ZigZag::stats(array: &vortex_zigzag::ZigZagData) -> &vortex_array::stats::array::ArrayStats -pub fn vortex_zigzag::ZigZag::vtable(_array: &Self::Array) -> &Self +pub fn vortex_zigzag::ZigZag::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_zigzag::ZigZag::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_zigzag::ZigZag::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::operations::OperationsVTable for vortex_zigzag::ZigZag diff --git a/encodings/zigzag/src/array.rs b/encodings/zigzag/src/array.rs index db40430ee78..e507871d55d 100644 --- a/encodings/zigzag/src/array.rs +++ b/encodings/zigzag/src/array.rs @@ -43,13 +43,13 @@ use crate::zigzag_decode; vtable!(ZigZag, ZigZag, ZigZagData); impl VTable for ZigZag { - type Array = ZigZagData; + type ArrayData = ZigZagData; type Metadata = EmptyMetadata; type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromChild; - fn vtable(_array: &Self::Array) -> &Self { + fn vtable(_array: &Self::ArrayData) -> &Self { &ZigZag } @@ -144,7 +144,7 @@ impl VTable for ZigZag { ZigZagData::try_new(encoded) } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { vortex_ensure!( children.len() == 1, "ZigZagArray expects exactly 1 child (encoded), got {}", diff --git a/encodings/zstd/public-api.lock b/encodings/zstd/public-api.lock index 7beedcd9ac6..14a28fab712 100644 --- a/encodings/zstd/public-api.lock +++ b/encodings/zstd/public-api.lock @@ -30,7 +30,7 @@ pub fn vortex_zstd::Zstd::cast(array: &vortex_zstd::ZstdArray, dtype: &vortex_ar impl vortex_array::vtable::VTable for vortex_zstd::Zstd -pub type vortex_zstd::Zstd::Array = vortex_zstd::ZstdData +pub type vortex_zstd::Zstd::ArrayData = vortex_zstd::ZstdData pub type vortex_zstd::Zstd::Metadata = vortex_array::metadata::ProstMetadata @@ -74,9 +74,9 @@ pub fn vortex_zstd::Zstd::serialize(metadata: Self::Metadata) -> vortex_error::V pub fn vortex_zstd::Zstd::stats(array: &vortex_zstd::ZstdData) -> &vortex_array::stats::array::ArrayStats -pub fn vortex_zstd::Zstd::vtable(_array: &Self::Array) -> &Self +pub fn vortex_zstd::Zstd::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_zstd::Zstd::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_zstd::Zstd::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::operations::OperationsVTable for vortex_zstd::Zstd diff --git a/encodings/zstd/src/array.rs b/encodings/zstd/src/array.rs index 42f0281f90d..8fe2c95ffe7 100644 --- a/encodings/zstd/src/array.rs +++ b/encodings/zstd/src/array.rs @@ -85,13 +85,13 @@ type ViewLen = u32; vtable!(Zstd, Zstd, ZstdData); impl VTable for Zstd { - type Array = ZstdData; + type ArrayData = ZstdData; type Metadata = ProstMetadata; type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromValiditySliceHelper; - fn vtable(_array: &Self::Array) -> &Self { + fn vtable(_array: &Self::ArrayData) -> &Self { &Zstd } @@ -263,7 +263,7 @@ impl VTable for Zstd { )) } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { vortex_ensure!( children.len() <= 1, "ZstdArray expects at most 1 child (validity), got {}", diff --git a/encodings/zstd/src/zstd_buffers.rs b/encodings/zstd/src/zstd_buffers.rs index c1d6d1e838b..45854ed6a1d 100644 --- a/encodings/zstd/src/zstd_buffers.rs +++ b/encodings/zstd/src/zstd_buffers.rs @@ -344,13 +344,13 @@ fn array_id_from_string(s: &str) -> ArrayId { } impl VTable for ZstdBuffers { - type Array = ZstdBuffersData; + type ArrayData = ZstdBuffersData; type Metadata = ProstMetadata; type OperationsVTable = Self; type ValidityVTable = Self; - fn vtable(_array: &Self::Array) -> &Self { + fn vtable(_array: &Self::ArrayData) -> &Self { &ZstdBuffers } @@ -482,7 +482,7 @@ impl VTable for ZstdBuffers { Ok(data) } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { array.children = children; Ok(()) } diff --git a/fuzz/src/array/fill_null.rs b/fuzz/src/array/fill_null.rs index 9facf80ddaa..4430c011e3a 100644 --- a/fuzz/src/array/fill_null.rs +++ b/fuzz/src/array/fill_null.rs @@ -210,7 +210,7 @@ fn fill_varbinview_array( if result_nullability == Nullability::Nullable { VarBinViewArray::new_handle( result.to_varbinview().views_handle().clone(), - result.to_varbinview().buffers().clone(), + result.to_varbinview().data_buffers().clone(), result.dtype().as_nullable(), result_nullability.into(), ) @@ -244,7 +244,7 @@ fn fill_varbinview_array( if result_nullability == Nullability::Nullable { VarBinViewArray::new_handle( result.to_varbinview().views_handle().clone(), - result.to_varbinview().buffers().clone(), + result.to_varbinview().data_buffers().clone(), result.dtype().as_nullable(), result_nullability.into(), ) diff --git a/fuzz/src/array/mask.rs b/fuzz/src/array/mask.rs index 170db177854..1ebb13d9abd 100644 --- a/fuzz/src/array/mask.rs +++ b/fuzz/src/array/mask.rs @@ -83,7 +83,7 @@ pub fn mask_canonical_array(canonical: Canonical, mask: &Mask) -> VortexResult(ctx) @@ -171,7 +169,6 @@ fn filter_random_by_mostly_false(bencher: Bencher, n: usize) { .bench_refs(|(array, m, ctx)| { array .clone() - .into_array() .filter(m.clone()) .unwrap() .execute::(ctx) @@ -192,7 +189,6 @@ fn filter_random_by_random(bencher: Bencher, n: usize) { .bench_refs(|(array, m, ctx)| { array .clone() - .into_array() .filter(m.clone()) .unwrap() .execute::(ctx) @@ -213,7 +209,6 @@ fn filter_random_by_correlated_runs(bencher: Bencher, n: usize) { .bench_refs(|(array, m, ctx)| { array .clone() - .into_array() .filter(m.clone()) .unwrap() .execute::(ctx) @@ -234,7 +229,6 @@ fn filter_random_by_power_law(bencher: Bencher, n: usize) { .bench_refs(|(array, m, ctx)| { array .clone() - .into_array() .filter(m.clone()) .unwrap() .execute::(ctx) @@ -257,7 +251,6 @@ fn filter_powerlaw_by_mostly_true(bencher: Bencher, n: usize) { .bench_refs(|(array, m, ctx)| { array .clone() - .into_array() .filter(m.clone()) .unwrap() .execute::(ctx) @@ -278,7 +271,6 @@ fn filter_powerlaw_by_mostly_false(bencher: Bencher, n: usize) { .bench_refs(|(array, m, ctx)| { array .clone() - .into_array() .filter(m.clone()) .unwrap() .execute::(ctx) @@ -299,7 +291,6 @@ fn filter_powerlaw_by_random(bencher: Bencher, n: usize) { .bench_refs(|(array, m, ctx)| { array .clone() - .into_array() .filter(m.clone()) .unwrap() .execute::(ctx) @@ -320,7 +311,6 @@ fn filter_powerlaw_by_correlated_runs(bencher: Bencher, n: usize) { .bench_refs(|(array, m, ctx)| { array .clone() - .into_array() .filter(m.clone()) .unwrap() .execute::(ctx) @@ -341,7 +331,6 @@ fn filter_powerlaw_by_power_law(bencher: Bencher, n: usize) { .bench_refs(|(array, m, ctx)| { array .clone() - .into_array() .filter(m.clone()) .unwrap() .execute::(ctx) @@ -368,7 +357,6 @@ fn density_sweep_random(bencher: Bencher, density: f64) { .bench_refs(|(array, m, ctx)| { array .clone() - .into_array() .filter(m.clone()) .unwrap() .execute::(ctx) @@ -390,7 +378,6 @@ fn density_sweep_dense_runs(bencher: Bencher, density: f64) { .bench_refs(|(array, m, ctx)| { array .clone() - .into_array() .filter(m.clone()) .unwrap() .execute::(ctx) @@ -411,7 +398,6 @@ fn density_sweep_single_slice(bencher: Bencher, density: f64) { .bench_refs(|(array, m, ctx)| { array .clone() - .into_array() .filter(m.clone()) .unwrap() .execute::(ctx) @@ -436,7 +422,6 @@ fn filter_all_true(bencher: Bencher, n: usize) { .bench_refs(|(array, m, ctx)| { array .clone() - .into_array() .filter(m.clone()) .unwrap() .execute::(ctx) @@ -459,7 +444,6 @@ fn filter_one_false(bencher: Bencher, n: usize) { .bench_refs(|(array, m, ctx)| { array .clone() - .into_array() .filter(m.clone()) .unwrap() .execute::(ctx) @@ -480,7 +464,6 @@ fn filter_ultra_sparse(bencher: Bencher, n: usize) { .bench_refs(|(array, m, ctx)| { array .clone() - .into_array() .filter(m.clone()) .unwrap() .execute::(ctx) diff --git a/vortex-array/benches/take_fsl.rs b/vortex-array/benches/take_fsl.rs index 94dd34a11b2..e6e4ea9ee28 100644 --- a/vortex-array/benches/take_fsl.rs +++ b/vortex-array/benches/take_fsl.rs @@ -67,7 +67,6 @@ fn take_fsl_random(bencher: Bencher, num_indices: usize) .bench_refs(|(array, indices, execution_ctx)| { array .clone() - .into_array() .take(indices.to_array()) .unwrap() .execute::(execution_ctx) @@ -94,7 +93,6 @@ fn take_fsl_nullable_random(bencher: Bencher, num_indice .bench_refs(|(array, indices, execution_ctx)| { array .clone() - .into_array() .take(indices.to_array()) .unwrap() .execute::(execution_ctx) diff --git a/vortex-array/public-api.lock b/vortex-array/public-api.lock index d630873075b..a23fbff4fe2 100644 --- a/vortex-array/public-api.lock +++ b/vortex-array/public-api.lock @@ -892,7 +892,7 @@ pub fn vortex_array::arrays::Bool::scalar_at(array: &vortex_array::vtable::Array impl vortex_array::vtable::VTable for vortex_array::arrays::Bool -pub type vortex_array::arrays::Bool::Array = vortex_array::arrays::BoolData +pub type vortex_array::arrays::Bool::ArrayData = vortex_array::arrays::BoolData pub type vortex_array::arrays::Bool::Metadata = vortex_array::ProstMetadata @@ -942,9 +942,9 @@ pub fn vortex_array::arrays::Bool::serialize(metadata: Self::Metadata) -> vortex pub fn vortex_array::arrays::Bool::stats(array: &vortex_array::arrays::BoolData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Bool::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Bool::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Bool::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Bool::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::bool::BoolArrayParts @@ -1070,7 +1070,7 @@ pub fn vortex_array::arrays::Chunked::scalar_at(array: &vortex_array::vtable::Ar impl vortex_array::vtable::VTable for vortex_array::arrays::Chunked -pub type vortex_array::arrays::Chunked::Array = vortex_array::arrays::ChunkedData +pub type vortex_array::arrays::Chunked::ArrayData = vortex_array::arrays::ChunkedData pub type vortex_array::arrays::Chunked::Metadata = vortex_array::EmptyMetadata @@ -1120,9 +1120,9 @@ pub fn vortex_array::arrays::Chunked::serialize(_metadata: Self::Metadata) -> vo pub fn vortex_array::arrays::Chunked::stats(array: &vortex_array::arrays::ChunkedData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Chunked::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Chunked::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Chunked::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Chunked::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Chunked @@ -1232,7 +1232,7 @@ pub fn vortex_array::arrays::Constant::scalar_at(array: &vortex_array::vtable::A impl vortex_array::vtable::VTable for vortex_array::arrays::Constant -pub type vortex_array::arrays::Constant::Array = vortex_array::arrays::ConstantData +pub type vortex_array::arrays::Constant::ArrayData = vortex_array::arrays::ConstantData pub type vortex_array::arrays::Constant::Metadata = vortex_array::scalar::Scalar @@ -1282,9 +1282,9 @@ pub fn vortex_array::arrays::Constant::serialize(_metadata: Self::Metadata) -> v pub fn vortex_array::arrays::Constant::stats(array: &vortex_array::arrays::ConstantData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Constant::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Constant::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Constant::with_children(_array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Constant::with_children(_array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Constant @@ -1438,7 +1438,7 @@ pub fn vortex_array::arrays::Decimal::scalar_at(array: &vortex_array::vtable::Ar impl vortex_array::vtable::VTable for vortex_array::arrays::Decimal -pub type vortex_array::arrays::Decimal::Array = vortex_array::arrays::DecimalData +pub type vortex_array::arrays::Decimal::ArrayData = vortex_array::arrays::DecimalData pub type vortex_array::arrays::Decimal::Metadata = vortex_array::ProstMetadata @@ -1488,9 +1488,9 @@ pub fn vortex_array::arrays::Decimal::serialize(metadata: Self::Metadata) -> vor pub fn vortex_array::arrays::Decimal::stats(array: &vortex_array::arrays::DecimalData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Decimal::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Decimal::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Decimal::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Decimal::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::decimal::DecimalArrayParts @@ -1646,7 +1646,7 @@ pub fn vortex_array::arrays::dict::Dict::scalar_at(array: &vortex_array::vtable: impl vortex_array::vtable::VTable for vortex_array::arrays::dict::Dict -pub type vortex_array::arrays::dict::Dict::Array = vortex_array::arrays::dict::DictData +pub type vortex_array::arrays::dict::Dict::ArrayData = vortex_array::arrays::dict::DictData pub type vortex_array::arrays::dict::Dict::Metadata = vortex_array::ProstMetadata @@ -1696,9 +1696,9 @@ pub fn vortex_array::arrays::dict::Dict::serialize(metadata: Self::Metadata) -> pub fn vortex_array::arrays::dict::Dict::stats(array: &vortex_array::arrays::dict::DictData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::dict::Dict::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::dict::Dict::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::dict::Dict::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::dict::Dict::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::dict::Dict @@ -1758,7 +1758,7 @@ pub fn vortex_array::arrays::dict::Dict::scalar_at(array: &vortex_array::vtable: impl vortex_array::vtable::VTable for vortex_array::arrays::dict::Dict -pub type vortex_array::arrays::dict::Dict::Array = vortex_array::arrays::dict::DictData +pub type vortex_array::arrays::dict::Dict::ArrayData = vortex_array::arrays::dict::DictData pub type vortex_array::arrays::dict::Dict::Metadata = vortex_array::ProstMetadata @@ -1808,9 +1808,9 @@ pub fn vortex_array::arrays::dict::Dict::serialize(metadata: Self::Metadata) -> pub fn vortex_array::arrays::dict::Dict::stats(array: &vortex_array::arrays::dict::DictData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::dict::Dict::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::dict::Dict::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::dict::Dict::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::dict::Dict::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::dict::Dict @@ -2052,7 +2052,7 @@ pub fn vortex_array::arrays::Extension::scalar_at(array: &vortex_array::vtable:: impl vortex_array::vtable::VTable for vortex_array::arrays::Extension -pub type vortex_array::arrays::Extension::Array = vortex_array::arrays::ExtensionData +pub type vortex_array::arrays::Extension::ArrayData = vortex_array::arrays::ExtensionData pub type vortex_array::arrays::Extension::Metadata = vortex_array::EmptyMetadata @@ -2102,9 +2102,9 @@ pub fn vortex_array::arrays::Extension::serialize(_metadata: Self::Metadata) -> pub fn vortex_array::arrays::Extension::stats(array: &vortex_array::arrays::ExtensionData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Extension::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Extension::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Extension::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Extension::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityChild for vortex_array::arrays::Extension @@ -2170,7 +2170,7 @@ pub fn vortex_array::arrays::Filter::scalar_at(array: &vortex_array::vtable::Arr impl vortex_array::vtable::VTable for vortex_array::arrays::Filter -pub type vortex_array::arrays::Filter::Array = vortex_array::arrays::FilterData +pub type vortex_array::arrays::Filter::ArrayData = vortex_array::arrays::FilterData pub type vortex_array::arrays::Filter::Metadata = vortex_array::arrays::filter::vtable::FilterMetadata @@ -2222,7 +2222,7 @@ pub fn vortex_array::arrays::Filter::stats(array: &vortex_array::arrays::FilterD pub fn vortex_array::arrays::Filter::vtable(_array: &vortex_array::arrays::FilterData) -> &Self -pub fn vortex_array::arrays::Filter::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Filter::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Filter @@ -2388,7 +2388,7 @@ pub fn vortex_array::arrays::FixedSizeList::scalar_at(array: &vortex_array::vtab impl vortex_array::vtable::VTable for vortex_array::arrays::FixedSizeList -pub type vortex_array::arrays::FixedSizeList::Array = vortex_array::arrays::FixedSizeListData +pub type vortex_array::arrays::FixedSizeList::ArrayData = vortex_array::arrays::FixedSizeListData pub type vortex_array::arrays::FixedSizeList::Metadata = vortex_array::EmptyMetadata @@ -2440,7 +2440,7 @@ pub fn vortex_array::arrays::FixedSizeList::stats(array: &vortex_array::arrays:: pub fn vortex_array::arrays::FixedSizeList::vtable(_array: &vortex_array::arrays::FixedSizeListData) -> &Self -pub fn vortex_array::arrays::FixedSizeList::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::FixedSizeList::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::fixed_size_list::FixedSizeListData @@ -2538,7 +2538,7 @@ pub fn vortex_array::arrays::List::scalar_at(array: &vortex_array::vtable::Array impl vortex_array::vtable::VTable for vortex_array::arrays::List -pub type vortex_array::arrays::List::Array = vortex_array::arrays::ListData +pub type vortex_array::arrays::List::ArrayData = vortex_array::arrays::ListData pub type vortex_array::arrays::List::Metadata = vortex_array::ProstMetadata @@ -2590,7 +2590,7 @@ pub fn vortex_array::arrays::List::stats(array: &vortex_array::arrays::ListData) pub fn vortex_array::arrays::List::vtable(_array: &vortex_array::arrays::ListData) -> &Self -pub fn vortex_array::arrays::List::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::List::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::list::ListArrayParts @@ -2712,7 +2712,7 @@ pub fn vortex_array::arrays::ListView::scalar_at(array: &vortex_array::vtable::A impl vortex_array::vtable::VTable for vortex_array::arrays::ListView -pub type vortex_array::arrays::ListView::Array = vortex_array::arrays::ListViewData +pub type vortex_array::arrays::ListView::ArrayData = vortex_array::arrays::ListViewData pub type vortex_array::arrays::ListView::Metadata = vortex_array::ProstMetadata @@ -2764,7 +2764,7 @@ pub fn vortex_array::arrays::ListView::stats(array: &vortex_array::arrays::ListV pub fn vortex_array::arrays::ListView::vtable(_array: &vortex_array::arrays::ListViewData) -> &Self -pub fn vortex_array::arrays::ListView::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::ListView::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::listview::ListViewArrayParts @@ -2886,7 +2886,7 @@ pub fn vortex_array::arrays::Masked::scalar_at(array: &vortex_array::vtable::Arr impl vortex_array::vtable::VTable for vortex_array::arrays::Masked -pub type vortex_array::arrays::Masked::Array = vortex_array::arrays::MaskedData +pub type vortex_array::arrays::Masked::ArrayData = vortex_array::arrays::MaskedData pub type vortex_array::arrays::Masked::Metadata = vortex_array::EmptyMetadata @@ -2936,9 +2936,9 @@ pub fn vortex_array::arrays::Masked::serialize(_metadata: Self::Metadata) -> vor pub fn vortex_array::arrays::Masked::stats(array: &vortex_array::arrays::MaskedData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Masked::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Masked::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Masked::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Masked::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::masked::MaskedData @@ -3028,7 +3028,7 @@ pub fn vortex_array::arrays::null::Null::scalar_at(_array: &vortex_array::vtable impl vortex_array::vtable::VTable for vortex_array::arrays::null::Null -pub type vortex_array::arrays::null::Null::Array = vortex_array::arrays::null::NullData +pub type vortex_array::arrays::null::Null::ArrayData = vortex_array::arrays::null::NullData pub type vortex_array::arrays::null::Null::Metadata = vortex_array::EmptyMetadata @@ -3078,9 +3078,9 @@ pub fn vortex_array::arrays::null::Null::serialize(_metadata: Self::Metadata) -> pub fn vortex_array::arrays::null::Null::stats(array: &vortex_array::arrays::null::NullData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::null::Null::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::null::Null::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::null::Null::with_children(_array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::null::Null::with_children(_array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::null::Null @@ -3234,7 +3234,7 @@ pub fn vortex_array::arrays::Primitive::scalar_at(array: &vortex_array::vtable:: impl vortex_array::vtable::VTable for vortex_array::arrays::Primitive -pub type vortex_array::arrays::Primitive::Array = vortex_array::arrays::PrimitiveData +pub type vortex_array::arrays::Primitive::ArrayData = vortex_array::arrays::PrimitiveData pub type vortex_array::arrays::Primitive::Metadata = vortex_array::EmptyMetadata @@ -3284,9 +3284,9 @@ pub fn vortex_array::arrays::Primitive::serialize(_metadata: Self::Metadata) -> pub fn vortex_array::arrays::Primitive::stats(array: &vortex_array::arrays::PrimitiveData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Primitive::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Primitive::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Primitive::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Primitive::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::primitive::PrimitiveArrayParts @@ -3498,7 +3498,7 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::scalar_at(array: &vortex impl vortex_array::vtable::VTable for vortex_array::arrays::scalar_fn::ScalarFnVTable -pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::Array = vortex_array::arrays::ScalarFnData +pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::ArrayData = vortex_array::arrays::ScalarFnData pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::Metadata = vortex_array::arrays::scalar_fn::metadata::ScalarFnMetadata @@ -3516,7 +3516,7 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::buffer(_array: &vortex_a pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &vortex_array::arrays::scalar_fn::metadata::ScalarFnMetadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &vortex_array::arrays::scalar_fn::metadata::ScalarFnMetadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef @@ -3550,7 +3550,7 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::stats(array: &vortex_arr pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::vtable(array: &vortex_array::arrays::ScalarFnData) -> &Self -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::scalar_fn::ScalarFnVTable @@ -3588,7 +3588,7 @@ pub fn vortex_array::arrays::Shared::scalar_at(array: &vortex_array::vtable::Arr impl vortex_array::vtable::VTable for vortex_array::arrays::Shared -pub type vortex_array::arrays::Shared::Array = vortex_array::arrays::SharedData +pub type vortex_array::arrays::Shared::ArrayData = vortex_array::arrays::SharedData pub type vortex_array::arrays::Shared::Metadata = vortex_array::EmptyMetadata @@ -3640,7 +3640,7 @@ pub fn vortex_array::arrays::Shared::stats(array: &vortex_array::arrays::SharedD pub fn vortex_array::arrays::Shared::vtable(_array: &vortex_array::arrays::SharedData) -> &Self -pub fn vortex_array::arrays::Shared::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Shared::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Shared @@ -3706,7 +3706,7 @@ pub fn vortex_array::arrays::slice::Slice::scalar_at(array: &vortex_array::vtabl impl vortex_array::vtable::VTable for vortex_array::arrays::slice::Slice -pub type vortex_array::arrays::slice::Slice::Array = vortex_array::arrays::SliceData +pub type vortex_array::arrays::slice::Slice::ArrayData = vortex_array::arrays::SliceData pub type vortex_array::arrays::slice::Slice::Metadata = vortex_array::arrays::slice::SliceMetadata @@ -3724,7 +3724,7 @@ pub fn vortex_array::arrays::slice::Slice::buffer(_array: &vortex_array::vtable: pub fn vortex_array::arrays::slice::Slice::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option -pub fn vortex_array::arrays::slice::Slice::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &vortex_array::arrays::slice::SliceMetadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::slice::Slice::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &vortex_array::arrays::slice::SliceMetadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult pub fn vortex_array::arrays::slice::Slice::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef @@ -3758,7 +3758,7 @@ pub fn vortex_array::arrays::slice::Slice::stats(array: &vortex_array::arrays::S pub fn vortex_array::arrays::slice::Slice::vtable(_array: &vortex_array::arrays::SliceData) -> &Self -pub fn vortex_array::arrays::slice::Slice::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::slice::Slice::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::slice::Slice @@ -3962,7 +3962,7 @@ pub fn vortex_array::arrays::Struct::scalar_at(array: &vortex_array::vtable::Arr impl vortex_array::vtable::VTable for vortex_array::arrays::Struct -pub type vortex_array::arrays::Struct::Array = vortex_array::arrays::StructData +pub type vortex_array::arrays::Struct::ArrayData = vortex_array::arrays::StructData pub type vortex_array::arrays::Struct::Metadata = vortex_array::EmptyMetadata @@ -4012,9 +4012,9 @@ pub fn vortex_array::arrays::Struct::serialize(_metadata: Self::Metadata) -> vor pub fn vortex_array::arrays::Struct::stats(array: &vortex_array::arrays::StructData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Struct::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Struct::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Struct::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Struct::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::struct_::StructArrayParts @@ -4176,7 +4176,7 @@ pub fn vortex_array::arrays::VarBin::scalar_at(array: &vortex_array::vtable::Arr impl vortex_array::vtable::VTable for vortex_array::arrays::VarBin -pub type vortex_array::arrays::VarBin::Array = vortex_array::arrays::VarBinData +pub type vortex_array::arrays::VarBin::ArrayData = vortex_array::arrays::VarBinData pub type vortex_array::arrays::VarBin::Metadata = vortex_array::ProstMetadata @@ -4228,7 +4228,7 @@ pub fn vortex_array::arrays::VarBin::stats(array: &vortex_array::arrays::VarBinD pub fn vortex_array::arrays::VarBin::vtable(_array: &vortex_array::arrays::VarBinData) -> &Self -pub fn vortex_array::arrays::VarBin::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::VarBin::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::varbin::VarBinData @@ -4576,7 +4576,7 @@ pub fn vortex_array::arrays::VarBinView::scalar_at(array: &vortex_array::vtable: impl vortex_array::vtable::VTable for vortex_array::arrays::VarBinView -pub type vortex_array::arrays::VarBinView::Array = vortex_array::arrays::VarBinViewData +pub type vortex_array::arrays::VarBinView::ArrayData = vortex_array::arrays::VarBinViewData pub type vortex_array::arrays::VarBinView::Metadata = vortex_array::EmptyMetadata @@ -4628,7 +4628,7 @@ pub fn vortex_array::arrays::VarBinView::stats(array: &vortex_array::arrays::Var pub fn vortex_array::arrays::VarBinView::vtable(_array: &vortex_array::arrays::VarBinViewData) -> &Self -pub fn vortex_array::arrays::VarBinView::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::VarBinView::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::varbinview::VarBinViewArrayParts @@ -4646,10 +4646,10 @@ impl vortex_array::arrays::VarBinViewData pub fn vortex_array::arrays::VarBinViewData::buffer(&self, idx: usize) -> &vortex_buffer::ByteBuffer -pub fn vortex_array::arrays::VarBinViewData::buffers(&self) -> &alloc::sync::Arc<[vortex_array::buffer::BufferHandle]> - pub fn vortex_array::arrays::VarBinViewData::bytes_at(&self, index: usize) -> vortex_buffer::ByteBuffer +pub fn vortex_array::arrays::VarBinViewData::data_buffers(&self) -> &alloc::sync::Arc<[vortex_array::buffer::BufferHandle]> + pub fn vortex_array::arrays::VarBinViewData::dtype(&self) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::VarBinViewData::from_iter, I: core::iter::traits::collect::IntoIterator>>(iter: I, dtype: vortex_array::dtype::DType) -> Self @@ -4668,8 +4668,6 @@ pub fn vortex_array::arrays::VarBinViewData::is_empty(&self) -> bool pub fn vortex_array::arrays::VarBinViewData::len(&self) -> usize -pub fn vortex_array::arrays::VarBinViewData::nbuffers(&self) -> usize - pub fn vortex_array::arrays::VarBinViewData::new(views: vortex_buffer::buffer::Buffer, buffers: alloc::sync::Arc<[vortex_buffer::ByteBuffer]>, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self pub fn vortex_array::arrays::VarBinViewData::new_handle(views: vortex_array::buffer::BufferHandle, buffers: alloc::sync::Arc<[vortex_array::buffer::BufferHandle]>, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self @@ -4752,7 +4750,7 @@ pub fn vortex_array::arrays::Variant::scalar_at(array: &vortex_array::vtable::Ar impl vortex_array::vtable::VTable for vortex_array::arrays::Variant -pub type vortex_array::arrays::Variant::Array = vortex_array::arrays::variant::VariantData +pub type vortex_array::arrays::Variant::ArrayData = vortex_array::arrays::variant::VariantData pub type vortex_array::arrays::Variant::Metadata = vortex_array::EmptyMetadata @@ -4770,7 +4768,7 @@ pub fn vortex_array::arrays::Variant::buffer(_array: &vortex_array::vtable::Arra pub fn vortex_array::arrays::Variant::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Variant::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Variant::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult pub fn vortex_array::arrays::Variant::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef @@ -4778,7 +4776,7 @@ pub fn vortex_array::arrays::Variant::child_name(_array: &vortex_array::vtable:: pub fn vortex_array::arrays::Variant::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Variant::dtype(array: &Self::Array) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Variant::dtype(array: &Self::ArrayData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Variant::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -4786,7 +4784,7 @@ pub fn vortex_array::arrays::Variant::execute_parent(array: &vortex_array::vtabl pub fn vortex_array::arrays::Variant::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Variant::len(array: &Self::Array) -> usize +pub fn vortex_array::arrays::Variant::len(array: &Self::ArrayData) -> usize pub fn vortex_array::arrays::Variant::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult @@ -4800,11 +4798,11 @@ pub fn vortex_array::arrays::Variant::reduce_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Variant::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Variant::stats(array: &Self::Array) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Variant::stats(array: &Self::ArrayData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Variant::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Variant::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Variant::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Variant::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Variant @@ -4892,7 +4890,7 @@ pub fn vortex_array::arrays::Bool::scalar_at(array: &vortex_array::vtable::Array impl vortex_array::vtable::VTable for vortex_array::arrays::Bool -pub type vortex_array::arrays::Bool::Array = vortex_array::arrays::BoolData +pub type vortex_array::arrays::Bool::ArrayData = vortex_array::arrays::BoolData pub type vortex_array::arrays::Bool::Metadata = vortex_array::ProstMetadata @@ -4942,9 +4940,9 @@ pub fn vortex_array::arrays::Bool::serialize(metadata: Self::Metadata) -> vortex pub fn vortex_array::arrays::Bool::stats(array: &vortex_array::arrays::BoolData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Bool::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Bool::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Bool::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Bool::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::BoolData @@ -5040,7 +5038,7 @@ pub fn vortex_array::arrays::Chunked::scalar_at(array: &vortex_array::vtable::Ar impl vortex_array::vtable::VTable for vortex_array::arrays::Chunked -pub type vortex_array::arrays::Chunked::Array = vortex_array::arrays::ChunkedData +pub type vortex_array::arrays::Chunked::ArrayData = vortex_array::arrays::ChunkedData pub type vortex_array::arrays::Chunked::Metadata = vortex_array::EmptyMetadata @@ -5090,9 +5088,9 @@ pub fn vortex_array::arrays::Chunked::serialize(_metadata: Self::Metadata) -> vo pub fn vortex_array::arrays::Chunked::stats(array: &vortex_array::arrays::ChunkedData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Chunked::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Chunked::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Chunked::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Chunked::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Chunked @@ -5198,7 +5196,7 @@ pub fn vortex_array::arrays::Constant::scalar_at(array: &vortex_array::vtable::A impl vortex_array::vtable::VTable for vortex_array::arrays::Constant -pub type vortex_array::arrays::Constant::Array = vortex_array::arrays::ConstantData +pub type vortex_array::arrays::Constant::ArrayData = vortex_array::arrays::ConstantData pub type vortex_array::arrays::Constant::Metadata = vortex_array::scalar::Scalar @@ -5248,9 +5246,9 @@ pub fn vortex_array::arrays::Constant::serialize(_metadata: Self::Metadata) -> v pub fn vortex_array::arrays::Constant::stats(array: &vortex_array::arrays::ConstantData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Constant::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Constant::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Constant::with_children(_array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Constant::with_children(_array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Constant @@ -5338,7 +5336,7 @@ pub fn vortex_array::arrays::Decimal::scalar_at(array: &vortex_array::vtable::Ar impl vortex_array::vtable::VTable for vortex_array::arrays::Decimal -pub type vortex_array::arrays::Decimal::Array = vortex_array::arrays::DecimalData +pub type vortex_array::arrays::Decimal::ArrayData = vortex_array::arrays::DecimalData pub type vortex_array::arrays::Decimal::Metadata = vortex_array::ProstMetadata @@ -5388,9 +5386,9 @@ pub fn vortex_array::arrays::Decimal::serialize(metadata: Self::Metadata) -> vor pub fn vortex_array::arrays::Decimal::stats(array: &vortex_array::arrays::DecimalData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Decimal::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Decimal::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Decimal::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Decimal::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::DecimalData @@ -5512,7 +5510,7 @@ pub fn vortex_array::arrays::dict::Dict::scalar_at(array: &vortex_array::vtable: impl vortex_array::vtable::VTable for vortex_array::arrays::dict::Dict -pub type vortex_array::arrays::dict::Dict::Array = vortex_array::arrays::dict::DictData +pub type vortex_array::arrays::dict::Dict::ArrayData = vortex_array::arrays::dict::DictData pub type vortex_array::arrays::dict::Dict::Metadata = vortex_array::ProstMetadata @@ -5562,9 +5560,9 @@ pub fn vortex_array::arrays::dict::Dict::serialize(metadata: Self::Metadata) -> pub fn vortex_array::arrays::dict::Dict::stats(array: &vortex_array::arrays::dict::DictData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::dict::Dict::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::dict::Dict::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::dict::Dict::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::dict::Dict::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::dict::Dict @@ -5662,7 +5660,7 @@ pub fn vortex_array::arrays::Extension::scalar_at(array: &vortex_array::vtable:: impl vortex_array::vtable::VTable for vortex_array::arrays::Extension -pub type vortex_array::arrays::Extension::Array = vortex_array::arrays::ExtensionData +pub type vortex_array::arrays::Extension::ArrayData = vortex_array::arrays::ExtensionData pub type vortex_array::arrays::Extension::Metadata = vortex_array::EmptyMetadata @@ -5712,9 +5710,9 @@ pub fn vortex_array::arrays::Extension::serialize(_metadata: Self::Metadata) -> pub fn vortex_array::arrays::Extension::stats(array: &vortex_array::arrays::ExtensionData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Extension::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Extension::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Extension::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Extension::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityChild for vortex_array::arrays::Extension @@ -5776,7 +5774,7 @@ pub fn vortex_array::arrays::Filter::scalar_at(array: &vortex_array::vtable::Arr impl vortex_array::vtable::VTable for vortex_array::arrays::Filter -pub type vortex_array::arrays::Filter::Array = vortex_array::arrays::FilterData +pub type vortex_array::arrays::Filter::ArrayData = vortex_array::arrays::FilterData pub type vortex_array::arrays::Filter::Metadata = vortex_array::arrays::filter::vtable::FilterMetadata @@ -5828,7 +5826,7 @@ pub fn vortex_array::arrays::Filter::stats(array: &vortex_array::arrays::FilterD pub fn vortex_array::arrays::Filter::vtable(_array: &vortex_array::arrays::FilterData) -> &Self -pub fn vortex_array::arrays::Filter::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Filter::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Filter @@ -5908,7 +5906,7 @@ pub fn vortex_array::arrays::FixedSizeList::scalar_at(array: &vortex_array::vtab impl vortex_array::vtable::VTable for vortex_array::arrays::FixedSizeList -pub type vortex_array::arrays::FixedSizeList::Array = vortex_array::arrays::FixedSizeListData +pub type vortex_array::arrays::FixedSizeList::ArrayData = vortex_array::arrays::FixedSizeListData pub type vortex_array::arrays::FixedSizeList::Metadata = vortex_array::EmptyMetadata @@ -5960,7 +5958,7 @@ pub fn vortex_array::arrays::FixedSizeList::stats(array: &vortex_array::arrays:: pub fn vortex_array::arrays::FixedSizeList::vtable(_array: &vortex_array::arrays::FixedSizeListData) -> &Self -pub fn vortex_array::arrays::FixedSizeList::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::FixedSizeList::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::FixedSizeListData @@ -6054,7 +6052,7 @@ pub fn vortex_array::arrays::List::scalar_at(array: &vortex_array::vtable::Array impl vortex_array::vtable::VTable for vortex_array::arrays::List -pub type vortex_array::arrays::List::Array = vortex_array::arrays::ListData +pub type vortex_array::arrays::List::ArrayData = vortex_array::arrays::ListData pub type vortex_array::arrays::List::Metadata = vortex_array::ProstMetadata @@ -6106,7 +6104,7 @@ pub fn vortex_array::arrays::List::stats(array: &vortex_array::arrays::ListData) pub fn vortex_array::arrays::List::vtable(_array: &vortex_array::arrays::ListData) -> &Self -pub fn vortex_array::arrays::List::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::List::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::ListData @@ -6204,7 +6202,7 @@ pub fn vortex_array::arrays::ListView::scalar_at(array: &vortex_array::vtable::A impl vortex_array::vtable::VTable for vortex_array::arrays::ListView -pub type vortex_array::arrays::ListView::Array = vortex_array::arrays::ListViewData +pub type vortex_array::arrays::ListView::ArrayData = vortex_array::arrays::ListViewData pub type vortex_array::arrays::ListView::Metadata = vortex_array::ProstMetadata @@ -6256,7 +6254,7 @@ pub fn vortex_array::arrays::ListView::stats(array: &vortex_array::arrays::ListV pub fn vortex_array::arrays::ListView::vtable(_array: &vortex_array::arrays::ListViewData) -> &Self -pub fn vortex_array::arrays::ListView::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::ListView::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::ListViewData @@ -6356,7 +6354,7 @@ pub fn vortex_array::arrays::Masked::scalar_at(array: &vortex_array::vtable::Arr impl vortex_array::vtable::VTable for vortex_array::arrays::Masked -pub type vortex_array::arrays::Masked::Array = vortex_array::arrays::MaskedData +pub type vortex_array::arrays::Masked::ArrayData = vortex_array::arrays::MaskedData pub type vortex_array::arrays::Masked::Metadata = vortex_array::EmptyMetadata @@ -6406,9 +6404,9 @@ pub fn vortex_array::arrays::Masked::serialize(_metadata: Self::Metadata) -> vor pub fn vortex_array::arrays::Masked::stats(array: &vortex_array::arrays::MaskedData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Masked::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Masked::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Masked::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Masked::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::MaskedData @@ -6492,7 +6490,7 @@ pub fn vortex_array::arrays::null::Null::scalar_at(_array: &vortex_array::vtable impl vortex_array::vtable::VTable for vortex_array::arrays::null::Null -pub type vortex_array::arrays::null::Null::Array = vortex_array::arrays::null::NullData +pub type vortex_array::arrays::null::Null::ArrayData = vortex_array::arrays::null::NullData pub type vortex_array::arrays::null::Null::Metadata = vortex_array::EmptyMetadata @@ -6542,9 +6540,9 @@ pub fn vortex_array::arrays::null::Null::serialize(_metadata: Self::Metadata) -> pub fn vortex_array::arrays::null::Null::stats(array: &vortex_array::arrays::null::NullData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::null::Null::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::null::Null::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::null::Null::with_children(_array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::null::Null::with_children(_array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::null::Null @@ -6628,7 +6626,7 @@ pub fn vortex_array::arrays::Primitive::scalar_at(array: &vortex_array::vtable:: impl vortex_array::vtable::VTable for vortex_array::arrays::Primitive -pub type vortex_array::arrays::Primitive::Array = vortex_array::arrays::PrimitiveData +pub type vortex_array::arrays::Primitive::ArrayData = vortex_array::arrays::PrimitiveData pub type vortex_array::arrays::Primitive::Metadata = vortex_array::EmptyMetadata @@ -6678,9 +6676,9 @@ pub fn vortex_array::arrays::Primitive::serialize(_metadata: Self::Metadata) -> pub fn vortex_array::arrays::Primitive::stats(array: &vortex_array::arrays::PrimitiveData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Primitive::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Primitive::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Primitive::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Primitive::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::PrimitiveData @@ -6816,7 +6814,7 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::scalar_at(array: &vortex impl vortex_array::vtable::VTable for vortex_array::arrays::scalar_fn::ScalarFnVTable -pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::Array = vortex_array::arrays::ScalarFnData +pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::ArrayData = vortex_array::arrays::ScalarFnData pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::Metadata = vortex_array::arrays::scalar_fn::metadata::ScalarFnMetadata @@ -6834,7 +6832,7 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::buffer(_array: &vortex_a pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &vortex_array::arrays::scalar_fn::metadata::ScalarFnMetadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &vortex_array::arrays::scalar_fn::metadata::ScalarFnMetadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef @@ -6868,7 +6866,7 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::stats(array: &vortex_arr pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::vtable(array: &vortex_array::arrays::ScalarFnData) -> &Self -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::scalar_fn::ScalarFnVTable @@ -6894,7 +6892,7 @@ pub fn vortex_array::arrays::Shared::scalar_at(array: &vortex_array::vtable::Arr impl vortex_array::vtable::VTable for vortex_array::arrays::Shared -pub type vortex_array::arrays::Shared::Array = vortex_array::arrays::SharedData +pub type vortex_array::arrays::Shared::ArrayData = vortex_array::arrays::SharedData pub type vortex_array::arrays::Shared::Metadata = vortex_array::EmptyMetadata @@ -6946,7 +6944,7 @@ pub fn vortex_array::arrays::Shared::stats(array: &vortex_array::arrays::SharedD pub fn vortex_array::arrays::Shared::vtable(_array: &vortex_array::arrays::SharedData) -> &Self -pub fn vortex_array::arrays::Shared::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Shared::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Shared @@ -7008,7 +7006,7 @@ pub fn vortex_array::arrays::slice::Slice::scalar_at(array: &vortex_array::vtabl impl vortex_array::vtable::VTable for vortex_array::arrays::slice::Slice -pub type vortex_array::arrays::slice::Slice::Array = vortex_array::arrays::SliceData +pub type vortex_array::arrays::slice::Slice::ArrayData = vortex_array::arrays::SliceData pub type vortex_array::arrays::slice::Slice::Metadata = vortex_array::arrays::slice::SliceMetadata @@ -7026,7 +7024,7 @@ pub fn vortex_array::arrays::slice::Slice::buffer(_array: &vortex_array::vtable: pub fn vortex_array::arrays::slice::Slice::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option -pub fn vortex_array::arrays::slice::Slice::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &vortex_array::arrays::slice::SliceMetadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::slice::Slice::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &vortex_array::arrays::slice::SliceMetadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult pub fn vortex_array::arrays::slice::Slice::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef @@ -7060,7 +7058,7 @@ pub fn vortex_array::arrays::slice::Slice::stats(array: &vortex_array::arrays::S pub fn vortex_array::arrays::slice::Slice::vtable(_array: &vortex_array::arrays::SliceData) -> &Self -pub fn vortex_array::arrays::slice::Slice::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::slice::Slice::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::slice::Slice @@ -7144,7 +7142,7 @@ pub fn vortex_array::arrays::Struct::scalar_at(array: &vortex_array::vtable::Arr impl vortex_array::vtable::VTable for vortex_array::arrays::Struct -pub type vortex_array::arrays::Struct::Array = vortex_array::arrays::StructData +pub type vortex_array::arrays::Struct::ArrayData = vortex_array::arrays::StructData pub type vortex_array::arrays::Struct::Metadata = vortex_array::EmptyMetadata @@ -7194,9 +7192,9 @@ pub fn vortex_array::arrays::Struct::serialize(_metadata: Self::Metadata) -> vor pub fn vortex_array::arrays::Struct::stats(array: &vortex_array::arrays::StructData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Struct::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Struct::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Struct::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Struct::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::StructData @@ -7378,7 +7376,7 @@ pub fn vortex_array::arrays::VarBin::scalar_at(array: &vortex_array::vtable::Arr impl vortex_array::vtable::VTable for vortex_array::arrays::VarBin -pub type vortex_array::arrays::VarBin::Array = vortex_array::arrays::VarBinData +pub type vortex_array::arrays::VarBin::ArrayData = vortex_array::arrays::VarBinData pub type vortex_array::arrays::VarBin::Metadata = vortex_array::ProstMetadata @@ -7430,7 +7428,7 @@ pub fn vortex_array::arrays::VarBin::stats(array: &vortex_array::arrays::VarBinD pub fn vortex_array::arrays::VarBin::vtable(_array: &vortex_array::arrays::VarBinData) -> &Self -pub fn vortex_array::arrays::VarBin::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::VarBin::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::VarBinData @@ -7590,7 +7588,7 @@ pub fn vortex_array::arrays::VarBinView::scalar_at(array: &vortex_array::vtable: impl vortex_array::vtable::VTable for vortex_array::arrays::VarBinView -pub type vortex_array::arrays::VarBinView::Array = vortex_array::arrays::VarBinViewData +pub type vortex_array::arrays::VarBinView::ArrayData = vortex_array::arrays::VarBinViewData pub type vortex_array::arrays::VarBinView::Metadata = vortex_array::EmptyMetadata @@ -7642,7 +7640,7 @@ pub fn vortex_array::arrays::VarBinView::stats(array: &vortex_array::arrays::Var pub fn vortex_array::arrays::VarBinView::vtable(_array: &vortex_array::arrays::VarBinViewData) -> &Self -pub fn vortex_array::arrays::VarBinView::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::VarBinView::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub struct vortex_array::arrays::VarBinViewData @@ -7650,10 +7648,10 @@ impl vortex_array::arrays::VarBinViewData pub fn vortex_array::arrays::VarBinViewData::buffer(&self, idx: usize) -> &vortex_buffer::ByteBuffer -pub fn vortex_array::arrays::VarBinViewData::buffers(&self) -> &alloc::sync::Arc<[vortex_array::buffer::BufferHandle]> - pub fn vortex_array::arrays::VarBinViewData::bytes_at(&self, index: usize) -> vortex_buffer::ByteBuffer +pub fn vortex_array::arrays::VarBinViewData::data_buffers(&self) -> &alloc::sync::Arc<[vortex_array::buffer::BufferHandle]> + pub fn vortex_array::arrays::VarBinViewData::dtype(&self) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::VarBinViewData::from_iter, I: core::iter::traits::collect::IntoIterator>>(iter: I, dtype: vortex_array::dtype::DType) -> Self @@ -7672,8 +7670,6 @@ pub fn vortex_array::arrays::VarBinViewData::is_empty(&self) -> bool pub fn vortex_array::arrays::VarBinViewData::len(&self) -> usize -pub fn vortex_array::arrays::VarBinViewData::nbuffers(&self) -> usize - pub fn vortex_array::arrays::VarBinViewData::new(views: vortex_buffer::buffer::Buffer, buffers: alloc::sync::Arc<[vortex_buffer::ByteBuffer]>, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self pub fn vortex_array::arrays::VarBinViewData::new_handle(views: vortex_array::buffer::BufferHandle, buffers: alloc::sync::Arc<[vortex_array::buffer::BufferHandle]>, dtype: vortex_array::dtype::DType, validity: vortex_array::validity::Validity) -> Self @@ -7752,7 +7748,7 @@ pub fn vortex_array::arrays::Variant::scalar_at(array: &vortex_array::vtable::Ar impl vortex_array::vtable::VTable for vortex_array::arrays::Variant -pub type vortex_array::arrays::Variant::Array = vortex_array::arrays::variant::VariantData +pub type vortex_array::arrays::Variant::ArrayData = vortex_array::arrays::variant::VariantData pub type vortex_array::arrays::Variant::Metadata = vortex_array::EmptyMetadata @@ -7770,7 +7766,7 @@ pub fn vortex_array::arrays::Variant::buffer(_array: &vortex_array::vtable::Arra pub fn vortex_array::arrays::Variant::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Variant::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Variant::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult pub fn vortex_array::arrays::Variant::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef @@ -7778,7 +7774,7 @@ pub fn vortex_array::arrays::Variant::child_name(_array: &vortex_array::vtable:: pub fn vortex_array::arrays::Variant::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Variant::dtype(array: &Self::Array) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Variant::dtype(array: &Self::ArrayData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Variant::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -7786,7 +7782,7 @@ pub fn vortex_array::arrays::Variant::execute_parent(array: &vortex_array::vtabl pub fn vortex_array::arrays::Variant::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Variant::len(array: &Self::Array) -> usize +pub fn vortex_array::arrays::Variant::len(array: &Self::ArrayData) -> usize pub fn vortex_array::arrays::Variant::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult @@ -7800,11 +7796,11 @@ pub fn vortex_array::arrays::Variant::reduce_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Variant::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Variant::stats(array: &Self::Array) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Variant::stats(array: &Self::ArrayData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Variant::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Variant::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Variant::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Variant::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::ValidityVTable for vortex_array::arrays::Variant @@ -20430,7 +20426,7 @@ pub fn vortex_array::vtable::Array::new(chil pub fn vortex_array::vtable::Array::try_new(child: vortex_array::ArrayRef, range: core::ops::range::Range) -> vortex_error::VortexResult -impl vortex_array::vtable::Array where ::Array: vortex_array::vtable::ValidityHelper +impl vortex_array::vtable::Array where ::ArrayData: vortex_array::vtable::ValidityHelper pub fn vortex_array::vtable::Array::validity(&self) -> &vortex_array::validity::Validity @@ -20442,12 +20438,18 @@ pub fn vortex_array::vtable::Array::all_invalid(&self) -> vortex_error::Vorte pub fn vortex_array::vtable::Array::all_valid(&self) -> vortex_error::VortexResult +pub fn vortex_array::vtable::Array::as_constant(&self) -> core::option::Option + pub fn vortex_array::vtable::Array::filter(&self, mask: vortex_mask::Mask) -> vortex_error::VortexResult pub fn vortex_array::vtable::Array::is_invalid(&self, index: usize) -> vortex_error::VortexResult pub fn vortex_array::vtable::Array::is_valid(&self, index: usize) -> vortex_error::VortexResult +pub fn vortex_array::vtable::Array::nbuffers(&self) -> usize + +pub fn vortex_array::vtable::Array::nbytes(&self) -> u64 + pub fn vortex_array::vtable::Array::scalar_at(&self, index: usize) -> vortex_error::VortexResult pub fn vortex_array::vtable::Array::slice(&self, range: core::ops::range::Range) -> vortex_error::VortexResult @@ -20460,17 +20462,15 @@ impl vortex_array::vtable::Array pub fn vortex_array::vtable::Array::array_stats(&self) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::vtable::Array::data(&self) -> &::ArrayData + pub fn vortex_array::vtable::Array::dtype(&self) -> &vortex_array::dtype::DType pub fn vortex_array::vtable::Array::encoding_id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::vtable::Array::from_inner(array: ::Array) -> Self +pub unsafe fn vortex_array::vtable::Array::from_data_unchecked(vtable: V, dtype: vortex_array::dtype::DType, len: usize, data: ::ArrayData, stats: vortex_array::stats::ArrayStats) -> Self -pub unsafe fn vortex_array::vtable::Array::from_parts_unchecked(vtable: V, dtype: vortex_array::dtype::DType, len: usize, array: ::Array, stats: vortex_array::stats::ArrayStats) -> Self - -pub fn vortex_array::vtable::Array::inner(&self) -> &::Array - -pub fn vortex_array::vtable::Array::into_inner(self) -> ::Array +pub fn vortex_array::vtable::Array::into_data(self) -> ::ArrayData pub fn vortex_array::vtable::Array::is_empty(&self) -> bool @@ -20480,7 +20480,9 @@ pub fn vortex_array::vtable::Array::statistics(&self) -> vortex_array::stats: pub fn vortex_array::vtable::Array::to_array_ref(&self) -> vortex_array::ArrayRef -pub fn vortex_array::vtable::Array::typed_vtable(&self) -> &V +pub fn vortex_array::vtable::Array::try_from_data(data: ::ArrayData) -> vortex_error::VortexResult + +pub fn vortex_array::vtable::Array::vtable(&self) -> &V impl core::convert::From> for vortex_array::vtable::Array @@ -20570,13 +20572,13 @@ pub fn vortex_array::vtable::Array::fmt(&self, f: &mut core::fmt::Formatter<' impl core::ops::deref::Deref for vortex_array::vtable::Array -pub type vortex_array::vtable::Array::Target = ::Array +pub type vortex_array::vtable::Array::Target = ::ArrayData -pub fn vortex_array::vtable::Array::deref(&self) -> &::Array +pub fn vortex_array::vtable::Array::deref(&self) -> &::ArrayData impl core::ops::deref::DerefMut for vortex_array::vtable::Array -pub fn vortex_array::vtable::Array::deref_mut(&mut self) -> &mut ::Array +pub fn vortex_array::vtable::Array::deref_mut(&mut self) -> &mut ::ArrayData impl vortex_array::ArrayEq for vortex_array::vtable::Array @@ -20694,25 +20696,25 @@ pub fn vortex_array::vtable::ValidityVTableFromChild::validity(array: &vortex_ar pub struct vortex_array::vtable::ValidityVTableFromChildSliceHelper -impl vortex_array::vtable::ValidityVTable for vortex_array::vtable::ValidityVTableFromChildSliceHelper where ::Array: vortex_array::vtable::ValidityChildSliceHelper +impl vortex_array::vtable::ValidityVTable for vortex_array::vtable::ValidityVTableFromChildSliceHelper where ::ArrayData: vortex_array::vtable::ValidityChildSliceHelper pub fn vortex_array::vtable::ValidityVTableFromChildSliceHelper::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult pub struct vortex_array::vtable::ValidityVTableFromValidityHelper -impl vortex_array::vtable::ValidityVTable for vortex_array::vtable::ValidityVTableFromValidityHelper where ::Array: vortex_array::vtable::ValidityHelper +impl vortex_array::vtable::ValidityVTable for vortex_array::vtable::ValidityVTableFromValidityHelper where ::ArrayData: vortex_array::vtable::ValidityHelper pub fn vortex_array::vtable::ValidityVTableFromValidityHelper::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult pub struct vortex_array::vtable::ValidityVTableFromValiditySliceHelper -impl vortex_array::vtable::ValidityVTable for vortex_array::vtable::ValidityVTableFromValiditySliceHelper where ::Array: vortex_array::vtable::ValiditySliceHelper +impl vortex_array::vtable::ValidityVTable for vortex_array::vtable::ValidityVTableFromValiditySliceHelper where ::ArrayData: vortex_array::vtable::ValiditySliceHelper pub fn vortex_array::vtable::ValidityVTableFromValiditySliceHelper::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult pub trait vortex_array::vtable::ArrayVTable: 'static + core::clone::Clone + core::marker::Sized + core::marker::Send + core::marker::Sync + core::fmt::Debug -pub type vortex_array::vtable::ArrayVTable::Array: 'static + core::marker::Send + core::marker::Sync + core::clone::Clone + core::fmt::Debug + vortex_array::IntoArray +pub type vortex_array::vtable::ArrayVTable::ArrayData: 'static + core::marker::Send + core::marker::Sync + core::clone::Clone + core::fmt::Debug + vortex_array::IntoArray pub type vortex_array::vtable::ArrayVTable::Metadata: core::fmt::Debug @@ -20730,7 +20732,7 @@ pub fn vortex_array::vtable::ArrayVTable::buffer(array: &vortex_array::vtable::A pub fn vortex_array::vtable::ArrayVTable::buffer_name(array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::vtable::ArrayVTable::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::vtable::ArrayVTable::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult pub fn vortex_array::vtable::ArrayVTable::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef @@ -20738,7 +20740,7 @@ pub fn vortex_array::vtable::ArrayVTable::child_name(array: &vortex_array::vtabl pub fn vortex_array::vtable::ArrayVTable::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::vtable::ArrayVTable::dtype(array: &Self::Array) -> &vortex_array::dtype::DType +pub fn vortex_array::vtable::ArrayVTable::dtype(array: &Self::ArrayData) -> &vortex_array::dtype::DType pub fn vortex_array::vtable::ArrayVTable::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -20746,7 +20748,7 @@ pub fn vortex_array::vtable::ArrayVTable::execute_parent(array: &vortex_array::v pub fn vortex_array::vtable::ArrayVTable::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::vtable::ArrayVTable::len(array: &Self::Array) -> usize +pub fn vortex_array::vtable::ArrayVTable::len(array: &Self::ArrayData) -> usize pub fn vortex_array::vtable::ArrayVTable::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult @@ -20760,15 +20762,15 @@ pub fn vortex_array::vtable::ArrayVTable::reduce_parent(array: &vortex_array::vt pub fn vortex_array::vtable::ArrayVTable::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::vtable::ArrayVTable::stats(array: &Self::Array) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::vtable::ArrayVTable::stats(array: &Self::ArrayData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::vtable::ArrayVTable::vtable(array: &Self::Array) -> &Self +pub fn vortex_array::vtable::ArrayVTable::vtable(array: &Self::ArrayData) -> &Self -pub fn vortex_array::vtable::ArrayVTable::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::vtable::ArrayVTable::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Bool -pub type vortex_array::arrays::Bool::Array = vortex_array::arrays::BoolData +pub type vortex_array::arrays::Bool::ArrayData = vortex_array::arrays::BoolData pub type vortex_array::arrays::Bool::Metadata = vortex_array::ProstMetadata @@ -20818,13 +20820,13 @@ pub fn vortex_array::arrays::Bool::serialize(metadata: Self::Metadata) -> vortex pub fn vortex_array::arrays::Bool::stats(array: &vortex_array::arrays::BoolData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Bool::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Bool::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Bool::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Bool::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Chunked -pub type vortex_array::arrays::Chunked::Array = vortex_array::arrays::ChunkedData +pub type vortex_array::arrays::Chunked::ArrayData = vortex_array::arrays::ChunkedData pub type vortex_array::arrays::Chunked::Metadata = vortex_array::EmptyMetadata @@ -20874,13 +20876,13 @@ pub fn vortex_array::arrays::Chunked::serialize(_metadata: Self::Metadata) -> vo pub fn vortex_array::arrays::Chunked::stats(array: &vortex_array::arrays::ChunkedData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Chunked::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Chunked::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Chunked::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Chunked::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Constant -pub type vortex_array::arrays::Constant::Array = vortex_array::arrays::ConstantData +pub type vortex_array::arrays::Constant::ArrayData = vortex_array::arrays::ConstantData pub type vortex_array::arrays::Constant::Metadata = vortex_array::scalar::Scalar @@ -20930,13 +20932,13 @@ pub fn vortex_array::arrays::Constant::serialize(_metadata: Self::Metadata) -> v pub fn vortex_array::arrays::Constant::stats(array: &vortex_array::arrays::ConstantData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Constant::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Constant::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Constant::with_children(_array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Constant::with_children(_array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Decimal -pub type vortex_array::arrays::Decimal::Array = vortex_array::arrays::DecimalData +pub type vortex_array::arrays::Decimal::ArrayData = vortex_array::arrays::DecimalData pub type vortex_array::arrays::Decimal::Metadata = vortex_array::ProstMetadata @@ -20986,13 +20988,13 @@ pub fn vortex_array::arrays::Decimal::serialize(metadata: Self::Metadata) -> vor pub fn vortex_array::arrays::Decimal::stats(array: &vortex_array::arrays::DecimalData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Decimal::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Decimal::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Decimal::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Decimal::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Extension -pub type vortex_array::arrays::Extension::Array = vortex_array::arrays::ExtensionData +pub type vortex_array::arrays::Extension::ArrayData = vortex_array::arrays::ExtensionData pub type vortex_array::arrays::Extension::Metadata = vortex_array::EmptyMetadata @@ -21042,13 +21044,13 @@ pub fn vortex_array::arrays::Extension::serialize(_metadata: Self::Metadata) -> pub fn vortex_array::arrays::Extension::stats(array: &vortex_array::arrays::ExtensionData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Extension::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Extension::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Extension::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Extension::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Filter -pub type vortex_array::arrays::Filter::Array = vortex_array::arrays::FilterData +pub type vortex_array::arrays::Filter::ArrayData = vortex_array::arrays::FilterData pub type vortex_array::arrays::Filter::Metadata = vortex_array::arrays::filter::vtable::FilterMetadata @@ -21100,11 +21102,11 @@ pub fn vortex_array::arrays::Filter::stats(array: &vortex_array::arrays::FilterD pub fn vortex_array::arrays::Filter::vtable(_array: &vortex_array::arrays::FilterData) -> &Self -pub fn vortex_array::arrays::Filter::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Filter::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::FixedSizeList -pub type vortex_array::arrays::FixedSizeList::Array = vortex_array::arrays::FixedSizeListData +pub type vortex_array::arrays::FixedSizeList::ArrayData = vortex_array::arrays::FixedSizeListData pub type vortex_array::arrays::FixedSizeList::Metadata = vortex_array::EmptyMetadata @@ -21156,11 +21158,11 @@ pub fn vortex_array::arrays::FixedSizeList::stats(array: &vortex_array::arrays:: pub fn vortex_array::arrays::FixedSizeList::vtable(_array: &vortex_array::arrays::FixedSizeListData) -> &Self -pub fn vortex_array::arrays::FixedSizeList::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::FixedSizeList::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::List -pub type vortex_array::arrays::List::Array = vortex_array::arrays::ListData +pub type vortex_array::arrays::List::ArrayData = vortex_array::arrays::ListData pub type vortex_array::arrays::List::Metadata = vortex_array::ProstMetadata @@ -21212,11 +21214,11 @@ pub fn vortex_array::arrays::List::stats(array: &vortex_array::arrays::ListData) pub fn vortex_array::arrays::List::vtable(_array: &vortex_array::arrays::ListData) -> &Self -pub fn vortex_array::arrays::List::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::List::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::ListView -pub type vortex_array::arrays::ListView::Array = vortex_array::arrays::ListViewData +pub type vortex_array::arrays::ListView::ArrayData = vortex_array::arrays::ListViewData pub type vortex_array::arrays::ListView::Metadata = vortex_array::ProstMetadata @@ -21268,11 +21270,11 @@ pub fn vortex_array::arrays::ListView::stats(array: &vortex_array::arrays::ListV pub fn vortex_array::arrays::ListView::vtable(_array: &vortex_array::arrays::ListViewData) -> &Self -pub fn vortex_array::arrays::ListView::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::ListView::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Masked -pub type vortex_array::arrays::Masked::Array = vortex_array::arrays::MaskedData +pub type vortex_array::arrays::Masked::ArrayData = vortex_array::arrays::MaskedData pub type vortex_array::arrays::Masked::Metadata = vortex_array::EmptyMetadata @@ -21322,13 +21324,13 @@ pub fn vortex_array::arrays::Masked::serialize(_metadata: Self::Metadata) -> vor pub fn vortex_array::arrays::Masked::stats(array: &vortex_array::arrays::MaskedData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Masked::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Masked::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Masked::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Masked::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Primitive -pub type vortex_array::arrays::Primitive::Array = vortex_array::arrays::PrimitiveData +pub type vortex_array::arrays::Primitive::ArrayData = vortex_array::arrays::PrimitiveData pub type vortex_array::arrays::Primitive::Metadata = vortex_array::EmptyMetadata @@ -21378,13 +21380,13 @@ pub fn vortex_array::arrays::Primitive::serialize(_metadata: Self::Metadata) -> pub fn vortex_array::arrays::Primitive::stats(array: &vortex_array::arrays::PrimitiveData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Primitive::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Primitive::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Primitive::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Primitive::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Shared -pub type vortex_array::arrays::Shared::Array = vortex_array::arrays::SharedData +pub type vortex_array::arrays::Shared::ArrayData = vortex_array::arrays::SharedData pub type vortex_array::arrays::Shared::Metadata = vortex_array::EmptyMetadata @@ -21436,11 +21438,11 @@ pub fn vortex_array::arrays::Shared::stats(array: &vortex_array::arrays::SharedD pub fn vortex_array::arrays::Shared::vtable(_array: &vortex_array::arrays::SharedData) -> &Self -pub fn vortex_array::arrays::Shared::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Shared::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Struct -pub type vortex_array::arrays::Struct::Array = vortex_array::arrays::StructData +pub type vortex_array::arrays::Struct::ArrayData = vortex_array::arrays::StructData pub type vortex_array::arrays::Struct::Metadata = vortex_array::EmptyMetadata @@ -21490,13 +21492,13 @@ pub fn vortex_array::arrays::Struct::serialize(_metadata: Self::Metadata) -> vor pub fn vortex_array::arrays::Struct::stats(array: &vortex_array::arrays::StructData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Struct::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Struct::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Struct::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Struct::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::VarBin -pub type vortex_array::arrays::VarBin::Array = vortex_array::arrays::VarBinData +pub type vortex_array::arrays::VarBin::ArrayData = vortex_array::arrays::VarBinData pub type vortex_array::arrays::VarBin::Metadata = vortex_array::ProstMetadata @@ -21548,11 +21550,11 @@ pub fn vortex_array::arrays::VarBin::stats(array: &vortex_array::arrays::VarBinD pub fn vortex_array::arrays::VarBin::vtable(_array: &vortex_array::arrays::VarBinData) -> &Self -pub fn vortex_array::arrays::VarBin::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::VarBin::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::VarBinView -pub type vortex_array::arrays::VarBinView::Array = vortex_array::arrays::VarBinViewData +pub type vortex_array::arrays::VarBinView::ArrayData = vortex_array::arrays::VarBinViewData pub type vortex_array::arrays::VarBinView::Metadata = vortex_array::EmptyMetadata @@ -21604,11 +21606,11 @@ pub fn vortex_array::arrays::VarBinView::stats(array: &vortex_array::arrays::Var pub fn vortex_array::arrays::VarBinView::vtable(_array: &vortex_array::arrays::VarBinViewData) -> &Self -pub fn vortex_array::arrays::VarBinView::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::VarBinView::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Variant -pub type vortex_array::arrays::Variant::Array = vortex_array::arrays::variant::VariantData +pub type vortex_array::arrays::Variant::ArrayData = vortex_array::arrays::variant::VariantData pub type vortex_array::arrays::Variant::Metadata = vortex_array::EmptyMetadata @@ -21626,7 +21628,7 @@ pub fn vortex_array::arrays::Variant::buffer(_array: &vortex_array::vtable::Arra pub fn vortex_array::arrays::Variant::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Variant::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Variant::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult pub fn vortex_array::arrays::Variant::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef @@ -21634,7 +21636,7 @@ pub fn vortex_array::arrays::Variant::child_name(_array: &vortex_array::vtable:: pub fn vortex_array::arrays::Variant::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Variant::dtype(array: &Self::Array) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Variant::dtype(array: &Self::ArrayData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Variant::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -21642,7 +21644,7 @@ pub fn vortex_array::arrays::Variant::execute_parent(array: &vortex_array::vtabl pub fn vortex_array::arrays::Variant::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Variant::len(array: &Self::Array) -> usize +pub fn vortex_array::arrays::Variant::len(array: &Self::ArrayData) -> usize pub fn vortex_array::arrays::Variant::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult @@ -21656,15 +21658,15 @@ pub fn vortex_array::arrays::Variant::reduce_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Variant::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Variant::stats(array: &Self::Array) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Variant::stats(array: &Self::ArrayData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Variant::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Variant::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Variant::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Variant::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::dict::Dict -pub type vortex_array::arrays::dict::Dict::Array = vortex_array::arrays::dict::DictData +pub type vortex_array::arrays::dict::Dict::ArrayData = vortex_array::arrays::dict::DictData pub type vortex_array::arrays::dict::Dict::Metadata = vortex_array::ProstMetadata @@ -21714,13 +21716,13 @@ pub fn vortex_array::arrays::dict::Dict::serialize(metadata: Self::Metadata) -> pub fn vortex_array::arrays::dict::Dict::stats(array: &vortex_array::arrays::dict::DictData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::dict::Dict::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::dict::Dict::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::dict::Dict::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::dict::Dict::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::null::Null -pub type vortex_array::arrays::null::Null::Array = vortex_array::arrays::null::NullData +pub type vortex_array::arrays::null::Null::ArrayData = vortex_array::arrays::null::NullData pub type vortex_array::arrays::null::Null::Metadata = vortex_array::EmptyMetadata @@ -21770,13 +21772,13 @@ pub fn vortex_array::arrays::null::Null::serialize(_metadata: Self::Metadata) -> pub fn vortex_array::arrays::null::Null::stats(array: &vortex_array::arrays::null::NullData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::null::Null::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::null::Null::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::null::Null::with_children(_array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::null::Null::with_children(_array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::scalar_fn::ScalarFnVTable -pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::Array = vortex_array::arrays::ScalarFnData +pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::ArrayData = vortex_array::arrays::ScalarFnData pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::Metadata = vortex_array::arrays::scalar_fn::metadata::ScalarFnMetadata @@ -21794,7 +21796,7 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::buffer(_array: &vortex_a pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &vortex_array::arrays::scalar_fn::metadata::ScalarFnMetadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &vortex_array::arrays::scalar_fn::metadata::ScalarFnMetadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef @@ -21828,11 +21830,11 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::stats(array: &vortex_arr pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::vtable(array: &vortex_array::arrays::ScalarFnData) -> &Self -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::slice::Slice -pub type vortex_array::arrays::slice::Slice::Array = vortex_array::arrays::SliceData +pub type vortex_array::arrays::slice::Slice::ArrayData = vortex_array::arrays::SliceData pub type vortex_array::arrays::slice::Slice::Metadata = vortex_array::arrays::slice::SliceMetadata @@ -21850,7 +21852,7 @@ pub fn vortex_array::arrays::slice::Slice::buffer(_array: &vortex_array::vtable: pub fn vortex_array::arrays::slice::Slice::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option -pub fn vortex_array::arrays::slice::Slice::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &vortex_array::arrays::slice::SliceMetadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::slice::Slice::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &vortex_array::arrays::slice::SliceMetadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult pub fn vortex_array::arrays::slice::Slice::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef @@ -21884,7 +21886,7 @@ pub fn vortex_array::arrays::slice::Slice::stats(array: &vortex_array::arrays::S pub fn vortex_array::arrays::slice::Slice::vtable(_array: &vortex_array::arrays::SliceData) -> &Self -pub fn vortex_array::arrays::slice::Slice::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::slice::Slice::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub trait vortex_array::vtable::DynVTable: 'static + core::marker::Send + core::marker::Sync + core::fmt::Debug @@ -22008,7 +22010,7 @@ pub fn vortex_array::vtable::NotSupported::scalar_at(array: &vortex_array::vtabl pub trait vortex_array::vtable::VTable: 'static + core::clone::Clone + core::marker::Sized + core::marker::Send + core::marker::Sync + core::fmt::Debug -pub type vortex_array::vtable::VTable::Array: 'static + core::marker::Send + core::marker::Sync + core::clone::Clone + core::fmt::Debug + vortex_array::IntoArray +pub type vortex_array::vtable::VTable::ArrayData: 'static + core::marker::Send + core::marker::Sync + core::clone::Clone + core::fmt::Debug + vortex_array::IntoArray pub type vortex_array::vtable::VTable::Metadata: core::fmt::Debug @@ -22026,7 +22028,7 @@ pub fn vortex_array::vtable::VTable::buffer(array: &vortex_array::vtable::Array< pub fn vortex_array::vtable::VTable::buffer_name(array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::vtable::VTable::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::vtable::VTable::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &Self::Metadata, buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult pub fn vortex_array::vtable::VTable::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef @@ -22034,7 +22036,7 @@ pub fn vortex_array::vtable::VTable::child_name(array: &vortex_array::vtable::Ar pub fn vortex_array::vtable::VTable::deserialize(bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::vtable::VTable::dtype(array: &Self::Array) -> &vortex_array::dtype::DType +pub fn vortex_array::vtable::VTable::dtype(array: &Self::ArrayData) -> &vortex_array::dtype::DType pub fn vortex_array::vtable::VTable::execute(array: alloc::sync::Arc>, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -22042,7 +22044,7 @@ pub fn vortex_array::vtable::VTable::execute_parent(array: &vortex_array::vtable pub fn vortex_array::vtable::VTable::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::vtable::VTable::len(array: &Self::Array) -> usize +pub fn vortex_array::vtable::VTable::len(array: &Self::ArrayData) -> usize pub fn vortex_array::vtable::VTable::metadata(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult @@ -22056,15 +22058,15 @@ pub fn vortex_array::vtable::VTable::reduce_parent(array: &vortex_array::vtable: pub fn vortex_array::vtable::VTable::serialize(metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::vtable::VTable::stats(array: &Self::Array) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::vtable::VTable::stats(array: &Self::ArrayData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::vtable::VTable::vtable(array: &Self::Array) -> &Self +pub fn vortex_array::vtable::VTable::vtable(array: &Self::ArrayData) -> &Self -pub fn vortex_array::vtable::VTable::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::vtable::VTable::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Bool -pub type vortex_array::arrays::Bool::Array = vortex_array::arrays::BoolData +pub type vortex_array::arrays::Bool::ArrayData = vortex_array::arrays::BoolData pub type vortex_array::arrays::Bool::Metadata = vortex_array::ProstMetadata @@ -22114,13 +22116,13 @@ pub fn vortex_array::arrays::Bool::serialize(metadata: Self::Metadata) -> vortex pub fn vortex_array::arrays::Bool::stats(array: &vortex_array::arrays::BoolData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Bool::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Bool::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Bool::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Bool::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Chunked -pub type vortex_array::arrays::Chunked::Array = vortex_array::arrays::ChunkedData +pub type vortex_array::arrays::Chunked::ArrayData = vortex_array::arrays::ChunkedData pub type vortex_array::arrays::Chunked::Metadata = vortex_array::EmptyMetadata @@ -22170,13 +22172,13 @@ pub fn vortex_array::arrays::Chunked::serialize(_metadata: Self::Metadata) -> vo pub fn vortex_array::arrays::Chunked::stats(array: &vortex_array::arrays::ChunkedData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Chunked::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Chunked::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Chunked::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Chunked::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Constant -pub type vortex_array::arrays::Constant::Array = vortex_array::arrays::ConstantData +pub type vortex_array::arrays::Constant::ArrayData = vortex_array::arrays::ConstantData pub type vortex_array::arrays::Constant::Metadata = vortex_array::scalar::Scalar @@ -22226,13 +22228,13 @@ pub fn vortex_array::arrays::Constant::serialize(_metadata: Self::Metadata) -> v pub fn vortex_array::arrays::Constant::stats(array: &vortex_array::arrays::ConstantData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Constant::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Constant::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Constant::with_children(_array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Constant::with_children(_array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Decimal -pub type vortex_array::arrays::Decimal::Array = vortex_array::arrays::DecimalData +pub type vortex_array::arrays::Decimal::ArrayData = vortex_array::arrays::DecimalData pub type vortex_array::arrays::Decimal::Metadata = vortex_array::ProstMetadata @@ -22282,13 +22284,13 @@ pub fn vortex_array::arrays::Decimal::serialize(metadata: Self::Metadata) -> vor pub fn vortex_array::arrays::Decimal::stats(array: &vortex_array::arrays::DecimalData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Decimal::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Decimal::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Decimal::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Decimal::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Extension -pub type vortex_array::arrays::Extension::Array = vortex_array::arrays::ExtensionData +pub type vortex_array::arrays::Extension::ArrayData = vortex_array::arrays::ExtensionData pub type vortex_array::arrays::Extension::Metadata = vortex_array::EmptyMetadata @@ -22338,13 +22340,13 @@ pub fn vortex_array::arrays::Extension::serialize(_metadata: Self::Metadata) -> pub fn vortex_array::arrays::Extension::stats(array: &vortex_array::arrays::ExtensionData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Extension::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Extension::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Extension::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Extension::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Filter -pub type vortex_array::arrays::Filter::Array = vortex_array::arrays::FilterData +pub type vortex_array::arrays::Filter::ArrayData = vortex_array::arrays::FilterData pub type vortex_array::arrays::Filter::Metadata = vortex_array::arrays::filter::vtable::FilterMetadata @@ -22396,11 +22398,11 @@ pub fn vortex_array::arrays::Filter::stats(array: &vortex_array::arrays::FilterD pub fn vortex_array::arrays::Filter::vtable(_array: &vortex_array::arrays::FilterData) -> &Self -pub fn vortex_array::arrays::Filter::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Filter::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::FixedSizeList -pub type vortex_array::arrays::FixedSizeList::Array = vortex_array::arrays::FixedSizeListData +pub type vortex_array::arrays::FixedSizeList::ArrayData = vortex_array::arrays::FixedSizeListData pub type vortex_array::arrays::FixedSizeList::Metadata = vortex_array::EmptyMetadata @@ -22452,11 +22454,11 @@ pub fn vortex_array::arrays::FixedSizeList::stats(array: &vortex_array::arrays:: pub fn vortex_array::arrays::FixedSizeList::vtable(_array: &vortex_array::arrays::FixedSizeListData) -> &Self -pub fn vortex_array::arrays::FixedSizeList::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::FixedSizeList::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::List -pub type vortex_array::arrays::List::Array = vortex_array::arrays::ListData +pub type vortex_array::arrays::List::ArrayData = vortex_array::arrays::ListData pub type vortex_array::arrays::List::Metadata = vortex_array::ProstMetadata @@ -22508,11 +22510,11 @@ pub fn vortex_array::arrays::List::stats(array: &vortex_array::arrays::ListData) pub fn vortex_array::arrays::List::vtable(_array: &vortex_array::arrays::ListData) -> &Self -pub fn vortex_array::arrays::List::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::List::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::ListView -pub type vortex_array::arrays::ListView::Array = vortex_array::arrays::ListViewData +pub type vortex_array::arrays::ListView::ArrayData = vortex_array::arrays::ListViewData pub type vortex_array::arrays::ListView::Metadata = vortex_array::ProstMetadata @@ -22564,11 +22566,11 @@ pub fn vortex_array::arrays::ListView::stats(array: &vortex_array::arrays::ListV pub fn vortex_array::arrays::ListView::vtable(_array: &vortex_array::arrays::ListViewData) -> &Self -pub fn vortex_array::arrays::ListView::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::ListView::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Masked -pub type vortex_array::arrays::Masked::Array = vortex_array::arrays::MaskedData +pub type vortex_array::arrays::Masked::ArrayData = vortex_array::arrays::MaskedData pub type vortex_array::arrays::Masked::Metadata = vortex_array::EmptyMetadata @@ -22618,13 +22620,13 @@ pub fn vortex_array::arrays::Masked::serialize(_metadata: Self::Metadata) -> vor pub fn vortex_array::arrays::Masked::stats(array: &vortex_array::arrays::MaskedData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Masked::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Masked::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Masked::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Masked::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Primitive -pub type vortex_array::arrays::Primitive::Array = vortex_array::arrays::PrimitiveData +pub type vortex_array::arrays::Primitive::ArrayData = vortex_array::arrays::PrimitiveData pub type vortex_array::arrays::Primitive::Metadata = vortex_array::EmptyMetadata @@ -22674,13 +22676,13 @@ pub fn vortex_array::arrays::Primitive::serialize(_metadata: Self::Metadata) -> pub fn vortex_array::arrays::Primitive::stats(array: &vortex_array::arrays::PrimitiveData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Primitive::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Primitive::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Primitive::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Primitive::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Shared -pub type vortex_array::arrays::Shared::Array = vortex_array::arrays::SharedData +pub type vortex_array::arrays::Shared::ArrayData = vortex_array::arrays::SharedData pub type vortex_array::arrays::Shared::Metadata = vortex_array::EmptyMetadata @@ -22732,11 +22734,11 @@ pub fn vortex_array::arrays::Shared::stats(array: &vortex_array::arrays::SharedD pub fn vortex_array::arrays::Shared::vtable(_array: &vortex_array::arrays::SharedData) -> &Self -pub fn vortex_array::arrays::Shared::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Shared::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Struct -pub type vortex_array::arrays::Struct::Array = vortex_array::arrays::StructData +pub type vortex_array::arrays::Struct::ArrayData = vortex_array::arrays::StructData pub type vortex_array::arrays::Struct::Metadata = vortex_array::EmptyMetadata @@ -22786,13 +22788,13 @@ pub fn vortex_array::arrays::Struct::serialize(_metadata: Self::Metadata) -> vor pub fn vortex_array::arrays::Struct::stats(array: &vortex_array::arrays::StructData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Struct::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Struct::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Struct::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Struct::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::VarBin -pub type vortex_array::arrays::VarBin::Array = vortex_array::arrays::VarBinData +pub type vortex_array::arrays::VarBin::ArrayData = vortex_array::arrays::VarBinData pub type vortex_array::arrays::VarBin::Metadata = vortex_array::ProstMetadata @@ -22844,11 +22846,11 @@ pub fn vortex_array::arrays::VarBin::stats(array: &vortex_array::arrays::VarBinD pub fn vortex_array::arrays::VarBin::vtable(_array: &vortex_array::arrays::VarBinData) -> &Self -pub fn vortex_array::arrays::VarBin::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::VarBin::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::VarBinView -pub type vortex_array::arrays::VarBinView::Array = vortex_array::arrays::VarBinViewData +pub type vortex_array::arrays::VarBinView::ArrayData = vortex_array::arrays::VarBinViewData pub type vortex_array::arrays::VarBinView::Metadata = vortex_array::EmptyMetadata @@ -22900,11 +22902,11 @@ pub fn vortex_array::arrays::VarBinView::stats(array: &vortex_array::arrays::Var pub fn vortex_array::arrays::VarBinView::vtable(_array: &vortex_array::arrays::VarBinViewData) -> &Self -pub fn vortex_array::arrays::VarBinView::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::VarBinView::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::Variant -pub type vortex_array::arrays::Variant::Array = vortex_array::arrays::variant::VariantData +pub type vortex_array::arrays::Variant::ArrayData = vortex_array::arrays::variant::VariantData pub type vortex_array::arrays::Variant::Metadata = vortex_array::EmptyMetadata @@ -22922,7 +22924,7 @@ pub fn vortex_array::arrays::Variant::buffer(_array: &vortex_array::vtable::Arra pub fn vortex_array::arrays::Variant::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option -pub fn vortex_array::arrays::Variant::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::Variant::build(dtype: &vortex_array::dtype::DType, len: usize, _metadata: &Self::Metadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult pub fn vortex_array::arrays::Variant::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef @@ -22930,7 +22932,7 @@ pub fn vortex_array::arrays::Variant::child_name(_array: &vortex_array::vtable:: pub fn vortex_array::arrays::Variant::deserialize(_bytes: &[u8], _dtype: &vortex_array::dtype::DType, _len: usize, _buffers: &[vortex_array::buffer::BufferHandle], _session: &vortex_session::VortexSession) -> vortex_error::VortexResult -pub fn vortex_array::arrays::Variant::dtype(array: &Self::Array) -> &vortex_array::dtype::DType +pub fn vortex_array::arrays::Variant::dtype(array: &Self::ArrayData) -> &vortex_array::dtype::DType pub fn vortex_array::arrays::Variant::execute(array: alloc::sync::Arc>, _ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult @@ -22938,7 +22940,7 @@ pub fn vortex_array::arrays::Variant::execute_parent(array: &vortex_array::vtabl pub fn vortex_array::arrays::Variant::id(&self) -> vortex_array::vtable::ArrayId -pub fn vortex_array::arrays::Variant::len(array: &Self::Array) -> usize +pub fn vortex_array::arrays::Variant::len(array: &Self::ArrayData) -> usize pub fn vortex_array::arrays::Variant::metadata(_array: &vortex_array::vtable::Array) -> vortex_error::VortexResult @@ -22952,15 +22954,15 @@ pub fn vortex_array::arrays::Variant::reduce_parent(array: &vortex_array::vtable pub fn vortex_array::arrays::Variant::serialize(_metadata: Self::Metadata) -> vortex_error::VortexResult>> -pub fn vortex_array::arrays::Variant::stats(array: &Self::Array) -> &vortex_array::stats::ArrayStats +pub fn vortex_array::arrays::Variant::stats(array: &Self::ArrayData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::Variant::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::Variant::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::Variant::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::Variant::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::dict::Dict -pub type vortex_array::arrays::dict::Dict::Array = vortex_array::arrays::dict::DictData +pub type vortex_array::arrays::dict::Dict::ArrayData = vortex_array::arrays::dict::DictData pub type vortex_array::arrays::dict::Dict::Metadata = vortex_array::ProstMetadata @@ -23010,13 +23012,13 @@ pub fn vortex_array::arrays::dict::Dict::serialize(metadata: Self::Metadata) -> pub fn vortex_array::arrays::dict::Dict::stats(array: &vortex_array::arrays::dict::DictData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::dict::Dict::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::dict::Dict::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::dict::Dict::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::dict::Dict::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::null::Null -pub type vortex_array::arrays::null::Null::Array = vortex_array::arrays::null::NullData +pub type vortex_array::arrays::null::Null::ArrayData = vortex_array::arrays::null::NullData pub type vortex_array::arrays::null::Null::Metadata = vortex_array::EmptyMetadata @@ -23066,13 +23068,13 @@ pub fn vortex_array::arrays::null::Null::serialize(_metadata: Self::Metadata) -> pub fn vortex_array::arrays::null::Null::stats(array: &vortex_array::arrays::null::NullData) -> &vortex_array::stats::ArrayStats -pub fn vortex_array::arrays::null::Null::vtable(_array: &Self::Array) -> &Self +pub fn vortex_array::arrays::null::Null::vtable(_array: &Self::ArrayData) -> &Self -pub fn vortex_array::arrays::null::Null::with_children(_array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::null::Null::with_children(_array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::scalar_fn::ScalarFnVTable -pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::Array = vortex_array::arrays::ScalarFnData +pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::ArrayData = vortex_array::arrays::ScalarFnData pub type vortex_array::arrays::scalar_fn::ScalarFnVTable::Metadata = vortex_array::arrays::scalar_fn::metadata::ScalarFnMetadata @@ -23090,7 +23092,7 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::buffer(_array: &vortex_a pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::buffer_name(_array: &vortex_array::vtable::Array, idx: usize) -> core::option::Option -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &vortex_array::arrays::scalar_fn::metadata::ScalarFnMetadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &vortex_array::arrays::scalar_fn::metadata::ScalarFnMetadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef @@ -23124,11 +23126,11 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::stats(array: &vortex_arr pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::vtable(array: &vortex_array::arrays::ScalarFnData) -> &Self -pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::scalar_fn::ScalarFnVTable::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> impl vortex_array::vtable::VTable for vortex_array::arrays::slice::Slice -pub type vortex_array::arrays::slice::Slice::Array = vortex_array::arrays::SliceData +pub type vortex_array::arrays::slice::Slice::ArrayData = vortex_array::arrays::SliceData pub type vortex_array::arrays::slice::Slice::Metadata = vortex_array::arrays::slice::SliceMetadata @@ -23146,7 +23148,7 @@ pub fn vortex_array::arrays::slice::Slice::buffer(_array: &vortex_array::vtable: pub fn vortex_array::arrays::slice::Slice::buffer_name(_array: &vortex_array::vtable::Array, _idx: usize) -> core::option::Option -pub fn vortex_array::arrays::slice::Slice::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &vortex_array::arrays::slice::SliceMetadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult +pub fn vortex_array::arrays::slice::Slice::build(dtype: &vortex_array::dtype::DType, len: usize, metadata: &vortex_array::arrays::slice::SliceMetadata, _buffers: &[vortex_array::buffer::BufferHandle], children: &dyn vortex_array::serde::ArrayChildren) -> vortex_error::VortexResult pub fn vortex_array::arrays::slice::Slice::child(array: &vortex_array::vtable::Array, idx: usize) -> vortex_array::ArrayRef @@ -23180,11 +23182,11 @@ pub fn vortex_array::arrays::slice::Slice::stats(array: &vortex_array::arrays::S pub fn vortex_array::arrays::slice::Slice::vtable(_array: &vortex_array::arrays::SliceData) -> &Self -pub fn vortex_array::arrays::slice::Slice::with_children(array: &mut Self::Array, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> +pub fn vortex_array::arrays::slice::Slice::with_children(array: &mut Self::ArrayData, children: alloc::vec::Vec) -> vortex_error::VortexResult<()> pub trait vortex_array::vtable::ValidityChild -pub fn vortex_array::vtable::ValidityChild::validity_child(array: &::Array) -> &vortex_array::ArrayRef +pub fn vortex_array::vtable::ValidityChild::validity_child(array: &::ArrayData) -> &vortex_array::ArrayRef impl vortex_array::vtable::ValidityChild for vortex_array::arrays::Extension @@ -23286,15 +23288,15 @@ impl vortex_array::vtable::ValidityVTable fo pub fn vortex_array::arrays::slice::Slice::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -impl vortex_array::vtable::ValidityVTable for vortex_array::vtable::ValidityVTableFromChildSliceHelper where ::Array: vortex_array::vtable::ValidityChildSliceHelper +impl vortex_array::vtable::ValidityVTable for vortex_array::vtable::ValidityVTableFromChildSliceHelper where ::ArrayData: vortex_array::vtable::ValidityChildSliceHelper pub fn vortex_array::vtable::ValidityVTableFromChildSliceHelper::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -impl vortex_array::vtable::ValidityVTable for vortex_array::vtable::ValidityVTableFromValidityHelper where ::Array: vortex_array::vtable::ValidityHelper +impl vortex_array::vtable::ValidityVTable for vortex_array::vtable::ValidityVTableFromValidityHelper where ::ArrayData: vortex_array::vtable::ValidityHelper pub fn vortex_array::vtable::ValidityVTableFromValidityHelper::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult -impl vortex_array::vtable::ValidityVTable for vortex_array::vtable::ValidityVTableFromValiditySliceHelper where ::Array: vortex_array::vtable::ValiditySliceHelper +impl vortex_array::vtable::ValidityVTable for vortex_array::vtable::ValidityVTableFromValiditySliceHelper where ::ArrayData: vortex_array::vtable::ValiditySliceHelper pub fn vortex_array::vtable::ValidityVTableFromValiditySliceHelper::validity(array: &vortex_array::vtable::Array) -> vortex_error::VortexResult diff --git a/vortex-array/src/array/mod.rs b/vortex-array/src/array/mod.rs index de866cc9adc..4b169016d69 100644 --- a/vortex-array/src/array/mod.rs +++ b/vortex-array/src/array/mod.rs @@ -628,7 +628,7 @@ impl DynArray for Array { } fn with_children(&self, children: Vec) -> VortexResult { - let mut inner = self.array.clone(); + let mut inner = self.data.clone(); V::with_children(&mut inner, children)?; // SAFETY: with_children preserves dtype and len. Ok(unsafe { diff --git a/vortex-array/src/arrays/bool/array.rs b/vortex-array/src/arrays/bool/array.rs index 50ad9824031..6b51512c759 100644 --- a/vortex-array/src/arrays/bool/array.rs +++ b/vortex-array/src/arrays/bool/array.rs @@ -217,13 +217,13 @@ impl Array { /// Returns the underlying [`BitBuffer`] of the array, consuming self. pub fn into_bit_buffer(self) -> BitBuffer { - self.into_inner().into_bit_buffer() + self.into_data().into_bit_buffer() } /// Splits into owned parts, consuming self. #[inline] pub fn into_parts(self) -> BoolArrayParts { - self.into_inner().into_parts() + self.into_data().into_parts() } } diff --git a/vortex-array/src/arrays/bool/vtable/mod.rs b/vortex-array/src/arrays/bool/vtable/mod.rs index 49540f58b5a..97b8304bc12 100644 --- a/vortex-array/src/arrays/bool/vtable/mod.rs +++ b/vortex-array/src/arrays/bool/vtable/mod.rs @@ -52,13 +52,13 @@ pub struct BoolMetadata { } impl VTable for Bool { - type Array = BoolData; + type ArrayData = BoolData; type Metadata = ProstMetadata; type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromValidityHelper; - fn vtable(_array: &Self::Array) -> &Self { + fn vtable(_array: &Self::ArrayData) -> &Self { &Bool } @@ -175,7 +175,7 @@ impl VTable for Bool { BoolData::try_new_from_handle(buffer, metadata.offset as usize, len, validity) } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { vortex_ensure!( children.len() <= 1, "BoolArray can have at most 1 child (validity), got {}", diff --git a/vortex-array/src/arrays/chunked/vtable/mod.rs b/vortex-array/src/arrays/chunked/vtable/mod.rs index 2e32e5c9c77..6722c628d24 100644 --- a/vortex-array/src/arrays/chunked/vtable/mod.rs +++ b/vortex-array/src/arrays/chunked/vtable/mod.rs @@ -52,12 +52,12 @@ impl Chunked { } impl VTable for Chunked { - type Array = ChunkedData; + type ArrayData = ChunkedData; type Metadata = EmptyMetadata; type OperationsVTable = Self; type ValidityVTable = Self; - fn vtable(_array: &Self::Array) -> &Self { + fn vtable(_array: &Self::ArrayData) -> &Self { &Chunked } @@ -209,7 +209,7 @@ impl VTable for Chunked { }) } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { // Children: chunk_offsets, then chunks... vortex_ensure!( !children.is_empty(), diff --git a/vortex-array/src/arrays/constant/vtable/mod.rs b/vortex-array/src/arrays/constant/vtable/mod.rs index 9ce2c1b9528..201424b780c 100644 --- a/vortex-array/src/arrays/constant/vtable/mod.rs +++ b/vortex-array/src/arrays/constant/vtable/mod.rs @@ -54,13 +54,13 @@ impl Constant { } impl VTable for Constant { - type Array = ConstantData; + type ArrayData = ConstantData; type Metadata = Scalar; type OperationsVTable = Self; type ValidityVTable = Self; - fn vtable(_array: &Self::Array) -> &Self { + fn vtable(_array: &Self::ArrayData) -> &Self { &Constant } @@ -163,7 +163,7 @@ impl VTable for Constant { Ok(ConstantData::new(metadata.clone(), len)) } - fn with_children(_array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(_array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { vortex_ensure!( children.is_empty(), "ConstantArray has no children, got {}", diff --git a/vortex-array/src/arrays/decimal/vtable/mod.rs b/vortex-array/src/arrays/decimal/vtable/mod.rs index 1d9cc326c2d..b9ac4cc22ab 100644 --- a/vortex-array/src/arrays/decimal/vtable/mod.rs +++ b/vortex-array/src/arrays/decimal/vtable/mod.rs @@ -54,13 +54,13 @@ pub struct DecimalMetadata { } impl VTable for Decimal { - type Array = DecimalData; + type ArrayData = DecimalData; type Metadata = ProstMetadata; type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromValidityHelper; - fn vtable(_array: &Self::Array) -> &Self { + fn vtable(_array: &Self::ArrayData) -> &Self { &Decimal } @@ -193,7 +193,7 @@ impl VTable for Decimal { }) } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { vortex_ensure!( children.len() <= 1, "DecimalArray expects 0 or 1 child (validity), got {}", diff --git a/vortex-array/src/arrays/dict/array.rs b/vortex-array/src/arrays/dict/array.rs index 71707f721e0..52b034db415 100644 --- a/vortex-array/src/arrays/dict/array.rs +++ b/vortex-array/src/arrays/dict/array.rs @@ -216,7 +216,7 @@ impl Array { /// See [`DictData::set_all_values_referenced`]. pub unsafe fn set_all_values_referenced(self, all_values_referenced: bool) -> Self { Array::try_from_data(unsafe { - self.into_inner() + self.into_data() .set_all_values_referenced(all_values_referenced) }) .vortex_expect("data is always valid") diff --git a/vortex-array/src/arrays/dict/vtable/mod.rs b/vortex-array/src/arrays/dict/vtable/mod.rs index 9e9ace3b6f9..0e0822026f7 100644 --- a/vortex-array/src/arrays/dict/vtable/mod.rs +++ b/vortex-array/src/arrays/dict/vtable/mod.rs @@ -59,13 +59,13 @@ impl Dict { } impl VTable for Dict { - type Array = DictData; + type ArrayData = DictData; type Metadata = ProstMetadata; type OperationsVTable = Self; type ValidityVTable = Self; - fn vtable(_array: &Self::Array) -> &Self { + fn vtable(_array: &Self::ArrayData) -> &Self { &Dict } @@ -188,7 +188,7 @@ impl VTable for Dict { }) } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { vortex_ensure!( children.len() == 2, "DictArray expects exactly 2 children (codes, values), got {}", @@ -225,7 +225,7 @@ impl VTable for Dict { let array = require_child!(array, array.values(), 1 => AnyCanonical); let DictArrayParts { codes, values, .. } = - Arc::unwrap_or_clone(array).into_inner().into_parts(); + Arc::unwrap_or_clone(array).into_data().into_parts(); let codes = codes .try_into::() diff --git a/vortex-array/src/arrays/extension/vtable/mod.rs b/vortex-array/src/arrays/extension/vtable/mod.rs index c8ea40c6aba..59125d33560 100644 --- a/vortex-array/src/arrays/extension/vtable/mod.rs +++ b/vortex-array/src/arrays/extension/vtable/mod.rs @@ -38,13 +38,13 @@ use crate::vtable::ValidityVTableFromChild; vtable!(Extension, Extension, ExtensionData); impl VTable for Extension { - type Array = ExtensionData; + type ArrayData = ExtensionData; type Metadata = EmptyMetadata; type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromChild; - fn vtable(_array: &Self::Array) -> &Self { + fn vtable(_array: &Self::ArrayData) -> &Self { &Extension } @@ -141,7 +141,7 @@ impl VTable for Extension { Ok(ExtensionData::new(ext_dtype.clone(), storage)) } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { vortex_ensure!( children.len() == 1, "ExtensionArray expects exactly 1 child (storage), got {}", diff --git a/vortex-array/src/arrays/filter/vtable.rs b/vortex-array/src/arrays/filter/vtable.rs index 66d4d3bd113..e3a8b114990 100644 --- a/vortex-array/src/arrays/filter/vtable.rs +++ b/vortex-array/src/arrays/filter/vtable.rs @@ -50,7 +50,7 @@ impl Filter { } impl VTable for Filter { - type Array = FilterData; + type ArrayData = FilterData; type Metadata = FilterMetadata; type OperationsVTable = Self; type ValidityVTable = Self; @@ -148,7 +148,7 @@ impl VTable for Filter { }) } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { vortex_ensure!( children.len() == 1, "FilterArray expects exactly 1 child, got {}", diff --git a/vortex-array/src/arrays/fixed_size_list/vtable/mod.rs b/vortex-array/src/arrays/fixed_size_list/vtable/mod.rs index 02902bd24be..35d2cbe20b9 100644 --- a/vortex-array/src/arrays/fixed_size_list/vtable/mod.rs +++ b/vortex-array/src/arrays/fixed_size_list/vtable/mod.rs @@ -46,7 +46,7 @@ impl FixedSizeList { } impl VTable for FixedSizeList { - type Array = FixedSizeListData; + type ArrayData = FixedSizeListData; type Metadata = EmptyMetadata; type OperationsVTable = Self; @@ -194,7 +194,7 @@ impl VTable for FixedSizeList { FixedSizeListData::try_new(elements, *list_size, validity, len) } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { vortex_ensure!( children.len() == 1 || children.len() == 2, "FixedSizeListArray expects 1 or 2 children, got {}", diff --git a/vortex-array/src/arrays/list/vtable/mod.rs b/vortex-array/src/arrays/list/vtable/mod.rs index 6fd48dc3cad..2b1d23519ca 100644 --- a/vortex-array/src/arrays/list/vtable/mod.rs +++ b/vortex-array/src/arrays/list/vtable/mod.rs @@ -53,7 +53,7 @@ pub struct ListMetadata { } impl VTable for List { - type Array = ListData; + type ArrayData = ListData; type Metadata = ProstMetadata; type OperationsVTable = Self; @@ -192,7 +192,7 @@ impl VTable for List { ListData::try_new(elements, offsets, validity) } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { vortex_ensure!( children.len() == 2 || children.len() == 3, "ListArray expects 2 or 3 children, got {}", diff --git a/vortex-array/src/arrays/listview/array.rs b/vortex-array/src/arrays/listview/array.rs index eebed90a4b3..529b5fc8904 100644 --- a/vortex-array/src/arrays/listview/array.rs +++ b/vortex-array/src/arrays/listview/array.rs @@ -12,7 +12,6 @@ use vortex_error::vortex_err; use crate::ArrayRef; use crate::DynArray; -use crate::IntoArray; use crate::ToCanonical; use crate::arrays::ListView; use crate::arrays::Primitive; @@ -510,7 +509,7 @@ impl Array { /// /// See [`ListViewData::with_zero_copy_to_list`]. pub unsafe fn with_zero_copy_to_list(self, is_zctl: bool) -> Self { - Array::try_from_data(unsafe { self.into_inner().with_zero_copy_to_list(is_zctl) }) + Array::try_from_data(unsafe { self.into_data().with_zero_copy_to_list(is_zctl) }) .vortex_expect("data is always valid") } } @@ -575,12 +574,7 @@ fn validate_zctl( ) -> VortexResult<()> { // Offsets must be sorted (but not strictly sorted, zero-length lists are allowed), even // if there are null views. - if let Some(is_sorted) = offsets_primitive - .clone() - .into_array() - .statistics() - .compute_is_sorted() - { + if let Some(is_sorted) = offsets_primitive.statistics().compute_is_sorted() { vortex_ensure!(is_sorted, "offsets must be sorted"); } else { vortex_bail!("offsets must report is_sorted statistic"); diff --git a/vortex-array/src/arrays/listview/vtable/mod.rs b/vortex-array/src/arrays/listview/vtable/mod.rs index 0d7cf739b4d..72312dc5a46 100644 --- a/vortex-array/src/arrays/listview/vtable/mod.rs +++ b/vortex-array/src/arrays/listview/vtable/mod.rs @@ -58,7 +58,7 @@ pub struct ListViewMetadata { } impl VTable for ListView { - type Array = ListViewData; + type ArrayData = ListViewData; type Metadata = ProstMetadata; type OperationsVTable = Self; @@ -212,7 +212,7 @@ impl VTable for ListView { ListViewData::try_new(elements, offsets, sizes, validity) } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { vortex_ensure!( children.len() == 3 || children.len() == 4, "ListViewArray expects 3 or 4 children, got {}", diff --git a/vortex-array/src/arrays/masked/execute.rs b/vortex-array/src/arrays/masked/execute.rs index b3868ca175f..fa41408fc83 100644 --- a/vortex-array/src/arrays/masked/execute.rs +++ b/vortex-array/src/arrays/masked/execute.rs @@ -131,7 +131,7 @@ fn mask_validity_varbinview( Ok(unsafe { VarBinViewArray::new_handle_unchecked( array.views_handle().clone(), - array.buffers().clone(), + array.data_buffers().clone(), dtype, new_validity, ) diff --git a/vortex-array/src/arrays/masked/vtable/mod.rs b/vortex-array/src/arrays/masked/vtable/mod.rs index 7036c64d7ad..7f3062769ad 100644 --- a/vortex-array/src/arrays/masked/vtable/mod.rs +++ b/vortex-array/src/arrays/masked/vtable/mod.rs @@ -50,13 +50,13 @@ impl Masked { } impl VTable for Masked { - type Array = MaskedData; + type ArrayData = MaskedData; type Metadata = EmptyMetadata; type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromValidityHelper; - fn vtable(_array: &Self::Array) -> &Self { + fn vtable(_array: &Self::ArrayData) -> &Self { &Masked } @@ -198,7 +198,7 @@ impl VTable for Masked { PARENT_RULES.evaluate(array, parent, child_idx) } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { vortex_ensure!( children.len() == 1 || children.len() == 2, "MaskedArray expects 1 or 2 children, got {}", diff --git a/vortex-array/src/arrays/null/mod.rs b/vortex-array/src/arrays/null/mod.rs index 6f13a360966..71da96cf6c2 100644 --- a/vortex-array/src/arrays/null/mod.rs +++ b/vortex-array/src/arrays/null/mod.rs @@ -34,13 +34,13 @@ pub(crate) mod compute; vtable!(Null, Null, NullData); impl VTable for Null { - type Array = NullData; + type ArrayData = NullData; type Metadata = EmptyMetadata; type OperationsVTable = Self; type ValidityVTable = Self; - fn vtable(_array: &Self::Array) -> &Self { + fn vtable(_array: &Self::ArrayData) -> &Self { &Null } @@ -120,7 +120,7 @@ impl VTable for Null { Ok(NullData::new(len)) } - fn with_children(_array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(_array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { vortex_ensure!( children.is_empty(), "NullArray has no children, got {}", diff --git a/vortex-array/src/arrays/primitive/array/conversion.rs b/vortex-array/src/arrays/primitive/array/conversion.rs index f3a3267dad0..444b79dfe41 100644 --- a/vortex-array/src/arrays/primitive/array/conversion.rs +++ b/vortex-array/src/arrays/primitive/array/conversion.rs @@ -54,18 +54,18 @@ impl PrimitiveArray { /// Consume the array and get a host Buffer containing the data values. pub fn into_buffer(self) -> Buffer { - self.into_inner().into_buffer() + self.into_data().into_buffer() } /// Extract a mutable buffer from the PrimitiveArray. Attempts to do this with zero-copy /// if the buffer is uniquely owned, otherwise will make a copy. pub fn into_buffer_mut(self) -> BufferMut { - self.into_inner().into_buffer_mut() + self.into_data().into_buffer_mut() } /// Try to extract a mutable buffer from the PrimitiveArray with zero copy. pub fn try_into_buffer_mut(self) -> Result, Buffer> { - self.into_inner().try_into_buffer_mut() + self.into_data().try_into_buffer_mut() } } diff --git a/vortex-array/src/arrays/primitive/vtable/mod.rs b/vortex-array/src/arrays/primitive/vtable/mod.rs index 540a2b46558..b963d0b5cb5 100644 --- a/vortex-array/src/arrays/primitive/vtable/mod.rs +++ b/vortex-array/src/arrays/primitive/vtable/mod.rs @@ -46,13 +46,13 @@ use crate::vtable::ArrayId; vtable!(Primitive, Primitive, PrimitiveData); impl VTable for Primitive { - type Array = PrimitiveData; + type ArrayData = PrimitiveData; type Metadata = EmptyMetadata; type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromValidityHelper; - fn vtable(_array: &Self::Array) -> &Self { + fn vtable(_array: &Self::ArrayData) -> &Self { &Primitive } @@ -189,7 +189,7 @@ impl VTable for Primitive { } } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { vortex_ensure!( children.len() <= 1, "PrimitiveArray can have at most 1 child (validity), got {}", diff --git a/vortex-array/src/arrays/scalar_fn/array.rs b/vortex-array/src/arrays/scalar_fn/array.rs index cf155bfec4c..23a55bdb3e0 100644 --- a/vortex-array/src/arrays/scalar_fn/array.rs +++ b/vortex-array/src/arrays/scalar_fn/array.rs @@ -78,13 +78,13 @@ impl Array { #[allow(clippy::same_name_method)] #[inline(always)] pub fn scalar_fn(&self) -> &ScalarFnRef { - self.inner().scalar_fn() + self.data().scalar_fn() } /// Get the children arrays of this scalar function array. #[allow(clippy::same_name_method)] pub fn children(&self) -> &[ArrayRef] { - self.inner().children() + self.data().children() } /// Create a new ScalarFnArray from a scalar function and its children. diff --git a/vortex-array/src/arrays/scalar_fn/vtable/mod.rs b/vortex-array/src/arrays/scalar_fn/vtable/mod.rs index 3fb756810de..bc2dd03f754 100644 --- a/vortex-array/src/arrays/scalar_fn/vtable/mod.rs +++ b/vortex-array/src/arrays/scalar_fn/vtable/mod.rs @@ -56,7 +56,7 @@ pub struct ScalarFnVTable { } impl VTable for ScalarFnVTable { - type Array = ScalarFnData; + type ArrayData = ScalarFnData; type Metadata = ScalarFnMetadata; type OperationsVTable = Self; type ValidityVTable = Self; @@ -166,7 +166,7 @@ impl VTable for ScalarFnVTable { metadata: &ScalarFnMetadata, _buffers: &[BufferHandle], children: &dyn ArrayChildren, - ) -> VortexResult { + ) -> VortexResult { let children: Vec<_> = metadata .child_dtypes .iter() @@ -194,7 +194,7 @@ impl VTable for ScalarFnVTable { }) } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { vortex_ensure!( children.len() == array.children.len(), "ScalarFnArray expects {} children, got {}", diff --git a/vortex-array/src/arrays/shared/vtable.rs b/vortex-array/src/arrays/shared/vtable.rs index 70cc21461a9..703bee260c1 100644 --- a/vortex-array/src/arrays/shared/vtable.rs +++ b/vortex-array/src/arrays/shared/vtable.rs @@ -42,7 +42,7 @@ impl Shared { } impl VTable for Shared { - type Array = SharedData; + type ArrayData = SharedData; type Metadata = EmptyMetadata; type OperationsVTable = Self; type ValidityVTable = Self; @@ -137,7 +137,7 @@ impl VTable for Shared { Ok(SharedData::new(child)) } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { vortex_error::vortex_ensure!( children.len() == 1, "SharedArray expects exactly 1 child, got {}", diff --git a/vortex-array/src/arrays/slice/vtable.rs b/vortex-array/src/arrays/slice/vtable.rs index 5c3989128be..55d1f1e43f5 100644 --- a/vortex-array/src/arrays/slice/vtable.rs +++ b/vortex-array/src/arrays/slice/vtable.rs @@ -50,7 +50,7 @@ impl Slice { } impl VTable for Slice { - type Array = SliceData; + type ArrayData = SliceData; type Metadata = SliceMetadata; type OperationsVTable = Self; type ValidityVTable = Self; @@ -139,7 +139,7 @@ impl VTable for Slice { metadata: &SliceMetadata, _buffers: &[BufferHandle], children: &dyn ArrayChildren, - ) -> VortexResult { + ) -> VortexResult { assert_eq!(len, metadata.0.len()); let child = children.get(0, dtype, metadata.0.end)?; Ok(SliceData { @@ -149,7 +149,7 @@ impl VTable for Slice { }) } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { vortex_ensure!( children.len() == 1, "SliceArray expects exactly 1 child, got {}", diff --git a/vortex-array/src/arrays/struct_/array.rs b/vortex-array/src/arrays/struct_/array.rs index bcd5ba919f6..62744537cf1 100644 --- a/vortex-array/src/arrays/struct_/array.rs +++ b/vortex-array/src/arrays/struct_/array.rs @@ -541,7 +541,7 @@ impl Array { /// Decompose this struct array into its constituent parts. pub fn into_parts(self) -> StructArrayParts { - self.into_inner().into_parts() + self.into_data().into_parts() } /// Create a [`StructArray`] from an iterator of (name, array) pairs with validity. diff --git a/vortex-array/src/arrays/struct_/vtable/mod.rs b/vortex-array/src/arrays/struct_/vtable/mod.rs index f4bacdd3314..c760b6f091f 100644 --- a/vortex-array/src/arrays/struct_/vtable/mod.rs +++ b/vortex-array/src/arrays/struct_/vtable/mod.rs @@ -42,12 +42,12 @@ use crate::vtable::ArrayId; vtable!(Struct, Struct, StructData); impl VTable for Struct { - type Array = StructData; + type ArrayData = StructData; type Metadata = EmptyMetadata; type OperationsVTable = Self; type ValidityVTable = ValidityVTableFromValidityHelper; - fn vtable(_array: &Self::Array) -> &Self { + fn vtable(_array: &Self::ArrayData) -> &Self { &Struct } @@ -179,7 +179,7 @@ impl VTable for Struct { StructData::try_new_with_dtype(children, struct_dtype.clone(), len, validity) } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { let DType::Struct(struct_dtype, _nullability) = &array.dtype else { vortex_bail!("Expected struct dtype, found {:?}", array.dtype) }; diff --git a/vortex-array/src/arrays/varbin/array.rs b/vortex-array/src/arrays/varbin/array.rs index 5e2ea5a71b7..4a1f7d768e5 100644 --- a/vortex-array/src/arrays/varbin/array.rs +++ b/vortex-array/src/arrays/varbin/array.rs @@ -336,7 +336,7 @@ impl VarBinData { for v in vec { builder.append_value(v.as_ref()); } - builder.finish(dtype).into_inner() + builder.finish(dtype).into_data() } #[expect( @@ -352,7 +352,7 @@ impl VarBinData { for v in iter { builder.append(v.as_ref().map(|o| o.as_ref())); } - builder.finish(dtype).into_inner() + builder.finish(dtype).into_data() } pub fn from_iter_nonnull, I: IntoIterator>( @@ -364,7 +364,7 @@ impl VarBinData { for v in iter { builder.append_value(v); } - builder.finish(dtype).into_inner() + builder.finish(dtype).into_data() } } diff --git a/vortex-array/src/arrays/varbin/builder.rs b/vortex-array/src/arrays/varbin/builder.rs index 69054712a0b..b6ee42a8c5f 100644 --- a/vortex-array/src/arrays/varbin/builder.rs +++ b/vortex-array/src/arrays/varbin/builder.rs @@ -6,7 +6,6 @@ use vortex_buffer::BitBufferMut; use vortex_buffer::BufferMut; use vortex_error::vortex_panic; -use crate::DynArray; use crate::IntoArray; use crate::arrays::Primitive; use crate::arrays::PrimitiveArray; @@ -103,12 +102,7 @@ impl VarBinBuilder { // this stat eagerly. This avoids an O(n) recomputation when the array is // deserialized and VarBinArray::validate checks sortedness. debug_assert!( - offsets - .clone() - .into_array() - .statistics() - .compute_is_sorted() - .unwrap_or(false), + offsets.statistics().compute_is_sorted().unwrap_or(false), "VarBinBuilder offsets must be sorted" ); Primitive::stats(&offsets).set(Stat::IsSorted, Precision::Exact(true.into())); diff --git a/vortex-array/src/arrays/varbin/vtable/canonical.rs b/vortex-array/src/arrays/varbin/vtable/canonical.rs index 6347bd59479..b57c798a811 100644 --- a/vortex-array/src/arrays/varbin/vtable/canonical.rs +++ b/vortex-array/src/arrays/varbin/vtable/canonical.rs @@ -22,7 +22,7 @@ pub(crate) fn varbin_to_canonical( array: &VarBinArray, ctx: &mut ExecutionCtx, ) -> VortexResult { - let (dtype, bytes, offsets, validity) = array.clone().into_inner().into_parts(); + let (dtype, bytes, offsets, validity) = array.clone().into_data().into_parts(); let offsets = offsets.execute::(ctx)?; diff --git a/vortex-array/src/arrays/varbin/vtable/mod.rs b/vortex-array/src/arrays/varbin/vtable/mod.rs index 104a27c0bd9..c2ae961417f 100644 --- a/vortex-array/src/arrays/varbin/vtable/mod.rs +++ b/vortex-array/src/arrays/varbin/vtable/mod.rs @@ -55,7 +55,7 @@ pub struct VarBinMetadata { } impl VTable for VarBin { - type Array = VarBinData; + type ArrayData = VarBinData; type Metadata = ProstMetadata; type OperationsVTable = Self; @@ -186,7 +186,7 @@ impl VTable for VarBin { VarBinData::try_new(offsets, bytes, dtype.clone(), validity) } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { match children.len() { 1 => { let [offsets]: [ArrayRef; 1] = children diff --git a/vortex-array/src/arrays/varbinview/accessor.rs b/vortex-array/src/arrays/varbinview/accessor.rs index 912d7ee8de3..72c98beee5e 100644 --- a/vortex-array/src/arrays/varbinview/accessor.rs +++ b/vortex-array/src/arrays/varbinview/accessor.rs @@ -13,7 +13,7 @@ impl ArrayAccessor<[u8]> for VarBinViewArray { &self, f: F, ) -> R { - let bytes = (0..self.nbuffers()) + let bytes = (0..self.data_buffers().len()) .map(|i| self.buffer(i)) .collect::>(); diff --git a/vortex-array/src/arrays/varbinview/array.rs b/vortex-array/src/arrays/varbinview/array.rs index dbd7842d65b..f68591f1e7b 100644 --- a/vortex-array/src/arrays/varbinview/array.rs +++ b/vortex-array/src/arrays/varbinview/array.rs @@ -382,11 +382,6 @@ impl VarBinViewData { } } - /// Number of raw string data buffers held by this array. - pub fn nbuffers(&self) -> usize { - self.buffers.len() - } - /// Access to the primitive views buffer. /// /// Variable-sized binary view buffer contain a "view" child array, with 16-byte entries that @@ -436,18 +431,18 @@ impl VarBinViewData { /// at construction time. #[inline] pub fn buffer(&self, idx: usize) -> &ByteBuffer { - if idx >= self.nbuffers() { + if idx >= self.data_buffers().len() { vortex_panic!( "{idx} buffer index out of bounds, there are {} buffers", - self.nbuffers() + self.data_buffers().len() ); } self.buffers[idx].as_host() } - /// Iterate over the underlying raw data buffers, not including the views buffer. + /// The underlying raw data buffers, not including the views buffer. #[inline] - pub fn buffers(&self) -> &Arc<[BufferHandle]> { + pub fn data_buffers(&self) -> &Arc<[BufferHandle]> { &self.buffers } @@ -470,7 +465,7 @@ impl VarBinViewData { } } - builder.finish_into_varbinview().into_inner() + builder.finish_into_varbinview().into_data() } pub fn from_iter_str, I: IntoIterator>(iter: I) -> Self { @@ -484,7 +479,7 @@ impl VarBinViewData { builder.append_value(item.as_ref()); } - builder.finish_into_varbinview().into_inner() + builder.finish_into_varbinview().into_data() } pub fn from_iter_nullable_str, I: IntoIterator>>( @@ -503,7 +498,7 @@ impl VarBinViewData { } } - builder.finish_into_varbinview().into_inner() + builder.finish_into_varbinview().into_data() } pub fn from_iter_bin, I: IntoIterator>(iter: I) -> Self { @@ -517,7 +512,7 @@ impl VarBinViewData { builder.append_value(item.as_ref()); } - builder.finish_into_varbinview().into_inner() + builder.finish_into_varbinview().into_data() } pub fn from_iter_nullable_bin, I: IntoIterator>>( @@ -536,7 +531,7 @@ impl VarBinViewData { } } - builder.finish_into_varbinview().into_inner() + builder.finish_into_varbinview().into_data() } } diff --git a/vortex-array/src/arrays/varbinview/compact.rs b/vortex-array/src/arrays/varbinview/compact.rs index e446f6ae789..c7709fb4895 100644 --- a/vortex-array/src/arrays/varbinview/compact.rs +++ b/vortex-array/src/arrays/varbinview/compact.rs @@ -36,7 +36,7 @@ impl VarBinViewArray { } fn should_compact(&self) -> VortexResult { - let nbuffers = self.nbuffers(); + let nbuffers = self.data_buffers().len(); // If the array is entirely inlined strings, do not attempt to compact. if nbuffers == 0 { @@ -93,7 +93,7 @@ impl VarBinViewArray { pub(crate) fn buffer_utilizations(&self) -> VortexResult> { let mut utilizations: Vec = self - .buffers() + .data_buffers() .iter() .map(|buf| { let len = u32::try_from(buf.len()).vortex_expect("buffer sizes must fit in u32"); @@ -207,8 +207,8 @@ mod tests { ]); // Verify it has buffers - assert!(original.nbuffers() > 0); - let original_buffers = original.nbuffers(); + assert!(!original.data_buffers().is_empty()); + let original_buffers = original.data_buffers().len(); // Take only the first and last elements (indices 0 and 4) let indices = buffer![0u32, 4u32].into_array(); @@ -217,7 +217,7 @@ mod tests { .execute::(&mut LEGACY_SESSION.create_execution_ctx()) .unwrap(); // The taken array should still have the same number of buffers - assert_eq!(taken.nbuffers(), original_buffers); + assert_eq!(taken.data_buffers().len(), original_buffers); // Now optimize the taken array let optimized_array = taken.compact_buffers().unwrap(); @@ -225,7 +225,7 @@ mod tests { // The optimized array should have compacted buffers // Since both remaining strings are short, they should be inlined // so we might have 0 buffers, or 1 buffer if any were not inlined - assert!(optimized_array.nbuffers() <= 1); + assert!(optimized_array.data_buffers().len() <= 1); // Verify the data is still correct assert_arrays_eq!( @@ -260,7 +260,7 @@ mod tests { let optimized_array = taken_array.compact_buffers().unwrap(); // The optimized array should have exactly 1 buffer (consolidated) - assert_eq!(optimized_array.nbuffers(), 1); + assert_eq!(optimized_array.data_buffers().len(), 1); // Verify the data is still correct assert_arrays_eq!( @@ -275,12 +275,12 @@ mod tests { let original = VarBinViewArray::from_iter_str(["a", "bb", "ccc", "dddd"]); // This should have no buffers - assert_eq!(original.nbuffers(), 0); + assert_eq!(original.data_buffers().len(), 0); // Optimize should return the same array let optimized_array = original.compact_buffers().unwrap(); - assert_eq!(optimized_array.nbuffers(), 0); + assert_eq!(optimized_array.data_buffers().len(), 0); assert_arrays_eq!(optimized_array, original); } @@ -293,13 +293,13 @@ mod tests { let original = VarBinViewArray::from_iter_str([str1, str2]); // Should have 1 compact buffer - assert_eq!(original.nbuffers(), 1); + assert_eq!(original.data_buffers().len(), 1); assert_eq!(original.buffer(0).len(), str1.len() + str2.len()); // Optimize should return the same array (no change needed) let optimized_array = original.compact_buffers().unwrap(); - assert_eq!(optimized_array.nbuffers(), 1); + assert_eq!(optimized_array.data_buffers().len(), 1); assert_arrays_eq!(optimized_array, original); } @@ -312,7 +312,7 @@ mod tests { "another very long string that definitely needs a buffer to store it", ]); - let original_buffers = original.nbuffers(); + let original_buffers = original.data_buffers().len(); assert!(original_buffers > 0); // Take only first element @@ -325,7 +325,7 @@ mod tests { let compacted = taken.compact_with_threshold(0.0).unwrap(); // Should still have the same number of buffers as the taken array - assert_eq!(compacted.nbuffers(), taken.nbuffers()); + assert_eq!(compacted.data_buffers().len(), taken.data_buffers().len()); // Verify correctness assert_arrays_eq!(compacted, taken); @@ -348,13 +348,13 @@ mod tests { .execute::(&mut LEGACY_SESSION.create_execution_ctx()) .unwrap(); - let original_buffers = taken.nbuffers(); + let original_buffers = taken.data_buffers().len(); // Compact with threshold=1.0 (aggressive compaction) let compacted = taken.compact_with_threshold(1.0).unwrap(); // Should have compacted buffers - assert!(compacted.nbuffers() <= original_buffers); + assert!(compacted.data_buffers().len() <= original_buffers); // Verify correctness assert_arrays_eq!(compacted, taken); @@ -370,13 +370,13 @@ mod tests { let original = VarBinViewArray::from_iter_str([str1, str2, str3]); // All strings should be in one well-utilized buffer - assert_eq!(original.nbuffers(), 1); + assert_eq!(original.data_buffers().len(), 1); // Compact with high threshold let compacted = original.compact_with_threshold(0.8).unwrap(); // Well-utilized buffer should be preserved - assert_eq!(compacted.nbuffers(), 1); + assert_eq!(compacted.data_buffers().len(), 1); // Verify all data is correct assert_arrays_eq!(compacted, original); @@ -430,7 +430,7 @@ mod tests { .unwrap(); // Get buffer stats before compaction let utils_before = taken.buffer_utilizations().unwrap(); - let original_buffer_count = taken.nbuffers(); + let original_buffer_count = taken.data_buffers().len(); // Compact with a threshold that should trigger slicing // The range utilization should be high even if overall utilization is low @@ -438,7 +438,7 @@ mod tests { // After compaction, we should still have buffers (sliced, not rewritten) assert!( - compacted.nbuffers() > 0, + !compacted.data_buffers().is_empty(), "Should have buffers after slice compaction" ); @@ -449,7 +449,7 @@ mod tests { // (it was sliced, not rewritten into multiple buffers) if original_buffer_count == 1 && utils_before[0].range_utilization() >= 0.8 { assert_eq!( - compacted.nbuffers(), + compacted.data_buffers().len(), 1, "Slice strategy should maintain single buffer" ); diff --git a/vortex-array/src/arrays/varbinview/compute/cast.rs b/vortex-array/src/arrays/varbinview/compute/cast.rs index ae6dc87911d..46e6b7ca163 100644 --- a/vortex-array/src/arrays/varbinview/compute/cast.rs +++ b/vortex-array/src/arrays/varbinview/compute/cast.rs @@ -29,7 +29,7 @@ impl CastReduce for VarBinView { Ok(Some( VarBinViewArray::new_handle_unchecked( array.views_handle().clone(), - array.buffers().clone(), + array.data_buffers().clone(), new_dtype, new_validity, ) diff --git a/vortex-array/src/arrays/varbinview/compute/mask.rs b/vortex-array/src/arrays/varbinview/compute/mask.rs index 5b24733ab6d..deb661207d1 100644 --- a/vortex-array/src/arrays/varbinview/compute/mask.rs +++ b/vortex-array/src/arrays/varbinview/compute/mask.rs @@ -18,7 +18,7 @@ impl MaskReduce for VarBinView { Ok(Some( VarBinViewArray::new_handle_unchecked( array.views_handle().clone(), - array.buffers().clone(), + array.data_buffers().clone(), array.dtype().as_nullable(), array .validity() diff --git a/vortex-array/src/arrays/varbinview/compute/slice.rs b/vortex-array/src/arrays/varbinview/compute/slice.rs index 71e69c6c849..1f7d8d8a1bc 100644 --- a/vortex-array/src/arrays/varbinview/compute/slice.rs +++ b/vortex-array/src/arrays/varbinview/compute/slice.rs @@ -21,7 +21,7 @@ impl SliceReduce for VarBinView { array .views_handle() .slice_typed::(range.clone()), - Arc::clone(array.buffers()), + Arc::clone(array.data_buffers()), array.dtype().clone(), array.validity().slice(range)?, ) diff --git a/vortex-array/src/arrays/varbinview/compute/take.rs b/vortex-array/src/arrays/varbinview/compute/take.rs index c3a70a82e6a..ed204da9802 100644 --- a/vortex-array/src/arrays/varbinview/compute/take.rs +++ b/vortex-array/src/arrays/varbinview/compute/take.rs @@ -41,7 +41,7 @@ impl TakeExecute for VarBinView { Ok(Some( VarBinViewArray::new_handle_unchecked( BufferHandle::new_host(views_buffer.into_byte_buffer()), - array.buffers().clone(), + array.data_buffers().clone(), array .dtype() .union_nullability(indices.dtype().nullability()), diff --git a/vortex-array/src/arrays/varbinview/compute/zip.rs b/vortex-array/src/arrays/varbinview/compute/zip.rs index 0fbf26274be..56557f8d3eb 100644 --- a/vortex-array/src/arrays/varbinview/compute/zip.rs +++ b/vortex-array/src/arrays/varbinview/compute/zip.rs @@ -46,9 +46,9 @@ impl ZipKernel for VarBinView { // to the new buffer index in the result array let mut buffers = DeduplicatedBuffers::default(); let true_lookup = - buffers.extend_from_iter(if_true.buffers().iter().map(|b| b.as_host().clone())); + buffers.extend_from_iter(if_true.data_buffers().iter().map(|b| b.as_host().clone())); let false_lookup = - buffers.extend_from_iter(if_false.buffers().iter().map(|b| b.as_host().clone())); + buffers.extend_from_iter(if_false.data_buffers().iter().map(|b| b.as_host().clone())); let mut views_builder = BufferMut::::with_capacity(len); let mut validity_builder = LazyBitBufferBuilder::new(len); diff --git a/vortex-array/src/arrays/varbinview/vtable/mod.rs b/vortex-array/src/arrays/varbinview/vtable/mod.rs index 4bae782d11c..553400a3b28 100644 --- a/vortex-array/src/arrays/varbinview/vtable/mod.rs +++ b/vortex-array/src/arrays/varbinview/vtable/mod.rs @@ -49,7 +49,7 @@ impl VarBinView { } impl VTable for VarBinView { - type Array = VarBinViewData; + type ArrayData = VarBinViewData; type Metadata = EmptyMetadata; type OperationsVTable = Self; @@ -96,13 +96,13 @@ impl VTable for VarBinView { } fn nbuffers(array: &Array) -> usize { - array.buffers().len() + 1 + array.data_buffers().len() + 1 } fn buffer(array: &Array, idx: usize) -> BufferHandle { - let ndata = array.buffers().len(); + let ndata = array.data_buffers().len(); if idx < ndata { - array.buffers()[idx].clone() + array.data_buffers()[idx].clone() } else if idx == ndata { array.views_handle().clone() } else { @@ -111,7 +111,7 @@ impl VTable for VarBinView { } fn buffer_name(array: &Array, idx: usize) -> Option { - let ndata = array.buffers().len(); + let ndata = array.data_buffers().len(); if idx < ndata { Some(format!("buffer_{idx}")) } else if idx == ndata { @@ -209,7 +209,7 @@ impl VTable for VarBinView { VarBinViewData::try_new(views, Arc::from(data_buffers), dtype.clone(), validity) } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { match children.len() { 0 => {} 1 => { diff --git a/vortex-array/src/arrays/variant/vtable/mod.rs b/vortex-array/src/arrays/variant/vtable/mod.rs index 475fe5b2f91..75ccb058385 100644 --- a/vortex-array/src/arrays/variant/vtable/mod.rs +++ b/vortex-array/src/arrays/variant/vtable/mod.rs @@ -39,7 +39,7 @@ impl Variant { } impl VTable for Variant { - type Array = VariantData; + type ArrayData = VariantData; type Metadata = EmptyMetadata; @@ -47,7 +47,7 @@ impl VTable for Variant { type ValidityVTable = Self; - fn vtable(_array: &Self::Array) -> &Self { + fn vtable(_array: &Self::ArrayData) -> &Self { &Variant } @@ -55,15 +55,15 @@ impl VTable for Variant { Self::ID } - fn len(array: &Self::Array) -> usize { + fn len(array: &Self::ArrayData) -> usize { array.child.len() } - fn dtype(array: &Self::Array) -> &DType { + fn dtype(array: &Self::ArrayData) -> &DType { array.child.dtype() } - fn stats(array: &Self::Array) -> &ArrayStats { + fn stats(array: &Self::ArrayData) -> &ArrayStats { &array.stats_set } @@ -129,7 +129,7 @@ impl VTable for Variant { _metadata: &Self::Metadata, _buffers: &[BufferHandle], children: &dyn ArrayChildren, - ) -> VortexResult { + ) -> VortexResult { vortex_ensure!(matches!(dtype, DType::Variant(_)), "Expected Variant DType"); vortex_ensure!( children.len() == 1, @@ -141,7 +141,7 @@ impl VTable for Variant { Ok(VariantData::new(child)) } - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { vortex_ensure!( children.len() == 1, "VariantArray expects exactly 1 child, got {}", diff --git a/vortex-array/src/arrow/convert.rs b/vortex-array/src/arrow/convert.rs index c901bdc7fd2..ebda6f44768 100644 --- a/vortex-array/src/arrow/convert.rs +++ b/vortex-array/src/arrow/convert.rs @@ -1300,14 +1300,14 @@ mod tests { // Verify metadata - should be VarBinViewArray with correct buffer count and dtype let varbin_view_array = vortex_array.as_::(); assert_eq!( - varbin_view_array.buffers().len(), + varbin_view_array.data_buffers().len(), arrow_array.data_buffers().len() ); assert_eq!(varbin_view_array.dtype(), &DType::Utf8(true.into())); let varbin_view_array_non_null = vortex_array_non_null.as_::(); assert_eq!( - varbin_view_array_non_null.buffers().len(), + varbin_view_array_non_null.data_buffers().len(), arrow_array_non_null.data_buffers().len() ); assert_eq!( @@ -1340,14 +1340,14 @@ mod tests { // Verify metadata - should be VarBinViewArray with correct buffer count and dtype let varbin_view_array = vortex_array.as_::(); assert_eq!( - varbin_view_array.buffers().len(), + varbin_view_array.data_buffers().len(), arrow_array.data_buffers().len() ); assert_eq!(varbin_view_array.dtype(), &DType::Binary(true.into())); let varbin_view_array_non_null = vortex_array_non_null.as_::(); assert_eq!( - varbin_view_array_non_null.buffers().len(), + varbin_view_array_non_null.data_buffers().len(), arrow_array_non_null.data_buffers().len() ); assert_eq!( diff --git a/vortex-array/src/arrow/executor/byte_view.rs b/vortex-array/src/arrow/executor/byte_view.rs index 0595a3ae975..42cfe4b2fe7 100644 --- a/vortex-array/src/arrow/executor/byte_view.rs +++ b/vortex-array/src/arrow/executor/byte_view.rs @@ -26,7 +26,7 @@ pub fn canonical_varbinview_to_arrow( let views = ScalarBuffer::::from(array.views_handle().as_host().clone().into_arrow_buffer()); let buffers: Vec<_> = array - .buffers() + .data_buffers() .iter() .map(|buffer| buffer.as_host().clone().into_arrow_buffer()) .collect(); @@ -45,7 +45,7 @@ pub fn execute_varbinview_to_arrow( let views = ScalarBuffer::::from(array.views_handle().as_host().clone().into_arrow_buffer()); let buffers: Vec<_> = array - .buffers() + .data_buffers() .iter() .map(|buffer| buffer.as_host().clone().into_arrow_buffer()) .collect(); diff --git a/vortex-array/src/arrow/executor/dictionary.rs b/vortex-array/src/arrow/executor/dictionary.rs index 99078cd83e2..5d9b75182b3 100644 --- a/vortex-array/src/arrow/executor/dictionary.rs +++ b/vortex-array/src/arrow/executor/dictionary.rs @@ -78,7 +78,7 @@ fn dict_to_dict( values_type: &DataType, ctx: &mut ExecutionCtx, ) -> VortexResult { - let DictArrayParts { codes, values, .. } = array.into_inner().into_parts(); + let DictArrayParts { codes, values, .. } = array.into_data().into_parts(); let codes = codes.execute_arrow(Some(codes_type), ctx)?; let values = values.execute_arrow(Some(values_type), ctx)?; make_dict_array(codes_type, codes, values) diff --git a/vortex-array/src/arrow/executor/list.rs b/vortex-array/src/arrow/executor/list.rs index 16908c5508d..1a620200b2f 100644 --- a/vortex-array/src/arrow/executor/list.rs +++ b/vortex-array/src/arrow/executor/list.rs @@ -140,7 +140,7 @@ fn list_view_zctl( sizes, validity, .. - } = array.into_inner().into_parts(); + } = array.into_data().into_parts(); // For ZCTL, we know that we only care about the final size. assert!(!sizes.is_empty()); diff --git a/vortex-array/src/arrow/executor/list_view.rs b/vortex-array/src/arrow/executor/list_view.rs index 3ea1480ce95..fb536bc3c1b 100644 --- a/vortex-array/src/arrow/executor/list_view.rs +++ b/vortex-array/src/arrow/executor/list_view.rs @@ -49,7 +49,7 @@ fn list_view_to_list_view( sizes, validity, .. - } = array.into_inner().into_parts(); + } = array.into_data().into_parts(); let elements = elements.execute_arrow(Some(elements_field.data_type()), ctx)?; vortex_ensure!( diff --git a/vortex-array/src/builders/listview.rs b/vortex-array/src/builders/listview.rs index 80a3d3ec815..c8e4044c915 100644 --- a/vortex-array/src/builders/listview.rs +++ b/vortex-array/src/builders/listview.rs @@ -301,8 +301,6 @@ impl ArrayBuilder for ListViewBuilder { if !listview.is_zero_copy_to_list() { for i in 0..listview.len() { let list = listview - .clone() - .into_array() .scalar_at(i) .vortex_expect("scalar_at failed in extend_from_array_unchecked"); diff --git a/vortex-array/src/builders/varbinview.rs b/vortex-array/src/builders/varbinview.rs index 3375a6c9e96..4ade6a2ca66 100644 --- a/vortex-array/src/builders/varbinview.rs +++ b/vortex-array/src/builders/varbinview.rs @@ -596,7 +596,7 @@ impl BuffersWithOffsets { return Self::AllKept { buffers: Arc::from( array - .buffers() + .data_buffers() .to_vec() .into_iter() .map(|b| b.unwrap_host()) @@ -619,20 +619,19 @@ impl BuffersWithOffsets { } } - let buffers_with_offsets_iter = - buffer_utilizations - .iter() - .zip(array.buffers().iter()) - .map(|(utilization, buffer)| { - match compaction_strategy(utilization, compaction_threshold) { - CompactionStrategy::KeepFull => (Some(buffer.as_host().clone()), 0), - CompactionStrategy::Slice { start, end } => ( - Some(buffer.as_host().slice(start as usize..end as usize)), - start, - ), - CompactionStrategy::Rewrite => (None, 0), - } - }); + let buffers_with_offsets_iter = buffer_utilizations + .iter() + .zip(array.data_buffers().iter()) + .map(|(utilization, buffer)| { + match compaction_strategy(utilization, compaction_threshold) { + CompactionStrategy::KeepFull => (Some(buffer.as_host().clone()), 0), + CompactionStrategy::Slice { start, end } => ( + Some(buffer.as_host().slice(start as usize..end as usize)), + start, + ), + CompactionStrategy::Rewrite => (None, 0), + } + }); match (has_rewrite, has_nonzero_offset) { // keep all buffers @@ -902,7 +901,7 @@ mod tests { builder.finish_into_varbinview() }; - assert_eq!(array.buffers().len(), 1); + assert_eq!(array.data_buffers().len(), 1); let mut builder = VarBinViewBuilder::with_buffer_deduplication(DType::Utf8(Nullability::Nullable), 10); diff --git a/vortex-array/src/canonical.rs b/vortex-array/src/canonical.rs index e3af42ec4e2..62d1d6c5bbd 100644 --- a/vortex-array/src/canonical.rs +++ b/vortex-array/src/canonical.rs @@ -566,7 +566,7 @@ impl Executable for CanonicalValidity { ptype, buffer, validity, - } = p.into_inner().into_parts(); + } = p.into_data().into_parts(); Ok(CanonicalValidity(Canonical::Primitive(unsafe { PrimitiveArray::new_unchecked_from_handle(buffer, ptype, validity.execute(ctx)?) }))) @@ -577,7 +577,7 @@ impl Executable for CanonicalValidity { values, values_type, validity, - } = d.into_inner().into_parts(); + } = d.into_data().into_parts(); Ok(CanonicalValidity(Canonical::Decimal(unsafe { DecimalArray::new_unchecked_handle( values, @@ -593,7 +593,7 @@ impl Executable for CanonicalValidity { buffers, views, validity, - } = vbv.into_inner().into_parts(); + } = vbv.into_data().into_parts(); Ok(CanonicalValidity(Canonical::VarBinView(unsafe { VarBinViewArray::new_handle_unchecked( views, @@ -611,7 +611,7 @@ impl Executable for CanonicalValidity { sizes, validity, .. - } = l.into_inner().into_parts(); + } = l.into_data().into_parts(); Ok(CanonicalValidity(Canonical::List(unsafe { ListViewArray::new_unchecked(elements, offsets, sizes, validity.execute(ctx)?) .with_zero_copy_to_list(zctl) @@ -620,7 +620,7 @@ impl Executable for CanonicalValidity { Canonical::FixedSizeList(fsl) => { let list_size = fsl.list_size(); let len = fsl.len(); - let (elements, validity, _) = fsl.into_inner().into_parts(); + let (elements, validity, _) = fsl.into_data().into_parts(); Ok(CanonicalValidity(Canonical::FixedSizeList( FixedSizeListArray::new(elements, list_size, validity.execute(ctx)?, len), ))) @@ -686,7 +686,7 @@ impl Executable for RecursiveCanonical { ptype, buffer, validity, - } = p.into_inner().into_parts(); + } = p.into_data().into_parts(); Ok(RecursiveCanonical(Canonical::Primitive(unsafe { PrimitiveArray::new_unchecked_from_handle(buffer, ptype, validity.execute(ctx)?) }))) @@ -697,7 +697,7 @@ impl Executable for RecursiveCanonical { values, values_type, validity, - } = d.into_inner().into_parts(); + } = d.into_data().into_parts(); Ok(RecursiveCanonical(Canonical::Decimal(unsafe { DecimalArray::new_unchecked_handle( values, @@ -713,7 +713,7 @@ impl Executable for RecursiveCanonical { buffers, views, validity, - } = vbv.into_inner().into_parts(); + } = vbv.into_data().into_parts(); Ok(RecursiveCanonical(Canonical::VarBinView(unsafe { VarBinViewArray::new_handle_unchecked( views, @@ -731,7 +731,7 @@ impl Executable for RecursiveCanonical { sizes, validity, .. - } = l.into_inner().into_parts(); + } = l.into_data().into_parts(); Ok(RecursiveCanonical(Canonical::List(unsafe { ListViewArray::new_unchecked( elements.execute::(ctx)?.0.into_array(), @@ -745,7 +745,7 @@ impl Executable for RecursiveCanonical { Canonical::FixedSizeList(fsl) => { let list_size = fsl.list_size(); let len = fsl.len(); - let (elements, validity, _) = fsl.into_inner().into_parts(); + let (elements, validity, _) = fsl.into_data().into_parts(); Ok(RecursiveCanonical(Canonical::FixedSizeList( FixedSizeListArray::new( elements.execute::(ctx)?.0.into_array(), diff --git a/vortex-array/src/scalar_fn/fns/zip/mod.rs b/vortex-array/src/scalar_fn/fns/zip/mod.rs index e5f5f18d964..64bb75ea8d9 100644 --- a/vortex-array/src/scalar_fn/fns/zip/mod.rs +++ b/vortex-array/src/scalar_fn/fns/zip/mod.rs @@ -444,7 +444,7 @@ mod tests { .execute::(&mut ctx) .unwrap(); let zipped = zipped.as_opt::().unwrap(); - assert_eq!(zipped.nbuffers(), 2); + assert_eq!(zipped.data_buffers().len(), 2); let expected = arrow_zip( mask.into_array() diff --git a/vortex-array/src/vtable/mod.rs b/vortex-array/src/vtable/mod.rs index 27de4f82b53..3534bb4c398 100644 --- a/vortex-array/src/vtable/mod.rs +++ b/vortex-array/src/vtable/mod.rs @@ -51,7 +51,7 @@ use crate::validity::Validity; /// out of bounds). Post-conditions are validated after invocation of the vtable function and will /// panic if violated. pub trait VTable: 'static + Clone + Sized + Send + Sync + Debug { - type Array: 'static + Send + Sync + Clone + Debug + IntoArray; + type ArrayData: 'static + Send + Sync + Clone + Debug + IntoArray; type Metadata: Debug; type OperationsVTable: OperationsVTable; @@ -60,19 +60,19 @@ pub trait VTable: 'static + Clone + Sized + Send + Sync + Debug { /// Returns the VTable from the array instance. /// // NOTE(ngates): this function is temporary while we migrate Arrays over to the unified vtable - fn vtable(array: &Self::Array) -> &Self; + fn vtable(array: &Self::ArrayData) -> &Self; /// Returns the ID of the array. fn id(&self) -> ArrayId; /// Returns the length of the array. - fn len(array: &Self::Array) -> usize; + fn len(array: &Self::ArrayData) -> usize; /// Returns the DType of the array. - fn dtype(array: &Self::Array) -> &DType; + fn dtype(array: &Self::ArrayData) -> &DType; /// Returns the stats set for the array. - fn stats(array: &Self::Array) -> &ArrayStats; + fn stats(array: &Self::ArrayData) -> &ArrayStats; /// Hashes the array contents. fn array_hash(array: &Array, state: &mut H, precision: Precision); @@ -141,10 +141,10 @@ pub trait VTable: 'static + Clone + Sized + Send + Sync + Debug { metadata: &Self::Metadata, buffers: &[BufferHandle], children: &dyn ArrayChildren, - ) -> VortexResult; + ) -> VortexResult; /// Replaces the children in `array` with `children`. - fn with_children(array: &mut Self::Array, children: Vec) -> VortexResult<()>; + fn with_children(array: &mut Self::ArrayData, children: Vec) -> VortexResult<()>; /// Execute this array by returning an [`ExecutionResult`]. fn execute(array: Arc>, ctx: &mut ExecutionCtx) -> VortexResult; diff --git a/vortex-array/src/vtable/typed.rs b/vortex-array/src/vtable/typed.rs index fecc402497e..8f213927e85 100644 --- a/vortex-array/src/vtable/typed.rs +++ b/vortex-array/src/vtable/typed.rs @@ -31,7 +31,7 @@ pub struct Array { vtable: V, pub(crate) dtype: DType, pub(crate) len: usize, - pub(crate) array: V::Array, + pub(crate) data: V::ArrayData, pub(crate) stats: ArrayStats, } @@ -40,7 +40,7 @@ impl Array { /// Create a new typed array from encoding-specific data. /// /// Extracts dtype, len, vtable, and stats from the data via [`VTable`] methods. - pub fn try_from_data(data: V::Array) -> VortexResult { + pub fn try_from_data(data: V::ArrayData) -> VortexResult { let vtable = V::vtable(&data).clone(); let dtype = V::dtype(&data).clone(); let len = V::len(&data); @@ -58,14 +58,14 @@ impl Array { vtable: V, dtype: DType, len: usize, - data: V::Array, + data: V::ArrayData, stats: ArrayStats, ) -> Self { Self { vtable, dtype, len, - array: data, + data, stats, } } @@ -106,13 +106,13 @@ impl Array { } /// Returns a reference to the inner encoding-specific array data. - pub fn inner(&self) -> &V::Array { - &self.array + pub fn data(&self) -> &V::ArrayData { + &self.data } /// Consumes this array and returns the inner encoding-specific data. - pub fn into_inner(self) -> V::Array { - self.array + pub fn into_data(self) -> V::ArrayData { + self.data } /// Returns a cloned [`ArrayRef`] for this array. @@ -123,7 +123,7 @@ impl Array { impl Array where - V::Array: crate::vtable::ValidityHelper, + V::ArrayData: crate::vtable::ValidityHelper, { /// Returns a reference to the validity of this array. /// @@ -131,7 +131,7 @@ where /// to the concrete validity without going through `VortexResult`. #[allow(clippy::same_name_method)] pub fn validity(&self) -> &crate::validity::Validity { - crate::vtable::ValidityHelper::validity(&self.array) + crate::vtable::ValidityHelper::validity(&self.data) } /// Returns the validity mask for this array. @@ -203,7 +203,7 @@ impl Array { self.to_array_ref().nbytes() } - /// Returns the number of buffers in this array. + /// Returns the number of buffers this array would serialize. #[allow(clippy::same_name_method)] pub fn nbuffers(&self) -> usize { V::nbuffers(self) @@ -216,16 +216,16 @@ impl Array { } impl Deref for Array { - type Target = V::Array; + type Target = V::ArrayData; - fn deref(&self) -> &V::Array { - &self.array + fn deref(&self) -> &V::ArrayData { + &self.data } } impl DerefMut for Array { - fn deref_mut(&mut self) -> &mut V::Array { - &mut self.array + fn deref_mut(&mut self) -> &mut V::ArrayData { + &mut self.data } } @@ -235,7 +235,7 @@ impl Clone for Array { vtable: self.vtable.clone(), dtype: self.dtype.clone(), len: self.len, - array: self.array.clone(), + data: self.data.clone(), stats: self.stats.clone(), } } @@ -247,7 +247,7 @@ impl Debug for Array { .field("encoding", &self.vtable.id()) .field("dtype", &self.dtype) .field("len", &self.len) - .field("inner", &self.array) + .field("inner", &self.data) .finish() } } diff --git a/vortex-array/src/vtable/validity.rs b/vortex-array/src/vtable/validity.rs index 1b3be6044b6..11b83a1f197 100644 --- a/vortex-array/src/vtable/validity.rs +++ b/vortex-array/src/vtable/validity.rs @@ -28,10 +28,10 @@ pub trait ValidityHelper { impl ValidityVTable for ValidityVTableFromValidityHelper where - V::Array: ValidityHelper, + V::ArrayData: ValidityHelper, { fn validity(array: &Array) -> VortexResult { - Ok(array.inner().validity().clone()) + Ok(array.data().validity().clone()) } } @@ -50,10 +50,10 @@ pub trait ValiditySliceHelper { impl ValidityVTable for ValidityVTableFromValiditySliceHelper where - V::Array: ValiditySliceHelper, + V::ArrayData: ValiditySliceHelper, { fn validity(array: &Array) -> VortexResult { - array.inner().sliced_validity() + array.data().sliced_validity() } } @@ -62,7 +62,7 @@ where pub struct ValidityVTableFromChild; pub trait ValidityChild { - fn validity_child(array: &V::Array) -> &ArrayRef; + fn validity_child(array: &V::ArrayData) -> &ArrayRef; } impl ValidityVTable for ValidityVTableFromChild @@ -70,7 +70,7 @@ where V: ValidityChild, { fn validity(array: &Array) -> VortexResult { - V::validity_child(array.inner()).validity() + V::validity_child(array.data()).validity() } } @@ -89,9 +89,9 @@ pub trait ValidityChildSliceHelper { impl ValidityVTable for ValidityVTableFromChildSliceHelper where - V::Array: ValidityChildSliceHelper, + V::ArrayData: ValidityChildSliceHelper, { fn validity(array: &Array) -> VortexResult { - array.inner().sliced_child_array()?.validity() + array.data().sliced_child_array()?.validity() } } diff --git a/vortex-btrblocks/public-api.lock b/vortex-btrblocks/public-api.lock index c3cf37445da..e891c8e189f 100644 --- a/vortex-btrblocks/public-api.lock +++ b/vortex-btrblocks/public-api.lock @@ -270,7 +270,7 @@ impl vortex_btrblocks::CompressorStats for vortex_btrblocks::IntegerStats pub type vortex_btrblocks::IntegerStats::ArrayVTable = vortex_array::arrays::primitive::vtable::Primitive -pub fn vortex_btrblocks::IntegerStats::generate(input: &::Array) -> Self +pub fn vortex_btrblocks::IntegerStats::generate(input: &::ArrayData) -> Self pub fn vortex_btrblocks::IntegerStats::generate_opts(input: &vortex_array::arrays::primitive::array::PrimitiveData, opts: vortex_btrblocks::GenerateStatsOptions) -> Self @@ -304,21 +304,21 @@ pub trait vortex_btrblocks::CompressorStats: core::fmt::Debug + core::clone::Clo pub type vortex_btrblocks::CompressorStats::ArrayVTable: vortex_array::vtable::VTable -pub fn vortex_btrblocks::CompressorStats::generate(input: &::Array) -> Self +pub fn vortex_btrblocks::CompressorStats::generate(input: &::ArrayData) -> Self -pub fn vortex_btrblocks::CompressorStats::generate_opts(input: &::Array, opts: vortex_btrblocks::GenerateStatsOptions) -> Self +pub fn vortex_btrblocks::CompressorStats::generate_opts(input: &::ArrayData, opts: vortex_btrblocks::GenerateStatsOptions) -> Self pub fn vortex_btrblocks::CompressorStats::sample(&self, sample_size: u32, sample_count: u32) -> Self pub fn vortex_btrblocks::CompressorStats::sample_opts(&self, sample_size: u32, sample_count: u32, opts: vortex_btrblocks::GenerateStatsOptions) -> Self -pub fn vortex_btrblocks::CompressorStats::source(&self) -> &::Array +pub fn vortex_btrblocks::CompressorStats::source(&self) -> &::ArrayData impl vortex_btrblocks::CompressorStats for vortex_btrblocks::IntegerStats pub type vortex_btrblocks::IntegerStats::ArrayVTable = vortex_array::arrays::primitive::vtable::Primitive -pub fn vortex_btrblocks::IntegerStats::generate(input: &::Array) -> Self +pub fn vortex_btrblocks::IntegerStats::generate(input: &::ArrayData) -> Self pub fn vortex_btrblocks::IntegerStats::generate_opts(input: &vortex_array::arrays::primitive::array::PrimitiveData, opts: vortex_btrblocks::GenerateStatsOptions) -> Self diff --git a/vortex-btrblocks/src/compressor/float/mod.rs b/vortex-btrblocks/src/compressor/float/mod.rs index 2e53066616f..69b8c462d38 100644 --- a/vortex-btrblocks/src/compressor/float/mod.rs +++ b/vortex-btrblocks/src/compressor/float/mod.rs @@ -91,7 +91,7 @@ impl<'a> Compressor for FloatCompressor<'a> { type SchemeType = dyn FloatScheme; type StatsType = FloatStats; - fn gen_stats(&self, array: &::Array) -> Self::StatsType { + fn gen_stats(&self, array: &::ArrayData) -> Self::StatsType { if self .btr_blocks_compressor .float_schemes() @@ -429,7 +429,7 @@ impl Scheme for DictScheme { ) -> VortexResult { let dict = dictionary_encode(stats); let has_all_values_referenced = dict.has_all_values_referenced(); - let DictArrayParts { codes, values, .. } = dict.into_inner().into_parts(); + let DictArrayParts { codes, values, .. } = dict.into_data().into_parts(); let compressed_codes = compressor.compress_canonical( Canonical::Primitive(codes.to_primitive()), diff --git a/vortex-btrblocks/src/compressor/float/stats.rs b/vortex-btrblocks/src/compressor/float/stats.rs index 6502e62b0ea..1574a6c4c81 100644 --- a/vortex-btrblocks/src/compressor/float/stats.rs +++ b/vortex-btrblocks/src/compressor/float/stats.rs @@ -6,7 +6,6 @@ use std::hash::Hash; use itertools::Itertools; use num_traits::Float; use rustc_hash::FxBuildHasher; -use vortex_array::DynArray; use vortex_array::IntoArray; use vortex_array::ToCanonical; use vortex_array::arrays::Primitive; @@ -154,8 +153,6 @@ where } let null_count = array - .clone() - .into_array() .statistics() .compute_null_count() .ok_or_else(|| vortex_err!("Failed to compute null_count"))?; diff --git a/vortex-btrblocks/src/compressor/integer/mod.rs b/vortex-btrblocks/src/compressor/integer/mod.rs index a9013e000a3..f250717bab9 100644 --- a/vortex-btrblocks/src/compressor/integer/mod.rs +++ b/vortex-btrblocks/src/compressor/integer/mod.rs @@ -85,7 +85,7 @@ impl<'a> Compressor for IntCompressor<'a> { &UncompressedScheme } - fn gen_stats(&self, array: &::Array) -> Self::StatsType { + fn gen_stats(&self, array: &::ArrayData) -> Self::StatsType { if self .btr_blocks_compressor .int_schemes() @@ -406,8 +406,6 @@ impl Scheme for FORScheme { let for_compressed = FoR::try_new(compressed, for_array.reference_scalar().clone())?; for_compressed - .clone() - .into_array() .statistics() .inherit_from(for_array.into_array().statistics()); Ok(for_compressed.into_array()) diff --git a/vortex-btrblocks/src/compressor/mod.rs b/vortex-btrblocks/src/compressor/mod.rs index dea05498efb..fd1dcf0f6a7 100644 --- a/vortex-btrblocks/src/compressor/mod.rs +++ b/vortex-btrblocks/src/compressor/mod.rs @@ -57,7 +57,7 @@ pub trait Compressor { type StatsType: CompressorStats; /// Generates statistics for the given array to guide compression scheme selection. - fn gen_stats(&self, array: &::Array) -> Self::StatsType; + fn gen_stats(&self, array: &::ArrayData) -> Self::StatsType; /// Returns all available compression schemes for this compressor. fn schemes(&self) -> &[&'static Self::SchemeType]; @@ -145,7 +145,7 @@ where fn compress( &self, btr_blocks_compressor: &BtrBlocksCompressor, - array: &<::ArrayVTable as VTable>::Array, + array: &<::ArrayVTable as VTable>::ArrayData, ctx: CompressorContext, excludes: &[::CodeType], ) -> VortexResult { diff --git a/vortex-btrblocks/src/compressor/string.rs b/vortex-btrblocks/src/compressor/string.rs index a9167cb04d4..5d0878d3d44 100644 --- a/vortex-btrblocks/src/compressor/string.rs +++ b/vortex-btrblocks/src/compressor/string.rs @@ -81,8 +81,6 @@ impl StringStats { opts: GenerateStatsOptions, ) -> VortexResult { let null_count = input - .clone() - .into_array() .statistics() .compute_null_count() .ok_or_else(|| vortex_err!("Failed to compute null_count"))?; @@ -149,7 +147,7 @@ impl<'a> Compressor for StringCompressor<'a> { type SchemeType = dyn StringScheme; type StatsType = StringStats; - fn gen_stats(&self, array: &::Array) -> Self::StatsType { + fn gen_stats(&self, array: &::ArrayData) -> Self::StatsType { if self .btr_blocks_compressor .string_schemes() diff --git a/vortex-btrblocks/src/stats.rs b/vortex-btrblocks/src/stats.rs index b3e25cfb8d6..e0de4dce1d7 100644 --- a/vortex-btrblocks/src/stats.rs +++ b/vortex-btrblocks/src/stats.rs @@ -40,18 +40,18 @@ pub trait CompressorStats: Debug + Clone { type ArrayVTable: VTable; /// Generates stats with default options. - fn generate(input: &::Array) -> Self { + fn generate(input: &::ArrayData) -> Self { Self::generate_opts(input, GenerateStatsOptions::default()) } /// Generates stats with provided options. fn generate_opts( - input: &::Array, + input: &::ArrayData, opts: GenerateStatsOptions, ) -> Self; /// Returns the underlying source array that statistics were generated from. - fn source(&self) -> &::Array; + fn source(&self) -> &::ArrayData; /// Sample the array with default options. fn sample(&self, sample_size: u32, sample_count: u32) -> Self { diff --git a/vortex-cuda/benches/zstd_cuda.rs b/vortex-cuda/benches/zstd_cuda.rs index baf7d02c745..7fe68380439 100644 --- a/vortex-cuda/benches/zstd_cuda.rs +++ b/vortex-cuda/benches/zstd_cuda.rs @@ -140,7 +140,7 @@ fn benchmark_zstd_cuda_decompress(c: &mut Criterion) { for _ in 0..iters { let ZstdArrayParts { frames, metadata, .. - } = zstd_array.clone().into_inner().into_parts(); + } = zstd_array.clone().into_data().into_parts(); let exec = block_on(zstd_kernel_prepare(frames, &metadata, &mut cuda_ctx)) .vortex_expect("kernel setup failed"); let kernel_time = block_on(execute_zstd_kernel(exec, &mut cuda_ctx)) diff --git a/vortex-cuda/src/arrow/canonical.rs b/vortex-cuda/src/arrow/canonical.rs index 763aed4569e..d04d2693996 100644 --- a/vortex-cuda/src/arrow/canonical.rs +++ b/vortex-cuda/src/arrow/canonical.rs @@ -69,7 +69,7 @@ fn export_canonical( let len = primitive.len(); let PrimitiveArrayParts { buffer, validity, .. - } = primitive.into_inner().into_parts(); + } = primitive.into_data().into_parts(); check_validity_empty(&validity)?; @@ -96,7 +96,7 @@ fn export_canonical( values_type, validity, .. - } = decimal.into_inner().into_parts(); + } = decimal.into_data().into_parts(); // verify that there is no null buffer check_validity_empty(&validity)?; @@ -121,7 +121,7 @@ fn export_canonical( let PrimitiveArrayParts { buffer, validity, .. - } = values.into_inner().into_parts(); + } = values.into_data().into_parts(); check_validity_empty(&validity)?; diff --git a/vortex-cuda/src/arrow/varbinview.rs b/vortex-cuda/src/arrow/varbinview.rs index 8c450d16844..12edc39c9bf 100644 --- a/vortex-cuda/src/arrow/varbinview.rs +++ b/vortex-cuda/src/arrow/varbinview.rs @@ -38,7 +38,7 @@ pub(crate) async fn copy_varbinview_to_varbin( buffers, validity, .. - } = array.into_inner().into_parts(); + } = array.into_data().into_parts(); // TODO(aduffy): handle nulls check_validity_empty(&validity)?; diff --git a/vortex-cuda/src/canonical.rs b/vortex-cuda/src/canonical.rs index 1927e981b36..70ab7f550ce 100644 --- a/vortex-cuda/src/canonical.rs +++ b/vortex-cuda/src/canonical.rs @@ -81,7 +81,7 @@ impl CanonicalCudaExt for Canonical { buffer, validity, .. - } = prim.into_inner().into_parts(); + } = prim.into_data().into_parts(); Ok(Canonical::Primitive(PrimitiveArray::from_byte_buffer( buffer.try_into_host()?.await?, ptype, @@ -95,7 +95,7 @@ impl CanonicalCudaExt for Canonical { values_type, validity, .. - } = decimal.into_inner().into_parts(); + } = decimal.into_data().into_parts(); Ok(Canonical::Decimal(unsafe { DecimalArray::new_unchecked_handle( BufferHandle::new_host(values.try_into_host()?.await?), @@ -111,7 +111,7 @@ impl CanonicalCudaExt for Canonical { buffers, validity, dtype, - } = varbinview.into_inner().into_parts(); + } = varbinview.into_data().into_parts(); // Copy all device views to host let host_views = views.try_into_host()?.await?; diff --git a/vortex-cuda/src/dynamic_dispatch/plan_builder.rs b/vortex-cuda/src/dynamic_dispatch/plan_builder.rs index 59044c8c07b..46ccf7c85a2 100644 --- a/vortex-cuda/src/dynamic_dispatch/plan_builder.rs +++ b/vortex-cuda/src/dynamic_dispatch/plan_builder.rs @@ -391,7 +391,7 @@ impl UnmaterializedPlan { fn walk_primitive(&mut self, array: ArrayRef) -> VortexResult { let prim = array.to_canonical()?.into_primitive(); - let PrimitiveArrayParts { buffer, .. } = prim.into_inner().into_parts(); + let PrimitiveArrayParts { buffer, .. } = prim.into_data().into_parts(); let buf_index = self.source_buffers.len(); self.source_buffers.push(buffer); Ok(UnmaterializedStage::new(SourceOp::load(), Some(buf_index))) @@ -407,7 +407,7 @@ impl UnmaterializedPlan { packed, patches, .. - } = bp.into_inner().into_parts(); + } = bp.into_data().into_parts(); if patches.is_some() { vortex_bail!("Dynamic dispatch does not support BitPackedArray with patches"); @@ -491,7 +491,7 @@ impl UnmaterializedPlan { .map_err(|_| vortex_err!("Expected SequenceArray"))?; let SequenceArrayParts { base, multiplier, .. - } = seq.into_inner().into_parts(); + } = seq.into_data().into_parts(); Ok(UnmaterializedStage::new( SourceOp::sequence(base.cast()?, multiplier.cast()?), @@ -504,7 +504,7 @@ impl UnmaterializedPlan { .try_into::() .map_err(|_| vortex_err!("Expected RunEndArray"))?; let offset = re.offset() as u64; - let RunEndArrayParts { ends, values } = re.into_inner().into_parts(); + let RunEndArrayParts { ends, values } = re.into_data().into_parts(); let num_runs = ends.len() as u64; let ends_smem = self.add_input_stage(ends)?; diff --git a/vortex-cuda/src/hybrid_dispatch/mod.rs b/vortex-cuda/src/hybrid_dispatch/mod.rs index 9733b5ee1e5..f5e8a74f732 100644 --- a/vortex-cuda/src/hybrid_dispatch/mod.rs +++ b/vortex-cuda/src/hybrid_dispatch/mod.rs @@ -125,7 +125,7 @@ async fn try_partial_fuse( let canonical = subtree.clone().execute_cuda(ctx).await?; subtree_inputs.push(( subtree.clone(), - canonical.into_primitive().into_inner().into_parts().buffer, + canonical.into_primitive().into_data().into_parts().buffer, )); } diff --git a/vortex-cuda/src/kernel/arrays/dict.rs b/vortex-cuda/src/kernel/arrays/dict.rs index 1dcca646f79..6159d284d34 100644 --- a/vortex-cuda/src/kernel/arrays/dict.rs +++ b/vortex-cuda/src/kernel/arrays/dict.rs @@ -65,7 +65,7 @@ impl CudaExecute for DictExecutor { #[expect(clippy::cognitive_complexity)] async fn execute_dict_prim(dict: DictArray, ctx: &mut CudaExecutionCtx) -> VortexResult { - let DictArrayParts { values, codes, .. } = dict.into_inner().into_parts(); + let DictArrayParts { values, codes, .. } = dict.into_data().into_parts(); // Execute both children to get them as primitives on the device let values_canonical = values.execute_cuda(ctx).await?; @@ -98,12 +98,12 @@ async fn execute_dict_prim_typed 0, "Non empty array"); let offset = offset as usize; diff --git a/vortex-cuda/src/kernel/encodings/date_time_parts.rs b/vortex-cuda/src/kernel/encodings/date_time_parts.rs index 9e690193453..da21f267d32 100644 --- a/vortex-cuda/src/kernel/encodings/date_time_parts.rs +++ b/vortex-cuda/src/kernel/encodings/date_time_parts.rs @@ -150,15 +150,15 @@ where let PrimitiveArrayParts { buffer: days_buffer, .. - } = days.into_inner().into_parts(); + } = days.into_data().into_parts(); let PrimitiveArrayParts { buffer: seconds_buffer, .. - } = seconds.into_inner().into_parts(); + } = seconds.into_data().into_parts(); let PrimitiveArrayParts { buffer: subseconds_buffer, .. - } = subseconds.into_inner().into_parts(); + } = subseconds.into_data().into_parts(); // Move buffers to device if not already there let days_device = ctx.ensure_on_device(days_buffer).await?; diff --git a/vortex-cuda/src/kernel/encodings/decimal_byte_parts.rs b/vortex-cuda/src/kernel/encodings/decimal_byte_parts.rs index b75b13cbed0..134e5c99374 100644 --- a/vortex-cuda/src/kernel/encodings/decimal_byte_parts.rs +++ b/vortex-cuda/src/kernel/encodings/decimal_byte_parts.rs @@ -35,7 +35,7 @@ impl CudaExecute for DecimalBytePartsExecutor { }; let decimal_dtype = *array.decimal_dtype(); - let DecimalBytePartsArrayParts { msp, .. } = array.into_inner().into_parts(); + let DecimalBytePartsArrayParts { msp, .. } = array.into_data().into_parts(); let PrimitiveArrayParts { buffer, ptype, @@ -45,7 +45,7 @@ impl CudaExecute for DecimalBytePartsExecutor { .execute_cuda(ctx) .await? .into_primitive() - .into_inner() + .into_data() .into_parts(); // SAFETY: The primitive array's buffer is already validated with correct type. diff --git a/vortex-cuda/src/kernel/encodings/for_.rs b/vortex-cuda/src/kernel/encodings/for_.rs index 4af12f431ac..aac352dfd6c 100644 --- a/vortex-cuda/src/kernel/encodings/for_.rs +++ b/vortex-cuda/src/kernel/encodings/for_.rs @@ -99,7 +99,7 @@ where let primitive = canonical.into_primitive(); let PrimitiveArrayParts { buffer, validity, .. - } = primitive.into_inner().into_parts(); + } = primitive.into_data().into_parts(); let device_buffer = ctx.ensure_on_device(buffer).await?; diff --git a/vortex-cuda/src/kernel/encodings/runend.rs b/vortex-cuda/src/kernel/encodings/runend.rs index 7be5ca46004..6f14ec20c9c 100644 --- a/vortex-cuda/src/kernel/encodings/runend.rs +++ b/vortex-cuda/src/kernel/encodings/runend.rs @@ -61,7 +61,7 @@ impl CudaExecute for RunEndExecutor { let offset = array.offset(); let output_len = array.len(); - let RunEndArrayParts { ends, values } = array.into_inner().into_parts(); + let RunEndArrayParts { ends, values } = array.into_data().into_parts(); let values_ptype = PType::try_from(values.dtype())?; let ends_ptype = PType::try_from(ends.dtype())?; @@ -110,12 +110,12 @@ async fn decode_runend_typed()?; diff --git a/vortex-cuda/src/kernel/encodings/zigzag.rs b/vortex-cuda/src/kernel/encodings/zigzag.rs index 635bd685c22..f1feac1bbf3 100644 --- a/vortex-cuda/src/kernel/encodings/zigzag.rs +++ b/vortex-cuda/src/kernel/encodings/zigzag.rs @@ -72,7 +72,7 @@ where let primitive = canonical.into_primitive(); let PrimitiveArrayParts { buffer, validity, .. - } = primitive.into_inner().into_parts(); + } = primitive.into_data().into_parts(); let device_buffer = ctx.ensure_on_device(buffer).await?; diff --git a/vortex-cuda/src/kernel/encodings/zstd.rs b/vortex-cuda/src/kernel/encodings/zstd.rs index c998808fd45..4aec0998fe6 100644 --- a/vortex-cuda/src/kernel/encodings/zstd.rs +++ b/vortex-cuda/src/kernel/encodings/zstd.rs @@ -222,7 +222,7 @@ async fn decode_zstd(array: ZstdArray, ctx: &mut CudaExecutionCtx) -> VortexResu dictionary, slice_start, slice_stop, - } = array.into_inner().into_parts(); + } = array.into_data().into_parts(); // nvCOMP doesn't support ZSTD dictionaries. if dictionary.is_some() { diff --git a/vortex-cuda/src/kernel/filter/decimal.rs b/vortex-cuda/src/kernel/filter/decimal.rs index 1d5332ec83d..88e07465968 100644 --- a/vortex-cuda/src/kernel/filter/decimal.rs +++ b/vortex-cuda/src/kernel/filter/decimal.rs @@ -23,7 +23,7 @@ pub(super) async fn filter_decimal(values, mask, ctx).await?; diff --git a/vortex-cuda/src/kernel/filter/mod.rs b/vortex-cuda/src/kernel/filter/mod.rs index a50e351904f..588c3e07925 100644 --- a/vortex-cuda/src/kernel/filter/mod.rs +++ b/vortex-cuda/src/kernel/filter/mod.rs @@ -53,7 +53,7 @@ impl CudaExecute for FilterExecutor { .try_into::() .map_err(|_| vortex_err!("Expected FilterArray"))?; - let FilterArrayParts { child, mask } = filter_array.into_inner().into_parts(); + let FilterArrayParts { child, mask } = filter_array.into_data().into_parts(); // Early return for trivial cases. match mask { diff --git a/vortex-cuda/src/kernel/filter/primitive.rs b/vortex-cuda/src/kernel/filter/primitive.rs index 39e4e9f6833..68e39edd60f 100644 --- a/vortex-cuda/src/kernel/filter/primitive.rs +++ b/vortex-cuda/src/kernel/filter/primitive.rs @@ -24,7 +24,7 @@ where { let PrimitiveArrayParts { buffer, validity, .. - } = array.into_inner().into_parts(); + } = array.into_data().into_parts(); let filtered_validity = validity.filter(&mask)?; let filtered_values = filter_sized::(buffer, mask, ctx).await?; diff --git a/vortex-cuda/src/kernel/filter/varbinview.rs b/vortex-cuda/src/kernel/filter/varbinview.rs index 3091c7d4dce..143e3f26ce7 100644 --- a/vortex-cuda/src/kernel/filter/varbinview.rs +++ b/vortex-cuda/src/kernel/filter/varbinview.rs @@ -20,7 +20,7 @@ pub(super) async fn filter_varbinview( buffers, validity, dtype, - } = array.into_inner().into_parts(); + } = array.into_data().into_parts(); let filtered_validity = validity.filter(&mask)?; diff --git a/vortex-cuda/src/kernel/patches/mod.rs b/vortex-cuda/src/kernel/patches/mod.rs index 67c670d158a..bb45220535e 100644 --- a/vortex-cuda/src/kernel/patches/mod.rs +++ b/vortex-cuda/src/kernel/patches/mod.rs @@ -71,12 +71,12 @@ pub(crate) async fn execute_patches< let PrimitiveArrayParts { buffer: indices_buffer, .. - } = indices.into_inner().into_parts(); + } = indices.into_data().into_parts(); let PrimitiveArrayParts { buffer: values_buffer, .. - } = values.into_inner().into_parts(); + } = values.into_data().into_parts(); let d_patch_indices = ctx.ensure_on_device(indices_buffer).await?; let d_patch_values = ctx.ensure_on_device(values_buffer).await?; @@ -171,7 +171,7 @@ mod tests { let PrimitiveArrayParts { buffer: cuda_buffer, .. - } = values.into_inner().into_parts(); + } = values.into_data().into_parts(); let handle = ctx.ensure_on_device(cuda_buffer).await.unwrap(); let device_buf = handle diff --git a/vortex-cuda/src/kernel/slice/mod.rs b/vortex-cuda/src/kernel/slice/mod.rs index 769d2060dab..0bcd7590146 100644 --- a/vortex-cuda/src/kernel/slice/mod.rs +++ b/vortex-cuda/src/kernel/slice/mod.rs @@ -34,7 +34,7 @@ impl CudaExecute for SliceExecutor { ) })?; - let SliceArrayParts { child, range } = slice_array.into_inner().into_parts(); + let SliceArrayParts { child, range } = slice_array.into_data().into_parts(); let child = child.execute_cuda(ctx).await?; match child { diff --git a/vortex-duckdb/src/exporter/decimal.rs b/vortex-duckdb/src/exporter/decimal.rs index 4836f7f22d8..b61754ab64e 100644 --- a/vortex-duckdb/src/exporter/decimal.rs +++ b/vortex-duckdb/src/exporter/decimal.rs @@ -47,7 +47,7 @@ pub(crate) fn new_exporter( decimal_dtype, values_type, values, - } = array.into_inner().into_parts(); + } = array.into_data().into_parts(); let dest_values_type = precision_to_duckdb_storage_size(&decimal_dtype)?; let nullability = validity.nullability(); let validity = validity.to_array(len).execute::(ctx)?; diff --git a/vortex-duckdb/src/exporter/fixed_size_list.rs b/vortex-duckdb/src/exporter/fixed_size_list.rs index 78cc3fa9f4e..8aaaa1cce1c 100644 --- a/vortex-duckdb/src/exporter/fixed_size_list.rs +++ b/vortex-duckdb/src/exporter/fixed_size_list.rs @@ -38,7 +38,7 @@ pub(crate) fn new_exporter( ) -> VortexResult> { let list_size = array.list_size(); let len = array.len(); - let (elements, validity, dtype) = array.into_inner().into_parts(); + let (elements, validity, dtype) = array.into_data().into_parts(); let mask = validity.to_array(len).execute::(ctx)?; let elements_exporter = new_array_exporter_with_flatten(elements, cache, ctx, true)?; diff --git a/vortex-duckdb/src/exporter/list.rs b/vortex-duckdb/src/exporter/list.rs index 8fd406d6c90..7bf4773d2ac 100644 --- a/vortex-duckdb/src/exporter/list.rs +++ b/vortex-duckdb/src/exporter/list.rs @@ -51,7 +51,7 @@ pub(crate) fn new_exporter( offsets, validity, dtype, - } = array.into_inner().into_parts(); + } = array.into_data().into_parts(); let num_elements = elements.len(); let validity = validity.to_array(array_len).execute::(ctx)?; diff --git a/vortex-duckdb/src/exporter/list_view.rs b/vortex-duckdb/src/exporter/list_view.rs index c907a9eaa52..880047f21c2 100644 --- a/vortex-duckdb/src/exporter/list_view.rs +++ b/vortex-duckdb/src/exporter/list_view.rs @@ -54,7 +54,7 @@ pub(crate) fn new_exporter( offsets, sizes, validity, - } = array.into_inner().into_parts(); + } = array.into_data().into_parts(); // Cache an `elements` vector up front so that future exports can reference it. let num_elements = elements.len(); let nullability = validity.nullability(); diff --git a/vortex-duckdb/src/exporter/run_end.rs b/vortex-duckdb/src/exporter/run_end.rs index 8c27368109b..0d05cf67a30 100644 --- a/vortex-duckdb/src/exporter/run_end.rs +++ b/vortex-duckdb/src/exporter/run_end.rs @@ -38,7 +38,7 @@ pub(crate) fn new_exporter( ctx: &mut ExecutionCtx, ) -> VortexResult> { let offset = array.offset(); - let RunEndArrayParts { ends, values } = array.into_inner().into_parts(); + let RunEndArrayParts { ends, values } = array.into_data().into_parts(); let ends = ends.execute::(ctx)?; let values_exporter = new_array_exporter(values.clone(), cache, ctx)?; diff --git a/vortex-duckdb/src/exporter/varbinview.rs b/vortex-duckdb/src/exporter/varbinview.rs index 2fecd2a2070..50c5cafc980 100644 --- a/vortex-duckdb/src/exporter/varbinview.rs +++ b/vortex-duckdb/src/exporter/varbinview.rs @@ -37,7 +37,7 @@ pub(crate) fn new_exporter( dtype, views, buffers, - } = array.into_inner().into_parts(); + } = array.into_data().into_parts(); let validity = validity.to_array(len).execute::(ctx)?; if validity.all_false() { let ltype = LogicalType::try_from(dtype)?; diff --git a/vortex-python/src/arrays/native.rs b/vortex-python/src/arrays/native.rs index 832ef926849..1229507a0de 100644 --- a/vortex-python/src/arrays/native.rs +++ b/vortex-python/src/arrays/native.rs @@ -249,13 +249,13 @@ pub trait AsArrayRef { fn as_array_ref(&self) -> &T; } -impl AsArrayRef<::Array> for PyRef<'_, V> { - fn as_array_ref(&self) -> &::Array { +impl AsArrayRef<::ArrayData> for PyRef<'_, V> { + fn as_array_ref(&self) -> &::ArrayData { self.as_super() .inner() .as_any() .downcast_ref::>() .vortex_expect("Failed to downcast array") - .inner() + .data() } } diff --git a/vortex-python/src/arrays/py/vtable.rs b/vortex-python/src/arrays/py/vtable.rs index 1f3c4d59454..7505af20787 100644 --- a/vortex-python/src/arrays/py/vtable.rs +++ b/vortex-python/src/arrays/py/vtable.rs @@ -42,13 +42,13 @@ pub struct PythonVTable { } impl VTable for PythonVTable { - type Array = PythonArray; + type ArrayData = PythonArray; type Metadata = RawMetadata; type OperationsVTable = Self; type ValidityVTable = Self; - fn vtable(array: &Self::Array) -> &Self { + fn vtable(array: &Self::ArrayData) -> &Self { &array.vtable } @@ -153,7 +153,7 @@ impl VTable for PythonVTable { todo!() } - fn with_children(_array: &mut Self::Array, children: Vec) -> VortexResult<()> { + fn with_children(_array: &mut Self::ArrayData, children: Vec) -> VortexResult<()> { vortex_ensure!( children.is_empty(), "PythonArray has no children, got {}", From 5aa2ba4e261bfcceac4bcb04c46f037d54ece480 Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Mon, 30 Mar 2026 14:49:07 +0100 Subject: [PATCH 07/11] Array VTables 5 Signed-off-by: Nicholas Gates --- encodings/fastlanes/src/bitpacking/vtable/operations.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/encodings/fastlanes/src/bitpacking/vtable/operations.rs b/encodings/fastlanes/src/bitpacking/vtable/operations.rs index 922534cac4a..73253d88aa6 100644 --- a/encodings/fastlanes/src/bitpacking/vtable/operations.rs +++ b/encodings/fastlanes/src/bitpacking/vtable/operations.rs @@ -30,6 +30,7 @@ impl OperationsVTable for BitPacked { #[cfg(test)] mod test { use std::ops::Range; + use std::sync::LazyLock; use vortex_array::ArrayRef; use vortex_array::DynArray; @@ -44,6 +45,7 @@ mod test { use vortex_array::dtype::PType; use vortex_array::patches::Patches; use vortex_array::scalar::Scalar; + use vortex_array::session::ArraySession; use vortex_array::validity::Validity; use vortex_buffer::Alignment; use vortex_buffer::Buffer; From 6ca133bdf4c7beee05ab4e6ed6236c843d1b7daa Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Mon, 30 Mar 2026 16:20:16 +0100 Subject: [PATCH 08/11] Array VTables 5 Signed-off-by: Nicholas Gates --- encodings/alp/src/alp/array.rs | 1 - encodings/alp/src/alp/compress.rs | 1 - encodings/alp/src/alp/decompress.rs | 1 - encodings/alp/src/alp_rd/mod.rs | 1 - encodings/bytebool/src/compute.rs | 1 - encodings/bytebool/src/slice.rs | 1 - encodings/datetime-parts/src/canonical.rs | 1 - encodings/datetime-parts/src/compress.rs | 2 -- encodings/datetime-parts/src/compute/filter.rs | 1 - .../src/decimal_byte_parts/compute/compare.rs | 1 - encodings/decimal-byte-parts/src/decimal_byte_parts/mod.rs | 2 -- encodings/fastlanes/src/bitpacking/array/mod.rs | 1 - encodings/fastlanes/src/delta/compute/cast.rs | 1 - encodings/fastlanes/src/for/array/for_compress.rs | 2 +- encodings/fastlanes/src/rle/array/rle_compress.rs | 2 +- encodings/fsst/src/array.rs | 1 - encodings/fsst/src/canonical.rs | 1 - encodings/fsst/src/compute/compare.rs | 1 - encodings/pco/src/array.rs | 2 -- encodings/pco/src/compute/cast.rs | 1 - encodings/pco/src/test.rs | 1 - encodings/runend/src/arrow.rs | 1 - encodings/runend/src/compress.rs | 1 - encodings/runend/src/compute/take.rs | 1 - encodings/sequence/src/compute/list_contains.rs | 1 - encodings/sparse/src/canonical.rs | 1 - encodings/sparse/src/ops.rs | 1 - encodings/zigzag/src/compress.rs | 1 - encodings/zstd/src/array.rs | 1 - encodings/zstd/src/compute/cast.rs | 1 - encodings/zstd/src/test.rs | 2 -- fuzz/src/array/fill_null.rs | 1 - fuzz/src/array/mask.rs | 1 - vortex-array/src/arrays/assertions.rs | 1 - vortex-array/src/arrays/bool/compute/take.rs | 1 - vortex-array/src/arrays/bool/vtable/operations.rs | 1 - vortex-array/src/arrays/chunked/compute/zip.rs | 1 - vortex-array/src/arrays/constant/vtable/canonical.rs | 1 - vortex-array/src/arrays/datetime/test.rs | 2 -- vortex-array/src/arrays/decimal/compute/cast.rs | 1 - vortex-array/src/arrays/dict/compute/slice.rs | 1 - vortex-array/src/arrays/dict/tests.rs | 1 - vortex-array/src/arrays/listview/conversion.rs | 1 - vortex-array/src/arrays/listview/rebuild.rs | 1 - vortex-array/src/arrays/masked/vtable/canonical.rs | 1 - vortex-array/src/arrays/primitive/compute/cast.rs | 1 - vortex-array/src/builders/bool.rs | 1 - vortex-array/src/builders/dict/primitive.rs | 1 - vortex-array/src/builders/fixed_size_list.rs | 1 - vortex-array/src/builders/list.rs | 1 - vortex-array/src/builders/listview.rs | 1 - vortex-array/src/builders/primitive.rs | 1 - vortex-array/src/scalar_fn/fns/list_contains/mod.rs | 2 ++ vortex-array/src/scalar_fn/fns/pack.rs | 1 - vortex-array/src/vtable/typed.rs | 1 + vortex-btrblocks/src/canonical_compressor.rs | 1 - vortex-btrblocks/src/compressor/integer/mod.rs | 1 - vortex-cuda/src/arrow/canonical.rs | 1 - vortex-cuda/src/kernel/patches/mod.rs | 1 - vortex-duckdb/src/e2e_test/vortex_scan_test.rs | 1 - vortex-duckdb/src/exporter/mod.rs | 1 - vortex-duckdb/src/exporter/primitive.rs | 1 - vortex-layout/src/layouts/struct_/reader.rs | 1 - vortex/src/lib.rs | 1 - 64 files changed, 5 insertions(+), 67 deletions(-) diff --git a/encodings/alp/src/alp/array.rs b/encodings/alp/src/alp/array.rs index e00fca19e86..338e46cc98a 100644 --- a/encodings/alp/src/alp/array.rs +++ b/encodings/alp/src/alp/array.rs @@ -552,7 +552,6 @@ mod tests { use vortex_array::arrays::PrimitiveArray; use vortex_array::assert_arrays_eq; use vortex_array::session::ArraySession; - use vortex_array::vtable::ValidityHelper; use vortex_session::VortexSession; use super::*; diff --git a/encodings/alp/src/alp/compress.rs b/encodings/alp/src/alp/compress.rs index 53d6319fb73..cdd08f2ec05 100644 --- a/encodings/alp/src/alp/compress.rs +++ b/encodings/alp/src/alp/compress.rs @@ -8,7 +8,6 @@ use vortex_array::arrays::PrimitiveArray; use vortex_array::dtype::PType; use vortex_array::patches::Patches; use vortex_array::validity::Validity; -use vortex_array::vtable::ValidityHelper; use vortex_buffer::Buffer; use vortex_buffer::BufferMut; use vortex_error::VortexResult; diff --git a/encodings/alp/src/alp/decompress.rs b/encodings/alp/src/alp/decompress.rs index bedc128771f..e64bde6206f 100644 --- a/encodings/alp/src/alp/decompress.rs +++ b/encodings/alp/src/alp/decompress.rs @@ -10,7 +10,6 @@ use vortex_array::arrays::primitive::patch_chunk; use vortex_array::dtype::DType; use vortex_array::match_each_unsigned_integer_ptype; use vortex_array::patches::Patches; -use vortex_array::vtable::ValidityHelper; use vortex_buffer::BufferMut; use vortex_error::VortexResult; diff --git a/encodings/alp/src/alp_rd/mod.rs b/encodings/alp/src/alp_rd/mod.rs index 9dab6979fd2..c089cca7556 100644 --- a/encodings/alp/src/alp_rd/mod.rs +++ b/encodings/alp/src/alp_rd/mod.rs @@ -30,7 +30,6 @@ use vortex_array::arrays::PrimitiveArray; use vortex_array::dtype::DType; use vortex_array::dtype::NativePType; use vortex_array::match_each_integer_ptype; -use vortex_array::vtable::ValidityHelper; use vortex_buffer::Buffer; use vortex_buffer::BufferMut; use vortex_error::VortexExpect; diff --git a/encodings/bytebool/src/compute.rs b/encodings/bytebool/src/compute.rs index 052f7c56b43..4d1ed73a849 100644 --- a/encodings/bytebool/src/compute.rs +++ b/encodings/bytebool/src/compute.rs @@ -12,7 +12,6 @@ use vortex_array::match_each_integer_ptype; use vortex_array::scalar_fn::fns::cast::CastReduce; use vortex_array::scalar_fn::fns::mask::MaskReduce; use vortex_array::validity::Validity; -use vortex_array::vtable::ValidityHelper; use vortex_error::VortexResult; use super::ByteBool; diff --git a/encodings/bytebool/src/slice.rs b/encodings/bytebool/src/slice.rs index 4248f8008fd..dadb5c91640 100644 --- a/encodings/bytebool/src/slice.rs +++ b/encodings/bytebool/src/slice.rs @@ -6,7 +6,6 @@ use std::ops::Range; use vortex_array::ArrayRef; use vortex_array::IntoArray; use vortex_array::arrays::slice::SliceReduce; -use vortex_array::vtable::ValidityHelper; use vortex_error::VortexResult; use crate::ByteBool; diff --git a/encodings/datetime-parts/src/canonical.rs b/encodings/datetime-parts/src/canonical.rs index 5424098fab6..14d33ec8771 100644 --- a/encodings/datetime-parts/src/canonical.rs +++ b/encodings/datetime-parts/src/canonical.rs @@ -116,7 +116,6 @@ mod test { use vortex_array::assert_arrays_eq; use vortex_array::extension::datetime::TimeUnit; use vortex_array::validity::Validity; - use vortex_array::vtable::ValidityHelper; use vortex_buffer::buffer; use vortex_error::VortexResult; use vortex_session::VortexSession; diff --git a/encodings/datetime-parts/src/compress.rs b/encodings/datetime-parts/src/compress.rs index 87047a30ee4..4bc0bad84de 100644 --- a/encodings/datetime-parts/src/compress.rs +++ b/encodings/datetime-parts/src/compress.rs @@ -9,7 +9,6 @@ use vortex_array::arrays::TemporalArray; use vortex_array::builtins::ArrayBuiltins; use vortex_array::dtype::DType; use vortex_array::dtype::PType; -use vortex_array::vtable::ValidityHelper; use vortex_buffer::BufferMut; use vortex_error::VortexError; use vortex_error::VortexResult; @@ -83,7 +82,6 @@ mod tests { use vortex_array::arrays::TemporalArray; use vortex_array::extension::datetime::TimeUnit; use vortex_array::validity::Validity; - use vortex_array::vtable::ValidityHelper; use vortex_buffer::buffer; use crate::TemporalParts; diff --git a/encodings/datetime-parts/src/compute/filter.rs b/encodings/datetime-parts/src/compute/filter.rs index 63a1f1a11d8..a90e5dd0bd0 100644 --- a/encodings/datetime-parts/src/compute/filter.rs +++ b/encodings/datetime-parts/src/compute/filter.rs @@ -33,7 +33,6 @@ mod test { use vortex_array::extension::datetime::TimeUnit; use vortex_buffer::buffer; - use crate::DateTimePartsArray; use crate::DateTimePartsData; #[test] diff --git a/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/compare.rs b/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/compare.rs index 9b474feff6d..6c78e3660be 100644 --- a/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/compare.rs +++ b/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/compare.rs @@ -160,7 +160,6 @@ mod tests { use vortex_error::VortexResult; use crate::DecimalByteParts; - use crate::DecimalBytePartsArray; #[test] fn compare_decimal_const() { diff --git a/encodings/decimal-byte-parts/src/decimal_byte_parts/mod.rs b/encodings/decimal-byte-parts/src/decimal_byte_parts/mod.rs index 96311e34bb8..677d4b15bee 100644 --- a/encodings/decimal-byte-parts/src/decimal_byte_parts/mod.rs +++ b/encodings/decimal-byte-parts/src/decimal_byte_parts/mod.rs @@ -37,7 +37,6 @@ use vortex_array::vtable::ArrayId; use vortex_array::vtable::OperationsVTable; use vortex_array::vtable::VTable; use vortex_array::vtable::ValidityChild; -use vortex_array::vtable::ValidityHelper; use vortex_array::vtable::ValidityVTableFromChild; use vortex_error::VortexExpect; use vortex_error::VortexResult; @@ -364,7 +363,6 @@ mod tests { use vortex_buffer::buffer; use crate::DecimalByteParts; - use crate::DecimalBytePartsArray; #[test] fn test_scalar_at_decimal_parts() { diff --git a/encodings/fastlanes/src/bitpacking/array/mod.rs b/encodings/fastlanes/src/bitpacking/array/mod.rs index 33bdd1197b8..4e15da2bd44 100644 --- a/encodings/fastlanes/src/bitpacking/array/mod.rs +++ b/encodings/fastlanes/src/bitpacking/array/mod.rs @@ -11,7 +11,6 @@ use vortex_array::dtype::PType; use vortex_array::patches::Patches; use vortex_array::stats::ArrayStats; use vortex_array::validity::Validity; -use vortex_error::VortexExpect; use vortex_error::VortexResult; use vortex_error::vortex_bail; use vortex_error::vortex_ensure; diff --git a/encodings/fastlanes/src/delta/compute/cast.rs b/encodings/fastlanes/src/delta/compute/cast.rs index ec7162550c2..b7bd0986018 100644 --- a/encodings/fastlanes/src/delta/compute/cast.rs +++ b/encodings/fastlanes/src/delta/compute/cast.rs @@ -63,7 +63,6 @@ mod tests { use vortex_session::VortexSession; use crate::DeltaData; - use crate::delta::DeltaArray; static SESSION: LazyLock = LazyLock::new(|| VortexSession::empty().with::()); diff --git a/encodings/fastlanes/src/for/array/for_compress.rs b/encodings/fastlanes/src/for/array/for_compress.rs index 7f5d480541f..14f87118826 100644 --- a/encodings/fastlanes/src/for/array/for_compress.rs +++ b/encodings/fastlanes/src/for/array/for_compress.rs @@ -10,7 +10,6 @@ use vortex_array::dtype::NativePType; use vortex_array::expr::stats::Stat; use vortex_array::match_each_integer_ptype; use vortex_array::stats::ArrayStats; -use vortex_error::VortexExpect; use vortex_error::VortexResult; use vortex_error::vortex_err; @@ -69,6 +68,7 @@ mod test { use vortex_array::session::ArraySession; use vortex_array::validity::Validity; use vortex_buffer::buffer; + use vortex_error::VortexExpect; use vortex_session::VortexSession; use super::*; diff --git a/encodings/fastlanes/src/rle/array/rle_compress.rs b/encodings/fastlanes/src/rle/array/rle_compress.rs index ec593846db2..42a089d3f4f 100644 --- a/encodings/fastlanes/src/rle/array/rle_compress.rs +++ b/encodings/fastlanes/src/rle/array/rle_compress.rs @@ -12,7 +12,6 @@ use vortex_array::match_each_native_ptype; use vortex_array::validity::Validity; use vortex_buffer::BitBufferMut; use vortex_buffer::BufferMut; -use vortex_error::VortexExpect; use vortex_error::VortexResult; use crate::FL_CHUNK_SIZE; @@ -141,6 +140,7 @@ mod tests { use vortex_array::dtype::half::f16; use vortex_buffer::Buffer; use vortex_buffer::buffer; + use vortex_error::VortexExpect; use super::*; use crate::RLEArray; diff --git a/encodings/fsst/src/array.rs b/encodings/fsst/src/array.rs index 5a185597750..28a5e363fa2 100644 --- a/encodings/fsst/src/array.rs +++ b/encodings/fsst/src/array.rs @@ -38,7 +38,6 @@ use vortex_array::vtable::Array; use vortex_array::vtable::ArrayId; use vortex_array::vtable::VTable; use vortex_array::vtable::ValidityChild; -use vortex_array::vtable::ValidityHelper; use vortex_array::vtable::ValidityVTableFromChild; use vortex_array::vtable::validity_nchildren; use vortex_array::vtable::validity_to_child; diff --git a/encodings/fsst/src/canonical.rs b/encodings/fsst/src/canonical.rs index b8ec8a12e51..494e2dcb400 100644 --- a/encodings/fsst/src/canonical.rs +++ b/encodings/fsst/src/canonical.rs @@ -12,7 +12,6 @@ use vortex_array::arrays::varbinview::build_views::BinaryView; use vortex_array::arrays::varbinview::build_views::MAX_BUFFER_LEN; use vortex_array::arrays::varbinview::build_views::build_views; use vortex_array::match_each_integer_ptype; -use vortex_array::vtable::ValidityHelper; use vortex_buffer::Buffer; use vortex_buffer::ByteBuffer; use vortex_buffer::ByteBufferMut; diff --git a/encodings/fsst/src/compute/compare.rs b/encodings/fsst/src/compute/compare.rs index a7bdfeeeb4d..f88fdb3e550 100644 --- a/encodings/fsst/src/compute/compare.rs +++ b/encodings/fsst/src/compute/compare.rs @@ -124,7 +124,6 @@ fn compare_fsst_constant( #[cfg(test)] mod tests { - use vortex_array::DynArray; use vortex_array::IntoArray; use vortex_array::ToCanonical; use vortex_array::arrays::BoolArray; diff --git a/encodings/pco/src/array.rs b/encodings/pco/src/array.rs index c1f7710a162..3de987b5b10 100644 --- a/encodings/pco/src/array.rs +++ b/encodings/pco/src/array.rs @@ -43,7 +43,6 @@ use vortex_array::vtable::Array; use vortex_array::vtable::ArrayId; use vortex_array::vtable::OperationsVTable; use vortex_array::vtable::VTable; -use vortex_array::vtable::ValidityHelper; use vortex_array::vtable::ValiditySliceHelper; use vortex_array::vtable::ValidityVTableFromValiditySliceHelper; use vortex_array::vtable::validity_nchildren; @@ -616,7 +615,6 @@ mod tests { use vortex_buffer::buffer; use crate::Pco; - use crate::PcoArray; #[test] fn test_slice_nullable() { diff --git a/encodings/pco/src/compute/cast.rs b/encodings/pco/src/compute/cast.rs index d11dcabddf0..211b7f8c65f 100644 --- a/encodings/pco/src/compute/cast.rs +++ b/encodings/pco/src/compute/cast.rs @@ -63,7 +63,6 @@ mod tests { use vortex_buffer::buffer; use crate::Pco; - use crate::PcoArray; #[test] fn test_cast_pco_f32_to_f64() { diff --git a/encodings/pco/src/test.rs b/encodings/pco/src/test.rs index d4fab23824a..5e4dbdfc3dd 100644 --- a/encodings/pco/src/test.rs +++ b/encodings/pco/src/test.rs @@ -23,7 +23,6 @@ use vortex_array::serde::SerializeOptions; use vortex_array::session::ArraySession; use vortex_array::session::ArraySessionExt; use vortex_array::validity::Validity; -use vortex_array::vtable::ValidityHelper; use vortex_buffer::Buffer; use vortex_buffer::BufferMut; use vortex_error::VortexExpect; diff --git a/encodings/runend/src/arrow.rs b/encodings/runend/src/arrow.rs index 34ad4121bdf..82eb837f48f 100644 --- a/encodings/runend/src/arrow.rs +++ b/encodings/runend/src/arrow.rs @@ -79,7 +79,6 @@ mod tests { use vortex_error::VortexResult; use vortex_session::VortexSession; - use crate::RunEnd; use crate::RunEndData; static SESSION: LazyLock = diff --git a/encodings/runend/src/compress.rs b/encodings/runend/src/compress.rs index d2b711767f3..c36413059da 100644 --- a/encodings/runend/src/compress.rs +++ b/encodings/runend/src/compress.rs @@ -18,7 +18,6 @@ use vortex_array::match_each_native_ptype; use vortex_array::match_each_unsigned_integer_ptype; use vortex_array::scalar::Scalar; use vortex_array::validity::Validity; -use vortex_array::vtable::ValidityHelper; use vortex_buffer::BitBuffer; use vortex_buffer::BitBufferMut; use vortex_buffer::Buffer; diff --git a/encodings/runend/src/compute/take.rs b/encodings/runend/src/compute/take.rs index fb46f063bdc..d3d4bc77ff2 100644 --- a/encodings/runend/src/compute/take.rs +++ b/encodings/runend/src/compute/take.rs @@ -15,7 +15,6 @@ use vortex_array::search_sorted::SearchResult; use vortex_array::search_sorted::SearchSorted; use vortex_array::search_sorted::SearchSortedSide; use vortex_array::validity::Validity; -use vortex_array::vtable::ValidityHelper; use vortex_buffer::Buffer; use vortex_error::VortexResult; use vortex_error::vortex_bail; diff --git a/encodings/sequence/src/compute/list_contains.rs b/encodings/sequence/src/compute/list_contains.rs index 00c9c54331e..21f0fd4aacc 100644 --- a/encodings/sequence/src/compute/list_contains.rs +++ b/encodings/sequence/src/compute/list_contains.rs @@ -51,7 +51,6 @@ impl ListContainsElementReduce for Sequence { mod tests { use std::sync::Arc; - use vortex_array::DynArray; use vortex_array::IntoArray; use vortex_array::arrays::BoolArray; use vortex_array::assert_arrays_eq; diff --git a/encodings/sparse/src/canonical.rs b/encodings/sparse/src/canonical.rs index 895868f931e..8c7e1969c9f 100644 --- a/encodings/sparse/src/canonical.rs +++ b/encodings/sparse/src/canonical.rs @@ -40,7 +40,6 @@ use vortex_array::scalar::ListScalar; use vortex_array::scalar::Scalar; use vortex_array::scalar::StructScalar; use vortex_array::validity::Validity; -use vortex_array::vtable::ValidityHelper; use vortex_buffer::BitBuffer; use vortex_buffer::Buffer; use vortex_buffer::BufferString; diff --git a/encodings/sparse/src/ops.rs b/encodings/sparse/src/ops.rs index 01f6ec702b1..940573f879f 100644 --- a/encodings/sparse/src/ops.rs +++ b/encodings/sparse/src/ops.rs @@ -30,7 +30,6 @@ mod tests { use vortex_array::assert_arrays_eq; use vortex_buffer::buffer; - use super::*; use crate::Sparse; #[test] diff --git a/encodings/zigzag/src/compress.rs b/encodings/zigzag/src/compress.rs index 09dde567f1b..20c3aed794f 100644 --- a/encodings/zigzag/src/compress.rs +++ b/encodings/zigzag/src/compress.rs @@ -6,7 +6,6 @@ use vortex_array::arrays::PrimitiveArray; use vortex_array::dtype::NativePType; use vortex_array::dtype::PType; use vortex_array::validity::Validity; -use vortex_array::vtable::ValidityHelper; use vortex_buffer::BufferMut; use vortex_error::VortexResult; use vortex_error::vortex_bail; diff --git a/encodings/zstd/src/array.rs b/encodings/zstd/src/array.rs index 8fe2c95ffe7..525e931025f 100644 --- a/encodings/zstd/src/array.rs +++ b/encodings/zstd/src/array.rs @@ -37,7 +37,6 @@ use vortex_array::vtable::Array; use vortex_array::vtable::ArrayId; use vortex_array::vtable::OperationsVTable; use vortex_array::vtable::VTable; -use vortex_array::vtable::ValidityHelper; use vortex_array::vtable::ValiditySliceHelper; use vortex_array::vtable::ValidityVTableFromValiditySliceHelper; use vortex_array::vtable::validity_nchildren; diff --git a/encodings/zstd/src/compute/cast.rs b/encodings/zstd/src/compute/cast.rs index 65deefc7056..02d7ba436ef 100644 --- a/encodings/zstd/src/compute/cast.rs +++ b/encodings/zstd/src/compute/cast.rs @@ -92,7 +92,6 @@ mod tests { use vortex_buffer::buffer; use crate::Zstd; - use crate::ZstdArray; #[test] fn test_cast_zstd_i32_to_i64() { diff --git a/encodings/zstd/src/test.rs b/encodings/zstd/src/test.rs index a55c2194367..0574b70ddd6 100644 --- a/encodings/zstd/src/test.rs +++ b/encodings/zstd/src/test.rs @@ -15,13 +15,11 @@ use vortex_array::assert_nth_scalar; use vortex_array::dtype::DType; use vortex_array::dtype::Nullability; use vortex_array::validity::Validity; -use vortex_array::vtable::ValidityHelper; use vortex_buffer::Alignment; use vortex_buffer::Buffer; use vortex_mask::Mask; use crate::Zstd; -use crate::ZstdArray; #[test] fn test_zstd_compress_decompress() { diff --git a/fuzz/src/array/fill_null.rs b/fuzz/src/array/fill_null.rs index 4430c011e3a..23a58b494f8 100644 --- a/fuzz/src/array/fill_null.rs +++ b/fuzz/src/array/fill_null.rs @@ -18,7 +18,6 @@ use vortex_array::match_each_decimal_value_type; use vortex_array::match_each_native_ptype; use vortex_array::scalar::Scalar; use vortex_array::validity::Validity; -use vortex_array::vtable::ValidityHelper; use vortex_buffer::Buffer; use vortex_buffer::BufferMut; use vortex_error::VortexExpect; diff --git a/fuzz/src/array/mask.rs b/fuzz/src/array/mask.rs index 1ebb13d9abd..3b239421592 100644 --- a/fuzz/src/array/mask.rs +++ b/fuzz/src/array/mask.rs @@ -17,7 +17,6 @@ use vortex_array::arrays::VarBinViewArray; use vortex_array::dtype::Nullability; use vortex_array::match_each_decimal_value_type; use vortex_array::validity::Validity; -use vortex_array::vtable::ValidityHelper; use vortex_error::VortexExpect; use vortex_error::VortexResult; use vortex_mask::AllOr; diff --git a/vortex-array/src/arrays/assertions.rs b/vortex-array/src/arrays/assertions.rs index 848a67f4735..c152dab1a93 100644 --- a/vortex-array/src/arrays/assertions.rs +++ b/vortex-array/src/arrays/assertions.rs @@ -44,7 +44,6 @@ macro_rules! assert_nth_scalar { macro_rules! assert_nth_scalar_is_null { ($arr:expr, $n:expr) => {{ use $crate::DynArray as _; - use $crate::IntoArray as _; let arr_ref: $crate::ArrayRef = $crate::IntoArray::into_array($arr.clone()); assert!( arr_ref.scalar_at($n).unwrap().is_null(), diff --git a/vortex-array/src/arrays/bool/compute/take.rs b/vortex-array/src/arrays/bool/compute/take.rs index 75233a1b4e3..e419d62532b 100644 --- a/vortex-array/src/arrays/bool/compute/take.rs +++ b/vortex-array/src/arrays/bool/compute/take.rs @@ -82,7 +82,6 @@ mod test { use rstest::rstest; use vortex_buffer::buffer; - use crate::DynArray; use crate::IntoArray as _; use crate::ToCanonical; use crate::arrays::BoolArray; diff --git a/vortex-array/src/arrays/bool/vtable/operations.rs b/vortex-array/src/arrays/bool/vtable/operations.rs index 98e93121959..8afb0a3fd5d 100644 --- a/vortex-array/src/arrays/bool/vtable/operations.rs +++ b/vortex-array/src/arrays/bool/vtable/operations.rs @@ -26,7 +26,6 @@ impl OperationsVTable for Bool { mod tests { use std::iter; - use super::*; use crate::IntoArray; use crate::ToCanonical; use crate::arrays::BoolArray; diff --git a/vortex-array/src/arrays/chunked/compute/zip.rs b/vortex-array/src/arrays/chunked/compute/zip.rs index 30023abe739..72fa236461e 100644 --- a/vortex-array/src/arrays/chunked/compute/zip.rs +++ b/vortex-array/src/arrays/chunked/compute/zip.rs @@ -58,7 +58,6 @@ mod tests { use crate::dtype::DType; use crate::dtype::Nullability; use crate::dtype::PType; - use crate::vtable::Array; #[test] fn test_chunked_zip_aligns_across_boundaries() { diff --git a/vortex-array/src/arrays/constant/vtable/canonical.rs b/vortex-array/src/arrays/constant/vtable/canonical.rs index bcc10adcb12..20268519d0c 100644 --- a/vortex-array/src/arrays/constant/vtable/canonical.rs +++ b/vortex-array/src/arrays/constant/vtable/canonical.rs @@ -335,7 +335,6 @@ mod tests { use crate::expr::stats::StatsProvider; use crate::scalar::Scalar; use crate::validity::Validity; - use crate::vtable::ValidityHelper; #[test] fn test_canonicalize_null() { diff --git a/vortex-array/src/arrays/datetime/test.rs b/vortex-array/src/arrays/datetime/test.rs index f9167c6463f..ea0609ffe09 100644 --- a/vortex-array/src/arrays/datetime/test.rs +++ b/vortex-array/src/arrays/datetime/test.rs @@ -22,8 +22,6 @@ use crate::extension::datetime::TimestampOptions; use crate::hash::ArrayEq; use crate::scalar::Scalar; use crate::validity::Validity; -use crate::vtable::ValidityHelper; - macro_rules! test_temporal_roundtrip { ($prim:ty, $constructor:expr, $unit:expr) => {{ let array = buffer![100 as $prim].into_array(); diff --git a/vortex-array/src/arrays/decimal/compute/cast.rs b/vortex-array/src/arrays/decimal/compute/cast.rs index 21603124e1c..5b36a872ac2 100644 --- a/vortex-array/src/arrays/decimal/compute/cast.rs +++ b/vortex-array/src/arrays/decimal/compute/cast.rs @@ -156,7 +156,6 @@ mod tests { use crate::dtype::DecimalType; use crate::dtype::Nullability; use crate::validity::Validity; - use crate::vtable::ValidityHelper; #[test] fn cast_decimal_to_nullable() { diff --git a/vortex-array/src/arrays/dict/compute/slice.rs b/vortex-array/src/arrays/dict/compute/slice.rs index 538f40046aa..1c2f544a155 100644 --- a/vortex-array/src/arrays/dict/compute/slice.rs +++ b/vortex-array/src/arrays/dict/compute/slice.rs @@ -49,7 +49,6 @@ mod tests { use vortex_buffer::buffer; use vortex_error::VortexResult; - use crate::DynArray; use crate::IntoArray; use crate::arrays::DictArray; use crate::arrays::PrimitiveArray; diff --git a/vortex-array/src/arrays/dict/tests.rs b/vortex-array/src/arrays/dict/tests.rs index a404e9ef06d..bc69998b0de 100644 --- a/vortex-array/src/arrays/dict/tests.rs +++ b/vortex-array/src/arrays/dict/tests.rs @@ -4,7 +4,6 @@ use vortex_buffer::buffer; use super::DictArray; -use crate::DynArray; use crate::IntoArray; use crate::arrays::BoolArray; use crate::arrays::ListArray; diff --git a/vortex-array/src/arrays/listview/conversion.rs b/vortex-array/src/arrays/listview/conversion.rs index 4be91eec2a4..c9dd620c37a 100644 --- a/vortex-array/src/arrays/listview/conversion.rs +++ b/vortex-array/src/arrays/listview/conversion.rs @@ -305,7 +305,6 @@ mod tests { use crate::assert_arrays_eq; use crate::dtype::FieldNames; use crate::validity::Validity; - use crate::vtable::ValidityHelper; #[test] fn test_list_to_listview_basic() -> VortexResult<()> { diff --git a/vortex-array/src/arrays/listview/rebuild.rs b/vortex-array/src/arrays/listview/rebuild.rs index 053693e975c..0456d2db619 100644 --- a/vortex-array/src/arrays/listview/rebuild.rs +++ b/vortex-array/src/arrays/listview/rebuild.rs @@ -381,7 +381,6 @@ mod tests { use crate::assert_arrays_eq; use crate::dtype::Nullability; use crate::validity::Validity; - use crate::vtable::ValidityHelper; #[test] fn test_rebuild_flatten_removes_overlaps() -> VortexResult<()> { diff --git a/vortex-array/src/arrays/masked/vtable/canonical.rs b/vortex-array/src/arrays/masked/vtable/canonical.rs index f56896bc981..f0a995c9875 100644 --- a/vortex-array/src/arrays/masked/vtable/canonical.rs +++ b/vortex-array/src/arrays/masked/vtable/canonical.rs @@ -8,7 +8,6 @@ mod tests { use crate::DynArray; use crate::IntoArray; - use crate::ToCanonical; use crate::arrays::MaskedArray; use crate::arrays::PrimitiveArray; use crate::dtype::Nullability; diff --git a/vortex-array/src/arrays/primitive/compute/cast.rs b/vortex-array/src/arrays/primitive/compute/cast.rs index e5691288875..960c864f446 100644 --- a/vortex-array/src/arrays/primitive/compute/cast.rs +++ b/vortex-array/src/arrays/primitive/compute/cast.rs @@ -144,7 +144,6 @@ mod test { use crate::dtype::Nullability; use crate::dtype::PType; use crate::validity::Validity; - use crate::vtable::ValidityHelper; #[allow(clippy::cognitive_complexity)] #[test] diff --git a/vortex-array/src/builders/bool.rs b/vortex-array/src/builders/bool.rs index a4ffbef92af..f5ff6a49f79 100644 --- a/vortex-array/src/builders/bool.rs +++ b/vortex-array/src/builders/bool.rs @@ -160,7 +160,6 @@ mod tests { use crate::dtype::DType; use crate::dtype::Nullability; use crate::scalar::Scalar; - use crate::vtable::ValidityHelper; fn make_opt_bool_chunks(len: usize, chunk_count: usize) -> ArrayRef { let mut rng = StdRng::seed_from_u64(0); diff --git a/vortex-array/src/builders/dict/primitive.rs b/vortex-array/src/builders/dict/primitive.rs index 911c17ed09e..ca42a61bcf6 100644 --- a/vortex-array/src/builders/dict/primitive.rs +++ b/vortex-array/src/builders/dict/primitive.rs @@ -157,7 +157,6 @@ mod test { use itertools::Itertools; use vortex_buffer::buffer; - use crate::DynArray; use crate::IntoArray as _; use crate::assert_arrays_eq; use crate::builders::dict::dict_encode; diff --git a/vortex-array/src/builders/fixed_size_list.rs b/vortex-array/src/builders/fixed_size_list.rs index c7ecf0a59b4..cbe661d917b 100644 --- a/vortex-array/src/builders/fixed_size_list.rs +++ b/vortex-array/src/builders/fixed_size_list.rs @@ -287,7 +287,6 @@ mod tests { use crate::dtype::PType::I32; use crate::scalar::Scalar; use crate::validity::Validity; - use crate::vtable::ValidityHelper; #[test] fn test_empty() { diff --git a/vortex-array/src/builders/list.rs b/vortex-array/src/builders/list.rs index 72d285b62ec..ad7196d3f1f 100644 --- a/vortex-array/src/builders/list.rs +++ b/vortex-array/src/builders/list.rs @@ -330,7 +330,6 @@ mod tests { use crate::executor::VortexSessionExecute; use crate::scalar::Scalar; use crate::validity::Validity; - use crate::vtable::ValidityHelper; #[test] fn test_empty() { diff --git a/vortex-array/src/builders/listview.rs b/vortex-array/src/builders/listview.rs index c8e4044c915..6a62275aa58 100644 --- a/vortex-array/src/builders/listview.rs +++ b/vortex-array/src/builders/listview.rs @@ -441,7 +441,6 @@ mod tests { use crate::dtype::Nullability::Nullable; use crate::dtype::PType::I32; use crate::scalar::Scalar; - use crate::vtable::ValidityHelper; #[test] fn test_empty() { diff --git a/vortex-array/src/builders/primitive.rs b/vortex-array/src/builders/primitive.rs index 9a6957f9350..e103e39afd1 100644 --- a/vortex-array/src/builders/primitive.rs +++ b/vortex-array/src/builders/primitive.rs @@ -611,7 +611,6 @@ mod tests { // values[2] might be any value since it's null. // Check validity - first two should be valid, third should be null. - use crate::vtable::ValidityHelper; assert!(array.validity().is_valid(0).unwrap()); assert!(array.validity().is_valid(1).unwrap()); assert!(!array.validity().is_valid(2).unwrap()); diff --git a/vortex-array/src/scalar_fn/fns/list_contains/mod.rs b/vortex-array/src/scalar_fn/fns/list_contains/mod.rs index b83826cd35f..c924af2f576 100644 --- a/vortex-array/src/scalar_fn/fns/list_contains/mod.rs +++ b/vortex-array/src/scalar_fn/fns/list_contains/mod.rs @@ -296,6 +296,8 @@ fn list_contains_scalar( Operator::Eq, &[elems.clone(), rhs.clone().into_array()], )?; + + // TODO(ngates): we should execute this into a Columnar and check for constant. let matches = matching_elements.execute::(ctx)?; // Fast path: no elements match. diff --git a/vortex-array/src/scalar_fn/fns/pack.rs b/vortex-array/src/scalar_fn/fns/pack.rs index 42741d2476f..37a00e61aeb 100644 --- a/vortex-array/src/scalar_fn/fns/pack.rs +++ b/vortex-array/src/scalar_fn/fns/pack.rs @@ -177,7 +177,6 @@ mod tests { use crate::scalar_fn::ScalarFnVTableExt; use crate::scalar_fn::fns::pack::StructArray; use crate::validity::Validity; - use crate::vtable::ValidityHelper; fn test_array() -> ArrayRef { StructArray::from_fields(&[ diff --git a/vortex-array/src/vtable/typed.rs b/vortex-array/src/vtable/typed.rs index 8f213927e85..be39089d285 100644 --- a/vortex-array/src/vtable/typed.rs +++ b/vortex-array/src/vtable/typed.rs @@ -210,6 +210,7 @@ impl Array { } /// If this array is a constant, returns the scalar value. + // TODO(ngates): remove this... we already know if we're constant or not pub fn as_constant(&self) -> Option { self.to_array_ref().as_constant() } diff --git a/vortex-btrblocks/src/canonical_compressor.rs b/vortex-btrblocks/src/canonical_compressor.rs index ab679ca2854..113ec639b01 100644 --- a/vortex-btrblocks/src/canonical_compressor.rs +++ b/vortex-btrblocks/src/canonical_compressor.rs @@ -319,7 +319,6 @@ impl CanonicalCompressor for BtrBlocksCompressor { #[cfg(test)] mod tests { use rstest::rstest; - use vortex_array::DynArray; use vortex_array::IntoArray; use vortex_array::arrays::List; use vortex_array::arrays::ListView; diff --git a/vortex-btrblocks/src/compressor/integer/mod.rs b/vortex-btrblocks/src/compressor/integer/mod.rs index f250717bab9..8a191a88204 100644 --- a/vortex-btrblocks/src/compressor/integer/mod.rs +++ b/vortex-btrblocks/src/compressor/integer/mod.rs @@ -893,7 +893,6 @@ mod tests { use vortex_array::arrays::PrimitiveArray; use vortex_array::assert_arrays_eq; use vortex_array::validity::Validity; - use vortex_array::vtable::ValidityHelper; use vortex_buffer::Buffer; use vortex_buffer::BufferMut; use vortex_buffer::buffer; diff --git a/vortex-cuda/src/arrow/canonical.rs b/vortex-cuda/src/arrow/canonical.rs index d04d2693996..e1c63057ad9 100644 --- a/vortex-cuda/src/arrow/canonical.rs +++ b/vortex-cuda/src/arrow/canonical.rs @@ -12,7 +12,6 @@ use vortex::array::arrays::decimal::DecimalArrayParts; use vortex::array::arrays::primitive::PrimitiveArrayParts; use vortex::array::arrays::struct_::StructArrayParts; use vortex::array::buffer::BufferHandle; -use vortex::array::vtable::ValidityHelper; use vortex::dtype::DecimalType; use vortex::error::VortexResult; use vortex::error::vortex_bail; diff --git a/vortex-cuda/src/kernel/patches/mod.rs b/vortex-cuda/src/kernel/patches/mod.rs index bb45220535e..9da4ddf8f51 100644 --- a/vortex-cuda/src/kernel/patches/mod.rs +++ b/vortex-cuda/src/kernel/patches/mod.rs @@ -15,7 +15,6 @@ use tracing::instrument; use vortex::array::arrays::primitive::PrimitiveArrayParts; use vortex::array::patches::Patches; use vortex::array::validity::Validity; -use vortex::array::vtable::ValidityHelper; use vortex::dtype::NativePType; use vortex::error::VortexResult; use vortex::error::vortex_ensure; diff --git a/vortex-duckdb/src/e2e_test/vortex_scan_test.rs b/vortex-duckdb/src/e2e_test/vortex_scan_test.rs index 8bf69cda5aa..4e03cd07cd7 100644 --- a/vortex-duckdb/src/e2e_test/vortex_scan_test.rs +++ b/vortex-duckdb/src/e2e_test/vortex_scan_test.rs @@ -38,7 +38,6 @@ use vortex::scalar::PValue; use vortex::scalar::Scalar; use vortex_runend::RunEnd; use vortex_sequence::Sequence; -use vortex_sequence::SequenceArray; use crate::RUNTIME; use crate::SESSION; diff --git a/vortex-duckdb/src/exporter/mod.rs b/vortex-duckdb/src/exporter/mod.rs index db147361065..d69b0275f1d 100644 --- a/vortex-duckdb/src/exporter/mod.rs +++ b/vortex-duckdb/src/exporter/mod.rs @@ -31,7 +31,6 @@ use vortex::array::arrays::Dict; use vortex::array::arrays::List; use vortex::array::arrays::StructArray; use vortex::array::arrays::TemporalArray; -use vortex::array::vtable::ValidityHelper; use vortex::encodings::runend::RunEnd; use vortex::encodings::sequence::Sequence; use vortex::error::VortexResult; diff --git a/vortex-duckdb/src/exporter/primitive.rs b/vortex-duckdb/src/exporter/primitive.rs index 5e4a3f7e121..c5167880b59 100644 --- a/vortex-duckdb/src/exporter/primitive.rs +++ b/vortex-duckdb/src/exporter/primitive.rs @@ -6,7 +6,6 @@ use std::marker::PhantomData; use vortex::array::ExecutionCtx; use vortex::array::arrays::PrimitiveArray; use vortex::array::match_each_native_ptype; -use vortex::array::vtable::ValidityHelper; use vortex::dtype::NativePType; use vortex::error::VortexResult; use vortex::mask::Mask; diff --git a/vortex-layout/src/layouts/struct_/reader.rs b/vortex-layout/src/layouts/struct_/reader.rs index bb069df9723..16a3841f1d1 100644 --- a/vortex-layout/src/layouts/struct_/reader.rs +++ b/vortex-layout/src/layouts/struct_/reader.rs @@ -30,7 +30,6 @@ use vortex_array::expr::transform::replace; use vortex_array::expr::transform::replace_root_fields; use vortex_array::scalar_fn::fns::merge::Merge; use vortex_array::scalar_fn::fns::pack::Pack; -use vortex_array::vtable::ValidityHelper; use vortex_error::VortexExpect; use vortex_error::VortexResult; use vortex_error::vortex_err; diff --git a/vortex/src/lib.rs b/vortex/src/lib.rs index c5f53d4bc90..093ca04fd8c 100644 --- a/vortex/src/lib.rs +++ b/vortex/src/lib.rs @@ -197,7 +197,6 @@ mod test { use vortex_array::expr::select; use vortex_array::stream::ArrayStreamExt; use vortex_array::validity::Validity; - use vortex_array::vtable::ValidityHelper; use vortex_buffer::buffer; use vortex_error::VortexResult; use vortex_file::OpenOptionsSessionExt; From 4b8ff855302293b400a547dbb9226fbbdb5bf1cd Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Mon, 30 Mar 2026 18:20:18 +0100 Subject: [PATCH 09/11] Array VTables 5 Signed-off-by: Nicholas Gates --- .../fastlanes/src/bitpacking/vtable/operations.rs | 2 -- java/testfiles/src/main.rs | 15 ++++++++++----- vortex-cuda/src/hybrid_dispatch/mod.rs | 2 +- vortex/benches/common_encoding_tree_throughput.rs | 1 - 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/encodings/fastlanes/src/bitpacking/vtable/operations.rs b/encodings/fastlanes/src/bitpacking/vtable/operations.rs index 51bab422ecc..b14b8dbfd24 100644 --- a/encodings/fastlanes/src/bitpacking/vtable/operations.rs +++ b/encodings/fastlanes/src/bitpacking/vtable/operations.rs @@ -30,7 +30,6 @@ impl OperationsVTable for BitPacked { #[cfg(test)] mod test { use std::ops::Range; - use vortex_array::ArrayRef; use vortex_array::DynArray; @@ -45,7 +44,6 @@ mod test { use vortex_array::dtype::PType; use vortex_array::patches::Patches; use vortex_array::scalar::Scalar; - use vortex_array::validity::Validity; use vortex_buffer::Alignment; use vortex_buffer::Buffer; diff --git a/java/testfiles/src/main.rs b/java/testfiles/src/main.rs index 206db638726..a1390156fa3 100644 --- a/java/testfiles/src/main.rs +++ b/java/testfiles/src/main.rs @@ -5,16 +5,20 @@ use std::path::Path; +use vortex::VortexSessionDefault; use vortex::array::arrays::StructArray; -use vortex::array::builders::{ArrayBuilder, DecimalBuilder, VarBinViewBuilder}; +use vortex::array::builders::ArrayBuilder; +use vortex::array::builders::DecimalBuilder; +use vortex::array::builders::VarBinViewBuilder; use vortex::array::validity::Validity; -use vortex::dtype::{DType, DecimalDType, Nullability}; +use vortex::dtype::DType; +use vortex::dtype::DecimalDType; +use vortex::dtype::Nullability; use vortex::file::WriteOptionsSessionExt; -use vortex::io::runtime::current::CurrentThreadRuntime; use vortex::io::runtime::BlockingRuntime; +use vortex::io::runtime::current::CurrentThreadRuntime; use vortex::io::session::RuntimeSessionExt; use vortex::session::VortexSession; -use vortex::VortexSessionDefault; /// Generate a test dataset with the following small set of rows: /// @@ -74,7 +78,8 @@ fn main() { 10, Validity::NonNullable, ) - .expect("Could not create struct array"); + .expect("Could not create struct array") + .to_array_ref(); // Save to file let minimal_path = Path::new(env!("CARGO_MANIFEST_DIR")) diff --git a/vortex-cuda/src/hybrid_dispatch/mod.rs b/vortex-cuda/src/hybrid_dispatch/mod.rs index fd7ba7617a2..301e3c4efab 100644 --- a/vortex-cuda/src/hybrid_dispatch/mod.rs +++ b/vortex-cuda/src/hybrid_dispatch/mod.rs @@ -88,7 +88,7 @@ pub async fn try_gpu_dispatch( // TODO(0ax1): execute subtrees concurrently using separate CUDA streams. for subtree in &pending_subtrees { let canonical = subtree.clone().execute_cuda(ctx).await?; - subtree_buffers.push(canonical.into_primitive().into_parts().buffer); + subtree_buffers.push(canonical.into_primitive().into_data().into_parts().buffer); } let num_subtrees = subtree_buffers.len(); diff --git a/vortex/benches/common_encoding_tree_throughput.rs b/vortex/benches/common_encoding_tree_throughput.rs index b8c31b6a282..79b1cf5a894 100644 --- a/vortex/benches/common_encoding_tree_throughput.rs +++ b/vortex/benches/common_encoding_tree_throughput.rs @@ -23,7 +23,6 @@ use vortex::array::arrays::TemporalArray; use vortex::array::arrays::VarBinArray; use vortex::array::arrays::VarBinViewArray; use vortex::array::builtins::ArrayBuiltins; -use vortex::array::vtable::ValidityHelper; use vortex::dtype::DType; use vortex::dtype::PType; use vortex::encodings::alp::ALP; From 41b3f5244194d8ce4a79281da083c8f4603f7b65 Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Mon, 30 Mar 2026 18:24:04 +0100 Subject: [PATCH 10/11] Array VTables 5 Signed-off-by: Nicholas Gates --- encodings/fastlanes/src/delta/array/mod.rs | 4 +- vortex-array/public-api.lock | 62 +--------------------- 2 files changed, 3 insertions(+), 63 deletions(-) diff --git a/encodings/fastlanes/src/delta/array/mod.rs b/encodings/fastlanes/src/delta/array/mod.rs index 7e65ec3591b..b9c0f3f6ff1 100644 --- a/encodings/fastlanes/src/delta/array/mod.rs +++ b/encodings/fastlanes/src/delta/array/mod.rs @@ -19,7 +19,7 @@ pub mod delta_decompress; /// A FastLanes-style delta-encoded array of primitive values. /// -/// A [`DeltaArray`] comprises a sequence of _chunks_ each representing exactly 1,024 +/// A DeltaArray comprises a sequence of _chunks_ each representing exactly 1,024 /// delta-encoded values. If the input array length is not a multiple of 1,024, the last chunk /// is padded with zeros to fill a complete 1,024-element chunk. /// @@ -77,7 +77,7 @@ impl DeltaData { Self::try_new(bases.into_array(), deltas.into_array(), 0, logical_len) } - /// Create a [`DeltaArray`] from the given `bases` and `deltas` arrays + /// Create a DeltaArray from the given `bases` and `deltas` arrays /// with given `offset` into first chunk and `logical_len` length. pub fn try_new( bases: ArrayRef, diff --git a/vortex-array/public-api.lock b/vortex-array/public-api.lock index e10bd5b868b..46f0fc44011 100644 --- a/vortex-array/public-api.lock +++ b/vortex-array/public-api.lock @@ -3470,18 +3470,6 @@ impl vortex_array::IntoArray for vortex_array::arrays::ScalarFnData pub fn vortex_array::arrays::ScalarFnData::into_array(self) -> vortex_array::ArrayRef -impl vortex_array::scalar_fn::ReduceNode for vortex_array::arrays::ScalarFnData - -pub fn vortex_array::arrays::ScalarFnData::as_any(&self) -> &dyn core::any::Any - -pub fn vortex_array::arrays::ScalarFnData::child(&self, idx: usize) -> vortex_array::scalar_fn::ReduceNodeRef - -pub fn vortex_array::arrays::ScalarFnData::child_count(&self) -> usize - -pub fn vortex_array::arrays::ScalarFnData::node_dtype(&self) -> vortex_error::VortexResult - -pub fn vortex_array::arrays::ScalarFnData::scalar_fn(&self) -> core::option::Option<&vortex_array::scalar_fn::ScalarFnRef> - pub struct vortex_array::arrays::scalar_fn::ScalarFnVTable impl core::clone::Clone for vortex_array::arrays::scalar_fn::ScalarFnVTable @@ -6786,18 +6774,6 @@ impl vortex_array::IntoArray for vortex_array::arrays::ScalarFnData pub fn vortex_array::arrays::ScalarFnData::into_array(self) -> vortex_array::ArrayRef -impl vortex_array::scalar_fn::ReduceNode for vortex_array::arrays::ScalarFnData - -pub fn vortex_array::arrays::ScalarFnData::as_any(&self) -> &dyn core::any::Any - -pub fn vortex_array::arrays::ScalarFnData::child(&self, idx: usize) -> vortex_array::scalar_fn::ReduceNodeRef - -pub fn vortex_array::arrays::ScalarFnData::child_count(&self) -> usize - -pub fn vortex_array::arrays::ScalarFnData::node_dtype(&self) -> vortex_error::VortexResult - -pub fn vortex_array::arrays::ScalarFnData::scalar_fn(&self) -> core::option::Option<&vortex_array::scalar_fn::ScalarFnRef> - pub struct vortex_array::arrays::ScalarFnVTable impl core::clone::Clone for vortex_array::arrays::scalar_fn::ScalarFnVTable @@ -18654,30 +18630,6 @@ pub fn vortex_array::ArrayRef::node_dtype(&self) -> vortex_error::VortexResult core::option::Option<&vortex_array::scalar_fn::ScalarFnRef> -impl vortex_array::scalar_fn::ReduceNode for vortex_array::arrays::ScalarFnData - -pub fn vortex_array::arrays::ScalarFnData::as_any(&self) -> &dyn core::any::Any - -pub fn vortex_array::arrays::ScalarFnData::child(&self, idx: usize) -> vortex_array::scalar_fn::ReduceNodeRef - -pub fn vortex_array::arrays::ScalarFnData::child_count(&self) -> usize - -pub fn vortex_array::arrays::ScalarFnData::node_dtype(&self) -> vortex_error::VortexResult - -pub fn vortex_array::arrays::ScalarFnData::scalar_fn(&self) -> core::option::Option<&vortex_array::scalar_fn::ScalarFnRef> - -impl vortex_array::scalar_fn::ReduceNode for vortex_array::vtable::Array - -pub fn vortex_array::vtable::Array::as_any(&self) -> &dyn core::any::Any - -pub fn vortex_array::vtable::Array::child(&self, idx: usize) -> vortex_array::scalar_fn::ReduceNodeRef - -pub fn vortex_array::vtable::Array::child_count(&self) -> usize - -pub fn vortex_array::vtable::Array::node_dtype(&self) -> vortex_error::VortexResult - -pub fn vortex_array::vtable::Array::scalar_fn(&self) -> core::option::Option<&vortex_array::scalar_fn::ScalarFnRef> - pub trait vortex_array::scalar_fn::ScalarFnPlugin: 'static + core::marker::Send + core::marker::Sync pub fn vortex_array::scalar_fn::ScalarFnPlugin::deserialize(&self, metadata: &[u8], session: &vortex_session::VortexSession) -> vortex_error::VortexResult @@ -20674,18 +20626,6 @@ impl vortex_array::IntoArray for vortex_array:: pub fn vortex_array::vtable::Array::into_array(self) -> vortex_array::ArrayRef -impl vortex_array::scalar_fn::ReduceNode for vortex_array::vtable::Array - -pub fn vortex_array::vtable::Array::as_any(&self) -> &dyn core::any::Any - -pub fn vortex_array::vtable::Array::child(&self, idx: usize) -> vortex_array::scalar_fn::ReduceNodeRef - -pub fn vortex_array::vtable::Array::child_count(&self) -> usize - -pub fn vortex_array::vtable::Array::node_dtype(&self) -> vortex_error::VortexResult - -pub fn vortex_array::vtable::Array::scalar_fn(&self) -> core::option::Option<&vortex_array::scalar_fn::ScalarFnRef> - pub struct vortex_array::vtable::NotSupported impl vortex_array::vtable::OperationsVTable for vortex_array::vtable::NotSupported @@ -23910,7 +23850,7 @@ pub type vortex_array::ProstMetadata::Output = M pub fn vortex_array::ProstMetadata::deserialize(metadata: &[u8]) -> vortex_error::VortexResult -pub trait vortex_array::DynArray: 'static + vortex_array::array::private::Sealed + core::marker::Send + core::marker::Sync + core::fmt::Debug + vortex_array::DynArrayEq + vortex_array::DynArrayHash + vortex_array::ArrayVisitor + vortex_array::scalar_fn::ReduceNode +pub trait vortex_array::DynArray: 'static + vortex_array::array::private::Sealed + core::marker::Send + core::marker::Sync + core::fmt::Debug + vortex_array::DynArrayEq + vortex_array::DynArrayHash + vortex_array::ArrayVisitor pub fn vortex_array::DynArray::all_invalid(&self) -> vortex_error::VortexResult From 617e8c7fe9b7ea2a77310fd60e7c4535ebc51868 Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Mon, 30 Mar 2026 22:34:16 +0100 Subject: [PATCH 11/11] Array VTables 5 Signed-off-by: Nicholas Gates --- encodings/alp/src/alp/array.rs | 2 +- encodings/datetime-parts/src/array.rs | 5 ++-- .../src/bitpacking/array/bitpack_compress.rs | 9 ++---- .../src/bitpacking/array/unpack_iter.rs | 2 +- encodings/fastlanes/src/delta/array/mod.rs | 2 +- vortex-array/src/arrays/chunked/array.rs | 12 ++++---- vortex-array/src/arrays/dict/array.rs | 4 +-- vortex-array/src/arrays/filter/array.rs | 2 +- .../src/arrays/fixed_size_list/array.rs | 18 +++++------ vortex-array/src/arrays/list/array.rs | 18 +++++------ vortex-array/src/arrays/listview/array.rs | 24 +++++++-------- .../src/arrays/listview/conversion.rs | 18 +++++------ .../src/arrays/primitive/array/mod.rs | 24 +++++++-------- vortex-array/src/arrays/struct_/array.rs | 26 ++++++++-------- vortex-array/src/arrays/varbin/array.rs | 30 +++++++++---------- vortex-array/src/arrays/varbinview/array.rs | 30 +++++++++---------- vortex-array/src/vtable/dyn_.rs | 3 +- 17 files changed, 112 insertions(+), 117 deletions(-) diff --git a/encodings/alp/src/alp/array.rs b/encodings/alp/src/alp/array.rs index 338e46cc98a..9901a52fe60 100644 --- a/encodings/alp/src/alp/array.rs +++ b/encodings/alp/src/alp/array.rs @@ -418,7 +418,7 @@ impl ALPData { /// buffer![0i32].into_array(), /// Exponents { e: 1, f: 1 }, /// None - /// ).unwrap()); + /// ).unwrap()).unwrap(); /// /// assert_eq!(value.scalar_at(0).unwrap(), 0f32.into()); /// ``` diff --git a/encodings/datetime-parts/src/array.rs b/encodings/datetime-parts/src/array.rs index 24bc8b80d34..c6c80d1e3de 100644 --- a/encodings/datetime-parts/src/array.rs +++ b/encodings/datetime-parts/src/array.rs @@ -16,6 +16,7 @@ use vortex_array::IntoArray; use vortex_array::Precision; use vortex_array::ProstMetadata; use vortex_array::SerializeMetadata; +use vortex_array::arrays::TemporalArray; use vortex_array::buffer::BufferHandle; use vortex_array::dtype::DType; use vortex_array::dtype::Nullability; @@ -279,9 +280,7 @@ impl DateTimeParts { } /// Construct a [`DateTimePartsArray`] from a [`TemporalArray`]. - pub fn try_from_temporal( - temporal: vortex_array::arrays::TemporalArray, - ) -> VortexResult { + pub fn try_from_temporal(temporal: TemporalArray) -> VortexResult { Array::try_from_data(DateTimePartsData::try_from(temporal)?) } } diff --git a/encodings/fastlanes/src/bitpacking/array/bitpack_compress.rs b/encodings/fastlanes/src/bitpacking/array/bitpack_compress.rs index 9bea2fe2197..f2d2c8f0e26 100644 --- a/encodings/fastlanes/src/bitpacking/array/bitpack_compress.rs +++ b/encodings/fastlanes/src/bitpacking/array/bitpack_compress.rs @@ -44,14 +44,9 @@ pub fn bitpack_encode( }; // Check array contains no negative values. - let array_ref = array.clone().into_array(); if array.ptype().is_signed_int() { let has_negative_values = match_each_integer_ptype!(array.ptype(), |P| { - array_ref - .statistics() - .compute_min::

() - .unwrap_or_default() - < 0 + array.statistics().compute_min::

().unwrap_or_default() < 0 }); if has_negative_values { vortex_bail!(InvalidArgument: "cannot bitpack_encode array containing negative integers") @@ -92,7 +87,7 @@ pub fn bitpack_encode( bitpacked .stats_set .to_ref(&*bp_ref) - .inherit_from(array_ref.statistics()); + .inherit_from(array.statistics()); } Ok(bitpacked) } diff --git a/encodings/fastlanes/src/bitpacking/array/unpack_iter.rs b/encodings/fastlanes/src/bitpacking/array/unpack_iter.rs index 1b698aae1a5..d14d218401c 100644 --- a/encodings/fastlanes/src/bitpacking/array/unpack_iter.rs +++ b/encodings/fastlanes/src/bitpacking/array/unpack_iter.rs @@ -54,7 +54,7 @@ impl> UnpackStrategy for BitPackingStr /// use lending_iterator::prelude::LendingIterator; /// use vortex_array::IntoArray; /// use vortex_buffer::buffer; -/// use vortex_fastlanes::BitPackedArray; +/// use vortex_fastlanes::BitPackedData; /// use vortex_fastlanes::unpack_iter::BitUnpackedChunks; /// /// let array = BitPackedData::encode(&buffer![2, 3, 4, 5].into_array(), 2).unwrap(); diff --git a/encodings/fastlanes/src/delta/array/mod.rs b/encodings/fastlanes/src/delta/array/mod.rs index b9c0f3f6ff1..0b2e53d6c32 100644 --- a/encodings/fastlanes/src/delta/array/mod.rs +++ b/encodings/fastlanes/src/delta/array/mod.rs @@ -30,7 +30,7 @@ pub mod delta_decompress; /// use vortex_array::VortexSessionExecute; /// use vortex_array::session::ArraySession; /// use vortex_session::VortexSession; -/// use vortex_fastlanes::DeltaArray; +/// use vortex_fastlanes::DeltaData; /// /// let session = VortexSession::empty().with::(); /// let primitive = PrimitiveArray::from_iter([1_u32, 2, 3, 5, 10, 11]); diff --git a/vortex-array/src/arrays/chunked/array.rs b/vortex-array/src/arrays/chunked/array.rs index d39138f060b..6e8fe790927 100644 --- a/vortex-array/src/arrays/chunked/array.rs +++ b/vortex-array/src/arrays/chunked/array.rs @@ -42,12 +42,12 @@ pub struct ChunkedData { impl ChunkedData { /// Constructs a new `ChunkedArray`. /// - /// See [`ChunkedArray::new_unchecked`] for more information. + /// See `ChunkedArray::new_unchecked` for more information. /// /// # Errors /// /// Returns an error if the provided components do not satisfy the invariants documented in - /// [`ChunkedArray::new_unchecked`]. + /// `ChunkedArray::new_unchecked`. pub fn try_new(chunks: Vec, dtype: DType) -> VortexResult { Self::validate(&chunks, &dtype)?; @@ -55,7 +55,7 @@ impl ChunkedData { unsafe { Ok(Self::new_unchecked(chunks, dtype)) } } - /// Creates a new [`ChunkedArray`] without validation from these components: + /// Creates a new `ChunkedArray` without validation from these components: /// /// * `chunks` is a vector of arrays to be concatenated logically. /// * `dtype` is the common data type of all chunks. @@ -93,9 +93,9 @@ impl ChunkedData { } } - /// Validates the components that would be used to create a [`ChunkedArray`]. + /// Validates the components that would be used to create a `ChunkedArray`. /// - /// This function checks all the invariants required by [`ChunkedArray::new_unchecked`]. + /// This function checks all the invariants required by `ChunkedArray::new_unchecked`. pub fn validate(chunks: &[ArrayRef], dtype: &DType) -> VortexResult<()> { for chunk in chunks { if chunk.dtype() != dtype { @@ -233,7 +233,7 @@ impl Array { Array::try_from_data(ChunkedData::try_new(chunks, dtype)?) } - /// Creates a new [`ChunkedArray`] without validation. + /// Creates a new `ChunkedArray` without validation. /// /// # Safety /// diff --git a/vortex-array/src/arrays/dict/array.rs b/vortex-array/src/arrays/dict/array.rs index 52b034db415..1ba47a12a99 100644 --- a/vortex-array/src/arrays/dict/array.rs +++ b/vortex-array/src/arrays/dict/array.rs @@ -58,7 +58,7 @@ impl DictData { /// /// # Safety /// This should be called only when you can guarantee the invariants checked - /// by the safe [`DictArray::try_new`] constructor are valid, for example when + /// by the safe `DictArray::try_new` constructor are valid, for example when /// you are filtering or slicing an existing valid `DictArray`. pub unsafe fn new_unchecked(codes: ArrayRef, values: ArrayRef) -> Self { let dtype = values @@ -98,7 +98,7 @@ impl DictData { /// Build a new `DictArray` from its components, `codes` and `values`. /// /// This constructor will panic if `codes` or `values` do not pass validation for building - /// a new `DictArray`. See [`DictArray::try_new`] for a description of the error conditions. + /// a new `DictArray`. See `DictArray::try_new` for a description of the error conditions. pub fn new(codes: ArrayRef, values: ArrayRef) -> Self { Self::try_new(codes, values).vortex_expect("DictArray new") } diff --git a/vortex-array/src/arrays/filter/array.rs b/vortex-array/src/arrays/filter/array.rs index 4cbf77c05cf..fc143805758 100644 --- a/vortex-array/src/arrays/filter/array.rs +++ b/vortex-array/src/arrays/filter/array.rs @@ -85,7 +85,7 @@ impl FilterData { } impl Array { - /// Creates a new [`FilterArray`]. + /// Creates a new `FilterArray`. pub fn new(array: ArrayRef, mask: Mask) -> Self { Array::try_from_data(FilterData::new(array, mask)) .vortex_expect("FilterData is always valid") diff --git a/vortex-array/src/arrays/fixed_size_list/array.rs b/vortex-array/src/arrays/fixed_size_list/array.rs index ca478d69cb2..64c4efb031b 100644 --- a/vortex-array/src/arrays/fixed_size_list/array.rs +++ b/vortex-array/src/arrays/fixed_size_list/array.rs @@ -102,12 +102,12 @@ pub struct FixedSizeListData { } impl FixedSizeListData { - /// Creates a new [`FixedSizeListArray`]. + /// Creates a new `FixedSizeListArray`. /// /// # Panics /// /// Panics if the provided components do not satisfy the invariants documented - /// in [`FixedSizeListArray::new_unchecked`]. + /// in `FixedSizeListArray::new_unchecked`. pub fn new(elements: ArrayRef, list_size: u32, validity: Validity, len: usize) -> Self { Self::try_new(elements, list_size, validity, len) .vortex_expect("FixedSizeListArray construction failed") @@ -115,12 +115,12 @@ impl FixedSizeListData { /// Constructs a new `FixedSizeListArray`. /// - /// See [`FixedSizeListArray::new_unchecked`] for more information. + /// See `FixedSizeListArray::new_unchecked` for more information. /// /// # Errors /// /// Returns an error if the provided components do not satisfy the invariants documented - /// in [`FixedSizeListArray::new_unchecked`]. + /// in `FixedSizeListArray::new_unchecked`. pub fn try_new( elements: ArrayRef, list_size: u32, @@ -133,7 +133,7 @@ impl FixedSizeListData { Ok(unsafe { Self::new_unchecked(elements, list_size, validity, len) }) } - /// Creates a new [`FixedSizeListArray`] without validation from these components: + /// Creates a new `FixedSizeListArray` without validation from these components: /// /// * `elements` is the data array where each fixed-size list is a slice. /// * `list_size` is the fixed number of elements in each list. @@ -175,9 +175,9 @@ impl FixedSizeListData { (self.elements, self.validity, self.dtype) } - /// Validates the components that would be used to create a [`FixedSizeListArray`]. + /// Validates the components that would be used to create a `FixedSizeListArray`. /// - /// This function checks all the invariants required by [`FixedSizeListArray::new_unchecked`]. + /// This function checks all the invariants required by `FixedSizeListArray::new_unchecked`. pub fn validate( elements: &ArrayRef, len: usize, @@ -249,7 +249,7 @@ impl FixedSizeListData { } impl Array { - /// Creates a new [`FixedSizeListArray`]. + /// Creates a new `FixedSizeListArray`. pub fn new(elements: ArrayRef, list_size: u32, validity: Validity, len: usize) -> Self { Array::try_from_data(FixedSizeListData::new(elements, list_size, validity, len)) .vortex_expect("FixedSizeListData is always valid") @@ -267,7 +267,7 @@ impl Array { )?) } - /// Creates a new [`FixedSizeListArray`] without validation. + /// Creates a new `FixedSizeListArray` without validation. /// /// # Safety /// diff --git a/vortex-array/src/arrays/list/array.rs b/vortex-array/src/arrays/list/array.rs index 74e1429761b..4514b8fe688 100644 --- a/vortex-array/src/arrays/list/array.rs +++ b/vortex-array/src/arrays/list/array.rs @@ -98,24 +98,24 @@ pub struct ListArrayParts { } impl ListData { - /// Creates a new [`ListArray`]. + /// Creates a new `ListArray`. /// /// # Panics /// /// Panics if the provided components do not satisfy the invariants documented - /// in [`ListArray::new_unchecked`]. + /// in `ListArray::new_unchecked`. pub fn new(elements: ArrayRef, offsets: ArrayRef, validity: Validity) -> Self { Self::try_new(elements, offsets, validity).vortex_expect("ListArray new") } /// Constructs a new `ListArray`. /// - /// See [`ListArray::new_unchecked`] for more information. + /// See `ListArray::new_unchecked` for more information. /// /// # Errors /// /// Returns an error if the provided components do not satisfy the invariants documented in - /// [`ListArray::new_unchecked`]. + /// `ListArray::new_unchecked`. pub fn try_new( elements: ArrayRef, offsets: ArrayRef, @@ -127,7 +127,7 @@ impl ListData { Ok(unsafe { Self::new_unchecked(elements, offsets, validity) }) } - /// Creates a new [`ListArray`] without validation from these components: + /// Creates a new `ListArray` without validation from these components: /// /// * `elements` is a flat array containing all list elements concatenated. /// * `offsets` is an integer array where `offsets[i]` is the start index for list `i`. @@ -157,9 +157,9 @@ impl ListData { } } - /// Validates the components that would be used to create a [`ListArray`]. + /// Validates the components that would be used to create a `ListArray`. /// - /// This function checks all the invariants required by [`ListArray::new_unchecked`]. + /// This function checks all the invariants required by `ListArray::new_unchecked`. pub fn validate( elements: &ArrayRef, offsets: &ArrayRef, @@ -343,7 +343,7 @@ impl ListData { } impl Array { - /// Creates a new [`ListArray`]. + /// Creates a new `ListArray`. pub fn new(elements: ArrayRef, offsets: ArrayRef, validity: Validity) -> Self { Array::try_from_data(ListData::new(elements, offsets, validity)) .vortex_expect("ListData is always valid") @@ -358,7 +358,7 @@ impl Array { Array::try_from_data(ListData::try_new(elements, offsets, validity)?) } - /// Creates a new [`ListArray`] without validation. + /// Creates a new `ListArray` without validation. /// /// # Safety /// diff --git a/vortex-array/src/arrays/listview/array.rs b/vortex-array/src/arrays/listview/array.rs index 529b5fc8904..0973d078236 100644 --- a/vortex-array/src/arrays/listview/array.rs +++ b/vortex-array/src/arrays/listview/array.rs @@ -146,12 +146,12 @@ pub struct ListViewArrayParts { } impl ListViewData { - /// Creates a new [`ListViewArray`]. + /// Creates a new `ListViewArray`. /// /// # Panics /// /// Panics if the provided components do not satisfy the invariants documented - /// in [`ListViewArray::new_unchecked`]. + /// in `ListViewArray::new_unchecked`. pub fn new(elements: ArrayRef, offsets: ArrayRef, sizes: ArrayRef, validity: Validity) -> Self { Self::try_new(elements, offsets, sizes, validity) .vortex_expect("`ListViewArray` construction failed") @@ -162,7 +162,7 @@ impl ListViewData { /// # Errors /// /// Returns an error if the provided components do not satisfy the invariants documented - /// in [`ListViewArray::new_unchecked`]. + /// in `ListViewArray::new_unchecked`. pub fn try_new( elements: ArrayRef, offsets: ArrayRef, @@ -182,7 +182,7 @@ impl ListViewData { }) } - /// Creates a new [`ListViewArray`] without validation. + /// Creates a new `ListViewArray` without validation. /// /// This unsafe function does not check the validity of the data. Prefer calling [`new()`] or /// [`try_new()`] over this function, as they will check the validity of the data. @@ -223,7 +223,7 @@ impl ListViewData { } } - /// Validates the components that would be used to create a [`ListViewArray`]. + /// Validates the components that would be used to create a `ListViewArray`. pub fn validate( elements: &ArrayRef, offsets: &ArrayRef, @@ -286,7 +286,7 @@ impl ListViewData { Ok(()) } - /// Sets whether this [`ListViewArray`] is zero-copyable to a [`ListArray`]. + /// Sets whether this `ListViewArray` is zero-copyable to a [`ListArray`]. /// /// This is an optimization flag that enables more efficient conversion to [`ListArray`] without /// needing to copy or reorganize the data. @@ -295,7 +295,7 @@ impl ListViewData { /// /// # Safety /// - /// When setting `is_zctl` to `true`, the caller must ensure that the [`ListViewArray`] is + /// When setting `is_zctl` to `true`, the caller must ensure that the `ListViewArray` is /// actually zero-copyable to a [`ListArray`]. This means: /// /// - Offsets must be sorted (but not strictly sorted, zero-length lists are allowed). @@ -385,7 +385,7 @@ impl ListViewData { /// /// Note that it is possible the corresponding list view is null (which is only defined by the /// validity map). Regardless, we are still guaranteed that this offset is valid by the - /// invariants of [`ListViewArray`]. + /// invariants of `ListViewArray`. pub fn offset_at(&self, index: usize) -> usize { assert!( index < self.len(), @@ -412,7 +412,7 @@ impl ListViewData { /// /// Note that it is possible the corresponding list view is null (which is only defined by the /// validity map). Regardless, we are still guaranteed that this size is valid by the invariants - /// of [`ListViewArray`]. + /// of `ListViewArray`. pub fn size_at(&self, index: usize) -> usize { assert!( index < self.len(), @@ -470,7 +470,7 @@ impl ListViewData { } impl Array { - /// Creates a new [`ListViewArray`]. + /// Creates a new `ListViewArray`. pub fn new(elements: ArrayRef, offsets: ArrayRef, sizes: ArrayRef, validity: Validity) -> Self { Array::try_from_data(ListViewData::new(elements, offsets, sizes, validity)) .vortex_expect("ListViewData is always valid") @@ -486,7 +486,7 @@ impl Array { Array::try_from_data(ListViewData::try_new(elements, offsets, sizes, validity)?) } - /// Creates a new [`ListViewArray`] without validation. + /// Creates a new `ListViewArray` without validation. /// /// # Safety /// @@ -565,7 +565,7 @@ where Ok(()) } -/// Helper function to validate if the [`ListViewArray`] components are actually zero-copyable to +/// Helper function to validate if the `ListViewArray` components are actually zero-copyable to /// [`ListArray`](crate::arrays::ListArray). fn validate_zctl( elements: &ArrayRef, diff --git a/vortex-array/src/arrays/listview/conversion.rs b/vortex-array/src/arrays/listview/conversion.rs index c9dd620c37a..45027add335 100644 --- a/vortex-array/src/arrays/listview/conversion.rs +++ b/vortex-array/src/arrays/listview/conversion.rs @@ -25,9 +25,9 @@ use crate::dtype::Nullability; use crate::match_each_integer_ptype; use crate::vtable::Array; -/// Creates a [`ListViewArray`] from a [`ListArray`] by computing `sizes` from `offsets`. +/// Creates a `ListViewArray` from a `ListArray` by computing `sizes` from `offsets`. /// -/// The output [`ListViewArray`] will be zero-copyable back to a [`ListArray`], and additionally it +/// The output `ListViewArray` will be zero-copyable back to a `ListArray`, and additionally it /// will not have any leading or trailing garbage data. pub fn list_view_from_list(list: ListArray, ctx: &mut ExecutionCtx) -> VortexResult { // If the list is empty, create an empty `ListViewArray` with the same offset `DType` as the @@ -68,7 +68,7 @@ pub fn list_view_from_list(list: ListArray, ctx: &mut ExecutionCtx) -> VortexRes }) } -/// Builds a sizes array from a [`ListArray`] by computing differences between consecutive offsets. +/// Builds a sizes array from a `ListArray` by computing differences between consecutive offsets. fn build_sizes_from_offsets( list: &ListArray, ctx: &mut ExecutionCtx, @@ -100,13 +100,13 @@ fn build_sizes_from_offsets( // TODO(connor)[ListView]: Note that it is not exactly zero-copy because we have to add a single // offset at the end, but it is fast enough. -/// Creates a [`ListArray`] from a [`ListViewArray`]. The resulting [`ListArray`] will not have any +/// Creates a `ListArray` from a `ListViewArray`. The resulting `ListArray` will not have any /// leading or trailing garbage data. /// -/// If [`ListViewArray::is_zero_copy_to_list`] is `true`, then this operation is fast +/// If `ListViewArray::is_zero_copy_to_list` is `true`, then this operation is fast /// /// Otherwise, this function fall back to the (very) expensive path and will rebuild the -/// [`ListArray`] from scratch. +/// `ListArray` from scratch. pub fn list_from_list_view(list_view: ListViewArray) -> VortexResult { // Rebuild as zero-copyable to list array and also trim all leading and trailing elements. let zctl_array = list_view.rebuild(ListViewRebuildMode::MakeExact)?; @@ -132,12 +132,12 @@ pub fn list_from_list_view(list_view: ListViewArray) -> VortexResult // TODO(connor)[ListView]: We can optimize this by always keeping extra memory in `ListViewArray` // offsets for an `n+1`th offset. -/// Builds a [`ListArray`] offsets array from a [`ListViewArray`] by constructing `n+1` offsets. +/// Builds a `ListArray` offsets array from a `ListViewArray` by constructing `n+1` offsets. /// The last offset is computed as `last_offset + last_size`. /// /// # Safety /// -/// The [`ListViewArray`] must have offsets that are sorted, and every size must be equal to the gap +/// The `ListViewArray` must have offsets that are sorted, and every size must be equal to the gap /// between `offset[i]` and `offset[i + 1]`. unsafe fn build_list_offsets_from_list_view( list_view: &ListViewArray, @@ -179,7 +179,7 @@ unsafe fn build_list_offsets_from_list_view( offsets_builder.finish_into_primitive().into_array() } -/// Recursively converts all [`ListViewArray`]s to [`ListArray`]s in a nested array structure. +/// Recursively converts all `ListViewArray`s to `ListArray`s in a nested array structure. /// /// The conversion happens bottom-up, processing children before parents. pub fn recursive_list_from_list_view(array: ArrayRef) -> VortexResult { diff --git a/vortex-array/src/arrays/primitive/array/mod.rs b/vortex-array/src/arrays/primitive/array/mod.rs index b790f884da3..faf0fa8143d 100644 --- a/vortex-array/src/arrays/primitive/array/mod.rs +++ b/vortex-array/src/arrays/primitive/array/mod.rs @@ -105,12 +105,12 @@ impl PrimitiveData { } } - /// Creates a new [`PrimitiveArray`]. + /// Creates a new `PrimitiveArray`. /// /// # Panics /// /// Panics if the provided components do not satisfy the invariants documented - /// in [`PrimitiveArray::new_unchecked`]. + /// in `PrimitiveArray::new_unchecked`. pub fn new(buffer: impl Into>, validity: Validity) -> Self { let buffer = buffer.into(); Self::try_new(buffer, validity).vortex_expect("PrimitiveArray construction failed") @@ -118,12 +118,12 @@ impl PrimitiveData { /// Constructs a new `PrimitiveArray`. /// - /// See [`PrimitiveArray::new_unchecked`] for more information. + /// See `PrimitiveArray::new_unchecked` for more information. /// /// # Errors /// /// Returns an error if the provided components do not satisfy the invariants documented in - /// [`PrimitiveArray::new_unchecked`]. + /// `PrimitiveArray::new_unchecked`. #[inline] pub fn try_new(buffer: Buffer, validity: Validity) -> VortexResult { Self::validate(&buffer, &validity)?; @@ -132,7 +132,7 @@ impl PrimitiveData { Ok(unsafe { Self::new_unchecked(buffer, validity) }) } - /// Creates a new [`PrimitiveArray`] without validation from these components: + /// Creates a new `PrimitiveArray` without validation from these components: /// /// * `buffer` is a typed buffer containing the primitive values. /// * `validity` holds the null values. @@ -158,9 +158,9 @@ impl PrimitiveData { } } - /// Validates the components that would be used to create a [`PrimitiveArray`]. + /// Validates the components that would be used to create a `PrimitiveArray`. /// - /// This function checks all the invariants required by [`PrimitiveArray::new_unchecked`]. + /// This function checks all the invariants required by `PrimitiveArray::new_unchecked`. #[inline] pub fn validate(buffer: &Buffer, validity: &Validity) -> VortexResult<()> { if let Some(len) = validity.maybe_len() @@ -187,7 +187,7 @@ impl Array { .vortex_expect("PrimitiveData is always valid") } - /// Creates a new [`PrimitiveArray`]. + /// Creates a new `PrimitiveArray`. /// /// # Panics /// @@ -202,7 +202,7 @@ impl Array { Array::try_from_data(PrimitiveData::try_new(buffer, validity)?) } - /// Creates a new [`PrimitiveArray`] without validation. + /// Creates a new `PrimitiveArray` without validation. /// /// # Safety /// @@ -228,13 +228,13 @@ impl Array { .vortex_expect("PrimitiveData is always valid") } - /// Creates a new [`PrimitiveArray`] from a [`BufferHandle`]. + /// Creates a new `PrimitiveArray` from a [`BufferHandle`]. pub fn from_buffer_handle(handle: BufferHandle, ptype: PType, validity: Validity) -> Self { Array::try_from_data(PrimitiveData::from_buffer_handle(handle, ptype, validity)) .vortex_expect("PrimitiveData is always valid") } - /// Creates a new [`PrimitiveArray`] from a [`ByteBuffer`]. + /// Creates a new `PrimitiveArray` from a [`ByteBuffer`]. pub fn from_byte_buffer(buffer: ByteBuffer, ptype: PType, validity: Validity) -> Self { Array::try_from_data(PrimitiveData::from_byte_buffer(buffer, ptype, validity)) .vortex_expect("PrimitiveData is always valid") @@ -256,7 +256,7 @@ impl Array { .vortex_expect("PrimitiveData is always valid") } - /// Validates the components that would be used to create a [`PrimitiveArray`]. + /// Validates the components that would be used to create a `PrimitiveArray`. pub fn validate(buffer: &Buffer, validity: &Validity) -> VortexResult<()> { PrimitiveData::validate(buffer, validity) } diff --git a/vortex-array/src/arrays/struct_/array.rs b/vortex-array/src/arrays/struct_/array.rs index 62744537cf1..15f8ec9be74 100644 --- a/vortex-array/src/arrays/struct_/array.rs +++ b/vortex-array/src/arrays/struct_/array.rs @@ -229,12 +229,12 @@ impl StructData { .vortex_expect("StructArray::new_with_len should not fail") } - /// Creates a new [`StructArray`]. + /// Creates a new `StructArray`. /// /// # Panics /// /// Panics if the provided components do not satisfy the invariants documented - /// in [`StructArray::new_unchecked`]. + /// in `StructArray::new_unchecked`. pub fn new( names: FieldNames, fields: impl Into>, @@ -247,12 +247,12 @@ impl StructData { /// Constructs a new `StructArray`. /// - /// See [`StructArray::new_unchecked`] for more information. + /// See `StructArray::new_unchecked` for more information. /// /// # Errors /// /// Returns an error if the provided components do not satisfy the invariants documented in - /// [`StructArray::new_unchecked`]. + /// `StructArray::new_unchecked`. pub fn try_new( names: FieldNames, fields: impl Into>, @@ -269,7 +269,7 @@ impl StructData { Ok(unsafe { Self::new_unchecked(fields, dtype, length, validity) }) } - /// Creates a new [`StructArray`] without validation from these components: + /// Creates a new `StructArray` without validation from these components: /// /// * `fields` is a vector of arrays, one for each field in the struct. /// * `dtype` contains the field names and types. @@ -315,9 +315,9 @@ impl StructData { } } - /// Validates the components that would be used to create a [`StructArray`]. + /// Validates the components that would be used to create a `StructArray`. /// - /// This function checks all the invariants required by [`StructArray::new_unchecked`]. + /// This function checks all the invariants required by `StructArray::new_unchecked`. pub fn validate( fields: &[ArrayRef], dtype: &StructFields, @@ -486,7 +486,7 @@ impl StructData { } impl Array { - /// Creates a new [`StructArray`]. + /// Creates a new `StructArray`. pub fn new( names: FieldNames, fields: impl Into>, @@ -507,7 +507,7 @@ impl Array { Array::try_from_data(StructData::try_new(names, fields, length, validity)?) } - /// Creates a new [`StructArray`] without validation. + /// Creates a new `StructArray` without validation. /// /// # Safety /// @@ -534,7 +534,7 @@ impl Array { )?) } - /// Construct a [`StructArray`] from named fields. + /// Construct a `StructArray` from named fields. pub fn from_fields>(items: &[(N, ArrayRef)]) -> VortexResult { Array::try_from_data(StructData::from_fields(items)?) } @@ -544,7 +544,7 @@ impl Array { self.into_data().into_parts() } - /// Create a [`StructArray`] from an iterator of (name, array) pairs with validity. + /// Create a `StructArray` from an iterator of (name, array) pairs with validity. pub fn try_from_iter_with_validity< N: AsRef, A: IntoArray, @@ -556,14 +556,14 @@ impl Array { Array::try_from_data(StructData::try_from_iter_with_validity(iter, validity)?) } - /// Create a [`StructArray`] from an iterator of (name, array) pairs. + /// Create a `StructArray` from an iterator of (name, array) pairs. pub fn try_from_iter, A: IntoArray, T: IntoIterator>( iter: T, ) -> VortexResult { Array::try_from_data(StructData::try_from_iter(iter)?) } - /// Create a fieldless [`StructArray`] with the given length. + /// Create a fieldless `StructArray` with the given length. pub fn new_fieldless_with_len(len: usize) -> Self { Array::try_from_data(StructData::new_fieldless_with_len(len)) .vortex_expect("StructData is always valid") diff --git a/vortex-array/src/arrays/varbin/array.rs b/vortex-array/src/arrays/varbin/array.rs index 4a1f7d768e5..3118683f9a8 100644 --- a/vortex-array/src/arrays/varbin/array.rs +++ b/vortex-array/src/arrays/varbin/array.rs @@ -33,22 +33,22 @@ pub struct VarBinData { } impl VarBinData { - /// Creates a new [`VarBinArray`]. + /// Creates a new `VarBinArray`. /// /// # Panics /// /// Panics if the provided components do not satisfy the invariants documented - /// in [`VarBinArray::new_unchecked`]. + /// in `VarBinArray::new_unchecked`. pub fn new(offsets: ArrayRef, bytes: ByteBuffer, dtype: DType, validity: Validity) -> Self { Self::try_new(offsets, bytes, dtype, validity).vortex_expect("VarBinArray new") } - /// Creates a new [`VarBinArray`]. + /// Creates a new `VarBinArray`. /// /// # Panics /// /// Panics if the provided components do not satisfy the invariants documented - /// in [`VarBinArray::new_unchecked`]. + /// in `VarBinArray::new_unchecked`. pub fn new_from_handle( offset: ArrayRef, bytes: BufferHandle, @@ -60,12 +60,12 @@ impl VarBinData { /// Constructs a new `VarBinArray`. /// - /// See [`VarBinArray::new_unchecked`] for more information. + /// See `VarBinArray::new_unchecked` for more information. /// /// # Errors /// /// Returns an error if the provided components do not satisfy the invariants documented in - /// [`VarBinArray::new_unchecked`]. + /// `VarBinArray::new_unchecked`. pub fn try_new( offsets: ArrayRef, bytes: ByteBuffer, @@ -82,12 +82,12 @@ impl VarBinData { /// Constructs a new `VarBinArray` from a `BufferHandle` of memory that may exist /// on the CPU or GPU. /// - /// See [`VarBinArray::new_unchecked`] for more information. + /// See `VarBinArray::new_unchecked` for more information. /// /// # Errors /// /// Returns an error if the provided components do not satisfy the invariants documented in - /// [`VarBinArray::new_unchecked`]. + /// `VarBinArray::new_unchecked`. pub fn try_new_from_handle( offsets: ArrayRef, bytes: BufferHandle, @@ -100,7 +100,7 @@ impl VarBinData { Ok(unsafe { Self::new_unchecked_from_handle(offsets, bytes, dtype, validity) }) } - /// Creates a new [`VarBinArray`] without validation from these components: + /// Creates a new `VarBinArray` without validation from these components: /// /// * `offsets` is an array of byte offsets into the `bytes` buffer. /// * `bytes` is a buffer containing all the variable-length data concatenated. @@ -141,7 +141,7 @@ impl VarBinData { } } - /// Creates a new [`VarBinArray`] without validation from its components, with string data + /// Creates a new `VarBinArray` without validation from its components, with string data /// stored in a `BufferHandle` (CPU or GPU). /// /// # Safety @@ -166,9 +166,9 @@ impl VarBinData { } } - /// Validates the components that would be used to create a [`VarBinArray`]. + /// Validates the components that would be used to create a `VarBinArray`. /// - /// This function checks all the invariants required by [`VarBinArray::new_unchecked`]. + /// This function checks all the invariants required by `VarBinArray::new_unchecked`. pub fn validate( offsets: &ArrayRef, bytes: &BufferHandle, @@ -455,13 +455,13 @@ impl VarBinData { } impl Array { - /// Creates a new [`VarBinArray`]. + /// Creates a new `VarBinArray`. pub fn new(offsets: ArrayRef, bytes: ByteBuffer, dtype: DType, validity: Validity) -> Self { Array::try_from_data(VarBinData::new(offsets, bytes, dtype, validity)) .vortex_expect("VarBinData is always valid") } - /// Creates a new [`VarBinArray`] without validation. + /// Creates a new `VarBinArray` without validation. /// /// # Safety /// @@ -476,7 +476,7 @@ impl Array { .vortex_expect("VarBinData is always valid") } - /// Creates a new [`VarBinArray`] without validation from a [`BufferHandle`]. + /// Creates a new `VarBinArray` without validation from a [`BufferHandle`]. /// /// # Safety /// diff --git a/vortex-array/src/arrays/varbinview/array.rs b/vortex-array/src/arrays/varbinview/array.rs index f68591f1e7b..4c2c3a93220 100644 --- a/vortex-array/src/arrays/varbinview/array.rs +++ b/vortex-array/src/arrays/varbinview/array.rs @@ -102,12 +102,12 @@ pub struct VarBinViewArrayParts { } impl VarBinViewData { - /// Creates a new [`VarBinViewArray`]. + /// Creates a new `VarBinViewArray`. /// /// # Panics /// /// Panics if the provided components do not satisfy the invariants documented - /// in [`VarBinViewArray::new_unchecked`]. + /// in `VarBinViewArray::new_unchecked`. pub fn new( views: Buffer, buffers: Arc<[ByteBuffer]>, @@ -118,12 +118,12 @@ impl VarBinViewData { .vortex_expect("VarBinViewArray construction failed") } - /// Creates a new [`VarBinViewArray`] with device or host memory. + /// Creates a new `VarBinViewArray` with device or host memory. /// /// # Panics /// /// Panics if the provided components do not satisfy the invariants documented - /// in [`VarBinViewArray::new_unchecked`]. + /// in `VarBinViewArray::new_unchecked`. pub fn new_handle( views: BufferHandle, buffers: Arc<[BufferHandle]>, @@ -136,12 +136,12 @@ impl VarBinViewData { /// Constructs a new `VarBinViewArray`. /// - /// See [`VarBinViewArray::new_unchecked`] for more information. + /// See `VarBinViewArray::new_unchecked` for more information. /// /// # Errors /// /// Returns an error if the provided components do not satisfy the invariants documented in - /// [`VarBinViewArray::new_unchecked`]. + /// `VarBinViewArray::new_unchecked`. pub fn try_new( views: Buffer, buffers: Arc<[ByteBuffer]>, @@ -156,12 +156,12 @@ impl VarBinViewData { /// Constructs a new `VarBinViewArray`. /// - /// See [`VarBinViewArray::new_unchecked`] for more information. + /// See `VarBinViewArray::new_unchecked` for more information. /// /// # Errors /// /// Returns an error if the provided components do not satisfy the invariants documented in - /// [`VarBinViewArray::new_unchecked`]. + /// `VarBinViewArray::new_unchecked`. pub fn try_new_handle( views: BufferHandle, buffers: Arc<[BufferHandle]>, @@ -187,7 +187,7 @@ impl VarBinViewData { Ok(unsafe { Self::new_handle_unchecked(views, buffers, dtype, validity) }) } - /// Creates a new [`VarBinViewArray`] without validation from these components: + /// Creates a new `VarBinViewArray` without validation from these components: /// /// * `views` is a buffer of 16-byte view entries (one per logical element). /// * `buffers` contains the backing storage for strings longer than 12 bytes. @@ -257,9 +257,9 @@ impl VarBinViewData { } } - /// Validates the components that would be used to create a [`VarBinViewArray`]. + /// Validates the components that would be used to create a `VarBinViewArray`. /// - /// This function checks all the invariants required by [`VarBinViewArray::new_unchecked`]. + /// This function checks all the invariants required by `VarBinViewArray::new_unchecked`. pub fn validate( views: &Buffer, buffers: &Arc<[ByteBuffer]>, @@ -536,7 +536,7 @@ impl VarBinViewData { } impl Array { - /// Construct a [`VarBinViewArray`] from an iterator of optional byte slices. + /// Construct a `VarBinViewArray` from an iterator of optional byte slices. #[expect( clippy::same_name_method, reason = "intentionally named from_iter like Iterator::from_iter" @@ -573,7 +573,7 @@ impl Array { .vortex_expect("VarBinViewData is always valid") } - /// Creates a new [`VarBinViewArray`]. + /// Creates a new `VarBinViewArray`. pub fn try_new( views: Buffer, buffers: Arc<[ByteBuffer]>, @@ -583,7 +583,7 @@ impl Array { Array::try_from_data(VarBinViewData::try_new(views, buffers, dtype, validity)?) } - /// Creates a new [`VarBinViewArray`] without validation. + /// Creates a new `VarBinViewArray` without validation. /// /// # Safety /// @@ -600,7 +600,7 @@ impl Array { .vortex_expect("VarBinViewData is always valid") } - /// Creates a new [`VarBinViewArray`] with device or host memory. + /// Creates a new `VarBinViewArray` with device or host memory. pub fn new_handle( views: BufferHandle, buffers: Arc<[BufferHandle]>, diff --git a/vortex-array/src/vtable/dyn_.rs b/vortex-array/src/vtable/dyn_.rs index bad5667f845..a871c56bf5c 100644 --- a/vortex-array/src/vtable/dyn_.rs +++ b/vortex-array/src/vtable/dyn_.rs @@ -18,6 +18,7 @@ use crate::IntoArray; use crate::buffer::BufferHandle; use crate::dtype::DType; use crate::executor::ExecutionCtx; +use crate::scalar_fn::ReduceNode; use crate::serde::ArrayChildren; use crate::stats::ArrayStats; use crate::vtable::Array; @@ -119,7 +120,7 @@ impl DynVTable for V { } fn reduce(&self, array: &ArrayRef) -> VortexResult> { - let Some(reduced) = V::reduce(downcast::(array))? else { + let Some(reduced) = V::reduce(downcast_owned::(array.clone()))? else { return Ok(None); }; vortex_ensure!(