diff --git a/encodings/alp/public-api.lock b/encodings/alp/public-api.lock index 3dabbc742b3..b3ce5d25097 100644 --- a/encodings/alp/public-api.lock +++ b/encodings/alp/public-api.lock @@ -128,8 +128,6 @@ pub fn vortex_alp::ALPArray::try_new(encoded: vortex_array::array::ArrayRef, exp impl vortex_alp::ALPArray -pub fn vortex_alp::ALPArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::array::ArrayRef - pub fn vortex_alp::ALPArray::to_array(&self) -> vortex_array::array::ArrayRef impl core::clone::Clone for vortex_alp::ALPArray @@ -276,12 +274,6 @@ pub struct vortex_alp::ALPRDArray impl vortex_alp::ALPRDArray -pub fn vortex_alp::ALPRDArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::array::ArrayRef - -pub fn vortex_alp::ALPRDArray::to_array(&self) -> vortex_array::array::ArrayRef - -impl vortex_alp::ALPRDArray - pub fn vortex_alp::ALPRDArray::into_parts(self) -> vortex_alp::ALPRDArrayParts pub fn vortex_alp::ALPRDArray::is_f32(&self) -> bool @@ -300,6 +292,10 @@ pub fn vortex_alp::ALPRDArray::right_parts(&self) -> &vortex_array::array::Array 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 vortex_alp::ALPRDArray + +pub fn vortex_alp::ALPRDArray::to_array(&self) -> vortex_array::array::ArrayRef + impl core::clone::Clone for vortex_alp::ALPRDArray pub fn vortex_alp::ALPRDArray::clone(&self) -> vortex_alp::ALPRDArray diff --git a/encodings/bytebool/public-api.lock b/encodings/bytebool/public-api.lock index 09ad3233a3d..0471ced549a 100644 --- a/encodings/bytebool/public-api.lock +++ b/encodings/bytebool/public-api.lock @@ -100,8 +100,6 @@ pub fn vortex_bytebool::ByteBoolArray::new(buffer: vortex_array::buffer::BufferH impl vortex_bytebool::ByteBoolArray -pub fn vortex_bytebool::ByteBoolArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::array::ArrayRef - pub fn vortex_bytebool::ByteBoolArray::to_array(&self) -> vortex_array::array::ArrayRef impl core::clone::Clone for vortex_bytebool::ByteBoolArray diff --git a/encodings/datetime-parts/public-api.lock b/encodings/datetime-parts/public-api.lock index a4880f57a75..362d3e551c6 100644 --- a/encodings/datetime-parts/public-api.lock +++ b/encodings/datetime-parts/public-api.lock @@ -114,8 +114,6 @@ pub fn vortex_datetime_parts::DateTimePartsArray::try_new(dtype: vortex_array::d impl vortex_datetime_parts::DateTimePartsArray -pub fn vortex_datetime_parts::DateTimePartsArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::array::ArrayRef - pub fn vortex_datetime_parts::DateTimePartsArray::to_array(&self) -> vortex_array::array::ArrayRef impl core::clone::Clone for vortex_datetime_parts::DateTimePartsArray diff --git a/encodings/decimal-byte-parts/public-api.lock b/encodings/decimal-byte-parts/public-api.lock index f300b2efd71..b248730cf49 100644 --- a/encodings/decimal-byte-parts/public-api.lock +++ b/encodings/decimal-byte-parts/public-api.lock @@ -110,8 +110,6 @@ pub fn vortex_decimal_byte_parts::DecimalBytePartsArray::try_new(msp: vortex_arr impl vortex_decimal_byte_parts::DecimalBytePartsArray -pub fn vortex_decimal_byte_parts::DecimalBytePartsArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::array::ArrayRef - pub fn vortex_decimal_byte_parts::DecimalBytePartsArray::to_array(&self) -> vortex_array::array::ArrayRef impl core::clone::Clone for vortex_decimal_byte_parts::DecimalBytePartsArray diff --git a/encodings/fastlanes/public-api.lock b/encodings/fastlanes/public-api.lock index 83f2e4a573c..5fda34e2505 100644 --- a/encodings/fastlanes/public-api.lock +++ b/encodings/fastlanes/public-api.lock @@ -234,8 +234,6 @@ pub fn vortex_fastlanes::BitPackedArray::unpacked_chunks) -> vortex_array::array::ArrayRef - pub fn vortex_fastlanes::BitPackedArray::to_array(&self) -> vortex_array::array::ArrayRef impl core::clone::Clone for vortex_fastlanes::BitPackedArray @@ -384,8 +382,6 @@ pub fn vortex_fastlanes::DeltaArray::try_new(bases: vortex_array::array::ArrayRe impl vortex_fastlanes::DeltaArray -pub fn vortex_fastlanes::DeltaArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::array::ArrayRef - pub fn vortex_fastlanes::DeltaArray::to_array(&self) -> vortex_array::array::ArrayRef impl core::clone::Clone for vortex_fastlanes::DeltaArray @@ -526,8 +522,6 @@ pub fn vortex_fastlanes::FoRArray::try_new(encoded: vortex_array::array::ArrayRe impl vortex_fastlanes::FoRArray -pub fn vortex_fastlanes::FoRArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::array::ArrayRef - pub fn vortex_fastlanes::FoRArray::to_array(&self) -> vortex_array::array::ArrayRef impl core::clone::Clone for vortex_fastlanes::FoRArray @@ -666,8 +660,6 @@ pub fn vortex_fastlanes::RLEArray::encode(array: &vortex_array::arrays::primitiv impl vortex_fastlanes::RLEArray -pub fn vortex_fastlanes::RLEArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::array::ArrayRef - pub fn vortex_fastlanes::RLEArray::to_array(&self) -> vortex_array::array::ArrayRef impl core::clone::Clone for vortex_fastlanes::RLEArray diff --git a/encodings/fsst/public-api.lock b/encodings/fsst/public-api.lock index a500a228f9b..a6c7dbc4cf4 100644 --- a/encodings/fsst/public-api.lock +++ b/encodings/fsst/public-api.lock @@ -124,8 +124,6 @@ pub fn vortex_fsst::FSSTArray::uncompressed_lengths_dtype(&self) -> &vortex_arra impl vortex_fsst::FSSTArray -pub fn vortex_fsst::FSSTArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::array::ArrayRef - pub fn vortex_fsst::FSSTArray::to_array(&self) -> vortex_array::array::ArrayRef impl core::clone::Clone for vortex_fsst::FSSTArray diff --git a/encodings/pco/public-api.lock b/encodings/pco/public-api.lock index d83d4d68cd2..10dc3f56b82 100644 --- a/encodings/pco/public-api.lock +++ b/encodings/pco/public-api.lock @@ -90,8 +90,6 @@ pub fn vortex_pco::PcoArray::new(chunk_metas: alloc::vec::Vec) -> vortex_array::array::ArrayRef - pub fn vortex_pco::PcoArray::to_array(&self) -> vortex_array::array::ArrayRef impl core::clone::Clone for vortex_pco::PcoArray diff --git a/encodings/runend/public-api.lock b/encodings/runend/public-api.lock index 867bd1d4c47..0bc5f77ab7d 100644 --- a/encodings/runend/public-api.lock +++ b/encodings/runend/public-api.lock @@ -136,8 +136,6 @@ pub fn vortex_runend::RunEndArray::values(&self) -> &vortex_array::array::ArrayR impl vortex_runend::RunEndArray -pub fn vortex_runend::RunEndArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::array::ArrayRef - pub fn vortex_runend::RunEndArray::to_array(&self) -> vortex_array::array::ArrayRef impl core::clone::Clone for vortex_runend::RunEndArray diff --git a/encodings/sequence/public-api.lock b/encodings/sequence/public-api.lock index 5e11ee48bbf..5b0f17988c0 100644 --- a/encodings/sequence/public-api.lock +++ b/encodings/sequence/public-api.lock @@ -118,8 +118,6 @@ pub fn vortex_sequence::SequenceArray::try_new_typed) -> vortex_array::array::ArrayRef - pub fn vortex_sequence::SequenceArray::to_array(&self) -> vortex_array::array::ArrayRef impl core::clone::Clone for vortex_sequence::SequenceArray diff --git a/encodings/sparse/public-api.lock b/encodings/sparse/public-api.lock index a2023a04521..87ef7c664bd 100644 --- a/encodings/sparse/public-api.lock +++ b/encodings/sparse/public-api.lock @@ -132,8 +132,6 @@ pub fn vortex_sparse::SparseArray::try_new_from_patches(patches: vortex_array::p impl vortex_sparse::SparseArray -pub fn vortex_sparse::SparseArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::array::ArrayRef - pub fn vortex_sparse::SparseArray::to_array(&self) -> vortex_array::array::ArrayRef impl core::clone::Clone for vortex_sparse::SparseArray diff --git a/encodings/zigzag/public-api.lock b/encodings/zigzag/public-api.lock index 6a337d79bbc..e34a3ebde15 100644 --- a/encodings/zigzag/public-api.lock +++ b/encodings/zigzag/public-api.lock @@ -108,8 +108,6 @@ pub fn vortex_zigzag::ZigZagArray::try_new(encoded: vortex_array::array::ArrayRe impl vortex_zigzag::ZigZagArray -pub fn vortex_zigzag::ZigZagArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::array::ArrayRef - pub fn vortex_zigzag::ZigZagArray::to_array(&self) -> vortex_array::array::ArrayRef impl core::clone::Clone for vortex_zigzag::ZigZagArray diff --git a/encodings/zstd/public-api.lock b/encodings/zstd/public-api.lock index 144f0cb570d..d6d8ab5cb34 100644 --- a/encodings/zstd/public-api.lock +++ b/encodings/zstd/public-api.lock @@ -100,8 +100,6 @@ pub fn vortex_zstd::ZstdArray::new(dictionary: core::option::Option) -> vortex_array::array::ArrayRef - pub fn vortex_zstd::ZstdArray::to_array(&self) -> vortex_array::array::ArrayRef impl core::clone::Clone for vortex_zstd::ZstdArray diff --git a/vortex-array/public-api.lock b/vortex-array/public-api.lock index 88bdca80481..a0be9a8cd84 100644 --- a/vortex-array/public-api.lock +++ b/vortex-array/public-api.lock @@ -978,13 +978,11 @@ pub fn vortex_array::arrays::BoolArray::validate(bits: &vortex_buffer::bit::buf: impl vortex_array::arrays::BoolArray -pub fn vortex_array::arrays::BoolArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - -pub fn vortex_array::arrays::BoolArray::to_array(&self) -> vortex_array::ArrayRef +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::patch(self, patches: &vortex_array::patches::Patches, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::BoolArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::BoolArray @@ -1194,8 +1192,6 @@ pub fn vortex_array::arrays::ChunkedArray::validate(chunks: &[vortex_array::Arra impl vortex_array::arrays::ChunkedArray -pub fn vortex_array::arrays::ChunkedArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - pub fn vortex_array::arrays::ChunkedArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::ChunkedArray @@ -1344,18 +1340,16 @@ pub struct vortex_array::arrays::constant::ConstantArray impl vortex_array::arrays::ConstantArray -pub fn vortex_array::arrays::ConstantArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - -pub fn vortex_array::arrays::ConstantArray::to_array(&self) -> vortex_array::ArrayRef - -impl vortex_array::arrays::ConstantArray - pub fn vortex_array::arrays::ConstantArray::into_parts(self) -> vortex_array::scalar::Scalar pub fn vortex_array::arrays::ConstantArray::new(scalar: S, len: usize) -> Self where S: core::convert::Into pub fn vortex_array::arrays::ConstantArray::scalar(&self) -> &vortex_array::scalar::Scalar +impl vortex_array::arrays::ConstantArray + +pub fn vortex_array::arrays::ConstantArray::to_array(&self) -> vortex_array::ArrayRef + impl core::clone::Clone for vortex_array::arrays::ConstantArray pub fn vortex_array::arrays::ConstantArray::clone(&self) -> vortex_array::arrays::ConstantArray @@ -1590,8 +1584,6 @@ pub fn vortex_array::arrays::DecimalArray::values_type(&self) -> vortex_array::d impl vortex_array::arrays::DecimalArray -pub fn vortex_array::arrays::DecimalArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - pub fn vortex_array::arrays::DecimalArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::DecimalArray @@ -1906,8 +1898,6 @@ pub fn vortex_array::arrays::dict::DictArray::values(&self) -> &vortex_array::Ar impl vortex_array::arrays::dict::DictArray -pub fn vortex_array::arrays::dict::DictArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - pub fn vortex_array::arrays::dict::DictArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::dict::DictArray @@ -2200,8 +2190,6 @@ pub fn vortex_array::arrays::ExtensionArray::try_new(ext_dtype: vortex_array::dt impl vortex_array::arrays::ExtensionArray -pub fn vortex_array::arrays::ExtensionArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - pub fn vortex_array::arrays::ExtensionArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::ExtensionArray @@ -2344,8 +2332,6 @@ pub fn vortex_array::arrays::FilterArray::try_new(array: vortex_array::ArrayRef, impl vortex_array::arrays::FilterArray -pub fn vortex_array::arrays::FilterArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - pub fn vortex_array::arrays::FilterArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::FilterArray @@ -2570,8 +2556,6 @@ pub fn vortex_array::arrays::FixedSizeListArray::validate(elements: &vortex_arra impl vortex_array::arrays::FixedSizeListArray -pub fn vortex_array::arrays::FixedSizeListArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - pub fn vortex_array::arrays::FixedSizeListArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::FixedSizeListArray @@ -2734,8 +2718,6 @@ pub fn vortex_array::arrays::ListArray::validate(elements: &vortex_array::ArrayR impl vortex_array::arrays::ListArray -pub fn vortex_array::arrays::ListArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - pub fn vortex_array::arrays::ListArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::ListArray @@ -2914,13 +2896,11 @@ pub unsafe fn vortex_array::arrays::ListViewArray::with_zero_copy_to_list(self, impl vortex_array::arrays::ListViewArray -pub fn vortex_array::arrays::ListViewArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - -pub fn vortex_array::arrays::ListViewArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ListViewArray::rebuild(&self, mode: vortex_array::arrays::listview::ListViewRebuildMode) -> vortex_error::VortexResult impl vortex_array::arrays::ListViewArray -pub fn vortex_array::arrays::ListViewArray::rebuild(&self, mode: vortex_array::arrays::listview::ListViewRebuildMode) -> vortex_error::VortexResult +pub fn vortex_array::arrays::ListViewArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::ListViewArray @@ -3076,8 +3056,6 @@ pub fn vortex_array::arrays::MaskedArray::try_new(child: vortex_array::ArrayRef, impl vortex_array::arrays::MaskedArray -pub fn vortex_array::arrays::MaskedArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - pub fn vortex_array::arrays::MaskedArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::MaskedArray @@ -3220,13 +3198,11 @@ pub struct vortex_array::arrays::null::NullArray impl vortex_array::arrays::null::NullArray -pub fn vortex_array::arrays::null::NullArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - -pub fn vortex_array::arrays::null::NullArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::null::NullArray::new(len: usize) -> Self impl vortex_array::arrays::null::NullArray -pub fn vortex_array::arrays::null::NullArray::new(len: usize) -> Self +pub fn vortex_array::arrays::null::NullArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::null::NullArray @@ -3484,17 +3460,15 @@ pub fn vortex_array::arrays::PrimitiveArray::try_into_buffer_mut) -> vortex_array::ArrayRef - -pub fn vortex_array::arrays::PrimitiveArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::PrimitiveArray::into_parts(self) -> vortex_array::arrays::primitive::PrimitiveArrayParts impl vortex_array::arrays::PrimitiveArray -pub fn vortex_array::arrays::PrimitiveArray::into_parts(self) -> vortex_array::arrays::primitive::PrimitiveArrayParts +pub fn vortex_array::arrays::PrimitiveArray::patch(self, patches: &vortex_array::patches::Patches, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::arrays::PrimitiveArray -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::PrimitiveArray::to_array(&self) -> vortex_array::ArrayRef impl vortex_array::arrays::PrimitiveArray @@ -3616,8 +3590,6 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::try_new(scalar_fn: vortex impl vortex_array::arrays::scalar_fn::ScalarFnArray -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::scalar_fn::ScalarFnArray @@ -3844,8 +3816,6 @@ pub fn vortex_array::arrays::SharedArray::new(source: vortex_array::ArrayRef) -> impl vortex_array::arrays::SharedArray -pub fn vortex_array::arrays::SharedArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - pub fn vortex_array::arrays::SharedArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::SharedArray @@ -3974,8 +3944,6 @@ pub fn vortex_array::arrays::slice::SliceArray::try_new(child: vortex_array::Arr impl vortex_array::arrays::slice::SliceArray -pub fn vortex_array::arrays::slice::SliceArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - pub fn vortex_array::arrays::slice::SliceArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::slice::SliceArray @@ -4260,13 +4228,11 @@ pub fn vortex_array::arrays::StructArray::with_column(&self, name: impl core::co impl vortex_array::arrays::StructArray -pub fn vortex_array::arrays::StructArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - -pub fn vortex_array::arrays::StructArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::StructArray::into_record_batch_with_schema(self, schema: impl core::convert::AsRef) -> vortex_error::VortexResult impl vortex_array::arrays::StructArray -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::StructArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::StructArray @@ -4480,8 +4446,6 @@ pub fn vortex_array::arrays::VarBinArray::validate(offsets: &vortex_array::Array impl vortex_array::arrays::VarBinArray -pub fn vortex_array::arrays::VarBinArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - pub fn vortex_array::arrays::VarBinArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::VarBinArray @@ -4900,8 +4864,6 @@ pub fn vortex_array::arrays::VarBinViewArray::compact_with_threshold(&self, buff impl vortex_array::arrays::VarBinViewArray -pub fn vortex_array::arrays::VarBinViewArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - pub fn vortex_array::arrays::VarBinViewArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::VarBinViewArray @@ -5062,8 +5024,6 @@ pub fn vortex_array::arrays::variant::VariantArray::new(child: vortex_array::Arr impl vortex_array::arrays::variant::VariantArray -pub fn vortex_array::arrays::variant::VariantArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - pub fn vortex_array::arrays::variant::VariantArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::variant::VariantArray @@ -5228,13 +5188,11 @@ pub fn vortex_array::arrays::BoolArray::validate(bits: &vortex_buffer::bit::buf: impl vortex_array::arrays::BoolArray -pub fn vortex_array::arrays::BoolArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - -pub fn vortex_array::arrays::BoolArray::to_array(&self) -> vortex_array::ArrayRef +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::patch(self, patches: &vortex_array::patches::Patches, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult +pub fn vortex_array::arrays::BoolArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::BoolArray @@ -5416,8 +5374,6 @@ pub fn vortex_array::arrays::ChunkedArray::validate(chunks: &[vortex_array::Arra impl vortex_array::arrays::ChunkedArray -pub fn vortex_array::arrays::ChunkedArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - pub fn vortex_array::arrays::ChunkedArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::ChunkedArray @@ -5564,18 +5520,16 @@ pub struct vortex_array::arrays::ConstantArray impl vortex_array::arrays::ConstantArray -pub fn vortex_array::arrays::ConstantArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - -pub fn vortex_array::arrays::ConstantArray::to_array(&self) -> vortex_array::ArrayRef - -impl vortex_array::arrays::ConstantArray - pub fn vortex_array::arrays::ConstantArray::into_parts(self) -> vortex_array::scalar::Scalar pub fn vortex_array::arrays::ConstantArray::new(scalar: S, len: usize) -> Self where S: core::convert::Into pub fn vortex_array::arrays::ConstantArray::scalar(&self) -> &vortex_array::scalar::Scalar +impl vortex_array::arrays::ConstantArray + +pub fn vortex_array::arrays::ConstantArray::to_array(&self) -> vortex_array::ArrayRef + impl core::clone::Clone for vortex_array::arrays::ConstantArray pub fn vortex_array::arrays::ConstantArray::clone(&self) -> vortex_array::arrays::ConstantArray @@ -5746,8 +5700,6 @@ pub fn vortex_array::arrays::DecimalArray::values_type(&self) -> vortex_array::d impl vortex_array::arrays::DecimalArray -pub fn vortex_array::arrays::DecimalArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - pub fn vortex_array::arrays::DecimalArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::DecimalArray @@ -5920,8 +5872,6 @@ pub fn vortex_array::arrays::dict::DictArray::values(&self) -> &vortex_array::Ar impl vortex_array::arrays::dict::DictArray -pub fn vortex_array::arrays::dict::DictArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - pub fn vortex_array::arrays::dict::DictArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::dict::DictArray @@ -6072,8 +6022,6 @@ pub fn vortex_array::arrays::ExtensionArray::try_new(ext_dtype: vortex_array::dt impl vortex_array::arrays::ExtensionArray -pub fn vortex_array::arrays::ExtensionArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - pub fn vortex_array::arrays::ExtensionArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::ExtensionArray @@ -6214,8 +6162,6 @@ pub fn vortex_array::arrays::FilterArray::try_new(array: vortex_array::ArrayRef, impl vortex_array::arrays::FilterArray -pub fn vortex_array::arrays::FilterArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - pub fn vortex_array::arrays::FilterArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::FilterArray @@ -6356,8 +6302,6 @@ pub fn vortex_array::arrays::FixedSizeListArray::validate(elements: &vortex_arra impl vortex_array::arrays::FixedSizeListArray -pub fn vortex_array::arrays::FixedSizeListArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - pub fn vortex_array::arrays::FixedSizeListArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::FixedSizeListArray @@ -6518,8 +6462,6 @@ pub fn vortex_array::arrays::ListArray::validate(elements: &vortex_array::ArrayR impl vortex_array::arrays::ListArray -pub fn vortex_array::arrays::ListArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - pub fn vortex_array::arrays::ListArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::ListArray @@ -6676,13 +6618,11 @@ pub unsafe fn vortex_array::arrays::ListViewArray::with_zero_copy_to_list(self, impl vortex_array::arrays::ListViewArray -pub fn vortex_array::arrays::ListViewArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - -pub fn vortex_array::arrays::ListViewArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::ListViewArray::rebuild(&self, mode: vortex_array::arrays::listview::ListViewRebuildMode) -> vortex_error::VortexResult impl vortex_array::arrays::ListViewArray -pub fn vortex_array::arrays::ListViewArray::rebuild(&self, mode: vortex_array::arrays::listview::ListViewRebuildMode) -> vortex_error::VortexResult +pub fn vortex_array::arrays::ListViewArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::ListViewArray @@ -6818,8 +6758,6 @@ pub fn vortex_array::arrays::MaskedArray::try_new(child: vortex_array::ArrayRef, impl vortex_array::arrays::MaskedArray -pub fn vortex_array::arrays::MaskedArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - pub fn vortex_array::arrays::MaskedArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::MaskedArray @@ -6958,13 +6896,11 @@ pub struct vortex_array::arrays::NullArray impl vortex_array::arrays::null::NullArray -pub fn vortex_array::arrays::null::NullArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - -pub fn vortex_array::arrays::null::NullArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::null::NullArray::new(len: usize) -> Self impl vortex_array::arrays::null::NullArray -pub fn vortex_array::arrays::null::NullArray::new(len: usize) -> Self +pub fn vortex_array::arrays::null::NullArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::null::NullArray @@ -7154,17 +7090,15 @@ pub fn vortex_array::arrays::PrimitiveArray::try_into_buffer_mut) -> vortex_array::ArrayRef - -pub fn vortex_array::arrays::PrimitiveArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::PrimitiveArray::into_parts(self) -> vortex_array::arrays::primitive::PrimitiveArrayParts impl vortex_array::arrays::PrimitiveArray -pub fn vortex_array::arrays::PrimitiveArray::into_parts(self) -> vortex_array::arrays::primitive::PrimitiveArrayParts +pub fn vortex_array::arrays::PrimitiveArray::patch(self, patches: &vortex_array::patches::Patches, ctx: &mut vortex_array::ExecutionCtx) -> vortex_error::VortexResult impl vortex_array::arrays::PrimitiveArray -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::PrimitiveArray::to_array(&self) -> vortex_array::ArrayRef impl vortex_array::arrays::PrimitiveArray @@ -7224,8 +7158,6 @@ pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::try_new(scalar_fn: vortex impl vortex_array::arrays::scalar_fn::ScalarFnArray -pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - pub fn vortex_array::arrays::scalar_fn::ScalarFnArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::scalar_fn::ScalarFnArray @@ -7430,8 +7362,6 @@ pub fn vortex_array::arrays::SharedArray::new(source: vortex_array::ArrayRef) -> impl vortex_array::arrays::SharedArray -pub fn vortex_array::arrays::SharedArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - pub fn vortex_array::arrays::SharedArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::SharedArray @@ -7558,8 +7488,6 @@ pub fn vortex_array::arrays::slice::SliceArray::try_new(child: vortex_array::Arr impl vortex_array::arrays::slice::SliceArray -pub fn vortex_array::arrays::slice::SliceArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - pub fn vortex_array::arrays::slice::SliceArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::slice::SliceArray @@ -7726,13 +7654,11 @@ pub fn vortex_array::arrays::StructArray::with_column(&self, name: impl core::co impl vortex_array::arrays::StructArray -pub fn vortex_array::arrays::StructArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - -pub fn vortex_array::arrays::StructArray::to_array(&self) -> vortex_array::ArrayRef +pub fn vortex_array::arrays::StructArray::into_record_batch_with_schema(self, schema: impl core::convert::AsRef) -> vortex_error::VortexResult impl vortex_array::arrays::StructArray -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::StructArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::StructArray @@ -7970,8 +7896,6 @@ pub fn vortex_array::arrays::VarBinArray::validate(offsets: &vortex_array::Array impl vortex_array::arrays::VarBinArray -pub fn vortex_array::arrays::VarBinArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - pub fn vortex_array::arrays::VarBinArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::VarBinArray @@ -8204,8 +8128,6 @@ pub fn vortex_array::arrays::VarBinViewArray::compact_with_threshold(&self, buff impl vortex_array::arrays::VarBinViewArray -pub fn vortex_array::arrays::VarBinViewArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - pub fn vortex_array::arrays::VarBinViewArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::VarBinViewArray @@ -8354,8 +8276,6 @@ pub fn vortex_array::arrays::variant::VariantArray::new(child: vortex_array::Arr impl vortex_array::arrays::variant::VariantArray -pub fn vortex_array::arrays::variant::VariantArray::into_array_ref(self: alloc::sync::Arc) -> vortex_array::ArrayRef - pub fn vortex_array::arrays::variant::VariantArray::to_array(&self) -> vortex_array::ArrayRef impl core::clone::Clone for vortex_array::arrays::variant::VariantArray diff --git a/vortex-array/src/array/mod.rs b/vortex-array/src/array/mod.rs index 94cd6f1d628..5c5d2782fff 100644 --- a/vortex-array/src/array/mod.rs +++ b/vortex-array/src/array/mod.rs @@ -308,28 +308,18 @@ impl dyn DynArray + '_ { } /// Returns the array downcast to the given `V::Array` as an owned object. - /// - /// Tries `Array` (new path) first, then falls back to `ArrayAdapter` (legacy). pub fn try_into(self: Arc) -> Result> { if !self.is::() { return Err(self); } let any_arc = self.as_any_arc(); - // Try new path: Array - if let Ok(typed) = any_arc.clone().downcast::>() { - return Ok(match Arc::try_unwrap(typed) { - Ok(array) => array.into_inner(), - Err(arc) => arc.deref().inner().clone(), - }); - } - // Legacy path: ArrayAdapter - let arc = any_arc - .downcast::>() + let typed: Arc> = any_arc + .downcast::>() .map_err(|_| vortex_err!("failed to downcast")) .vortex_expect("Failed to downcast"); - Ok(match Arc::try_unwrap(arc) { + Ok(match Arc::try_unwrap(typed) { Ok(array) => array.into_inner(), - Err(arc) => arc.deref().as_inner().clone(), + Err(arc) => arc.deref().inner().clone(), }) } @@ -827,7 +817,7 @@ impl DynArray for ArrayAdapter { } fn to_array(&self) -> ArrayRef { - Arc::new(ArrayAdapter::(self.0.clone())) + self.0.clone().into_array() } fn len(&self) -> usize { diff --git a/vortex-array/src/vtable/dyn_.rs b/vortex-array/src/vtable/dyn_.rs index c0b2954fbe1..6b7266719c4 100644 --- a/vortex-array/src/vtable/dyn_.rs +++ b/vortex-array/src/vtable/dyn_.rs @@ -2,7 +2,6 @@ // SPDX-FileCopyrightText: Copyright the Vortex contributors use std::fmt::Debug; -use std::mem::transmute; use std::sync::Arc; use arcref::ArcRef; @@ -11,7 +10,6 @@ use vortex_error::VortexResult; use vortex_error::vortex_ensure; use vortex_session::VortexSession; -use crate::ArrayAdapter; use crate::ArrayRef; use crate::DynArray; use crate::ExecutionResult; @@ -222,50 +220,31 @@ impl DynVTable for V { } /// Borrow-downcast an `ArrayRef` to `&V::Array`. -/// -/// Tries `Array` (new path) first, then falls back to `ArrayAdapter` (legacy path). fn downcast(array: &ArrayRef) -> &V::Array { - // New path: Array - if let Some(typed) = array.as_any().downcast_ref::>() { - return typed.inner(); - } - // Legacy path: ArrayAdapter array .as_any() - .downcast_ref::>() + .downcast_ref::>() .vortex_expect("Failed to downcast array to expected encoding type") - .as_inner() + .inner() } -/// Downcast an `ArrayRef` into an `Arc` without cloning. -/// -/// Tries `Array` (new path) first, then falls back to `ArrayAdapter` (legacy path). +/// Downcast an `ArrayRef` into an `Arc`. fn downcast_owned(array: ArrayRef) -> Arc { - // Try new path: Array let any_arc = array.as_any_arc(); - if let Ok(typed) = any_arc.clone().downcast::>() { - // Need to clone the inner array since Array owns it alongside the vtable. - return Arc::new(match Arc::try_unwrap(typed) { - Ok(array) => array.into_inner(), - Err(arc) => arc.inner().clone(), - }); - } - // Legacy path: ArrayAdapter — zero-cost via #[repr(transparent)] - let adapter: Arc> = any_arc - .downcast::>() + let typed: Arc> = any_arc + .downcast::>() .ok() .vortex_expect("Failed to downcast array to expected encoding type"); - // SAFETY: ArrayAdapter is #[repr(transparent)] over V::Array, - // so Arc> and Arc have identical layout. - unsafe { transmute::>, Arc>(adapter) } + Arc::new(match Arc::try_unwrap(typed) { + Ok(array) => array.into_inner(), + Err(arc) => arc.inner().clone(), + }) } -/// Upcast an `Arc` into an `ArrayRef` without cloning. -/// -/// This is a zero-cost pointer cast leveraging the `#[repr(transparent)]` layout of -/// [`ArrayAdapter`]. It is the reverse of `downcast_owned`. +/// Upcast an `Arc` into an `ArrayRef`. pub(crate) fn upcast_array(array: Arc) -> ArrayRef { - // SAFETY: ArrayAdapter is #[repr(transparent)] over V::Array, - // so Arc and Arc> have identical layout. - unsafe { transmute::, Arc>>(array) } + match Arc::try_unwrap(array) { + Ok(inner) => inner.into_array(), + Err(arc) => (*arc).clone().into_array(), + } } diff --git a/vortex-array/src/vtable/mod.rs b/vortex-array/src/vtable/mod.rs index dd6b5347932..9f9924a6f19 100644 --- a/vortex-array/src/vtable/mod.rs +++ b/vortex-array/src/vtable/mod.rs @@ -289,14 +289,6 @@ macro_rules! vtable { use $crate::IntoArray; self.clone().into_array() } - - /// Upcasts an `Arc` to an [`ArrayRef`] without cloning. - pub fn into_array_ref(self: std::sync::Arc) -> $crate::ArrayRef { - // SAFETY: ArrayAdapter is #[repr(transparent)] over V::Array, - // so Arc and Arc> have identical layout. - let raw = std::sync::Arc::into_raw(self) as *const $crate::ArrayAdapter<$VT>; - unsafe { std::sync::Arc::from_raw(raw) } - } } } };