You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/12/06 16:04:33 UTC

[GitHub] [arrow] jorisvandenbossche commented on a change in pull request #11855: ARROW-13735: [C++][Python] Creating a Map array with non-default field names segfaults

jorisvandenbossche commented on a change in pull request #11855:
URL: https://github.com/apache/arrow/pull/11855#discussion_r763146334



##########
File path: python/pyarrow/tests/test_array.py
##########
@@ -891,6 +891,14 @@ def test_list_from_arrays(list_array_type, list_type_factory):
         result.validate(full=True)
 
 
+def test_map_labelled():
+    t = pa.map_(pa.field("name", "string", nullable=False), "int64")
+    arr = pa.array([[('a', 1), ('b', 2)], [('c', 3)]], type=t)
+    assert arr.type.key_field == pa.field("name", pa.utf8(), nullable=False)

Review comment:
       Would `assert arr.type == t` capture possible incorrect names as well?

##########
File path: python/pyarrow/tests/test_array.py
##########
@@ -891,6 +891,14 @@ def test_list_from_arrays(list_array_type, list_type_factory):
         result.validate(full=True)
 
 
+def test_map_labelled():
+    t = pa.map_(pa.field("name", "string", nullable=False), "int64")

Review comment:
       ```suggestion
   def test_map_labelled():
       #  ARROW-13735
       t = pa.map_(pa.field("name", "string", nullable=False), "int64")
   ```




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