pub trait TakeFn<A> {
// Required method
fn take(&self, array: &A, indices: &Array) -> VortexResult<Array>;
// Provided method
unsafe fn take_unchecked(
&self,
array: &A,
indices: &Array,
) -> VortexResult<Array> { ... }
}Required Methods§
Provided Methods§
Sourceunsafe fn take_unchecked(
&self,
array: &A,
indices: &Array,
) -> VortexResult<Array>
unsafe fn take_unchecked( &self, array: &A, indices: &Array, ) -> VortexResult<Array>
Create a new array by taking the values from the array at the
given indices.
§Safety
This take variant will not perform bounds checking on indices, so it is the caller’s
responsibility to ensure that the indices are all valid for the provided array.
Failure to do so could result in out of bounds memory access or UB.
Implementors§
impl TakeFn<BoolArray> for BoolEncoding
impl TakeFn<ChunkedArray> for ChunkedEncoding
impl TakeFn<ConstantArray> for ConstantEncoding
impl TakeFn<ExtensionArray> for ExtensionEncoding
impl TakeFn<NullArray> for NullEncoding
impl TakeFn<PrimitiveArray> for PrimitiveEncoding
impl TakeFn<StructArray> for StructEncoding
impl TakeFn<VarBinArray> for VarBinEncoding
impl TakeFn<VarBinViewArray> for VarBinViewEncoding
Take involves creating a new array that references the old array, just with the given set of views.