pub fn variant_get(
input: &ArrayRef,
options: GetOptions<'_>,
) -> Result<ArrayRef>
Expand description
Returns an array with the specified path extracted from the variant values.
The return array type depends on the as_type
field of the options parameter
as_type: None
: a VariantArray is returned. The values in this new VariantArray will point to the specified path.as_type: Some(<specific field>)
: an array of the specified type is returned.
TODO: How would a caller request a struct or list type where the fields/elements can be any
variant? Caller can pass None as the requested type to fetch a specific path, but it would
quickly become annoying (and inefficient) to call variant_get
for each leaf value in a struct or
list and then try to assemble the results.