Skip to content

Commit 035fb48

Browse files
committed
ArrayRef
Signed-off-by: Nicholas Gates <nick@nickgates.com>
1 parent 404b566 commit 035fb48

133 files changed

Lines changed: 851 additions & 1187 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/public-api.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ pub type vortex_alp::ALP::OperationsVTable = vortex_alp::ALP
6666

6767
pub type vortex_alp::ALP::ValidityVTable = vortex_array::vtable::validity::ValidityVTableFromChild
6868

69-
pub fn vortex_alp::ALP::array_eq(array: vortex_array::vtable::typed::ArrayView<'_, Self>, other: vortex_array::vtable::typed::ArrayView<'_, Self>, precision: vortex_array::hash::Precision) -> bool
69+
pub fn vortex_alp::ALP::array_eq(array: &vortex_alp::ALPData, other: &vortex_alp::ALPData, precision: vortex_array::hash::Precision) -> bool
7070

71-
pub fn vortex_alp::ALP::array_hash<H: core::hash::Hasher>(array: vortex_array::vtable::typed::ArrayView<'_, Self>, state: &mut H, precision: vortex_array::hash::Precision)
71+
pub fn vortex_alp::ALP::array_hash<H: core::hash::Hasher>(array: &vortex_alp::ALPData, state: &mut H, precision: vortex_array::hash::Precision)
7272

7373
pub fn vortex_alp::ALP::buffer(_array: vortex_array::vtable::typed::ArrayView<'_, Self>, idx: usize) -> vortex_array::buffer::BufferHandle
7474

@@ -136,7 +136,7 @@ pub fn vortex_alp::ALPData::is_empty(&self) -> bool
136136

137137
pub fn vortex_alp::ALPData::len(&self) -> usize
138138

139-
pub fn vortex_alp::ALPData::patches(&self) -> core::option::Option<&vortex_array::patches::Patches>
139+
pub fn vortex_alp::ALPData::patches(&self) -> core::option::Option<vortex_array::patches::Patches>
140140

141141
pub fn vortex_alp::ALPData::ptype(&self) -> vortex_array::dtype::ptype::PType
142142

@@ -230,9 +230,9 @@ pub type vortex_alp::ALPRD::OperationsVTable = vortex_alp::ALPRD
230230

231231
pub type vortex_alp::ALPRD::ValidityVTable = vortex_array::vtable::validity::ValidityVTableFromChild
232232

233-
pub fn vortex_alp::ALPRD::array_eq(array: vortex_array::vtable::typed::ArrayView<'_, Self>, other: vortex_array::vtable::typed::ArrayView<'_, Self>, precision: vortex_array::hash::Precision) -> bool
233+
pub fn vortex_alp::ALPRD::array_eq(array: &vortex_alp::ALPRDData, other: &vortex_alp::ALPRDData, precision: vortex_array::hash::Precision) -> bool
234234

235-
pub fn vortex_alp::ALPRD::array_hash<H: core::hash::Hasher>(array: vortex_array::vtable::typed::ArrayView<'_, Self>, state: &mut H, precision: vortex_array::hash::Precision)
235+
pub fn vortex_alp::ALPRD::array_hash<H: core::hash::Hasher>(array: &vortex_alp::ALPRDData, state: &mut H, precision: vortex_array::hash::Precision)
236236

237237
pub fn vortex_alp::ALPRD::buffer(_array: vortex_array::vtable::typed::ArrayView<'_, Self>, idx: usize) -> vortex_array::buffer::BufferHandle
238238

@@ -314,7 +314,7 @@ pub fn vortex_alp::ALPRDData::left_parts(&self) -> &vortex_array::array::ArrayRe
314314

315315
pub fn vortex_alp::ALPRDData::left_parts_dictionary(&self) -> &vortex_buffer::buffer::Buffer<u16>
316316

317-
pub fn vortex_alp::ALPRDData::left_parts_patches(&self) -> core::option::Option<&vortex_array::patches::Patches>
317+
pub fn vortex_alp::ALPRDData::left_parts_patches(&self) -> core::option::Option<vortex_array::patches::Patches>
318318

319319
pub fn vortex_alp::ALPRDData::len(&self) -> usize
320320

encodings/alp/src/alp/compress.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ where
7373
let (exponents, encoded, exceptional_positions, exceptional_values, mut chunk_offsets) =
7474
T::encode(values_slice, exponents);
7575

76-
let encoded_array = PrimitiveArray::new(encoded, values.validity().clone()).into_array();
76+
let encoded_array = PrimitiveArray::new(encoded, values.validity()).into_array();
7777

7878
let validity = values.validity_mask()?;
7979
// exceptional_positions may contain exceptions at invalid positions (which contain garbage

encodings/alp/src/alp/decompress.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ fn decompress_chunked_core(
100100
patches: &Patches,
101101
dtype: DType,
102102
) -> PrimitiveArray {
103-
let validity = encoded.validity().clone();
103+
let validity = encoded.validity();
104104
let ptype = dtype.as_ptype();
105105
let array_len = encoded.len();
106106
let offset_within_chunk = patches.offset_within_chunk().unwrap_or(0);
@@ -150,7 +150,7 @@ fn decompress_unchunked_core(
150150
dtype: DType,
151151
ctx: &mut ExecutionCtx,
152152
) -> VortexResult<PrimitiveArray> {
153-
let validity = encoded.validity().clone();
153+
let validity = encoded.validity();
154154
let ptype = dtype.as_ptype();
155155

156156
let decoded = match_each_alp_float_ptype!(ptype, |T| {

encodings/alp/src/alp_rd/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ impl RDEncoder {
227227
}
228228

229229
// Bit-pack down the encoded left-parts array that have been dictionary encoded.
230-
let primitive_left = PrimitiveArray::new(left_parts, array.validity().clone());
230+
let primitive_left = PrimitiveArray::new(left_parts, array.validity());
231231
// SAFETY: by construction, all values in left_parts can be packed to left_bit_width.
232232
let packed_left = unsafe {
233233
bitpack_encode_unchecked(primitive_left, left_bit_width as _)

encodings/bytebool/public-api.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ pub type vortex_bytebool::ByteBool::OperationsVTable = vortex_bytebool::ByteBool
4242

4343
pub type vortex_bytebool::ByteBool::ValidityVTable = vortex_array::vtable::validity::ValidityVTableFromValidityHelper
4444

45-
pub fn vortex_bytebool::ByteBool::array_eq(array: vortex_array::vtable::typed::ArrayView<'_, Self>, other: vortex_array::vtable::typed::ArrayView<'_, Self>, precision: vortex_array::hash::Precision) -> bool
45+
pub fn vortex_bytebool::ByteBool::array_eq(array: &vortex_bytebool::ByteBoolData, other: &vortex_bytebool::ByteBoolData, precision: vortex_array::hash::Precision) -> bool
4646

47-
pub fn vortex_bytebool::ByteBool::array_hash<H: core::hash::Hasher>(array: vortex_array::vtable::typed::ArrayView<'_, Self>, state: &mut H, precision: vortex_array::hash::Precision)
47+
pub fn vortex_bytebool::ByteBool::array_hash<H: core::hash::Hasher>(array: &vortex_bytebool::ByteBoolData, state: &mut H, precision: vortex_array::hash::Precision)
4848

4949
pub fn vortex_bytebool::ByteBool::buffer(array: vortex_array::vtable::typed::ArrayView<'_, Self>, idx: usize) -> vortex_array::buffer::BufferHandle
5050

encodings/datetime-parts/public-api.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ pub type vortex_datetime_parts::DateTimeParts::OperationsVTable = vortex_datetim
5252

5353
pub type vortex_datetime_parts::DateTimeParts::ValidityVTable = vortex_array::vtable::validity::ValidityVTableFromChild
5454

55-
pub fn vortex_datetime_parts::DateTimeParts::array_eq(array: vortex_array::vtable::typed::ArrayView<'_, Self>, other: vortex_array::vtable::typed::ArrayView<'_, Self>, precision: vortex_array::hash::Precision) -> bool
55+
pub fn vortex_datetime_parts::DateTimeParts::array_eq(array: &vortex_datetime_parts::DateTimePartsData, other: &vortex_datetime_parts::DateTimePartsData, precision: vortex_array::hash::Precision) -> bool
5656

57-
pub fn vortex_datetime_parts::DateTimeParts::array_hash<H: core::hash::Hasher>(array: vortex_array::vtable::typed::ArrayView<'_, Self>, state: &mut H, precision: vortex_array::hash::Precision)
57+
pub fn vortex_datetime_parts::DateTimeParts::array_hash<H: core::hash::Hasher>(array: &vortex_datetime_parts::DateTimePartsData, state: &mut H, precision: vortex_array::hash::Precision)
5858

5959
pub fn vortex_datetime_parts::DateTimeParts::buffer(_array: vortex_array::vtable::typed::ArrayView<'_, Self>, idx: usize) -> vortex_array::buffer::BufferHandle
6060

encodings/datetime-parts/src/compress.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pub fn split_temporal(array: TemporalArray) -> VortexResult<TemporalParts> {
5151
}
5252

5353
Ok(TemporalParts {
54-
days: PrimitiveArray::new(days, temporal_values.validity().clone()).into_array(),
54+
days: PrimitiveArray::new(days, temporal_values.validity()).into_array(),
5555
seconds: seconds.into_array(),
5656
subseconds: subseconds.into_array(),
5757
})

encodings/decimal-byte-parts/public-api.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ pub type vortex_decimal_byte_parts::DecimalByteParts::OperationsVTable = vortex_
5050

5151
pub type vortex_decimal_byte_parts::DecimalByteParts::ValidityVTable = vortex_array::vtable::validity::ValidityVTableFromChild
5252

53-
pub fn vortex_decimal_byte_parts::DecimalByteParts::array_eq(array: vortex_array::vtable::typed::ArrayView<'_, Self>, other: vortex_array::vtable::typed::ArrayView<'_, Self>, precision: vortex_array::hash::Precision) -> bool
53+
pub fn vortex_decimal_byte_parts::DecimalByteParts::array_eq(array: &vortex_decimal_byte_parts::DecimalBytePartsData, other: &vortex_decimal_byte_parts::DecimalBytePartsData, precision: vortex_array::hash::Precision) -> bool
5454

55-
pub fn vortex_decimal_byte_parts::DecimalByteParts::array_hash<H: core::hash::Hasher>(array: vortex_array::vtable::typed::ArrayView<'_, Self>, state: &mut H, precision: vortex_array::hash::Precision)
55+
pub fn vortex_decimal_byte_parts::DecimalByteParts::array_hash<H: core::hash::Hasher>(array: &vortex_decimal_byte_parts::DecimalBytePartsData, state: &mut H, precision: vortex_array::hash::Precision)
5656

5757
pub fn vortex_decimal_byte_parts::DecimalByteParts::buffer(_array: vortex_array::vtable::typed::ArrayView<'_, Self>, idx: usize) -> vortex_array::buffer::BufferHandle
5858

encodings/decimal-byte-parts/src/decimal_byte_parts/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ fn to_canonical_decimal(
335335
DecimalArray::new_unchecked(
336336
prim.to_buffer::<P>(),
337337
*array.decimal_dtype(),
338-
prim.validity().clone(),
338+
prim.validity(),
339339
)
340340
}
341341
.into_array()

encodings/fastlanes/benches/bitpacking_take.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@ use vortex_array::RecursiveCanonical;
1515
use vortex_array::VortexSessionExecute;
1616
use vortex_array::arrays::PrimitiveArray;
1717
use vortex_array::validity::Validity;
18-
use vortex_array::vtable::Array;
1918
use vortex_buffer::Buffer;
2019
use vortex_buffer::buffer;
21-
use vortex_fastlanes::BitPacked;
2220
use vortex_fastlanes::bitpack_compress::bitpack_to_best_bit_width;
2321

2422
fn main() {

0 commit comments

Comments
 (0)