pub fn shred_variant(
array: &VariantArray,
as_type: &DataType,
) -> Result<VariantArray>
Expand description
Shreds the input binary variant using a target shredding schema derived from the requested data type.
For example, requesting DataType::Int64
would produce an output variant array with the schema:
{
metadata: BINARY,
value: BINARY,
typed_value: LONG,
}
Similarly, requesting DataType::Struct
with two integer fields a
and b
would produce an
output variant array with the schema:
{
metadata: BINARY,
value: BINARY,
typed_value: {
a: {
value: BINARY,
typed_value: INT,
},
b: {
value: BINARY,
typed_value: INT,
},
}
}