Enum datafusion::scalar::ScalarValue [−][src]
pub enum ScalarValue {}Show variants
Boolean(Option<bool>), Float32(Option<f32>), Float64(Option<f64>), Int8(Option<i8>), Int16(Option<i16>), Int32(Option<i32>), Int64(Option<i64>), UInt8(Option<u8>), UInt16(Option<u16>), UInt32(Option<u32>), UInt64(Option<u64>), Utf8(Option<String>), LargeUtf8(Option<String>), Binary(Option<Vec<u8>>), LargeBinary(Option<Vec<u8>>), List(Option<Vec<ScalarValue>>, DataType), Date32(Option<i32>), Date64(Option<i64>), TimestampSecond(Option<i64>), TimestampMillisecond(Option<i64>), TimestampMicrosecond(Option<i64>), TimestampNanosecond(Option<i64>), IntervalYearMonth(Option<i32>), IntervalDayTime(Option<i64>),
Represents a dynamically typed, nullable single value.
This is the single-valued counter-part of arrow’s Array
.
Variants
true or false value
32bit float
64bit float
signed 8bit int
signed 16bit int
signed 32bit int
signed 64bit int
unsigned 8bit int
unsigned 16bit int
unsigned 32bit int
unsigned 64bit int
utf-8 encoded string.
utf-8 encoded string representing a LargeString’s arrow type.
binary
large binary
List(Option<Vec<ScalarValue>>, DataType)
list of nested ScalarValue
Date stored as a signed 32bit int
Date stored as a signed 64bit int
Timestamp Second
Timestamp Milliseconds
Timestamp Microseconds
Timestamp Nanoseconds
Interval with YearMonth unit
Interval with DayTime unit
Implementations
impl ScalarValue
[src]
impl ScalarValue
[src]pub fn get_datatype(&self) -> DataType
[src]
Getter for the DataType
of the value
pub fn arithmetic_negate(&self) -> Self
[src]
Calculate arithmetic negation for a scalar value
pub fn is_null(&self) -> bool
[src]
whether this value is null or not.
pub fn to_array(&self) -> ArrayRef
[src]
Converts a scalar value into an 1-row array.
pub fn to_array_of_size(&self, size: usize) -> ArrayRef
[src]
Converts a scalar value into an array of size
rows.
pub fn try_from_array(array: &ArrayRef, index: usize) -> Result<Self>
[src]
Converts a value in array
at index
into a ScalarValue
Trait Implementations
impl Clone for ScalarValue
[src]
impl Clone for ScalarValue
[src]fn clone(&self) -> ScalarValue
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl PartialEq<ScalarValue> for ScalarValue
[src]
impl PartialEq<ScalarValue> for ScalarValue
[src]fn eq(&self, other: &ScalarValue) -> bool
[src]
fn ne(&self, other: &ScalarValue) -> bool
[src]
impl StructuralPartialEq for ScalarValue
[src]
impl StructuralPartialEq for ScalarValue
[src]impl TryFrom<&'_ DataType> for ScalarValue
[src]
impl TryFrom<&'_ DataType> for ScalarValue
[src]Auto Trait Implementations
impl RefUnwindSafe for ScalarValue
impl RefUnwindSafe for ScalarValue
impl Send for ScalarValue
impl Send for ScalarValue
impl Sync for ScalarValue
impl Sync for ScalarValue
impl Unpin for ScalarValue
impl Unpin for ScalarValue
impl UnwindSafe for ScalarValue
impl UnwindSafe for ScalarValue
Blanket Implementations
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,