Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-13412

[C++] and_kleene, or_kleene return null on Scalar and multi-chunk ChunkedArray

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.0.1
    • 7.0.0
    • C++

    Description

      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:

      > call_function("or_kleene", Scalar$create(TRUE), ChunkedArray$create(c(T,F,T), c(F,T,F)))
      ChunkedArray
      [
        [
          null,
          null,
          null,
          null,
          null,
          null
        ]
      ]

      Compare to the following which all work as one would expect:

      Scalar and ChunkedArray with only one chunk (works as expected):

      > call_function("or_kleene", Scalar$create(TRUE), ChunkedArray$create(c(T,F,T)))
      ChunkedArray
      [
        [
          true,
          true,
          true
        ]
      ]
      

      Scalar and Array (works as expected):

      > call_function("or_kleene", Scalar$create(TRUE), Array$create(c(T,F,T)))
      Array
      <bool>
      [
        true,
        true,
        true
      ]
      

      Two ChunkedArrays (works as expected):

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

      Attachments

        Issue Links

          Activity

            People

              apitrou Antoine Pitrou
              icook Ian Cook
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 10m
                  1h 10m