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/08/24 15:04:02 UTC
[GitHub] [arrow] kainoa21 commented on a change in pull request #10981: ARROW-13696: [Python] Support for MapType with Fields
kainoa21 commented on a change in pull request #10981:
URL: https://github.com/apache/arrow/pull/10981#discussion_r694940645
##########
File path: python/pyarrow/types.pxi
##########
@@ -2349,12 +2363,23 @@ cpdef MapType map_(key_type, item_type, keys_sorted=False):
map_type : DataType
"""
cdef:
- DataType _key_type = ensure_type(key_type, allow_none=False)
- DataType _item_type = ensure_type(item_type, allow_none=False)
+ Field _key_field
+ Field _item_field
shared_ptr[CDataType] map_type
MapType out = MapType.__new__(MapType)
- map_type.reset(new CMapType(_key_type.sp_type, _item_type.sp_type,
+ if isinstance(key_type, Field):
+ _key_field = key_type
Review comment:
Added a commit to ensure the nullability for a passed field is correct.
--
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