We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For example: Consider:
CASE WHEN NULL THEN 1 ELSE 0 END
This returns:
ERROR : null is/are incompatible data types for the 'CASE_WHEN' operator.
According to SQL spec, the case expression should returns the value of the of the first (leftmost) whose is true.
Per my understand, NULL should be permitted in the case expression, as NULL IS TRUE simply returns false.
NULL IS TRUE
See also: PostgreSQL link.
This will be a problem for us, practically because we rewrite control flow function like NULLIF to case when.
NULLIF
i.e.,
NULLIF(a, b) -- is equivalent to CASE WHEN a=b THEN NULL ELSE a END -- a=b can return null.
CASE WHEN NULL THEN 1 ELSE 0 END java.lang.AssertionError: ERROR:null is/are incompatible data types for the 'CASE_WHEN' operator.
Define a better handling mechanism for truth value in the typer.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
For example:
Consider:
This returns:
According to SQL spec, the case expression should returns the value of the of the first (leftmost)
whose is true.
Per my understand, NULL should be permitted in the case expression, as
NULL IS TRUE
simply returns false.See also: PostgreSQL link.
This will be a problem for us, practically because we rewrite control flow function like
NULLIF
to case when.i.e.,
To Reproduce
Expected Behavior
Define a better handling mechanism for truth value in the typer.
Additional Context
The text was updated successfully, but these errors were encountered: