Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
datafusion::scalar::ScalarValue - Rust
[go: Go Back, main page]

[][src]Enum datafusion::scalar::ScalarValue

pub enum ScalarValue {
    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>),
    List(Option<Vec<ScalarValue>>, DataType),
}

Represents a dynamically typed, nullable single value. This is the single-valued counter-part of arrow’s Array.

Variants

Boolean(Option<bool>)

true or false value

Float32(Option<f32>)

32bit float

Float64(Option<f64>)

64bit float

Int8(Option<i8>)

signed 8bit int

Int16(Option<i16>)

signed 16bit int

Int32(Option<i32>)

signed 32bit int

Int64(Option<i64>)

signed 64bit int

UInt8(Option<u8>)

unsigned 8bit int

UInt16(Option<u16>)

unsigned 16bit int

UInt32(Option<u32>)

unsigned 32bit int

UInt64(Option<u64>)

unsigned 64bit int

Utf8(Option<String>)

utf-8 encoded string.

LargeUtf8(Option<String>)

utf-8 encoded string representing a LargeString's arrow type.

list of nested ScalarValue

Implementations

impl ScalarValue[src]

pub fn get_datatype(&self) -> DataType[src]

Getter for the DataType of the 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 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 Debug for ScalarValue[src]

impl Display for ScalarValue[src]

impl From<bool> for ScalarValue[src]

impl From<f32> for ScalarValue[src]

impl From<f64> for ScalarValue[src]

impl From<i16> for ScalarValue[src]

impl From<i32> for ScalarValue[src]

impl From<i64> for ScalarValue[src]

impl From<i8> for ScalarValue[src]

impl From<u16> for ScalarValue[src]

impl From<u32> for ScalarValue[src]

impl From<u64> for ScalarValue[src]

impl From<u8> for ScalarValue[src]

impl PartialEq<ScalarValue> for ScalarValue[src]

impl StructuralPartialEq for ScalarValue[src]

impl<'_> TryFrom<&'_ DataType> for ScalarValue[src]

type Error = ExecutionError

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,