Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.20.0
Description
When executing queries like:
"SELECT COALESCE(name, 'unknown') as name_out FROM PCOLLECTION"
(input 'name' is nullable)
There is a need to know whether the result is nullable or not (in this case - not). During validation stage "COALESCE" is being transformed (via SqlValidatorImpl.performUnconditionalRewrites) into a "CASE" statement, which currently does not determine nullability of a result.
Attachments
Issue Links
- Blocked
-
BEAM-7610 SELECT COALESCE(...) isn't inferred as non-nullable field
- Open
- fixes
-
CALCITE-3850 AssertionError when converts a SQL parse tree into a relational algebra expression
- Closed
- links to