HawaiianSpork opened a new pull request, #5703:
URL: https://github.com/apache/arrow-rs/pull/5703
Arrow Maps have field names for the elements of the fields, the field names
are allowed to be any value and do not affect the type of the data.
This allows a Map where the field names are key_value, key, value to be
mapped to a entries, keys, values.
This can be helpful in merging record batches that may have come from
different sources. This also makes maps behave similar to lists which also
have a field to distinguish their elements.
# Which issue does this PR close?
Closes #5702.
# Rationale for this change
Arrow has field names for list elements and map elements. arrow-rs can cast
lists with one name for elements (like elements) to another name like `items).
But this is not supported for the map type which has field names, one for the
elements, one for the keys and one for the values. This can be a limitation for
anyone using arrays of Maps from different sources.
# What changes are included in this PR?
The cast functions now support casting from one Map type to another Map type
where nothing is different other than the root field elements name, the key
field name and value field name.
# Are there any user-facing changes?
No, I would not consider this a user breaking change unless some client was
expecting an error when map root level field names did not match.
--
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]