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/05/14 20:03:36 UTC

[GitHub] [arrow] westonpace commented on a change in pull request #10272: ARROW-12677: [Python] Add a mask argument to pyarrow.StructArray.from_arrays

westonpace commented on a change in pull request #10272:
URL: https://github.com/apache/arrow/pull/10272#discussion_r632767457



##########
File path: python/pyarrow/array.pxi
##########
@@ -2189,6 +2227,18 @@ cdef class StructArray(Array):
         if names is not None and fields is not None:
             raise ValueError('Must pass either names or fields, not both')
 
+        if mask is None:
+            c_mask = shared_ptr[CBuffer]()
+        elif isinstance(mask, Array):
+            if mask.type != bool_():

Review comment:
       I couldn't figure out how to access `is_boolean` from the `pxi` file but I changed it to `mask.type.id != Type_BOOL` which is similar to the way other type comparisons are done in this file.




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

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