Type Alias IdxArr

pub type IdxArr = PrimitiveArray<u32>;

Aliased Type§

struct IdxArr { /* private fields */ }

Implementations

§

impl<T> PrimitiveArray<T>
where T: NativeType,

pub fn try_new( dtype: ArrowDataType, values: Buffer<T>, validity: Option<Bitmap>, ) -> Result<PrimitiveArray<T>, PolarsError>

The canonical method to create a [PrimitiveArray] out of its internal components.

§Implementation

This function is O(1).

§Errors

This function errors iff:

  • The validity is not None and its length is different from values’s length
  • The dtype’s [PhysicalType] is not equal to [PhysicalType::Primitive(T::PRIMITIVE)]

pub unsafe fn new_unchecked( dtype: ArrowDataType, values: Buffer<T>, validity: Option<Bitmap>, ) -> PrimitiveArray<T>

§Safety

Doesn’t check invariants

pub fn to(self, dtype: ArrowDataType) -> PrimitiveArray<T>

Returns a new [PrimitiveArray] with a different logical type.

This function is useful to assign a different ArrowDataType to the array. Used to change the arrays’ logical type (see example).

§Example
use polars_arrow::array::Int32Array;
use polars_arrow::datatypes::ArrowDataType;

let array = Int32Array::from(&[Some(1), None, Some(2)]).to(ArrowDataType::Date32);
assert_eq!(
   format!("{:?}", array),
   "Date32[1970-01-02, None, 1970-01-03]"
);
§Panics

Panics iff the dtype’s [PhysicalType] is not equal to [PhysicalType::Primitive(T::PRIMITIVE)]

pub fn from_vec(values: Vec<T>) -> PrimitiveArray<T>

Creates a (non-null) [PrimitiveArray] from a vector of values. This function is O(1).

§Examples
use polars_arrow::array::PrimitiveArray;

let array = PrimitiveArray::from_vec(vec![1, 2, 3]);
assert_eq!(format!("{:?}", array), "Int32[1, 2, 3]");

pub fn iter(&self) -> ZipValidity<&T, Iter<'_, T>, BitmapIter<'_>>

Returns an iterator over the values and validity, Option<&T>.

pub fn values_iter(&self) -> Iter<'_, T>

Returns an iterator of the values, &T, ignoring the arrays’ validity.

pub fn non_null_values_iter(&self) -> NonNullValuesIter<'_, [T]>

Returns an iterator of the non-null values T.

pub fn len(&self) -> usize

Returns the length of this array

pub fn values(&self) -> &Buffer<T>

The values [Buffer]. Values on null slots are undetermined (they can be anything).

pub fn validity(&self) -> Option<&Bitmap>

Returns the optional validity.

pub fn dtype(&self) -> &ArrowDataType

Returns the arrays’ ArrowDataType.

pub fn value(&self, i: usize) -> T

Returns the value at slot i.

Equivalent to self.values()[i]. The value of a null slot is undetermined (it can be anything).

§Panic

This function panics iff i >= self.len.

pub unsafe fn value_unchecked(&self, i: usize) -> T

Returns the value at index i. The value on null slots is undetermined (it can be anything).

§Safety

Caller must be sure that i < self.len()

pub fn slice(&mut self, offset: usize, length: usize)

Slices this [PrimitiveArray] by an offset and length.

§Implementation

This operation is O(1).

pub unsafe fn slice_unchecked(&mut self, offset: usize, length: usize)

Slices this [PrimitiveArray] by an offset and length.

§Implementation

This operation is O(1).

§Safety

The caller must ensure that offset + length <= self.len().

pub fn sliced(self, offset: usize, length: usize) -> PrimitiveArray<T>

Returns this array sliced.

§Implementation

This function is O(1).

§Panics

iff offset + length > self.len().

pub unsafe fn sliced_unchecked( self, offset: usize, length: usize, ) -> PrimitiveArray<T>

Returns this array sliced.

§Implementation

This function is O(1).

§Safety

The caller must ensure that offset + length <= self.len().

pub fn with_validity(self, validity: Option<Bitmap>) -> PrimitiveArray<T>

Returns this array with a new validity.

§Panic

Panics iff validity.len() != self.len().

pub fn set_validity(&mut self, validity: Option<Bitmap>)

Sets the validity of this array.

§Panics

This function panics iff values.len() != self.len().

pub fn take_validity(&mut self) -> Option<Bitmap>

Takes the validity of this array, leaving it without a validity mask.

pub fn boxed(self) -> Box<dyn Array>

Boxes this array into a Box<dyn Array>.

pub fn arced(self) -> Arc<dyn Array>

Arcs this array into a std::sync::Arc<dyn Array>.

pub fn with_values(self, values: Buffer<T>) -> PrimitiveArray<T>

Returns this [PrimitiveArray] with new values.

§Panics

This function panics iff values.len() != self.len().

pub fn set_values(&mut self, values: Buffer<T>)

Update the values of this [PrimitiveArray].

§Panics

This function panics iff values.len() != self.len().

pub fn apply_validity<F>(&mut self, f: F)
where F: FnOnce(Bitmap) -> Bitmap,

Applies a function f to the validity of this array.

This is an API to leverage clone-on-write

§Panics

This function panics if the function f modifies the length of the [Bitmap].

pub fn get_mut_values(&mut self) -> Option<&mut [T]>

Returns an option of a mutable reference to the values of this [PrimitiveArray].

pub fn into_inner(self) -> (ArrowDataType, Buffer<T>, Option<Bitmap>)

Returns its internal representation

pub fn from_inner( dtype: ArrowDataType, values: Buffer<T>, validity: Option<Bitmap>, ) -> Result<PrimitiveArray<T>, PolarsError>

Creates a [PrimitiveArray] from its internal representation. This is the inverted from [PrimitiveArray::into_inner]

pub unsafe fn from_inner_unchecked( dtype: ArrowDataType, values: Buffer<T>, validity: Option<Bitmap>, ) -> PrimitiveArray<T>

Creates a [PrimitiveArray] from its internal representation. This is the inverted from [PrimitiveArray::into_inner]

§Safety

Callers must ensure all invariants of this struct are upheld.

pub fn into_mut(self) -> Either<PrimitiveArray<T>, MutablePrimitiveArray<T>>

Try to convert this [PrimitiveArray] to a [MutablePrimitiveArray] via copy-on-write semantics.

A [PrimitiveArray] is backed by a [Buffer] and [Bitmap] which are essentially Arc<Vec<_>>. This function returns a [MutablePrimitiveArray] (via std::sync::Arc::get_mut) iff both values and validity have not been cloned / are unique references to their underlying vectors.

This function is primarily used to reuse memory regions.

pub fn new_empty(dtype: ArrowDataType) -> PrimitiveArray<T>

Returns a new empty (zero-length) [PrimitiveArray].

pub fn new_null(dtype: ArrowDataType, length: usize) -> PrimitiveArray<T>

Returns a new [PrimitiveArray] where all slots are null / None.

pub fn from_values<I>(iter: I) -> PrimitiveArray<T>
where I: IntoIterator<Item = T>,

Creates a (non-null) [PrimitiveArray] from an iterator of values.

§Implementation

This does not assume that the iterator has a known length.

pub fn from_slice<P>(slice: P) -> PrimitiveArray<T>
where P: AsRef<[T]>,

Creates a (non-null) [PrimitiveArray] from a slice of values.

§Implementation

This is essentially a memcopy and is thus O(N)

pub fn from_trusted_len_values_iter<I>(iter: I) -> PrimitiveArray<T>
where I: TrustedLen<Item = T>,

Creates a (non-null) [PrimitiveArray] from a [TrustedLen] of values.

§Implementation

This does not assume that the iterator has a known length.

pub unsafe fn from_trusted_len_values_iter_unchecked<I>( iter: I, ) -> PrimitiveArray<T>
where I: Iterator<Item = T>,

Creates a new [PrimitiveArray] from an iterator over values

§Safety

The iterator must be TrustedLen. I.e. that size_hint().1 correctly reports its length.

pub fn from_trusted_len_iter<I>(iter: I) -> PrimitiveArray<T>
where I: TrustedLen<Item = Option<T>>,

Creates a [PrimitiveArray] from a [TrustedLen] of optional values.

pub unsafe fn from_trusted_len_iter_unchecked<I>(iter: I) -> PrimitiveArray<T>
where I: Iterator<Item = Option<T>>,

Creates a [PrimitiveArray] from an iterator of optional values.

§Safety

The iterator must be TrustedLen. I.e. that size_hint().1 correctly reports its length.

pub fn new( dtype: ArrowDataType, values: Buffer<T>, validity: Option<Bitmap>, ) -> PrimitiveArray<T>

