Skip to content

Commit 286fdaf

Browse files
joseph-isaacsclaude
andcommitted
fix: resolve CI lint failures for array_slots macro PR
- Remove unused imports of DictArrayExt, ALPArraySlotsExt where SlotsExt provides the needed methods - Fix base_array() -> inner() rename in fastlanes plugin test - Remove dead downcast_slot function and commented-out code - Fix taplo formatting in workspace Cargo.toml - Regenerate public-api.lock files Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c93ae2f commit 286fdaf

8 files changed

Lines changed: 61 additions & 34 deletions

File tree

encodings/alp/public-api.lock

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,8 @@ impl<'a> vortex_alp::ALPSlotsView<'a>
338338

339339
pub fn vortex_alp::ALPSlotsView<'a>::from_slots(slots: &'a [core::option::Option<vortex_array::array::erased::ArrayRef>]) -> Self
340340

341+
pub fn vortex_alp::ALPSlotsView<'a>::to_owned(&self) -> vortex_alp::ALPSlots
342+
341343
impl<'a> core::clone::Clone for vortex_alp::ALPSlotsView<'a>
342344

343345
pub fn vortex_alp::ALPSlotsView<'a>::clone(&self) -> vortex_alp::ALPSlotsView<'a>

encodings/fastlanes/public-api.lock

Lines changed: 52 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,34 @@ pub vortex_fastlanes::BitPackedDataParts::patches: core::option::Option<vortex_a
248248

249249
pub vortex_fastlanes::BitPackedDataParts::validity: vortex_array::validity::Validity
250250

