Skip to content

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

Description

@asfimport

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 (mostrecentcalllast):
File"<stdin>", line1, in <module>
File"<string>", line3, inif_elseFile"pyarrow/_compute.pyx", line335, inpyarrow._compute.Function.callresult = GetResultValue(self.base_func.Execute(c_args,
File"pyarrow/error.pxi", line141, inpyarrow.lib.pyarrow_internal_check_statusreturncheck_status(status)
File"pyarrow/error.pxi", line118, inpyarrow.lib.check_statusraiseArrowNotImplementedError(message)
pyarrow.lib.ArrowNotImplementedError: Functionif_elsehasnokernelmatchinginputtypes (array[bool], array[int64], array[double])

Reporter: Niranda Perera / @nirandaperera
Assignee: Niranda Perera / @nirandaperera

Related issues:

PRs and other links:

Note: This issue was originally created as ARROW-12975. Please see the migration documentation for further details.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions