datafusion_common::scalar

Trait ScalarType

Source
pub trait ScalarType<T: ArrowNativeType> {
    // Required method
    fn scalar(r: Option<T>) -> ScalarValue;
}
Expand description

Trait used to map a NativeType to a ScalarValue

Required Methods§

Source

fn scalar(r: Option<T>) -> ScalarValue

returns a scalar from an optional T

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ScalarType<f32> for Float32Type

Source§

impl ScalarType<i32> for Date32Type

Source§

impl ScalarType<i64> for TimestampMicrosecondType

Source§

impl ScalarType<i64> for TimestampMillisecondType

Source§

impl ScalarType<i64> for TimestampNanosecondType

Source§

impl ScalarType<i64> for TimestampSecondType

Implementors§