Jefffrey commented on code in PR #10272:
URL: https://github.com/apache/arrow-rs/pull/10272#discussion_r3522179880


##########
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 feel its better to be strict/explicit in this case
   
   for reference, in the builder we also check nullability already:
   
   
https://github.com/apache/arrow-rs/blob/b1de629ae82ee417e24a413f8f6815c884ec971b/arrow-array/src/builder/map_builder.rs#L243-L247



-- 
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