Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
a10y committed Jan 21, 2025
1 parent 461a3ec commit c8d4b6d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions vortex-array/src/array/primitive/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<T>(), length);
// SAFETY: alignment of Buffer is checked on construction
unsafe { std::slice::from_raw_parts(raw_slice.as_ptr().cast(), length) }
Expand Down
4 changes: 3 additions & 1 deletion vortex-array/src/array/struct_/compute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ impl ScalarAtFn<StructArray> 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()?,
))
}
Expand Down
1 change: 1 addition & 0 deletions vortex-array/src/array/varbin/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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_()
})
})
Expand Down
1 change: 1 addition & 0 deletions vortex-array/src/data/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c8d4b6d

Please sign in to comment.