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
ScalarValue in datafusion::scalar - Rust
[go: Go Back, main page]

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

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.

Binary(Option<Vec<u8>>)

binary

LargeBinary(Option<Vec<u8>>)

large binary

list of nested ScalarValue

Date32(Option<i32>)

Date stored as a signed 32bit int

Date64(Option<i64>)

Date stored as a signed 64bit int

TimestampSecond(Option<i64>)

Timestamp Second

TimestampMillisecond(Option<i64>)

Timestamp Milliseconds

TimestampMicrosecond(Option<i64>)

Timestamp Microseconds

TimestampNanosecond(Option<i64>)

Timestamp Nanoseconds

IntervalYearMonth(Option<i32>)

Interval with YearMonth unit

IntervalDayTime(Option<i64>)

Interval with DayTime unit

Implementations

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 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 Literal for ScalarValue[src]

impl PartialEq<ScalarValue> for ScalarValue[src]

impl StructuralPartialEq for ScalarValue[src]

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

type Error = DataFusionError

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> Same<T> for T

type Output = T

Should always be Self

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>,