Skip to content

Commit

Permalink
Don't validate offset buffers when converting them to arrow (#887)
Browse files Browse the repository at this point in the history
This shows up as most expensive part of converting into arrow since
OffsetBuffer::new validates that values are monotonic
  • Loading branch information
robert3005 authored Sep 20, 2024
1 parent 4168d21 commit 372ea90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vortex-array/src/arrow/wrappers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ pub fn as_scalar_buffer<T: NativePType + ArrowNativeType>(
pub fn as_offset_buffer<T: NativePType + ArrowNativeType>(
array: PrimitiveArray,
) -> OffsetBuffer<T> {
OffsetBuffer::new(as_scalar_buffer(array))
unsafe { OffsetBuffer::new_unchecked(as_scalar_buffer(array)) }
}

0 comments on commit 372ea90

Please sign in to comment.