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

   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   
   We keep a vector of `Field` and a `UnionMode` in `Union` datatype now. 
According to Arrow 
[spec](https://arrow.apache.org/docs/format/Columnar.html#union-layout), it 
only specifies the type ids are 8bit signed integers. So the type ids can be 
arbitrary integers only if they can be matched with children arrays' type ids. 
This is how 
[UnionType](https://github.com/apache/arrow/blob/d6e577899f1d0c62c1525ac0691026e6db89fd0d/cpp/src/arrow/type.cc#L620-L631)
 in C++ implementation works.
   
   Currently this crate assumes that the type ids of `Union` are monotonically 
increasing from 0 (i.e., 0, 1, 2...). When integrating with other 
implementations like C++, this assumption will cause error in receiving/sending 
UnionArray.
   
   **Describe the solution you'd like**
   
   We should keep type ids in `Union` datatype like C++ `UnionType`. The type 
ids are given when creating `Union` datatype. `UnionArray` related code should 
not assume the type ids are monotonically increasing from 0.
   
   **Describe alternatives you've considered**
   A clear and concise description of any alternative solutions or features 
you've considered.
   
   **Additional context**
   Add any other context or screenshots about the feature request here.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to