Alias for Self::try_new(..).unwrap().

§Panics

This function errors iff:

  • The validity is not None and its length is different from values’s length
  • The dtype’s [PhysicalType] is not equal to [PhysicalType::Primitive].

pub fn transmute<U>(self) -> PrimitiveArray<U>
where U: NativeType,

Transmute this PrimitiveArray into another PrimitiveArray.

T and U must have the same size and alignment.

pub fn fill_with(self, value: T) -> PrimitiveArray<T>

Fills this entire array with the given value, leaving the validity mask intact.

Reuses the memory of the PrimitiveArray if possible.

Trait Implementations

§

impl<T> ArithmeticKernel for PrimitiveArray<T>
where T: HasPrimitiveArithmeticKernel,

§

type Scalar = T

§

type TrueDivT = <T as PrimitiveArithmeticKernelImpl>::TrueDivT

§

fn wrapping_abs(self) -> PrimitiveArray<T>

§

fn wrapping_neg(self) -> PrimitiveArray<T>

§

fn wrapping_add(self, rhs: PrimitiveArray<T>) -> PrimitiveArray<T>

§

fn wrapping_sub(self, rhs: PrimitiveArray<T>) -> PrimitiveArray<T>

§

fn wrapping_mul(self, rhs: PrimitiveArray<T>) -> PrimitiveArray<T>

§

fn wrapping_floor_div(self, rhs: PrimitiveArray<T>) -> PrimitiveArray<T>

§

fn wrapping_trunc_div(self, rhs: PrimitiveArray<T>) -> PrimitiveArray<T>

§

fn wrapping_mod(self, rhs: PrimitiveArray<T>) -> PrimitiveArray<T>

§

fn wrapping_add_scalar( self, rhs: <PrimitiveArray<T> as ArithmeticKernel>::Scalar, ) -> PrimitiveArray<T>

§

fn wrapping_sub_scalar( self, rhs: <PrimitiveArray<T> as ArithmeticKernel>::Scalar, ) -> PrimitiveArray<T>

§

fn wrapping_sub_scalar_lhs( lhs: <PrimitiveArray<T> as ArithmeticKernel>::Scalar, rhs: PrimitiveArray<T>, ) -> PrimitiveArray<T>

§

fn wrapping_mul_scalar( self, rhs: <PrimitiveArray<T> as ArithmeticKernel>::Scalar, ) -> PrimitiveArray<T>

§

fn wrapping_floor_div_scalar( self, rhs: <PrimitiveArray<T> as ArithmeticKernel>::Scalar, ) -> PrimitiveArray<T>

§

fn wrapping_floor_div_scalar_lhs( lhs: <PrimitiveArray<T> as ArithmeticKernel>::Scalar, rhs: PrimitiveArray<T>, ) -> PrimitiveArray<T>

§

fn wrapping_trunc_div_scalar( self, rhs: <PrimitiveArray<T> as ArithmeticKernel>::Scalar, ) -> PrimitiveArray<T>

§

fn wrapping_trunc_div_scalar_lhs( lhs: <PrimitiveArray<T> as ArithmeticKernel>::Scalar, rhs: PrimitiveArray<T>, ) -> PrimitiveArray<T>

§

fn wrapping_mod_scalar( self, rhs: <PrimitiveArray<T> as ArithmeticKernel>::Scalar, ) -> PrimitiveArray<T>

§

fn wrapping_mod_scalar_lhs( lhs: <PrimitiveArray<T> as ArithmeticKernel>::Scalar, rhs: PrimitiveArray<T>, ) -> PrimitiveArray<T>

§

fn true_div( self, rhs: PrimitiveArray<T>, ) -> PrimitiveArray<<PrimitiveArray<T> as ArithmeticKernel>::TrueDivT>

§

fn true_div_scalar( self, rhs: <PrimitiveArray<T> as ArithmeticKernel>::Scalar, ) -> PrimitiveArray<<PrimitiveArray<T> as ArithmeticKernel>::TrueDivT>

§

fn true_div_scalar_lhs( lhs: <PrimitiveArray<T> as ArithmeticKernel>::Scalar, rhs: PrimitiveArray<T>, ) -> PrimitiveArray<<PrimitiveArray<T> as ArithmeticKernel>::TrueDivT>

§

fn legacy_div(self, rhs: Self) -> Self

§

fn legacy_div_scalar(self, rhs: Self::Scalar) -> Self

