amol- commented on a change in pull request #11481:
URL: https://github.com/apache/arrow/pull/11481#discussion_r733687691



##########
File path: cpp/src/arrow/python/numpy_to_arrow.cc
##########
@@ -268,6 +270,7 @@ class NumPyConverter {
     if (mask_ != nullptr) {
       RETURN_NOT_OK(InitNullBitmap());
       null_count_ = MaskToBitmap(mask_, length_, null_bitmap_data_);
+      if (null_count_ == -1) return Status::Invalid("Invalid mask type");

Review comment:
       Yes, I explained it at 
https://issues.apache.org/jira/browse/ARROW-14388?focusedCommentId=17431246#comment-17431246
 I couldn't find a way to reproduce the issue once I put in place the fix from 
Krisztian, but I left this check in place anyway so that instead of segfaulting 
we get an error if it happens again in the future.
   
   Sadly we can't monkeypatch Cython code, thus there is no easy way to get the 
`get_values` out of the way and avoid the conversion.




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