tustvold commented on code in PR #4085:
URL: https://github.com/apache/arrow-rs/pull/4085#discussion_r1165787189
##########
arrow-array/src/array/map_array.rs:
##########
@@ -54,35 +50,34 @@ impl MapArray {
/// Returns a reference to the keys of this map
pub fn keys(&self) -> &ArrayRef {
- &self.keys
+ self.entries.column(0)
}
/// Returns a reference to the values of this map
pub fn values(&self) -> &ArrayRef {
- &self.values
+ self.entries.column(1)
}
/// Returns a reference to the [`StructArray`] entries of this map
- pub fn entries(&self) -> &ArrayRef {
+ pub fn entries(&self) -> &StructArray {
Review Comment:
This is a breaking change, but I think is significantly easier to
understand, especially since it was already documented to be a `StructArray`
:sweat_smile:
--
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]