Is your feature request related to a problem or challenge? Please describe what you are trying to do.
We introduced the basic variant_get kernel in and now we need to expand its feature set
In particular, variant_get allows extracting variants (or subpaths) as typed arrays.
Describe the solution you'd like
I would like variant_get to support shredded arrays, along with being able to extract elements from them.
So roughly that means, implement VariantOutputBuilder::typed for the rest of the input variant types (Currently only Int32 is supported)
The type list is
- PrimitiveTypes: DataType::Int32, etc
- StringTypes: DataType::Utf8, Utf8View, etc
- BinaryTypes: Binary, BinaryView, etc
- Boolean
- Time Types
- Date Types
- Timestamp Types
I recommend doing this as a few PRs adding different subsets of types
Describe alternatives you've considered
- Add a test to create a VariantArray with the relevant
Variant:: types, and then extract them as the desired type (e.g. make a VariantArray with Variant::Int32s and then extract it as a DataType::Int32
Note you should be able to extract to different types
So for example, a VariantArray with
Variant::Int32(23)
Variant::Int64(34)
SHould be extractable as both an Int64Array
And an Int32Array
Additional context
Reference
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
We introduced the basic
variant_getkernel in and now we need to expand its feature setvariant_getand ShreddedVariantArray#8021In particular,
variant_getallows extracting variants (or subpaths) as typed arrays.Describe the solution you'd like
I would like
variant_getto support shredded arrays, along with being able to extract elements from them.So roughly that means, implement
VariantOutputBuilder::typedfor the rest of the input variant types (Currently only Int32 is supported)The type list is
I recommend doing this as a few PRs adding different subsets of types
Describe alternatives you've considered
Variant::types, and then extract them as the desired type (e.g. make a VariantArray with Variant::Int32s and then extract it as a DataType::Int32Note you should be able to extract to different types
So for example, a VariantArray with
SHould be extractable as both an Int64Array
And an Int32Array
Additional context
Reference