[−][src]Struct arrow::array::PrimitiveArray
Array whose elements are of primitive types.
Methods
impl<T: ArrowNumericType> PrimitiveArray<T>
[src]
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]
length: usize,
values: Buffer,
null_count: usize,
offset: usize
) -> Self
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<T: ArrowTemporalType + ArrowNumericType> PrimitiveArray<T> where
i64: From<T::Native>,
[src]
i64: From<T::Native>,
pub fn value_as_datetime(&self, i: usize) -> Option<NaiveDateTime>
[src]
Returns value as a chrono NaiveDateTime
, handling time resolution
If a data type cannot be converted to NaiveDateTime
, a None
is returned.
A valid value is expected, thus the user should first check for validity.
pub fn value_as_date(&self, i: usize) -> Option<NaiveDate>
[src]
Returns value as a chrono NaiveDate
by using Self::datetime()
If a data type cannot be converted to NaiveDate
, a None
is returned
pub fn value_as_time(&self, i: usize) -> Option<NaiveTime>
[src]
Returns a value as a chrono NaiveTime
Date32
and Date64
return UTC midnight as they do not have time resolution
impl PrimitiveArray<BooleanType>
[src]
Specific implementation for Boolean arrays due to bit-packing
pub fn new(
length: usize,
values: Buffer,
null_count: usize,
offset: usize
) -> Self
[src]
length: usize,
values: Buffer,
null_count: usize,
offset: usize
) -> Self
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]
fn as_any(&self) -> &dyn Any
[src]
fn data(&self) -> ArrayDataRef
[src]
fn data_ref(&self) -> &ArrayDataRef
[src]
fn data_type(&self) -> &DataType
[src]
fn slice(&self, offset: usize, length: usize) -> ArrayRef
[src]
fn len(&self) -> usize
[src]
fn offset(&self) -> usize
[src]
fn is_null(&self, i: usize) -> bool
[src]
fn is_valid(&self, i: usize) -> bool
[src]
fn null_count(&self) -> usize
[src]
impl<T: ArrowPrimitiveType> PrimitiveArrayOps<T> for PrimitiveArray<T>
[src]
impl<T: ArrowNumericType> PrimitiveArrayOps<T> for PrimitiveArray<T>
[src]
impl<T: ArrowPrimitiveType> ArrayEqual for PrimitiveArray<T>
[src]
default fn equals(&self, other: &dyn Array) -> bool
[src]
default fn range_equals(
&self,
other: &dyn Array,
start_idx: usize,
end_idx: usize,
other_start_idx: usize
) -> bool
[src]
&self,
other: &dyn Array,
start_idx: usize,
end_idx: usize,
other_start_idx: usize
) -> bool
impl<T: ArrowNumericType> PartialEq<PrimitiveArray<T>> for PrimitiveArray<T>
[src]
fn eq(&self, other: &PrimitiveArray<T>) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<T: ArrowPrimitiveType> PartialEq<Value> for PrimitiveArray<T>
[src]
impl<T: ArrowPrimitiveType> PartialEq<PrimitiveArray<T>> for Value
[src]
fn eq(&self, arrow: &PrimitiveArray<T>) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl From<Vec<i8>> for PrimitiveArray<Int8Type>
[src]
impl From<Vec<Option<i8>>> for PrimitiveArray<Int8Type>
[src]
impl From<Vec<i16>> for PrimitiveArray<Int16Type>
[src]
impl From<Vec<Option<i16>>> for PrimitiveArray<Int16Type>
[src]
impl From<Vec<i32>> for PrimitiveArray<Int32Type>
[src]
impl From<Vec<Option<i32>>> for PrimitiveArray<Int32Type>
[src]
impl From<Vec<i64>> for PrimitiveArray<Int64Type>
[src]
impl From<Vec<Option<i64>>> for PrimitiveArray<Int64Type>
[src]
impl From<Vec<u8>> for PrimitiveArray<UInt8Type>
[src]
impl From<Vec<Option<u8>>> for PrimitiveArray<UInt8Type>
[src]
impl From<Vec<u16>> for PrimitiveArray<UInt16Type>
[src]
impl From<Vec<Option<u16>>> for PrimitiveArray<UInt16Type>
[src]
impl From<Vec<u32>> for PrimitiveArray<UInt32Type>
[src]
impl From<Vec<Option<u32>>> for PrimitiveArray<UInt32Type>
[src]
impl From<Vec<u64>> for PrimitiveArray<UInt64Type>
[src]
impl From<Vec<Option<u64>>> for PrimitiveArray<UInt64Type>
[src]
impl From<Vec<f32>> for PrimitiveArray<Float32Type>
[src]
impl From<Vec<Option<f32>>> for PrimitiveArray<Float32Type>
[src]
impl From<Vec<f64>> for PrimitiveArray<Float64Type>
[src]
impl From<Vec<Option<f64>>> for PrimitiveArray<Float64Type>
[src]
impl From<Vec<i64>> for PrimitiveArray<TimestampSecondType>
[src]
impl From<Vec<Option<i64>>> for PrimitiveArray<TimestampSecondType>
[src]
impl From<Vec<i64>> for PrimitiveArray<TimestampMillisecondType>
[src]
impl From<Vec<Option<i64>>> for PrimitiveArray<TimestampMillisecondType>
[src]
impl From<Vec<i64>> for PrimitiveArray<TimestampMicrosecondType>
[src]
impl From<Vec<Option<i64>>> for PrimitiveArray<TimestampMicrosecondType>
[src]
impl From<Vec<i64>> for PrimitiveArray<TimestampNanosecondType>
[src]
impl From<Vec<Option<i64>>> for PrimitiveArray<TimestampNanosecondType>
[src]
impl From<Vec<i32>> for PrimitiveArray<Date32Type>
[src]
impl From<Vec<Option<i32>>> for PrimitiveArray<Date32Type>
[src]
impl From<Vec<i64>> for PrimitiveArray<Date64Type>
[src]
impl From<Vec<Option<i64>>> for PrimitiveArray<Date64Type>
[src]
impl From<Vec<i32>> for PrimitiveArray<Time32SecondType>
[src]
impl From<Vec<Option<i32>>> for PrimitiveArray<Time32SecondType>
[src]
impl From<Vec<i32>> for PrimitiveArray<Time32MillisecondType>
[src]
impl From<Vec<Option<i32>>> for PrimitiveArray<Time32MillisecondType>
[src]
impl From<Vec<i64>> for PrimitiveArray<Time64MicrosecondType>
[src]
impl From<Vec<Option<i64>>> for PrimitiveArray<Time64MicrosecondType>
[src]
impl From<Vec<i64>> for PrimitiveArray<Time64NanosecondType>
[src]
impl From<Vec<Option<i64>>> for PrimitiveArray<Time64NanosecondType>
[src]
impl<T: ArrowPrimitiveType> From<Arc<ArrayData>> for PrimitiveArray<T>
[src]
Constructs a PrimitiveArray
from an array data reference.
default fn from(data: ArrayDataRef) -> Self
[src]
impl<T: ArrowPrimitiveType> Debug for PrimitiveArray<T>
[src]
impl<T: ArrowNumericType> Debug for PrimitiveArray<T>
[src]
impl<T: ArrowNumericType + ArrowTemporalType> Debug for PrimitiveArray<T> where
i64: From<T::Native>,
[src]
i64: From<T::Native>,
impl Debug for PrimitiveArray<BooleanType>
[src]
Auto Trait Implementations
impl<T> Sync for PrimitiveArray<T>
impl<T> Send for PrimitiveArray<T>
impl<T> Unpin for PrimitiveArray<T>
impl<T> UnwindSafe for PrimitiveArray<T> where
<T as ArrowPrimitiveType>::Native: RefUnwindSafe,
<T as ArrowPrimitiveType>::Native: RefUnwindSafe,
impl<T> RefUnwindSafe for PrimitiveArray<T> where
<T as ArrowPrimitiveType>::Native: RefUnwindSafe,
<T as ArrowPrimitiveType>::Native: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> FromCast<T> for T
[src]
impl<T, U> Cast<U> for T where
U: FromCast<T>,
[src]
U: FromCast<T>,