pub enum LiteralValue {
Show 22 variants
Boolean(bool),
Int8(i8),
Int16(i16),
Int32(i32),
Int64(i64),
UInt8(u8),
UInt16(u16),
UInt32(u32),
UInt64(u64),
Float32(f32),
Float64(f64),
Utf8(String),
LargeUtf8(String),
Decimal128 {
raw: i128,
precision: u8,
scale: i8,
},
Date32(i32),
Date64(i64),
Time32 {
raw: i32,
unit: TimeUnit,
},
Time64 {
raw: i64,
unit: TimeUnit,
},
Timestamp {
raw: i64,
unit: TimeUnit,
},
Duration {
raw: i64,
unit: TimeUnit,
},
IntervalMonthDayNano {
months: i32,
days: i32,
nanoseconds: i64,
},
Null(DataType),
}Expand description
Typed scalar literal in native expression IR; nulls carry an explicit DataType.
Self::data_type is total: every variant names one Arrow type, so
validation types a literal without a schema. PartialEq only, because
Float32 and Float64 carry NaN; two literals that compare equal have the
same type and the same non-NaN value.
Variants§
Boolean(bool)
Boolean scalar.
Int8(i8)
Signed 8-bit integer scalar.
Int16(i16)
Signed 16-bit integer scalar.
Int32(i32)
Signed 32-bit integer scalar.
Int64(i64)
Signed 64-bit integer scalar.
UInt8(u8)
Unsigned 8-bit integer scalar.
UInt16(u16)
Unsigned 16-bit integer scalar.
UInt32(u32)
Unsigned 32-bit integer scalar.
UInt64(u64)
Unsigned 64-bit integer scalar.
Float32(f32)
32-bit floating-point scalar.
Float64(f64)
64-bit floating-point scalar.
Utf8(String)
UTF-8 string scalar with Arrow Utf8 type.
LargeUtf8(String)
UTF-8 string scalar with Arrow LargeUtf8 type.
Decimal128
Arrow Decimal128 scalar.
raw is the unscaled integer payload. precision and scale are the
Arrow decimal metadata; the mathematical value is raw * 10^-scale.
Fields
Date32(i32)
Arrow Date32 scalar, encoded as days since the Unix epoch.
Date64(i64)
Arrow Date64 scalar, encoded as milliseconds since the Unix epoch.
Time32
Arrow Time32 scalar.
raw is the count of unit intervals since midnight.
Fields
Time64
Arrow Time64 scalar.
raw is the count of unit intervals since midnight.
Fields
Timestamp
Arrow timestamp scalar without a timezone.
raw is the count of unit intervals since the Unix epoch.
Fields
Duration
Arrow duration scalar.
raw is the count of unit intervals.
IntervalMonthDayNano
Arrow Interval(MonthDayNano) scalar.
Null(DataType)
Typed SQL null literal.