Skip to content

COALESCE expr in datafusion should perform lazy evaluation of the operands #17322

@coderfender

Description

@coderfender

Describe the bug

We observed that datafusion-spark's coalesce should perform lazy evaluation of the operands from left to right similar to spark . Current implementation throws an exception in case any operand throws an error which is not in alignment with spark which does lazy evaluation to return first non NULL values

To Reproduce

select coalesce(100, 1/0) from tbl

Expected behavior

result : 100 but throws an exception

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions