Registry Mirror
Skip to content

Support if function #5910

Closed
Closed

Description

@allenma

Is your feature request related to a problem or challenge?

Most of the sql engines support if function, like spark, snowflake, mysql, etc. It is similar as Case expression, but only support one condition, the syntax is like:
IF( <condition> , <expr1> , <expr2> )
If condition evaluates to TRUE, returns expr1, otherwise returns expr2

Describe the solution you'd like

Add new build in function 'If'

Describe alternatives you've considered

No response

Additional context

No response

Activity

  1. added
    enhancement
    on Apr 7, 2023
  2. Jefffrey commented on Oct 17, 2025

    @Jefffrey
    Contributor

    I'll close this as being done by #16946 as it adds this function to the datafusion-spark crate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions