[
https://issues.apache.org/jira/browse/ARROW-12975?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ben Kietzman resolved ARROW-12975.
----------------------------------
Fix Version/s: 5.0.0
Resolution: Fixed
Issue resolved by pull request 10472
[https://github.com/apache/arrow/pull/10472]
> [C++][Python] if_else kernel doesn't support upcasting
> -------------------------------------------------------
>
> Key: ARROW-12975
> URL: https://issues.apache.org/jira/browse/ARROW-12975
> Project: Apache Arrow
> Issue Type: Improvement
> Components: C++, Python
> Reporter: Niranda Perera
> Assignee: Niranda Perera
> Priority: Major
> Labels: pull-request-available
> Fix For: 5.0.0
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> 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.
> {code:java}
> >>> 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])
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)