pub enum Literal {
Null,
Int128(i128),
Float64(f64),
Decimal128(DecimalValue),
String(String),
Boolean(bool),
Date32(i32),
Struct(Vec<(String, Box<Literal>)>),
Interval(IntervalValue),
}Expand description
A literal value that has not yet been coerced into a specific native type. This allows for type inference to be deferred until the column type is known.
Variants§
Null
Int128(i128)
Float64(f64)
Decimal128(DecimalValue)
Decimal literal stored as scaled integer with fixed precision.
String(String)
Boolean(bool)
Date32(i32)
Date literal stored as days since the Unix epoch (1970-01-01).
Struct(Vec<(String, Box<Literal>)>)
Struct literal with field names and nested literals
Interval(IntervalValue)
Interval literal with mixed calendar and sub-day precision.
Implementations§
Trait Implementations§
Source§impl From<DecimalValue> for Literal
impl From<DecimalValue> for Literal
Source§fn from(v: DecimalValue) -> Literal
fn from(v: DecimalValue) -> Literal
Converts to this type from the input type.
Source§impl From<IntervalValue> for Literal
impl From<IntervalValue> for Literal
Source§fn from(v: IntervalValue) -> Literal
fn from(v: IntervalValue) -> Literal
Converts to this type from the input type.
Source§impl LiteralExt for Literal
impl LiteralExt for Literal
fn type_name(&self) -> &'static str
fn to_string_owned(&self) -> Result<String, LiteralCastError>
fn to_native<T>(&self) -> Result<T, LiteralCastError>where
T: FromLiteral + Copy + 'static,
fn from_array_ref( array: &Arc<dyn Array>, index: usize, ) -> Result<Literal, Error>
fn bound_to_native<T>( bound: &Bound<Literal>, ) -> Result<Bound<<T as ArrowPrimitiveType>::Native>, LiteralCastError>
impl StructuralPartialEq for Literal
Auto Trait Implementations§
impl Freeze for Literal
impl RefUnwindSafe for Literal
impl Send for Literal
impl Sync for Literal
impl Unpin for Literal
impl UnwindSafe for Literal
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more