Skip to main content

Module unshred_variant

Module unshred_variant 

Source
Expand description

Module for unshredding VariantArray by folding typed_value columns back into the value column.

Macrosยง

handle_unshredded_case ๐Ÿ”’
Macro that handles the unshredded case (typed_value is missing or NULL) and returns early if handled. If not handled (shredded case), validates and returns the extracted value.
impl_append_to_variant_builder ๐Ÿ”’

Structsยง

DecimalUnshredRowBuilder ๐Ÿ”’
Generic builder for decimal unshredding
ListUnshredVariantBuilder ๐Ÿ”’
Builder for unshredding list/array types with recursive element processing
NullUnshredVariantBuilder ๐Ÿ”’
Builder for arrays with neither typed_value nor value (all Variant::Null)
StructUnshredVariantBuilder ๐Ÿ”’
Builder for unshredding struct/object types with nested fields
TimestampUnshredRowBuilder ๐Ÿ”’
Generic builder for timestamp types that handles timezone-aware conversion
TopLevelRowSink ๐Ÿ”’
Wraps the sink that every top-level row is appended into. The row builders signal a missing value (value and typed_value both NULL) by calling append_null, and this wrapper gives that signal its top-level meaning: Variant::Null, because the non-nullable output value column cannot hold a physical NULL. Array-level NULL rows are appended before the sink is built, so they never reach it. Nested builders created via try_new_object/try_new_list are returned unwrapped, so nested missing values keep their own semantics, e.g. [ObjectFieldBuilder] omits the field.
UnshredPrimitiveRowBuilder ๐Ÿ”’
Generic unshred builder that works with any Array implementing AppendToVariantBuilder
ValueOnlyUnshredVariantBuilder ๐Ÿ”’
Builder for arrays that only have value column (already unshredded)

Enumsยง

UnshredVariantRowBuilder ๐Ÿ”’
Row builder for converting shredded VariantArray rows back to unshredded form

Traitsยง

AppendToVariantBuilder ๐Ÿ”’
Extension trait that directly adds row builder support for arrays that correspond to primitive variant types.
TimestampType ๐Ÿ”’
Trait for timestamp types to handle conversion to DateTime<Utc>

Functionsยง

unshred_variant
Removes all (nested) typed_value columns from a VariantArray by converting them back to binary variant and merging the resulting values back into the value column.
value_field_is_non_nullable ๐Ÿ”’
value_nulls_are_masked ๐Ÿ”’
Returns true if every null in value is masked by a parent null, i.e. the column may be annotated non-nullable.