Skip to content

Missing ScalarValue variant for RunEndEncoded #18563

@vegarsti

Description

@vegarsti

While working on #18516 I found that ScalarValue is missing an enum variant for RunEndEncoded values.

pub enum ScalarValue {
/// represents `DataType::Null` (castable to/from any other type)
Null,
/// true or false value
Boolean(Option<bool>),
/// 16bit float
Float16(Option<f16>),
/// 32bit float
Float32(Option<f32>),
/// 64bit float
Float64(Option<f64>),
/// 32bit decimal, using the i32 to represent the decimal, precision scale
Decimal32(Option<i32>, u8, i8),
/// 64bit decimal, using the i64 to represent the decimal, precision scale
Decimal64(Option<i64>, u8, i8),
/// 128bit decimal, using the i128 to represent the decimal, precision scale
Decimal128(Option<i128>, u8, i8),
/// 256bit decimal, using the i256 to represent the decimal, precision scale
Decimal256(Option<i256>, u8, i8),
/// signed 8bit int
Int8(Option<i8>),
/// signed 16bit int
Int16(Option<i16>),
/// signed 32bit int
Int32(Option<i32>),
/// signed 64bit int
Int64(Option<i64>),
/// unsigned 8bit int
UInt8(Option<u8>),
/// unsigned 16bit int
UInt16(Option<u16>),
/// unsigned 32bit int
UInt32(Option<u32>),
/// unsigned 64bit int
UInt64(Option<u64>),
/// utf-8 encoded string.
Utf8(Option<String>),
/// utf-8 encoded string but from view types.
Utf8View(Option<String>),
/// utf-8 encoded string representing a LargeString's arrow type.
LargeUtf8(Option<String>),
/// binary
Binary(Option<Vec<u8>>),
/// binary but from view types.
BinaryView(Option<Vec<u8>>),
/// fixed size binary
FixedSizeBinary(i32, Option<Vec<u8>>),
/// large binary
LargeBinary(Option<Vec<u8>>),
/// Fixed size list scalar.
///
/// The array must be a FixedSizeListArray with length 1.
FixedSizeList(Arc<FixedSizeListArray>),
/// Represents a single element of a [`ListArray`] as an [`ArrayRef`]
///
/// The array must be a ListArray with length 1.
List(Arc<ListArray>),
/// The array must be a LargeListArray with length 1.
LargeList(Arc<LargeListArray>),
/// Represents a single element [`StructArray`] as an [`ArrayRef`]. See
/// [`ScalarValue`] for examples of how to create instances of this type.
Struct(Arc<StructArray>),
/// Represents a single element [`MapArray`] as an [`ArrayRef`].
Map(Arc<MapArray>),
/// Date stored as a signed 32bit int days since UNIX epoch 1970-01-01
Date32(Option<i32>),
/// Date stored as a signed 64bit int milliseconds since UNIX epoch 1970-01-01
Date64(Option<i64>),
/// Time stored as a signed 32bit int as seconds since midnight
Time32Second(Option<i32>),
/// Time stored as a signed 32bit int as milliseconds since midnight
Time32Millisecond(Option<i32>),
/// Time stored as a signed 64bit int as microseconds since midnight
Time64Microsecond(Option<i64>),
/// Time stored as a signed 64bit int as nanoseconds since midnight
Time64Nanosecond(Option<i64>),
/// Timestamp Second
TimestampSecond(Option<i64>, Option<Arc<str>>),
/// Timestamp Milliseconds
TimestampMillisecond(Option<i64>, Option<Arc<str>>),
/// Timestamp Microseconds
TimestampMicrosecond(Option<i64>, Option<Arc<str>>),
/// Timestamp Nanoseconds
TimestampNanosecond(Option<i64>, Option<Arc<str>>),
/// Number of elapsed whole months
IntervalYearMonth(Option<i32>),
/// Number of elapsed days and milliseconds (no leap seconds)
/// stored as 2 contiguous 32-bit signed integers
IntervalDayTime(Option<IntervalDayTime>),
/// A triple of the number of elapsed months, days, and nanoseconds.
/// Months and days are encoded as 32-bit signed integers.
/// Nanoseconds is encoded as a 64-bit signed integer (no leap seconds).
IntervalMonthDayNano(Option<IntervalMonthDayNano>),
/// Duration in seconds
DurationSecond(Option<i64>),
/// Duration in milliseconds
DurationMillisecond(Option<i64>),
/// Duration in microseconds
DurationMicrosecond(Option<i64>),
/// Duration in nanoseconds
DurationNanosecond(Option<i64>),
/// A nested datatype that can represent slots of differing types. Components:
/// `.0`: a tuple of union `type_id` and the single value held by this Scalar
/// `.1`: the list of fields, zero-to-one of which will by set in `.0`
/// `.2`: the physical storage of the source/destination UnionArray from which this Scalar came
Union(Option<(i8, Box<ScalarValue>)>, UnionFields, UnionMode),
/// Dictionary type: index type and value
Dictionary(Box<DataType>, Box<ScalarValue>),
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions