From c8d4b6d0920961b8e3020e91f8cd689121c99700 Mon Sep 17 00:00:00 2001 From: Andrew Duffy Date: Tue, 21 Jan 2025 21:00:39 +0100 Subject: [PATCH] save --- vortex-array/src/array/primitive/mod.rs | 1 + vortex-array/src/array/struct_/compute.rs | 4 +++- vortex-array/src/array/varbin/mod.rs | 1 + vortex-array/src/data/mod.rs | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/vortex-array/src/array/primitive/mod.rs b/vortex-array/src/array/primitive/mod.rs index bc4159b364..ef35f4ba51 100644 --- a/vortex-array/src/array/primitive/mod.rs +++ b/vortex-array/src/array/primitive/mod.rs @@ -199,6 +199,7 @@ impl PrimitiveArray { } let length = self.len(); let raw_slice = self.byte_buffer().as_slice(); + println!("raw_slice.len() = {} ptype = {}", raw_slice.len(), T::PTYPE); debug_assert_eq!(raw_slice.len() / size_of::(), length); // SAFETY: alignment of Buffer is checked on construction unsafe { std::slice::from_raw_parts(raw_slice.as_ptr().cast(), length) } diff --git a/vortex-array/src/array/struct_/compute.rs b/vortex-array/src/array/struct_/compute.rs index d95788d60e..ef3b544209 100644 --- a/vortex-array/src/array/struct_/compute.rs +++ b/vortex-array/src/array/struct_/compute.rs @@ -35,7 +35,9 @@ impl ScalarAtFn for StructEncoding { array.dtype().clone(), array .children() - .map(|field| scalar_at(&field, index)) + .enumerate() + .inspect(|(idx, _)| println!("scalar @ for field {idx}")) + .map(|(_, field)| scalar_at(&field, index)) .try_collect()?, )) } diff --git a/vortex-array/src/array/varbin/mod.rs b/vortex-array/src/array/varbin/mod.rs index a2c0d1b13c..9d29d16cbd 100644 --- a/vortex-array/src/array/varbin/mod.rs +++ b/vortex-array/src/array/varbin/mod.rs @@ -190,6 +190,7 @@ impl VarBinArray { Ok(PrimitiveArray::maybe_from(self.offsets()) .map(|p| { match_each_native_ptype!(p.ptype(), |$P| { + println!("using offset ptype {}", $P::PTYPE); p.as_slice::<$P>()[index].as_() }) }) diff --git a/vortex-array/src/data/mod.rs b/vortex-array/src/data/mod.rs index 7f9b832877..4d6f76c085 100644 --- a/vortex-array/src/data/mod.rs +++ b/vortex-array/src/data/mod.rs @@ -96,6 +96,7 @@ impl ArrayData { // Parse the array metadata let metadata = encoding.load_metadata(array.as_fb().metadata().map(|v| v.bytes()))?; + println!("metadata = {:?}", metadata); let view = ViewedArrayData { encoding,