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

[C++][Python] if_else kernel doesn't support upcasting

    XMLWordPrintableJSON

Details

    Description

      when using type multiple types for `left` and `right` arrays, `if_else` kernel fails. IMO check casting and dispatching logic for the if_else kernel.

      >>> pc.if_else([True], [1], [3.5])
      Traceback (most recent call last):
       File "<stdin>", line 1, in <module>
       File "<string>", line 3, in if_else
       File "pyarrow/_compute.pyx", line 335, in pyarrow._compute.Function.call
       result = GetResultValue(self.base_func.Execute(c_args,
       File "pyarrow/error.pxi", line 141, in pyarrow.lib.pyarrow_internal_check_status
       return check_status(status)
       File "pyarrow/error.pxi", line 118, in pyarrow.lib.check_status
       raise ArrowNotImplementedError(message)
      pyarrow.lib.ArrowNotImplementedError: Function if_else has no kernel matching input types (array[bool], array[int64], array[double])
      

      Attachments

        Issue Links

          Activity

            People

              niranda Niranda Perera
              niranda Niranda Perera
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 50m
                  50m