Skip to content

Commit 91f20ae

Browse files
authored
Bind constant array (#5208)
Signed-off-by: Nicholas Gates <[email protected]>
1 parent 6e86418 commit 91f20ae

File tree

43 files changed

+332
-362
lines changed

Some content is hidden

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

43 files changed

+332
-362
lines changed

encodings/decimal-byte-parts/src/decimal_byte_parts/compute/compare.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ use num_traits::NumCast;
66
use vortex_array::arrays::ConstantArray;
77
use vortex_array::compute::{CompareKernel, CompareKernelAdapter, Operator, compare};
88
use vortex_array::{Array, ArrayRef, register_kernel};
9-
use vortex_dtype::{IntegerPType, Nullability, PType, ToI256, match_each_integer_ptype};
9+
use vortex_dtype::{
10+
IntegerPType, Nullability, PType, ToI256, match_each_decimal_value, match_each_integer_ptype,
11+
};
1012
use vortex_error::{VortexExpect, VortexResult};
11-
use vortex_scalar::{DecimalValue, Scalar, ScalarValue, match_each_decimal_value};
13+
use vortex_scalar::{DecimalValue, Scalar, ScalarValue};
1214

1315
use crate::DecimalBytePartsVTable;
1416
use crate::decimal_byte_parts::compute::compare::Sign::Positive;

encodings/sparse/src/canonical.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,10 @@ use vortex_array::{Array, Canonical, ToCanonical};
2020
use vortex_buffer::{BitBuffer, Buffer, BufferString, ByteBuffer, buffer, buffer_mut};
2121
use vortex_dtype::{
2222
DType, DecimalDType, DecimalType, IntegerPType, NativeDecimalType, NativePType, Nullability,
23-
StructFields, match_each_integer_ptype, match_each_native_ptype,
23+
StructFields, match_each_decimal_value_type, match_each_integer_ptype, match_each_native_ptype,
2424
};
2525
use vortex_error::{VortexError, VortexExpect, vortex_panic};
26-
use vortex_scalar::{
27-
DecimalScalar, ListScalar, Scalar, StructScalar, match_each_decimal_value_type,
28-
};
26+
use vortex_scalar::{DecimalScalar, ListScalar, Scalar, StructScalar};
2927

3028
use crate::{SparseArray, SparseVTable};
3129

fuzz/src/array/compare.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ use vortex_array::compute::{Operator, scalar_cmp};
1010
use vortex_array::validity::Validity;
1111
use vortex_array::{Array, ArrayRef, IntoArray, ToCanonical};
1212
use vortex_buffer::BitBuffer;
13-
use vortex_dtype::{DType, NativeDecimalType, NativePType, match_each_native_ptype};
13+
use vortex_dtype::{
14+
DType, NativeDecimalType, NativePType, match_each_decimal_value_type, match_each_native_ptype,
15+
};
1416
use vortex_error::{VortexExpect, VortexResult, vortex_err};
15-
use vortex_scalar::{Scalar, match_each_decimal_value_type};
17+
use vortex_scalar::Scalar;
1618

1719
pub fn compare_canonical_array(
1820
array: &dyn Array,

fuzz/src/array/fill_null.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ use vortex_array::validity::Validity;
99
use vortex_array::vtable::ValidityHelper;
1010
use vortex_array::{ArrayRef, Canonical, IntoArray, ToCanonical};
1111
use vortex_buffer::Buffer;
12-
use vortex_dtype::{DType, Nullability, match_each_native_ptype};
12+
use vortex_dtype::{DType, Nullability, match_each_decimal_value_type, match_each_native_ptype};
1313
use vortex_error::{VortexExpect, VortexResult, VortexUnwrap};
14-
use vortex_scalar::{Scalar, match_each_decimal_value_type};
14+
use vortex_scalar::Scalar;
1515

1616
/// Apply fill_null on the canonical form of the array to get a consistent baseline.
1717
/// This implementation manually fills null values for each canonical type

fuzz/src/array/filter.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ use vortex_array::arrays::{BoolArray, DecimalArray, PrimitiveArray, StructArray,
66
use vortex_array::validity::Validity;
77
use vortex_array::{Array, ArrayRef, IntoArray, ToCanonical};
88
use vortex_buffer::{BitBuffer, Buffer};
9-
use vortex_dtype::{DType, match_each_native_ptype};
9+
use vortex_dtype::{DType, match_each_decimal_value_type, match_each_native_ptype};
1010
use vortex_error::VortexResult;
11-
use vortex_scalar::match_each_decimal_value_type;
1211

1312
use crate::array::take_canonical_array_non_nullable_indices;
1413

fuzz/src/array/mask.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@ use vortex_array::arrays::{
1111
use vortex_array::validity::Validity;
1212
use vortex_array::vtable::ValidityHelper;
1313
use vortex_array::{ArrayRef, Canonical, IntoArray, ToCanonical};
14-
use vortex_dtype::ExtDType;
14+
use vortex_dtype::{ExtDType, match_each_decimal_value_type};
1515
use vortex_error::{VortexResult, VortexUnwrap};
1616
use vortex_mask::{AllOr, Mask};
17-
use vortex_scalar::match_each_decimal_value_type;
1817

1918
/// Apply mask on the canonical form of the array to get a consistent baseline.
2019
/// This implementation manually applies the mask to each canonical type

fuzz/src/array/scalar_at.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ use std::sync::Arc;
55

66
use vortex_array::arrays::varbin_scalar;
77
use vortex_array::{Array, Canonical};
8-
use vortex_dtype::{DType, match_each_native_ptype};
8+
use vortex_dtype::{DType, match_each_decimal_value_type, match_each_native_ptype};
99
use vortex_error::{VortexResult, VortexUnwrap};
10-
use vortex_scalar::{DecimalValue, Scalar, match_each_decimal_value_type};
10+
use vortex_scalar::{DecimalValue, Scalar};
1111

1212
/// Baseline implementation of scalar_at that works on canonical arrays.
1313
/// This implementation manually extracts the scalar value from each canonical type

fuzz/src/array/search_sorted.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ use vortex_array::accessor::ArrayAccessor;
99
use vortex_array::search_sorted::{IndexOrd, SearchResult, SearchSorted, SearchSortedSide};
1010
use vortex_array::{Array, ToCanonical};
1111
use vortex_buffer::{BufferString, ByteBuffer};
12-
use vortex_dtype::{DType, NativePType, match_each_native_ptype};
12+
use vortex_dtype::{DType, NativePType, match_each_decimal_value_type, match_each_native_ptype};
1313
use vortex_error::{VortexResult, vortex_err};
14-
use vortex_scalar::{Scalar, match_each_decimal_value_type};
14+
use vortex_scalar::Scalar;
1515

1616
struct SearchNullableSlice<T>(Vec<Option<T>>);
1717

fuzz/src/array/slice.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ use vortex_array::arrays::{
88
};
99
use vortex_array::validity::Validity;
1010
use vortex_array::{Array, ArrayRef, IntoArray, ToCanonical};
11-
use vortex_dtype::{DType, match_each_native_ptype};
11+
use vortex_dtype::{DType, match_each_decimal_value_type, match_each_native_ptype};
1212
use vortex_error::VortexResult;
13-
use vortex_scalar::match_each_decimal_value_type;
1413

1514
#[allow(clippy::unnecessary_fallible_conversions)]
1615
pub fn slice_canonical_array(

fuzz/src/array/sort.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ use std::cmp::Ordering;
66
use vortex_array::accessor::ArrayAccessor;
77
use vortex_array::arrays::{BoolArray, DecimalArray, PrimitiveArray, VarBinViewArray};
88
use vortex_array::{Array, ArrayRef, IntoArray, ToCanonical};
9-
use vortex_dtype::{DType, NativePType, match_each_native_ptype};
9+
use vortex_dtype::{DType, NativePType, match_each_decimal_value_type, match_each_native_ptype};
1010
use vortex_error::{VortexExpect, VortexResult};
11-
use vortex_scalar::match_each_decimal_value_type;
1211

1312
use crate::array::take_canonical_array_non_nullable_indices;
1413

0 commit comments

Comments
 (0)