alamb opened a new issue, #8087:
URL: https://github.com/apache/arrow-rs/issues/8087

   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   - part of https://github.com/apache/arrow-rs/issues/6736
   
   We introduced the basic `variant_get` kernel in and now we need to expand 
its feature set
   - https://github.com/apache/arrow-rs/pull/8021
   
   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
   1. PrimitiveTypes: DataType::Int32, etc
   2. StringTypes: DataType::Utf8, Utf8View, etc
   3. BinaryTypes: Binary, BinaryView, etc
   4. Boolean
   5. Time Types
   6. Date Types
   7. Timestamp Types
   
   I recommend doing this as a few PRs adding different subsets of types 
   
   
   **Describe alternatives you've considered**
   1. 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
   ```
   Int64Array: [23, 34]
   ```
   
   And an Int32Array
   ```
   Int32Array: [23, 34]
   ```
   
   
   **Additional context**
   Reference
   - [Variant 
Spec](https://github.com/apache/parquet-format/blob/master/VariantEncoding.md#encoding-types)
   - [Variant Shredding 
Spec](https://github.com/apache/parquet-format/blob/master/VariantShredding.md#value-shredding)
   - [Representing Variant In Arrow 
Proposal](https://docs.google.com/document/d/1pw0AWoMQY3SjD7R4LgbPvMjG_xSCtXp3rZHkVp9jpZ4)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to