polars_arrow ::array Trait Array Copy item path Source pub trait Array:
Send
+ Sync
+ DynClone
+ 'static {
Show 19 methods // Required methods
fn as_any (&self) -> &dyn Any ;
fn as_any_mut (&mut self) -> &mut dyn Any ;
fn len (&self) -> usize ;
fn dtype (&self) -> &ArrowDataType ;
fn validity (&self) -> Option <&Bitmap >;
fn split_at_boxed (&self, offset: usize ) -> (Box <dyn Array >, Box <dyn Array >);
unsafe fn split_at_boxed_unchecked (
&self,
offset: usize ,
) -> (Box <dyn Array >, Box <dyn Array >);
fn slice (&mut self, offset: usize , length: usize );
unsafe fn slice_unchecked (&mut self, offset: usize , length: usize );
fn with_validity (&self, validity: Option <Bitmap >) -> Box <dyn Array >;
fn to_boxed (&self) -> Box <dyn Array >;
// Provided methods
fn is_empty (&self) -> bool { ... }
fn null_count (&self) -> usize { ... }
fn has_nulls (&self) -> bool { ... }
fn is_null (&self, i: usize ) -> bool { ... }
unsafe fn is_null_unchecked (&self, i: usize ) -> bool { ... }
fn is_valid (&self, i: usize ) -> bool { ... }
fn sliced (&self, offset: usize , length: usize ) -> Box <dyn Array > { ... }
unsafe fn sliced_unchecked (
&self,
offset: usize ,
length: usize ,
) -> Box <dyn Array > { ... }
}
Expand description A trait representing an immutable Arrow array. Arrow arrays are trait objects
that are infallibly downcasted to concrete types according to the Array::dtype
.
Converts itself to a reference of Any
, which enables downcasting to concrete types.
Converts itself to a mutable reference of Any
, which enables mutable downcasting to concrete types.
The length of the Array
. Every array has a length corresponding to the number of
elements (slots).
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.
Split Self
at offset
into two boxed Array
s where offset <= self.len()
.
Split Self
at offset
into two boxed Array
s without checking offset <= self.len()
.
§ Safety
Safe if offset <= self.len()
.
Slices this Array
.
§ Implementation
This operation is O(1)
over len
.
§ Panic
This function panics iff offset + length > self.len()
.
Slices the Array
.
§ Implementation
This operation is O(1)
.
§ Safety
The caller must ensure that offset + length <= self.len()
Clones this Array
with a new assigned bitmap.
§ Panic
This function panics iff validity.len() != self.len()
.
Clone a &dyn Array
to an owned Box<dyn Array>
.
whether the array is empty
The number of null slots on this Array
.
§ Implementation
This is O(1)
since the number of null elements is pre-computed.
Returns whether slot i
is null.
§ Panic
Panics iff i >= self.len()
.
Returns whether slot i
is null.
§ Safety
The caller must ensure i < self.len()
Returns whether slot i
is valid.
§ Panic
Panics iff i >= self.len()
.
Returns a slice of this Array
.
§ Implementation
This operation is O(1)
over len
.
§ Panic
This function panics iff offset + length > self.len()
.
Returns a slice of this Array
.
§ Implementation
This operation is O(1)
over len
, as it amounts to increase two ref counts
and moving the struct to the heap.
§ Safety
The caller must ensure that offset + length <= self.len()
Converts this type into a shared reference of the (usually inferred) input type.
Formats the value using the given formatter.
Read more Tests for self
and other
values to be equal, and is used by ==
.
Tests for !=
. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
Tests for self
and other
values to be equal, and is used by ==
.
Tests for !=
. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
Tests for self
and other
values to be equal, and is used by ==
.
Tests for !=
. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
Tests for self
and other
values to be equal, and is used by ==
.
Tests for !=
. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
Tests for self
and other
values to be equal, and is used by ==
.
Tests for !=
. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
Tests for self
and other
values to be equal, and is used by ==
.
Tests for !=
. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
Tests for self
and other
values to be equal, and is used by ==
.
Tests for !=
. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
Tests for self
and other
values to be equal, and is used by ==
.
Tests for !=
. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
Tests for self
and other
values to be equal, and is used by ==
.
Tests for !=
. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
Tests for self
and other
values to be equal, and is used by ==
.
Tests for !=
. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
Tests for self
and other
values to be equal, and is used by ==
.
Tests for !=
. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
Tests for self
and other
values to be equal, and is used by ==
.
Tests for !=
. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
Tests for self
and other
values to be equal, and is used by ==
.
Tests for !=
. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
Tests for self
and other
values to be equal, and is used by ==
.
Tests for !=
. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
Tests for self
and other
values to be equal, and is used by ==
.
Tests for !=
. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
Tests for self
and other
values to be equal, and is used by ==
.
Tests for !=
. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
Tests for self
and other
values to be equal, and is used by ==
.
Tests for !=
. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
Tests for self
and other
values to be equal, and is used by ==
.
Tests for !=
. The default implementation is almost always sufficient,
and should not be overridden without very good reason.