arrow_array::array

Type Alias ArrayRef

Source
pub type ArrayRef = Arc<dyn Array>;
Expand description

A reference-counted reference to a generic Array

Aliased Type§

struct ArrayRef { /* private fields */ }

Trait Implementations§

Source§

impl Array for ArrayRef

Ergonomics: Allow use of an ArrayRef as an &dyn Array

Source§

fn shrink_to_fit(&mut self)

For shared buffers, this is a no-op.

Source§

fn as_any(&self) -> &dyn Any

Returns the array as Any so that it can be downcasted to a specific implementation. Read more
Source§

fn to_data(&self) -> ArrayData

Returns the underlying data of this array
Source§

fn into_data(self) -> ArrayData

Returns the underlying data of this array Read more
Source§

fn data_type(&self) -> &DataType

Returns a reference to the DataType of this array. Read more
Source§

fn slice(&self, offset: usize, length: usize) -> ArrayRef

Returns a zero-copy slice of this array with the indicated offset and length. Read more
Source§

fn len(&self) -> usize

Returns the length (i.e., number of elements) of this array. Read more
Source§

fn is_empty(&self) -> bool

Returns whether this array is empty. Read more
Source§

fn offset(&self) -> usize

Returns the offset into the underlying data used by this array(-slice). Note that the underlying data can be shared by many arrays. This defaults to 0. Read more
Source§

fn nulls(&self) -> Option<&NullBuffer>

Returns the null buffer of this array if any. Read more
Source§

fn logical_nulls(&self) -> Option<NullBuffer>

Returns a potentially computed NullBuffer that represents the logical null values of this array, if any. Read more
Source§

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

Returns whether the element at index is null according to Array::nulls Read more
Source§

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

Returns whether the element at index is not null, the opposite of Self::is_null. Read more
Source§

fn null_count(&self) -> usize

Returns the total number of physical null values in this array. Read more
Source§

fn logical_null_count(&self) -> usize

Returns the total number of logical null values in this array. Read more
Source§

fn is_nullable(&self) -> bool

Returns false if the array is guaranteed to not contain any logical nulls Read more
Source§

fn get_buffer_memory_size(&self) -> usize

Returns the total number of bytes of memory pointed to by this array. The buffers store bytes in the Arrow memory format, and include the data as well as the validity map. Note that this does not always correspond to the exact memory usage of an array, since multiple arrays can share the same buffers or slices thereof.
Source§

fn get_array_memory_size(&self) -> usize

Returns the total number of bytes of memory occupied physically by this array. This value will always be greater than returned by get_buffer_memory_size() and includes the overhead of the data structures that contain the pointers to the various buffers.
Source§

impl AsArray for ArrayRef

Source§

fn as_boolean_opt(&self) -> Option<&BooleanArray>

Downcast this to a BooleanArray returning None if not possible
Source§

fn as_primitive_opt<T: ArrowPrimitiveType>(&self) -> Option<&PrimitiveArray<T>>

Downcast this to a PrimitiveArray returning None if not possible
Source§

fn as_bytes_opt<T: ByteArrayType>(&self) -> Option<&GenericByteArray<T>>

Downcast this to a GenericByteArray returning None if not possible
Source§

fn as_byte_view_opt<T: ByteViewType>(&self) -> Option<&GenericByteViewArray<T>>

Downcast this to a GenericByteViewArray returning None if not possible
Source§

fn as_struct_opt(&self) -> Option<&StructArray>

Downcast this to a StructArray returning None if not possible
Source§

fn as_union_opt(&self) -> Option<&UnionArray>

Downcast this to a UnionArray returning None if not possible
Source§

fn as_list_opt<O: OffsetSizeTrait>(&self) -> Option<&GenericListArray<O>>

Downcast this to a GenericListArray returning None if not possible
Source§

fn as_fixed_size_binary_opt(&self) -> Option<&FixedSizeBinaryArray>

Downcast this to a FixedSizeBinaryArray returning None if not possible
Source§

fn as_fixed_size_list_opt(&self) -> Option<&FixedSizeListArray>

Downcast this to a FixedSizeListArray returning None if not possible
Source§

fn as_map_opt(&self) -> Option<&MapArray>

Downcast this to a MapArray returning None if not possible
Source§

fn as_dictionary_opt<K: ArrowDictionaryKeyType>( &self, ) -> Option<&DictionaryArray<K>>

Downcast this to a DictionaryArray returning None if not possible
Source§

fn as_any_dictionary_opt(&self) -> Option<&dyn AnyDictionaryArray>

Downcasts this to a AnyDictionaryArray returning None if not possible
Source§

fn as_boolean(&self) -> &BooleanArray

Downcast this to a BooleanArray panicking if not possible
Source§

fn as_primitive<T: ArrowPrimitiveType>(&self) -> &PrimitiveArray<T>

Downcast this to a PrimitiveArray panicking if not possible
Source§

fn as_bytes<T: ByteArrayType>(&self) -> &GenericByteArray<T>

Downcast this to a GenericByteArray panicking if not possible
Source§

fn as_string_opt<O: OffsetSizeTrait>(&self) -> Option<&GenericStringArray<O>>

Downcast this to a GenericStringArray returning None if not possible
Source§

fn as_string<O: OffsetSizeTrait>(&self) -> &GenericStringArray<O>

Downcast this to a GenericStringArray panicking if not possible
Source§

fn as_binary_opt<O: OffsetSizeTrait>(&self) -> Option<&GenericBinaryArray<O>>

Downcast this to a GenericBinaryArray returning None if not possible
Source§

fn as_binary<O: OffsetSizeTrait>(&self) -> &GenericBinaryArray<O>

Downcast this to a GenericBinaryArray panicking if not possible
Source§

fn as_string_view_opt(&self) -> Option<&StringViewArray>

Downcast this to a StringViewArray returning None if not possible
Source§

fn as_string_view(&self) -> &StringViewArray

Downcast this to a StringViewArray panicking if not possible
Source§

fn as_binary_view_opt(&self) -> Option<&BinaryViewArray>

Downcast this to a BinaryViewArray returning None if not possible
Source§

fn as_binary_view(&self) -> &BinaryViewArray

Downcast this to a BinaryViewArray panicking if not possible
Source§

fn as_byte_view<T: ByteViewType>(&self) -> &GenericByteViewArray<T>

Downcast this to a GenericByteViewArray panicking if not possible
Source§

fn as_struct(&self) -> &StructArray

Downcast this to a StructArray panicking if not possible
Source§

fn as_union(&self) -> &UnionArray

Downcast this to a UnionArray panicking if not possible
Source§

fn as_list<O: OffsetSizeTrait>(&self) -> &GenericListArray<O>

Downcast this to a GenericListArray panicking if not possible
Source§

fn as_fixed_size_binary(&self) -> &FixedSizeBinaryArray

Downcast this to a FixedSizeBinaryArray panicking if not possible
Source§

fn as_fixed_size_list(&self) -> &FixedSizeListArray

Downcast this to a FixedSizeListArray panicking if not possible
Source§

fn as_map(&self) -> &MapArray

Downcast this to a MapArray panicking if not possible
Source§

fn as_dictionary<K: ArrowDictionaryKeyType>(&self) -> &DictionaryArray<K>

Downcast this to a DictionaryArray panicking if not possible
Source§

fn as_any_dictionary(&self) -> &dyn AnyDictionaryArray

Downcasts this to a AnyDictionaryArray panicking if not possible