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/10/21 12:32:46 UTC

[GitHub] [arrow] amol- commented on a change in pull request #11481: ARROW-14388: [Python] Add unit test for pandas masks

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



##########
File path: python/pyarrow/tests/test_array.py
##########
@@ -2901,6 +2901,14 @@ def test_array_supported_masks():
                        mask=pa.array([True, False, True, False]))
 
 
+@pytest.mark.pandas
+def test_array_supported_pandas_masks():
+    import pandas
+    arr = pa.array(pandas.Series([0, 1], name="a", dtype="int64"),
+                   mask=pandas.Series([0, False], name="a", dtype='bool'))
+    assert arr.to_pylist() == [0, 1]

Review comment:
       Note, I picked the values exactly as they were in the `pyspark` test that triggered the issue, see https://issues.apache.org/jira/browse/ARROW-14388?focusedCommentId=17431248&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17431248
   
   In some cases passing `pandas.Series` did work, but that example was able to trigger a `NDIMS` equal to `NDIMS: 744843680` which seemed to suggest that in some cases we were reading just spurious memory. 




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