251+
pub struct vortex_fastlanes::BitPackedSlots
252+
253+
pub vortex_fastlanes::BitPackedSlots::patch_chunk_offsets: core::option::Option<vortex_array::array::erased::ArrayRef>
254+
255+
pub vortex_fastlanes::BitPackedSlots::patch_indices: core::option::Option<vortex_array::array::erased::ArrayRef>
256+
257+
pub vortex_fastlanes::BitPackedSlots::patch_values: core::option::Option<vortex_array::array::erased::ArrayRef>
258+
259+
pub vortex_fastlanes::BitPackedSlots::validity_child: core::option::Option<vortex_array::array::erased::ArrayRef>
260+
261+
impl vortex_fastlanes::BitPackedSlots
262+
263+
pub const vortex_fastlanes::BitPackedSlots::COUNT: usize
264+
265+
pub const vortex_fastlanes::BitPackedSlots::NAMES: [&'static str; 4]
266+
267+
pub const vortex_fastlanes::BitPackedSlots::PATCH_CHUNK_OFFSETS: usize
268+
269+
pub const vortex_fastlanes::BitPackedSlots::PATCH_INDICES: usize
270+
271+
pub const vortex_fastlanes::BitPackedSlots::PATCH_VALUES: usize
272+
273+
pub const vortex_fastlanes::BitPackedSlots::VALIDITY_CHILD: usize
274+
275+
pub fn vortex_fastlanes::BitPackedSlots::from_slots(slots: alloc::vec::Vec<core::option::Option<vortex_array::array::erased::ArrayRef>>) -> Self
276+
277+
pub fn vortex_fastlanes::BitPackedSlots::into_slots(self) -> alloc::vec::Vec<core::option::Option<vortex_array::array::erased::ArrayRef>>
278+
251279
pub struct vortex_fastlanes::Delta
252280

253281
impl vortex_fastlanes::Delta
@@ -544,7 +572,7 @@ pub fn vortex_fastlanes::RLEData::array_hash<H: core::hash::Hasher>(&self, state
544572

545573
pub static vortex_fastlanes::USE_EXPERIMENTAL_PATCHES: std::sync::lazy_lock::LazyLock<bool>
546574

547-
pub trait vortex_fastlanes::BitPackedArrayExt: vortex_array::array::typed::TypedArrayRef<vortex_fastlanes::BitPacked>
575+
pub trait vortex_fastlanes::BitPackedArrayExt: vortex_fastlanes::BitPackedArraySlotsExt
548576

549577
pub fn vortex_fastlanes::BitPackedArrayExt::bit_width(&self) -> u8
550578

@@ -554,20 +582,12 @@ pub fn vortex_fastlanes::BitPackedArrayExt::packed(&self) -> &vortex_array::buff
554582

555583
pub fn vortex_fastlanes::BitPackedArrayExt::packed_slice<T: vortex_array::dtype::ptype::NativePType + fastlanes::bitpacking::BitPacking>(&self) -> &[T]
556584

557-
pub fn vortex_fastlanes::BitPackedArrayExt::patch_chunk_offsets(&self) -> core::option::Option<&vortex_array::array::erased::ArrayRef>
558-
559-
pub fn vortex_fastlanes::BitPackedArrayExt::patch_indices(&self) -> core::option::Option<&vortex_array::array::erased::ArrayRef>
560-
561-
pub fn vortex_fastlanes::BitPackedArrayExt::patch_values(&self) -> core::option::Option<&vortex_array::array::erased::ArrayRef>
562-
563585
pub fn vortex_fastlanes::BitPackedArrayExt::patches(&self) -> core::option::Option<vortex_array::patches::Patches>
564586

565587
pub fn vortex_fastlanes::BitPackedArrayExt::unpacked_chunks<T: vortex_fastlanes::unpack_iter::BitPacked>(&self) -> vortex_error::VortexResult<vortex_fastlanes::unpack_iter::BitUnpackedChunks<T>>
566588

567589
pub fn vortex_fastlanes::BitPackedArrayExt::validity(&self) -> vortex_array::validity::Validity
568590

569-
pub fn vortex_fastlanes::BitPackedArrayExt::validity_child(&self) -> core::option::Option<&vortex_array::array::erased::ArrayRef>
570-
571591
pub fn vortex_fastlanes::BitPackedArrayExt::validity_mask(&self) -> vortex_mask::Mask
572592

573593
impl<T: vortex_array::array::typed::TypedArrayRef<vortex_fastlanes::BitPacked>> vortex_fastlanes::BitPackedArrayExt for T
@@ -580,22 +600,38 @@ pub fn T::packed(&self) -> &vortex_array::buffer::BufferHandle
580600

581601
pub fn T::packed_slice<T: vortex_array::dtype::ptype::NativePType + fastlanes::bitpacking::BitPacking>(&self) -> &[T]
582602

603+
pub fn T::patches(&self) -> core::option::Option<vortex_array::patches::Patches>
604+
605+
pub fn T::unpacked_chunks<T: vortex_fastlanes::unpack_iter::BitPacked>(&self) -> vortex_error::VortexResult<vortex_fastlanes::unpack_iter::BitUnpackedChunks<T>>
606+
607+
pub fn T::validity(&self) -> vortex_array::validity::Validity
608+
609+
pub fn T::validity_mask(&self) -> vortex_mask::Mask
610+
611+
pub trait vortex_fastlanes::BitPackedArraySlotsExt: vortex_array::array::typed::TypedArrayRef<vortex_fastlanes::BitPacked>
612+
613+
pub fn vortex_fastlanes::BitPackedArraySlotsExt::patch_chunk_offsets(&self) -> core::option::Option<&vortex_array::array::erased::ArrayRef>
614+
615+
pub fn vortex_fastlanes::BitPackedArraySlotsExt::patch_indices(&self) -> core::option::Option<&vortex_array::array::erased::ArrayRef>
616+
617+
pub fn vortex_fastlanes::BitPackedArraySlotsExt::patch_values(&self) -> core::option::Option<&vortex_array::array::erased::ArrayRef>
618+
619+
pub fn vortex_fastlanes::BitPackedArraySlotsExt::slots_view(&self) -> vortex_fastlanes::bitpacking::array::BitPackedSlotsView<'_>
620+
621+
pub fn vortex_fastlanes::BitPackedArraySlotsExt::validity_child(&self) -> core::option::Option<&vortex_array::array::erased::ArrayRef>
622+
623+
impl<T: vortex_array::array::typed::TypedArrayRef<vortex_fastlanes::BitPacked>> vortex_fastlanes::BitPackedArraySlotsExt for T
624+
583625
pub fn T::patch_chunk_offsets(&self) -> core::option::Option<&vortex_array::array::erased::ArrayRef>
584626

585627
pub fn T::patch_indices(&self) -> core::option::Option<&vortex_array::array::erased::ArrayRef>
586628

587629
pub fn T::patch_values(&self) -> core::option::Option<&vortex_array::array::erased::ArrayRef>
588630

589-
pub fn T::patches(&self) -> core::option::Option<vortex_array::patches::Patches>
590-
591-
pub fn T::unpacked_chunks<T: vortex_fastlanes::unpack_iter::BitPacked>(&self) -> vortex_error::VortexResult<vortex_fastlanes::unpack_iter::BitUnpackedChunks<T>>
592-
593-
pub fn T::validity(&self) -> vortex_array::validity::Validity
631+
pub fn T::slots_view(&self) -> vortex_fastlanes::bitpacking::array::BitPackedSlotsView<'_>
594632

595633
pub fn T::validity_child(&self) -> core::option::Option<&vortex_array::array::erased::ArrayRef>
596634

597-
pub fn T::validity_mask(&self) -> vortex_mask::Mask
598-
599635
pub trait vortex_fastlanes::FoRArrayExt: vortex_array::array::typed::TypedArrayRef<vortex_fastlanes::FoR>
600636

601637
pub fn vortex_fastlanes::FoRArrayExt::encoded(&self) -> &vortex_array::array::erased::ArrayRef

encodings/fastlanes/src/bitpacking/plugin.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ mod tests {
9292
use vortex_array::IntoArray;
9393
use vortex_array::arrays::PatchedArray;
9494
use vortex_array::arrays::PrimitiveArray;
95-
use vortex_array::arrays::patched::PatchedArrayExt;
95+
use vortex_array::arrays::patched::PatchedArraySlotsExt;
9696
use vortex_array::buffer::BufferHandle;
9797
use vortex_array::session::ArraySession;
9898
use vortex_array::session::ArraySessionExt;
@@ -150,7 +150,7 @@ mod tests {
150150
.map_err(|a| vortex_err!("Expected Patched, got {}", a.encoding_id()))?;
151151

152152
let inner_bitpacked: BitPackedArray = patched
153-
.base_array()
153+
.inner()
154154
.clone()
155155
.try_downcast()
156156
.map_err(|a| vortex_err!("Expected inner BitPacked, got {}", a.encoding_id()))?;

vortex-array/public-api.lock

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2156,6 +2156,8 @@ impl<'a> vortex_array::arrays::dict::DictSlotsView<'a>
21562156

21572157
pub fn vortex_array::arrays::dict::DictSlotsView<'a>::from_slots(slots: &'a [core::option::Option<vortex_array::ArrayRef>]) -> Self
21582158

2159+
pub fn vortex_array::arrays::dict::DictSlotsView<'a>::to_owned(&self) -> vortex_array::arrays::dict::DictSlots
2160+
21592161
impl<'a> core::clone::Clone for vortex_array::arrays::dict::DictSlotsView<'a>
21602162

21612163
pub fn vortex_array::arrays::dict::DictSlotsView<'a>::clone(&self) -> vortex_array::arrays::dict::DictSlotsView<'a>
@@ -3524,6 +3526,8 @@ impl<'a> vortex_array::arrays::patched::PatchedSlotsView<'a>
35243526

35253527
pub fn vortex_array::arrays::patched::PatchedSlotsView<'a>::from_slots(slots: &'a [core::option::Option<vortex_array::ArrayRef>]) -> Self
35263528

3529+
pub fn vortex_array::arrays::patched::PatchedSlotsView<'a>::to_owned(&self) -> vortex_array::arrays::patched::PatchedSlots
3530+
35273531
impl<'a> core::clone::Clone for vortex_array::arrays::patched::PatchedSlotsView<'a>
35283532

35293533
pub fn vortex_array::arrays::patched::PatchedSlotsView<'a>::clone(&self) -> vortex_array::arrays::patched::PatchedSlotsView<'a>

vortex-array/src/arrays/patched/vtable/mod.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -260,22 +260,10 @@ impl VTable for Patched {
260260

261261
let len = array.len();
262262

263-
fn downcast_slot(slot: ArrayRef) -> PrimitiveArray {
264-
slot.try_downcast::<Primitive>()
265-
.ok()
266-
.vortex_expect("slot must be primitive")
267-
}
268-
269263
let n_lanes = array.n_lanes;
270264
let offset = array.offset;
271265
let slots = match array.try_into_parts() {
272-
Ok(parts) => {
273-
PatchedSlots::from_slots(parts.slots)
274-
// let inner = downcast_slot(take_slot(&mut parts.slots, INNER_SLOT));
275-
// let lane_offsets = downcast_slot(take_slot(&mut parts.slots, LANE_OFFSETS_SLOT));
276-
// let indices = downcast_slot(take_slot(&mut parts.slots, INDICES_SLOT));
277-
// let values = downcast_slot(take_slot(&mut parts.slots, VALUES_SLOT));
278-
}
266+
Ok(parts) => PatchedSlots::from_slots(parts.slots),
279267
Err(array) => PatchedSlotsView::from_slots(array.slots()).to_owned(),
280268
};
281269

vortex-compressor/src/builtins/dict/float.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,6 @@ mod tests {
238238
use vortex_array::ToCanonical;
239239
use vortex_array::arrays::BoolArray;
240240
use vortex_array::arrays::PrimitiveArray;
241-
use vortex_array::arrays::dict::DictArrayExt;
242241
use vortex_array::arrays::dict::DictArraySlotsExt;
243242
use vortex_array::assert_arrays_eq;
244243
use vortex_array::validity::Validity;

vortex-compressor/src/builtins/dict/integer.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,6 @@ mod tests {
244244
use vortex_array::ToCanonical;
245245
use vortex_array::arrays::BoolArray;
246246
use vortex_array::arrays::PrimitiveArray;
247-
use vortex_array::arrays::dict::DictArrayExt;
248247
use vortex_array::arrays::dict::DictArraySlotsExt;
249248
use vortex_array::assert_arrays_eq;
250249
use vortex_array::validity::Validity;

vortex-file/src/tests.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ use vortex_array::arrays::StructArray;
2424
use vortex_array::arrays::TemporalArray;
2525
use vortex_array::arrays::VarBinArray;
2626
use vortex_array::arrays::VarBinViewArray;
27-
use vortex_array::arrays::dict::DictArrayExt;
2827
use vortex_array::arrays::dict::DictArraySlotsExt;
2928
use vortex_array::arrays::struct_::StructArrayExt;
3029
use vortex_array::assert_arrays_eq;

0 commit comments

Comments
 (0)