You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "paleolimbot (via GitHub)" <gi...@apache.org> on 2023/04/11 01:38:28 UTC

[GitHub] [arrow] paleolimbot commented on a diff in pull request #35013: GH-34983: [C++] Preserve map values nullability on C Data Interface import

paleolimbot commented on code in PR #35013:
URL: https://github.com/apache/arrow/pull/35013#discussion_r1162214230


##########
cpp/src/arrow/c/bridge.cc:
##########
@@ -1102,7 +1102,13 @@ struct SchemaImporter {
     }
 
     bool keys_sorted = (c_struct_->flags & ARROW_FLAG_MAP_KEYS_SORTED);
-    type_ = map(value_type->field(0)->type(), value_type->field(1)->type(), keys_sorted);
+    bool values_nullable = value_type->field(1)->nullable();
+    // Some implementations of Arrow (such as Rust) use a non-standard field name
+    // for key ("keys") and value ("values") fields. For simplicity, we override
+    // them on import.

Review Comment:
   I need to fix this in the nanoarrow implementation (I think it currently errors for the case where the names are incorrect!)



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org