mbrobbel opened a new pull request #11843: URL: https://github.com/apache/arrow/pull/11843
This PR adds support for concatenation of union arrays. For sparse union arrays this is trivial: the type buffers and child arrays are concatenated like the other concatenate implementations. For dense union arrays the following approach is used: - The type buffers are concatenated. - The child arrays are concatenated, but slicing is ignored. This makes building the offsets buffer more simple. - For every input array the length of the different child arrays (concatenated up to that point) is tracked. By iterating over the types buffers these offsets can be applied to the values in the concatenated offsets buffer. Does this make sense or should we slice child arrays (when required) and reflect this in the concatenated offsets buffer? This PR also removes a check in `DenseUnionArray::Make` that rejected empty offsets buffers. This made it impossible to construct empty dense union arrays. I discussed removing this check with @bkietz. -- 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]
