Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions rust/arrow/src/array/array_boolean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,6 @@ impl BooleanArray {
self.data.is_empty()
}

/// Returns a raw pointer to the values of this array.
pub fn raw_values(&self) -> *const u8 {
unsafe { self.raw_values.as_ptr().add(self.data.offset()) }
}

/// Returns a slice for the given offset and length
///
/// Note this doesn't do any bound checking, for performance reason.
pub fn value_slice(&self, offset: usize, len: usize) -> &[u8] {
let raw =
unsafe { std::slice::from_raw_parts(self.raw_values().add(offset), len) };
&raw[..]
}

// Returns a new boolean array builder
pub fn builder(capacity: usize) -> BooleanBuilder {
BooleanBuilder::new(capacity)
Expand Down
13 changes: 0 additions & 13 deletions rust/arrow/src/array/array_primitive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,6 @@ impl<T: ArrowPrimitiveType> PrimitiveArray<T> {
self.data.is_empty()
}

/// Returns a slice for the given offset and length
///
/// Note this doesn't do any bound checking, for performance reason.
/// # Safety
/// caller must ensure that the passed in offset + len are less than the array len()
#[deprecated(note = "Please use values() instead")]
pub unsafe fn value_slice(&self, offset: usize, len: usize) -> &[T::Native] {
std::slice::from_raw_parts(
self.raw_values.as_ptr().add(self.data.offset()).add(offset),
len,
)
}

/// Returns a slice of the values of this array
#[inline]
pub fn values(&self) -> &[T::Native] {
Expand Down