pub trait Array: 'static + Send + Sync + DynClone {
Show 13 methods
fn as_any(&self) -> &(dyn Any + 'static);
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static);
fn len(&self) -> usize;
fn data_type(&self) -> &DataType;
fn validity(&self) -> Option<&Bitmap>;
fn slice(
&self,
offset: usize,
length: usize
) -> Box<dyn Array + 'static, Global>;
unsafe fn slice_unchecked(
&self,
offset: usize,
length: usize
) -> Box<dyn Array + 'static, Global>;
fn with_validity(
&self,
validity: Option<Bitmap>
) -> Box<dyn Array + 'static, Global>;
fn to_boxed(&self) -> Box<dyn Array + 'static, Global>;
fn is_empty(&self) -> bool { ... }
fn null_count(&self) -> usize { ... }
fn is_null(&self, i: usize) -> bool { ... }
fn is_valid(&self, i: usize) -> bool { ... }
}
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::data_type
.
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 DataType
of the Array
. In combination with Array::as_any
, this can be
used to downcast trait objects (dyn Array
) to concrete arrays.
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.
Slices the Array
, returning a new Box<dyn Array>
.
This operation is O(1)
over len
, as it amounts to increase two ref counts
and moving the struct to the heap.
This function panics iff offset + length > self.len()
.
Slices the Array
, returning a new Box<dyn Array>
.
This operation is O(1)
over len
, as it amounts to increase two ref counts
and moving the struct to the heap.
The caller must ensure that offset + length <= self.len()
Clones this Array
with a new new assigned bitmap.
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
.
This is O(1)
since the number of null elements is pre-computed.
Returns whether slot i
is null.
Panics iff i >= self.len()
.
Returns whether slot i
is valid.
Panics iff i >= self.len()
.
Converts this type into a shared reference of the (usually inferred) input type.
Formats the value using the given formatter.
Read more
This method tests for
self
and
other
values to be equal, and is used
by
==
.
Read more
This method tests for
!=
. The default implementation is almost always
sufficient, and should not be overridden without very good reason.
Read more
This method tests for
self
and
other
values to be equal, and is used
by
==
.
Read more
This method tests for
!=
. The default implementation is almost always
sufficient, and should not be overridden without very good reason.
Read more
This method tests for
self
and
other
values to be equal, and is used
by
==
.
Read more
This method tests for
!=
. The default implementation is almost always
sufficient, and should not be overridden without very good reason.
Read more
This method tests for
self
and
other
values to be equal, and is used
by
==
.
Read more
This method tests for
!=
. The default implementation is almost always
sufficient, and should not be overridden without very good reason.
Read more
This method tests for
self
and
other
values to be equal, and is used
by
==
.
Read more
This method tests for
!=
. The default implementation is almost always
sufficient, and should not be overridden without very good reason.
Read more
This method tests for
self
and
other
values to be equal, and is used
by
==
.
Read more
This method tests for
!=
. The default implementation is almost always
sufficient, and should not be overridden without very good reason.
Read more
This method tests for
self
and
other
values to be equal, and is used
by
==
.
Read more
This method tests for
!=
. The default implementation is almost always
sufficient, and should not be overridden without very good reason.
Read more
This method tests for
self
and
other
values to be equal, and is used
by
==
.
Read more
This method tests for
!=
. The default implementation is almost always
sufficient, and should not be overridden without very good reason.
Read more
This method tests for
self
and
other
values to be equal, and is used
by
==
.
Read more
This method tests for
!=
. The default implementation is almost always
sufficient, and should not be overridden without very good reason.
Read more
This method tests for
self
and
other
values to be equal, and is used
by
==
.
Read more
This method tests for
!=
. The default implementation is almost always
sufficient, and should not be overridden without very good reason.
Read more
This method tests for
self
and
other
values to be equal, and is used
by
==
.
Read more
This method tests for
!=
. The default implementation is almost always
sufficient, and should not be overridden without very good reason.
Read more
This method tests for
self
and
other
values to be equal, and is used
by
==
.
Read more
This method tests for
!=
. The default implementation is almost always
sufficient, and should not be overridden without very good reason.
Read more
This method tests for
self
and
other
values to be equal, and is used
by
==
.
Read more
This method tests for
!=
. The default implementation is almost always
sufficient, and should not be overridden without very good reason.
Read more
This method tests for
self
and
other
values to be equal, and is used
by
==
.
Read more
This method tests for
!=
. The default implementation is almost always
sufficient, and should not be overridden without very good reason.
Read more
This method tests for
self
and
other
values to be equal, and is used
by
==
.
Read more
This method tests for
!=
. The default implementation is almost always
sufficient, and should not be overridden without very good reason.
Read more
This method tests for
self
and
other
values to be equal, and is used
by
==
.
Read more
This method tests for
!=
. The default implementation is almost always
sufficient, and should not be overridden without very good reason.
Read more
This method tests for
self
and
other
values to be equal, and is used
by
==
.
Read more
This method tests for
!=
. The default implementation is almost always
sufficient, and should not be overridden without very good reason.
Read more
Useful for a Utf8 or a List to get underlying value size.
During a rechunk this is handy
Read more