Ian Cook created ARROW-13412:
--------------------------------

             Summary: [C++] and_kleene, or_kleene return null on Scalar and 
multi-chunk ChunkedArray
                 Key: ARROW-13412
                 URL: https://issues.apache.org/jira/browse/ARROW-13412
             Project: Apache Arrow
          Issue Type: Bug
          Components: C++
    Affects Versions: 4.0.1
            Reporter: Ian Cook


When you pass a Scalar and a ChunkedArray with 2+ chunks to the {{or_kleene}} 
or {{and_kleene}} kernel, it returns all {{null}} in the result.

Demonstrating this with the R bindings:
{code:java}
> call_function("or_kleene", Scalar$create(TRUE), ChunkedArray$create(c(T,F,T), 
> c(F,T,F)))
ChunkedArray
[
  [
    null,
    null,
    null,
    null,
    null,
    null
  ]
]{code}
Compare to the following which all work as one would expect:

Scalar and ChunkedArray with only one chunk (works as expected):
{code:java}
> call_function("or_kleene", Scalar$create(TRUE), ChunkedArray$create(c(T,F,T)))
ChunkedArray
[
  [
    true,
    true,
    true
  ]
]
{code}
Scalar and Array (works as expected):
{code:java}
> call_function("or_kleene", Scalar$create(TRUE), Array$create(c(T,F,T)))
Array
<bool>
[
  true,
  true,
  true
]
{code}
Two ChunkedArrays (works as expected):
{code:java}
> call_function("or_kleene", ChunkedArray$create(c(T,NA,T), c(F,F,T)), 
> ChunkedArray$create(c(T,NA,T), c(F,F,T)))
ChunkedArray
[
  [
    true,
    null,
    true,
    false,
    false,
    true
  ]
]
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to