[−][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( | [src] |
pub fn values(&self) -> Buffer | [src] |
Returns 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] |
Returns the length of this array
pub fn raw_values(&self) -> *const T::Native | [src] |
Returns a raw pointer to the values of this array.
pub fn value(&self, i: usize) -> T::Native | [src] |
Returns 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] |
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) -> PrimitiveBuilder<T> | [src] |
impl PrimitiveArray<BooleanType>
[src]
impl PrimitiveArray<BooleanType>
Specific implementation for Boolean arrays due to bit-packing
pub fn new( | [src] |
pub fn values(&self) -> Buffer | [src] |
Returns 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] |
Returns the boolean value at index i
.
pub fn builder(capacity: usize) -> BooleanBuilder | [src] |
Trait Implementations
impl<T: ArrowPrimitiveType> Array for PrimitiveArray<T>
[src]
impl<T: ArrowPrimitiveType> Array for PrimitiveArray<T>
fn as_any(&self) -> &dyn Any | [src] |
fn data(&self) -> ArrayDataRef | [src] |
fn data_ref(&self) -> &ArrayDataRef | [src] |
fn data_type(&self) -> &DataType | [src] |
Returns a reference to the data type of this array
fn len(&self) -> usize | [src] |
Returns the length (i.e., number of elements) of this array
fn offset(&self) -> usize | [src] |
Returns the offset of this array
fn is_null(&self, i: usize) -> bool | [src] |
Returns whether the element at index i
is null
fn is_valid(&self, i: usize) -> bool | [src] |
Returns whether the element at index i
is not null
fn null_count(&self) -> usize | [src] |
Returns 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] |
Auto 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> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<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] |
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] |
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,