Skip to content

Confirm NULLIF Behavior #27024

@natashasehgal

Description

@natashasehgal

Want to confirm if the NULLIF(a,b) in Presto coordinator translates to if(eq(a, b), null, a) 100% of the time.
Or is there any nuance which will require preserving NULLIF and not converting to IF?

This question came up in the development of Axiom native front-end for Velox.
facebookincubator/axiom#781 (comment)

Also follow up, is there any difference in implementing this in Axiom as a function (current PR above) or expression?

Possible Implementation

https://github.com/prestodb/presto/blob/master/presto-parser/src/main/java/com/facebook/presto/sql/tree/NullIfExpression.java

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions