pub struct ShreddedVariantFieldArray {
    inner: StructArray,
    shredding_state: ShreddingState,
}Expand description
One shredded field of a partially or perfectly shredded variant. For example, suppose the
shredding schema for variant v treats it as an object with a single field a, where a is
itself a struct with the single field b of type INT. Then the physical layout of the column
is:
v: VARIANT {
    metadata: BINARY,
    value: BINARY,
    typed_value: STRUCT {
        a: SHREDDED_VARIANT_FIELD {
            value: BINARY,
            typed_value: STRUCT {
                a: SHREDDED_VARIANT_FIELD {
                    value: BINARY,
                    typed_value: INT,
                },
            },
        },
    },
}In the above, each row of v.value is either a variant value (shredding failed, v was not an
object at all) or a variant object (partial shredding, v was an object but included unexpected
fields other than a), or is NULL (perfect shredding, v was an object containing only the
single expected field a).
A similar story unfolds for each v.typed_value.a.value – a variant value if shredding failed
(v:a was not an object at all), or a variant object (v:a was an object with unexpected
additional fields), or NULL (v:a was an object containing only the single expected field b).
Finally, v.typed_value.a.typed_value.b.value is either NULL (v:a.b was an integer) or else a
variant value (which could be Variant::Null).
Fields§
§inner: StructArrayReference to the underlying StructArray
shredding_state: ShreddingStateImplementations§
Source§impl ShreddedVariantFieldArray
 
impl ShreddedVariantFieldArray
Sourcepub fn try_new(inner: &dyn Array) -> Result<Self>
 
pub fn try_new(inner: &dyn Array) -> Result<Self>
Creates a new ShreddedVariantFieldArray from a [StructArray].
§Arguments
- inner- The underlying [- StructArray] that contains the variant data.
§Returns
- A new instance of ShreddedVariantFieldArray.
§Errors:
- If the StructArraydoes not contain the required fields
§Requirements of the StructArray
- 
An optional field named valuethat is binary, large_binary, or binary_view
- 
An optional field named typed_valuewhich can be any primitive type or be a list, large_list, list_view or struct
Currently, only value columns of type [BinaryViewArray] are supported.
Sourcepub fn shredding_state(&self) -> &ShreddingState
 
pub fn shredding_state(&self) -> &ShreddingState
Return the shredding state of this VariantArray
Sourcepub fn value_field(&self) -> Option<&BinaryViewArray>
 
pub fn value_field(&self) -> Option<&BinaryViewArray>
Return a reference to the value field of the StructArray
Sourcepub fn typed_value_field(&self) -> Option<&ArrayRef>
 
pub fn typed_value_field(&self) -> Option<&ArrayRef>
Return a reference to the typed_value field of the StructArray, if present
pub(crate) fn from_parts( value: Option<BinaryViewArray>, typed_value: Option<ArrayRef>, nulls: Option<NullBuffer>, ) -> Self
Sourcepub fn into_inner(self) -> StructArray
 
pub fn into_inner(self) -> StructArray
Returns the inner [StructArray], consuming self