[−][src]Struct arrow::array::PrimitiveArray
Array whose elements are of primitive types.
Methods
impl<T: ArrowNumericType> PrimitiveArray<T>[src]
impl<T: ArrowNumericType> PrimitiveArray<T>Implementation for primitive arrays with numeric types. Boolean arrays are bit-packed and so implemented separately.
pub fn new(
length: usize,
values: Buffer,
null_count: usize,
offset: usize
) -> Self[src]
pub fn new(
length: usize,
values: Buffer,
null_count: usize,
offset: usize
) -> Selfpub fn values(&self) -> Buffer[src]
pub fn values(&self) -> BufferReturns a Buffer holds all the values of this array.
Note this doesn't take account into the offset of this array.
pub fn len(&self) -> usize[src]
pub fn len(&self) -> usizeReturns the length of this array
pub fn raw_values(&self) -> *const T::Native[src]
pub fn raw_values(&self) -> *const T::NativeReturns a raw pointer to the values of this array.
pub fn value(&self, i: usize) -> T::Native[src]
pub fn value(&self, i: usize) -> T::NativeReturns the primitive value at index i.
Note this doesn't do any bound checking, for performance reason.
pub fn value_slice(&self, offset: usize, len: usize) -> &[T::Native][src]
pub fn value_slice(&self, offset: usize, len: usize) -> &[T::Native]Returns a slice for the given offset and length
Note this doesn't do any bound checking, for performance reason.
pub fn builder(capacity: usize) -> PrimitiveArrayBuilder<T>[src]
pub fn builder(capacity: usize) -> PrimitiveArrayBuilder<T>impl PrimitiveArray<BooleanType>[src]
impl PrimitiveArray<BooleanType>Specific implementation for Boolean arrays due to bit-packing
pub fn new(
length: usize,
values: Buffer,
null_count: usize,
offset: usize
) -> Self[src]
pub fn new(
length: usize,
values: Buffer,
null_count: usize,
offset: usize
) -> Selfpub fn values(&self) -> Buffer[src]
pub fn values(&self) -> BufferReturns a Buffer holds all the values of this array.
Note this doesn't take account into the offset of this array.
pub fn value(&self, i: usize) -> bool[src]
pub fn value(&self, i: usize) -> boolReturns the boolean value at index i.
pub fn builder(capacity: usize) -> BooleanBuilder[src]
pub fn builder(capacity: usize) -> BooleanBuilderTrait Implementations
impl<T: ArrowPrimitiveType> Array for PrimitiveArray<T>[src]
impl<T: ArrowPrimitiveType> Array for PrimitiveArray<T>fn as_any(&self) -> &dyn Any[src]
fn as_any(&self) -> &dyn Anyfn data(&self) -> ArrayDataRef[src]
fn data(&self) -> ArrayDataReffn data_ref(&self) -> &ArrayDataRef[src]
fn data_ref(&self) -> &ArrayDataReffn data_type(&self) -> &DataType[src]
fn data_type(&self) -> &DataTypeReturns a reference to the data type of this array
fn len(&self) -> usize[src]
fn len(&self) -> usizeReturns the length (i.e., number of elements) of this array
fn offset(&self) -> usize[src]
fn offset(&self) -> usizeReturns the offset of this array
fn is_null(&self, i: usize) -> bool[src]
fn is_null(&self, i: usize) -> boolReturns whether the element at index i is null
fn is_valid(&self, i: usize) -> bool[src]
fn is_valid(&self, i: usize) -> boolReturns whether the element at index i is not null
fn null_count(&self) -> usize[src]
fn null_count(&self) -> usizeReturns the total number of nulls in this array
impl From<Vec<i8>> for PrimitiveArray<Int8Type>[src]
impl From<Vec<i8>> for PrimitiveArray<Int8Type>impl From<Vec<Option<i8>>> for PrimitiveArray<Int8Type>[src]
impl From<Vec<Option<i8>>> for PrimitiveArray<Int8Type>impl From<Vec<i16>> for PrimitiveArray<Int16Type>[src]
impl From<Vec<i16>> for PrimitiveArray<Int16Type>impl From<Vec<Option<i16>>> for PrimitiveArray<Int16Type>[src]
impl From<Vec<Option<i16>>> for PrimitiveArray<Int16Type>impl From<Vec<i32>> for PrimitiveArray<Int32Type>[src]
impl From<Vec<i32>> for PrimitiveArray<Int32Type>impl From<Vec<Option<i32>>> for PrimitiveArray<Int32Type>[src]
impl From<Vec<Option<i32>>> for PrimitiveArray<Int32Type>impl From<Vec<i64>> for PrimitiveArray<Int64Type>[src]
impl From<Vec<i64>> for PrimitiveArray<Int64Type>impl From<Vec<Option<i64>>> for PrimitiveArray<Int64Type>[src]
impl From<Vec<Option<i64>>> for PrimitiveArray<Int64Type>impl From<Vec<u8>> for PrimitiveArray<UInt8Type>[src]
impl From<Vec<u8>> for PrimitiveArray<UInt8Type>impl From<Vec<Option<u8>>> for PrimitiveArray<UInt8Type>[src]
impl From<Vec<Option<u8>>> for PrimitiveArray<UInt8Type>impl From<Vec<u16>> for PrimitiveArray<UInt16Type>[src]
impl From<Vec<u16>> for PrimitiveArray<UInt16Type>impl From<Vec<Option<u16>>> for PrimitiveArray<UInt16Type>[src]
impl From<Vec<Option<u16>>> for PrimitiveArray<UInt16Type>impl From<Vec<u32>> for PrimitiveArray<UInt32Type>[src]
impl From<Vec<u32>> for PrimitiveArray<UInt32Type>impl From<Vec<Option<u32>>> for PrimitiveArray<UInt32Type>[src]
impl From<Vec<Option<u32>>> for PrimitiveArray<UInt32Type>impl From<Vec<u64>> for PrimitiveArray<UInt64Type>[src]
impl From<Vec<u64>> for PrimitiveArray<UInt64Type>impl From<Vec<Option<u64>>> for PrimitiveArray<UInt64Type>[src]
impl From<Vec<Option<u64>>> for PrimitiveArray<UInt64Type>impl From<Vec<f32>> for PrimitiveArray<Float32Type>[src]
impl From<Vec<f32>> for PrimitiveArray<Float32Type>impl From<Vec<Option<f32>>> for PrimitiveArray<Float32Type>[src]
impl From<Vec<Option<f32>>> for PrimitiveArray<Float32Type>impl From<Vec<f64>> for PrimitiveArray<Float64Type>[src]
impl From<Vec<f64>> for PrimitiveArray<Float64Type>impl From<Vec<Option<f64>>> for PrimitiveArray<Float64Type>[src]
impl From<Vec<Option<f64>>> for PrimitiveArray<Float64Type>impl<T: ArrowPrimitiveType> From<Arc<ArrayData>> for PrimitiveArray<T>[src]
impl<T: ArrowPrimitiveType> From<Arc<ArrayData>> for PrimitiveArray<T>Constructs a PrimitiveArray from an array data reference.
fn from(data: ArrayDataRef) -> Self[src]
fn from(data: ArrayDataRef) -> SelfAuto Trait Implementations
impl<T> Send for PrimitiveArray<T>
impl<T> Send for PrimitiveArray<T>impl<T> Sync for PrimitiveArray<T>
impl<T> Sync for PrimitiveArray<T>Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T> From for T[src]
impl<T> From for Timpl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeIdimpl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut Timpl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>,