alamb commented on code in PR #10272:
URL: https://github.com/apache/arrow-rs/pull/10272#discussion_r3521798134
##########
arrow-array/src/array/map_array.rs:
##########
@@ -109,6 +110,16 @@ impl MapArray {
)));
}
+ // The Arrow spec requires the "key" field to be non-nullable
+ //
<https://github.com/apache/arrow/blob/98347d233f03bcf4d116d77f1769d498902b1fc8/format/Schema.fbs#L138>
+ if entries.fields()[0].is_nullable() {
Review Comment:
Should we check the data type? Or maybe just the actual contents of the
array (`null_count() > 0`)?
##########
arrow-array/src/array/map_array.rs:
##########
@@ -109,6 +110,16 @@ impl MapArray {
)));
}
+ // The Arrow spec requires the "key" field to be non-nullable
+ //
<https://github.com/apache/arrow/blob/98347d233f03bcf4d116d77f1769d498902b1fc8/format/Schema.fbs#L138>
+ if entries.fields()[0].is_nullable() {
Review Comment:
I worry that the data_type is not always set super precisely (as in there
may be some code that claims the key is "nullable" for convenience, but in
reality the key is not nullable)
🤔
--
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]