Skip to content

Commit cb6cf3c

Browse files
committed
Slots
Signed-off-by: Nicholas Gates <nick@nickgates.com>
1 parent 931c1a3 commit cb6cf3c

58 files changed

Lines changed: 251 additions & 224 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

encodings/alp/src/alp_rd/array.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,11 @@ impl VTable for ALPRD {
236236
let ptype = dtype.as_ptype();
237237

238238
let left_parts = left_parts
239-
.try_into::<Primitive>()
239+
.try_downcast::<Primitive>()
240240
.ok()
241241
.vortex_expect("ALPRD execute: left_parts is primitive");
242242
let right_parts = right_parts
243-
.try_into::<Primitive>()
243+
.try_downcast::<Primitive>()
244244
.ok()
245245
.vortex_expect("ALPRD execute: right_parts is primitive");
246246

encodings/fastlanes/src/bitpacking/array/bitpack_compress.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use itertools::Itertools;
66
use num_traits::PrimInt;
77
use vortex_array::IntoArray;
88
use vortex_array::arrays::PrimitiveArray;
9+
use vortex_array::arrays::primitive::PrimitiveArrayExt;
910
use vortex_array::buffer::BufferHandle;
1011
use vortex_array::dtype::IntegerPType;
1112
use vortex_array::dtype::NativePType;

encodings/fastlanes/src/bitpacking/array/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ impl BitPackedData {
299299
pub fn encode(array: &ArrayRef, bit_width: u8) -> VortexResult<BitPackedArray> {
300300
let parray: PrimitiveArray = array
301301
.clone()
302-
.try_into::<Primitive>()
302+
.try_downcast::<Primitive>()
303303
.map_err(|a| vortex_err!(InvalidArgument: "Bitpacking can only encode primitive arrays, got {}", a.encoding_id()))?;
304304
bitpack_encode(&parray, bit_width, None)
305305
}

encodings/fastlanes/src/for/array/for_compress.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ mod test {
5252
use itertools::Itertools;
5353
use vortex_array::ToCanonical;
5454
use vortex_array::VortexSessionExecute;
55+
use vortex_array::arrays::primitive::PrimitiveArrayExt;
5556
use vortex_array::assert_arrays_eq;
5657
use vortex_array::dtype::PType;
5758
use vortex_array::expr::stats::StatsProvider;

encodings/fastlanes/src/rle/array/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ mod tests {
234234
use vortex_array::ToCanonical;
235235
use vortex_array::VortexSessionExecute;
236236
use vortex_array::arrays::PrimitiveArray;
237+
use vortex_array::arrays::primitive::PrimitiveArrayExt;
237238
use vortex_array::assert_arrays_eq;
238239
use vortex_array::dtype::DType;
239240
use vortex_array::dtype::Nullability;

encodings/fsst/src/compute/filter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ impl FilterKernel for FSST {
2626
let filtered_codes_ref = <VarBin as FilterKernel>::filter(codes, mask, ctx)?
2727
.vortex_expect("VarBin filter kernel always returns Some");
2828
let filtered_codes = filtered_codes_ref
29-
.try_into::<VarBin>()
29+
.try_downcast::<VarBin>()
3030
.ok()
3131
.vortex_expect("must be VarBin");
3232

encodings/fsst/src/compute/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ impl TakeExecute for FSST {
4141
<VarBin as TakeExecute>::take(codes, indices, _ctx)?
4242
.vortex_expect("VarBin take kernel always returns Some")
4343
}
44-
.try_into::<VarBin>()
44+
.try_downcast::<VarBin>()
4545
.map_err(|_| vortex_err!("take for codes must return varbin array"))?,
4646
array
4747
.uncompressed_lengths()

encodings/fsst/src/slice.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ impl SliceReduce for FSST {
2626
array
2727
.codes()
2828
.slice(range.clone())?
29-
.try_into::<VarBin>()
29+
.try_downcast::<VarBin>()
3030
.map_err(|_| vortex_err!("cannot fail conversion"))?,
3131
array.uncompressed_lengths().slice(range)?,
3232
)

encodings/pco/src/array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ impl PcoData {
469469
}
470470

471471
pub fn from_array(array: ArrayRef, level: usize, nums_per_page: usize) -> VortexResult<Self> {
472-
let parray = array.try_into::<Primitive>().map_err(|a| {
472+
let parray = array.try_downcast::<Primitive>().map_err(|a| {
473473
vortex_err!(
474474
"Pco can only encode primitive arrays, got {}",
475475
a.encoding_id()

encodings/runend/src/arrow.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use arrow_array::types::RunEndIndexType;
66
use vortex_array::ArrayRef;
77
use vortex_array::IntoArray;
88
use vortex_array::arrays::PrimitiveArray;
9+
use vortex_array::arrays::primitive::PrimitiveArrayExt;
910
use vortex_array::arrow::FromArrowArray;
1011
use vortex_array::dtype::NativePType;
1112
use vortex_array::scalar::PValue;
@@ -76,6 +77,7 @@ mod tests {
7677
use vortex_array::IntoArray as _;
7778
use vortex_array::VortexSessionExecute as _;
7879
use vortex_array::arrays::PrimitiveArray;
80+
use vortex_array::arrays::primitive::PrimitiveArrayExt;
7981
use vortex_array::arrow::ArrowArrayExecutor;
8082
use vortex_array::arrow::FromArrowArray;
8183
use vortex_array::assert_arrays_eq;

0 commit comments

Comments
 (0)