§

fn legacy_div_scalar_lhs(lhs: Self::Scalar, rhs: Self) -> Self

§

impl<T> Array for PrimitiveArray<T>
where T: NativeType,

§

fn as_any(&self) -> &(dyn Any + 'static)

Converts itself to a reference of Any, which enables downcasting to concrete types.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts itself to a mutable reference of Any, which enables mutable downcasting to concrete types.
§

fn len(&self) -> usize

The length of the [Array]. Every array has a length corresponding to the number of elements (slots).
§

fn dtype(&self) -> &ArrowDataType

The ArrowDataType of the [Array]. In combination with [Array::as_any], this can be used to downcast trait objects (dyn Array) to concrete arrays.
§

fn split_at_boxed(&self, offset: usize) -> (Box<dyn Array>, Box<dyn Array>)

Split [Self] at offset into two boxed [Array]s where offset <= self.len().
§

unsafe fn split_at_boxed_unchecked( &self, offset: usize, ) -> (Box<dyn Array>, Box<dyn Array>)

Split [Self] at offset into two boxed [Array]s without checking offset <= self.len(). Read more
§

fn slice(&mut self, offset: usize, length: usize)

Slices this [Array]. Read more
§

unsafe fn slice_unchecked(&mut self, offset: usize, length: usize)

Slices the [Array]. Read more
§

fn to_boxed(&self) -> Box<dyn Array>

Clone a &dyn Array to an owned Box<dyn Array>.
§

fn validity(&self) -> Option<&Bitmap>

The validity of the [Array]: every array has an optional [Bitmap] that, when available specifies whether the array slot is valid or not (null). When the validity is None, all slots are valid.
§

fn with_validity(&self, validity: Option<Bitmap>) -> Box<dyn Array>

Clones this [Array] with a new assigned bitmap. Read more
§

fn is_empty(&self) -> bool

whether the array is empty
§

fn null_count(&self) -> usize

The number of null slots on this [Array]. Read more
§

fn has_nulls(&self) -> bool

§

fn is_null(&self, i: usize) -> bool

Returns whether slot i is null. Read more
§

unsafe fn is_null_unchecked(&self, i: usize) -> bool

Returns whether slot i is null. Read more
§

fn is_valid(&self, i: usize) -> bool

Returns whether slot i is valid. Read more
§

fn sliced(&self, offset: usize, length: usize) -> Box<dyn Array>

Returns a slice of this [Array]. Read more
§

unsafe fn sliced_unchecked( &self, offset: usize, length: usize, ) -> Box<dyn Array>

Returns a slice of this [Array]. Read more
§

impl<T> ArrayFromIter<Option<T>> for PrimitiveArray<T>
where T: NativeType,

§

fn arr_from_iter<I>(iter: I) -> PrimitiveArray<T>
where I: IntoIterator<Item = Option<T>>,

§

fn arr_from_iter_trusted<I>(iter: I) -> PrimitiveArray<T>
where I: IntoIterator<Item = Option<T>>, <I as IntoIterator>::IntoIter: TrustedLen,

§

fn try_arr_from_iter<E, I>(iter: I) -> Result<PrimitiveArray<T>, E>
where I: IntoIterator<Item = Result<Option<T>, E>>,

§

fn try_arr_from_iter_trusted<E, I>(iter: I) -> Result<PrimitiveArray<T>, E>
where I: IntoIterator<Item = Result<Option<T>, E>>, <I as IntoIterator>::IntoIter: TrustedLen,

§

impl<T> ArrayFromIter<T> for PrimitiveArray<T>
where T: NativeType,

§

fn arr_from_iter<I>(iter: I) -> PrimitiveArray<T>
where I: IntoIterator<Item = T>,

§

fn arr_from_iter_trusted<I>(iter: I) -> PrimitiveArray<T>
where I: IntoIterator<Item = T>, <I as IntoIterator>::IntoIter: TrustedLen,

§

fn try_arr_from_iter<E, I>(iter: I) -> Result<PrimitiveArray<T>, E>
where I: IntoIterator<Item = Result<T, E>>,

§

fn try_arr_from_iter_trusted<E, I>(iter: I) -> Result<PrimitiveArray<T>, E>
where I: IntoIterator<Item = Result<T, E>>, <I as IntoIterator>::IntoIter: TrustedLen,

§

impl BitwiseKernel for PrimitiveArray<u32>

§

type Scalar = u32

§

fn count_ones(&self) -> PrimitiveArray<u32>

§

fn count_zeros(&self) -> PrimitiveArray<u32>

§

fn leading_ones(&self) -> PrimitiveArray<u32>

§

fn leading_zeros(&self) -> PrimitiveArray<u32>

§

fn trailing_ones(&self) -> PrimitiveArray<u32>

§

fn trailing_zeros(&self) -> PrimitiveArray<u32>

§

fn reduce_and(&self) -> Option<<PrimitiveArray<u32> as BitwiseKernel>::Scalar>

§

fn reduce_or(&self) -> Option<<PrimitiveArray<u32> as BitwiseKernel>::Scalar>

§

fn reduce_xor(&self) -> Option<<PrimitiveArray<u32> as BitwiseKernel>::Scalar>

§

fn bit_and( lhs: <PrimitiveArray<u32> as BitwiseKernel>::Scalar, rhs: <PrimitiveArray<u32> as BitwiseKernel>::Scalar, ) -> <PrimitiveArray<u32> as BitwiseKernel>::Scalar

§

fn bit_or( lhs: <PrimitiveArray<u32> as BitwiseKernel>::Scalar, rhs: <PrimitiveArray<u32> as BitwiseKernel>::Scalar, ) -> <PrimitiveArray<u32> as BitwiseKernel>::Scalar

§

fn bit_xor( lhs: <PrimitiveArray<u32> as BitwiseKernel>::Scalar, rhs: <PrimitiveArray<u32> as BitwiseKernel>::Scalar, ) -> <PrimitiveArray<u32> as BitwiseKernel>::Scalar

§

impl<T> Bounded for PrimitiveArray<T>
where T: NativeType,

§

fn len(&self) -> usize

Source§

fn is_empty(&self) -> bool

§

impl<T> Clone for PrimitiveArray<T>
where T: Clone + NativeType,

§

fn clone(&self) -> PrimitiveArray<T>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<T> Debug for PrimitiveArray<T>
where T: NativeType,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<T> Default for PrimitiveArray<T>
where T: NativeType,

§

fn default() -> PrimitiveArray<T>

Returns the “default value” for a type. Read more
§

impl<T> From<MutablePrimitiveArray<T>> for PrimitiveArray<T>
where T: NativeType,

§

fn from(other: MutablePrimitiveArray<T>) -> PrimitiveArray<T>

Converts to this type from the input type.
§

impl<T, P> From<P> for PrimitiveArray<T>
where T: NativeType, P: AsRef<[Option<T>]>,

§

fn from(slice: P) -> PrimitiveArray<T>

Converts to this type from the input type.
§

impl<T> FromData<Buffer<T>> for PrimitiveArray<T>
where T: NativeType,

§

fn from_data_default( values: Buffer<T>, validity: Option<Bitmap>, ) -> PrimitiveArray<T>

§

impl<T, Ptr> FromIterator<Ptr> for PrimitiveArray<T>
where T: NativeType, Ptr: Borrow<Option<T>>,

§

fn from_iter<I>(iter: I) -> PrimitiveArray<T>
where I: IntoIterator<Item = Ptr>,

Creates a value from an iterator. Read more
§

impl<T> FromIteratorReversed<Option<T>> for PrimitiveArray<T>
where T: NativeType,

§

fn from_trusted_len_iter_rev<I>(iter: I) -> PrimitiveArray<T>
where I: TrustedLen<Item = Option<T>>,

§

impl<T> FromIteratorReversed<T> for PrimitiveArray<T>
where T: NativeType,

§

fn from_trusted_len_iter_rev<I>(iter: I) -> PrimitiveArray<T>
where I: TrustedLen<Item = T>,

§

impl<T> FromTrustedLenIterator<Option<T>> for PrimitiveArray<T>
where T: NativeType,

§

fn from_iter_trusted_length<I>(iter: I) -> PrimitiveArray<T>
where I: IntoIterator<Item = Option<T>>, <I as IntoIterator>::IntoIter: TrustedLen,

§

impl<T> FromTrustedLenIterator<T> for PrimitiveArray<T>
where T: NativeType,

§

fn from_iter_trusted_length<I>(iter: I) -> PrimitiveArray<T>
where I: IntoIterator<Item = T>, <I as IntoIterator>::IntoIter: TrustedLen,

§

impl<T> IfThenElseKernel for PrimitiveArray<T>
where T: NotSimdPrimitive,

§

type Scalar<'a> = T

§

fn if_then_else( mask: &Bitmap, if_true: &PrimitiveArray<T>, if_false: &PrimitiveArray<T>, ) -> PrimitiveArray<T>

§

fn if_then_else_broadcast_true( mask: &Bitmap, if_true: <PrimitiveArray<T> as IfThenElseKernel>::Scalar<'_>, if_false: &PrimitiveArray<T>, ) -> PrimitiveArray<T>

§

fn if_then_else_broadcast_false( mask: &Bitmap, if_true: &PrimitiveArray<T>, if_false: <PrimitiveArray<T> as IfThenElseKernel>::Scalar<'_>, ) -> PrimitiveArray<T>

§

fn if_then_else_broadcast_both( _dtype: ArrowDataType, mask: &Bitmap, if_true: <PrimitiveArray<T> as IfThenElseKernel>::Scalar<'_>, if_false: <PrimitiveArray<T> as IfThenElseKernel>::Scalar<'_>, ) -> PrimitiveArray<T>

§

impl<T> Indexable for PrimitiveArray<T>
where T: NativeType,

§

type Item = Option<T>

§

fn get(&self, i: usize) -> <PrimitiveArray<T> as Indexable>::Item

§

unsafe fn get_unchecked( &self, i: usize, ) -> <PrimitiveArray<T> as Indexable>::Item

Safety Read more
§

impl<T> IntoIterator for PrimitiveArray<T>
where T: NativeType,

§

type Item = Option<T>

The type of the elements being iterated over.
§

type IntoIter = ZipValidity<T, IntoIter<T>, IntoIter>

Which kind of iterator are we turning this into?
§

fn into_iter(self) -> <PrimitiveArray<T> as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
§

impl<T> MinMaxKernel for PrimitiveArray<T>
where T: NativeType + MinMax + NotSimdPrimitive,

§

type Scalar<'a> = T

§

fn min_ignore_nan_kernel( &self, ) -> Option<<PrimitiveArray<T> as MinMaxKernel>::Scalar<'_>>

§

fn max_ignore_nan_kernel( &self, ) -> Option<<PrimitiveArray<T> as MinMaxKernel>::Scalar<'_>>

§

fn min_max_ignore_nan_kernel( &self, ) -> Option<(<PrimitiveArray<T> as MinMaxKernel>::Scalar<'_>, <PrimitiveArray<T> as MinMaxKernel>::Scalar<'_>)>

§

fn min_propagate_nan_kernel( &self, ) -> Option<<PrimitiveArray<T> as MinMaxKernel>::Scalar<'_>>

§

fn max_propagate_nan_kernel( &self, ) -> Option<<PrimitiveArray<T> as MinMaxKernel>::Scalar<'_>>

§

fn min_max_propagate_nan_kernel( &self, ) -> Option<(<PrimitiveArray<T> as MinMaxKernel>::Scalar<'_>, <PrimitiveArray<T> as MinMaxKernel>::Scalar<'_>)>

§

impl<T> NullCount for PrimitiveArray<T>
where T: NativeType,

§

fn null_count(&self) -> usize

§

impl<T> ParameterFreeDtypeStaticArray for PrimitiveArray<T>
where T: NativeType,

§

impl<T> PartialEq<&(dyn Array + 'static)> for PrimitiveArray<T>
where T: NativeType,

§

fn eq(&self, other: &&(dyn Array + 'static)) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl<T> PartialEq for PrimitiveArray<T>
where T: NativeType,

§

fn eq(&self, other: &PrimitiveArray<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl<T> SliceAble for PrimitiveArray<T>
where T: NativeType,

§

unsafe fn slice_unchecked(&self, range: Range<usize>) -> PrimitiveArray<T>

Safety Read more
§

fn slice(&self, range: Range<usize>) -> PrimitiveArray<T>

§

impl<T> Splitable for PrimitiveArray<T>
where T: NativeType,

§

fn check_bound(&self, offset: usize) -> bool

§

unsafe fn _split_at_unchecked( &self, offset: usize, ) -> (PrimitiveArray<T>, PrimitiveArray<T>)

Internal implementation of split_at_unchecked. For any usage, prefer the using split_at or split_at_unchecked. Read more
§

fn split_at(&self, offset: usize) -> (Self, Self)

Split [Self] at offset where offset <= self.len().
§

unsafe fn split_at_unchecked(&self, offset: usize) -> (Self, Self)

Split [Self] at offset without checking offset <= self.len(). Read more
§

impl<T> StaticArray for PrimitiveArray<T>
where T: NativeType,

§

type ValueT<'a> = T

§

type ZeroableValueT<'a> = T

§

type ValueIterT<'a> = Copied<Iter<'a, T>>

§

unsafe fn value_unchecked( &self, idx: usize, ) -> <PrimitiveArray<T> as StaticArray>::ValueT<'_>

Safety Read more
§

fn values_iter(&self) -> <PrimitiveArray<T> as StaticArray>::ValueIterT<'_>

§

fn as_slice(&self) -> Option<&[<PrimitiveArray<T> as StaticArray>::ValueT<'_>]>

§

fn iter( &self, ) -> ZipValidity<<PrimitiveArray<T> as StaticArray>::ValueT<'_>, <PrimitiveArray<T> as StaticArray>::ValueIterT<'_>, BitmapIter<'_>>

§

fn with_validity_typed(self, validity: Option<Bitmap>) -> PrimitiveArray<T>

§

fn from_vec( v: Vec<<PrimitiveArray<T> as StaticArray>::ValueT<'_>>, _dtype: ArrowDataType, ) -> PrimitiveArray<T>

§

fn from_zeroable_vec( v: Vec<<PrimitiveArray<T> as StaticArray>::ZeroableValueT<'_>>, _dtype: ArrowDataType, ) -> PrimitiveArray<T>

§

fn full_null(length: usize, dtype: ArrowDataType) -> PrimitiveArray<T>

§

fn full( length: usize, value: <PrimitiveArray<T> as StaticArray>::ValueT<'_>, _dtype: ArrowDataType, ) -> PrimitiveArray<T>

§

fn get(&self, idx: usize) -> Option<Self::ValueT<'_>>

§

unsafe fn get_unchecked(&self, idx: usize) -> Option<Self::ValueT<'_>>

Safety Read more
§

fn last(&self) -> Option<Self::ValueT<'_>>

§

fn value(&self, idx: usize) -> Self::ValueT<'_>

§

impl<T> TotalEqKernel for PrimitiveArray<T>
where T: NotSimdPrimitive + TotalOrd,

§

type Scalar = T

§

fn tot_eq_kernel(&self, other: &PrimitiveArray<T>) -> Bitmap

§

fn tot_ne_kernel(&self, other: &PrimitiveArray<T>) -> Bitmap

§

fn tot_eq_kernel_broadcast( &self, other: &<PrimitiveArray<T> as TotalEqKernel>::Scalar, ) -> Bitmap

§

fn tot_ne_kernel_broadcast( &self, other: &<PrimitiveArray<T> as TotalEqKernel>::Scalar, ) -> Bitmap

§

fn tot_eq_missing_kernel(&self, other: &Self) -> Bitmap

§

fn tot_ne_missing_kernel(&self, other: &Self) -> Bitmap

§

fn tot_eq_missing_kernel_broadcast(&self, other: &Self::Scalar) -> Bitmap

§

fn tot_ne_missing_kernel_broadcast(&self, other: &Self::Scalar) -> Bitmap

§

impl<T> TotalOrdKernel for PrimitiveArray<T>
where T: NotSimdPrimitive + TotalOrd,

§

type Scalar = T

§

fn tot_lt_kernel(&self, other: &PrimitiveArray<T>) -> Bitmap

§

fn tot_le_kernel(&self, other: &PrimitiveArray<T>) -> Bitmap

§

fn tot_lt_kernel_broadcast( &self, other: &<PrimitiveArray<T> as TotalOrdKernel>::Scalar, ) -> Bitmap

§

fn tot_le_kernel_broadcast( &self, other: &<PrimitiveArray<T> as TotalOrdKernel>::Scalar, ) -> Bitmap

§

fn tot_gt_kernel_broadcast( &self, other: &<PrimitiveArray<T> as TotalOrdKernel>::Scalar, ) -> Bitmap

§

fn tot_ge_kernel_broadcast( &self, other: &<PrimitiveArray<T> as TotalOrdKernel>::Scalar, ) -> Bitmap

§

fn tot_gt_kernel(&self, other: &Self) -> Bitmap

§

fn tot_ge_kernel(&self, other: &Self) -> Bitmap

§

impl<T> ArrowArray for PrimitiveArray<T>
where T: NativeType,