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/01/02 21:54:41 UTC

[GitHub] [arrow] KirillLykov opened a new pull request #9079: ARROW-10578: [C++] Comparison kernels crashing for string array with null string scalar

KirillLykov opened a new pull request #9079:
URL: https://github.com/apache/arrow/pull/9079


   


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



[GitHub] [arrow] pitrou commented on a change in pull request #9079: ARROW-10578: [C++] Comparison kernels crashing for string array with null string scalar

Posted by GitBox <gi...@apache.org>.
pitrou commented on a change in pull request #9079:
URL: https://github.com/apache/arrow/pull/9079#discussion_r551374612



##########
File path: python/pyarrow/tests/test_compute.py
##########
@@ -803,12 +836,17 @@ def con(values): return pa.array(values)
         def con(values): return pa.chunked_array([values])
 
     arr = con([1, 2, 3, None])
-    # TODO this is a hacky way to construct a scalar ..
-    scalar = pa.array([2]).sum()
+    scalar = pa.scalar(2)
 
     result = pc.equal(arr, scalar)
     assert result.equals(con([False, True, False, None]))
 
+    if typ == "array":
+        nascalar = pa.scalar(None, type="int64")
+        result = pc.equal(arr, nascalar)
+        isnull = pc.is_null(result)

Review comment:
       Or simply: `assert result.to_pylist() == [None, None, None, None]`




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



[GitHub] [arrow] jorisvandenbossche closed pull request #9079: ARROW-10578: [C++] Comparison kernels crashing for string array with null string scalar

Posted by GitBox <gi...@apache.org>.
jorisvandenbossche closed pull request #9079:
URL: https://github.com/apache/arrow/pull/9079


   


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



[GitHub] [arrow] kou commented on pull request #9079: ARROW-10578: [C++] Comparison kernels crashing for string array with null string scalar

Posted by GitBox <gi...@apache.org>.
kou commented on pull request #9079:
URL: https://github.com/apache/arrow/pull/9079#issuecomment-753675157


   @github-actions autotune


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



[GitHub] [arrow] KirillLykov commented on a change in pull request #9079: ARROW-10578: [C++] Comparison kernels crashing for string array with null string scalar

Posted by GitBox <gi...@apache.org>.
KirillLykov commented on a change in pull request #9079:
URL: https://github.com/apache/arrow/pull/9079#discussion_r551791854



##########
File path: python/pyarrow/tests/test_compute.py
##########
@@ -803,12 +836,17 @@ def con(values): return pa.array(values)
         def con(values): return pa.chunked_array([values])
 
     arr = con([1, 2, 3, None])
-    # TODO this is a hacky way to construct a scalar ..
-    scalar = pa.array([2]).sum()
+    scalar = pa.scalar(2)
 
     result = pc.equal(arr, scalar)
     assert result.equals(con([False, True, False, None]))
 
+    if typ == "array":
+        nascalar = pa.scalar(None, type="int64")
+        result = pc.equal(arr, nascalar)
+        isnull = pc.is_null(result)

Review comment:
       All done




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



[GitHub] [arrow] github-actions[bot] commented on pull request #9079: ARROW-10578: [C++] Comparison kernels crashing for string array with null string scalar

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #9079:
URL: https://github.com/apache/arrow/pull/9079#issuecomment-753535083


   https://issues.apache.org/jira/browse/ARROW-10578


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