11moon11 commented on a change in pull request #1611: [CALCITE-3355] Deduce 
whether CASE and COALESCE may produce NULL values
URL: https://github.com/apache/calcite/pull/1611#discussion_r352798781
 
 

 ##########
 File path: core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java
 ##########
 @@ -619,6 +625,9 @@ private static String 
cannotStreamResultsForNonStreamingInputs(String inputs) {
     expr("coalesce('a','b')").ok();
     expr("coalesce('a','b','c')")
         .columnType("CHAR(1) NOT NULL");
+
+    sql("select COALESCE(mgr, 12) as m from EMP")
 
 Review comment:
   I would also add a test for a query like this: `NULLIF(x, -1)`.
   According to the doc [1] it is also converted to `CASE WHEN ...`
   
   [1] 
https://calcite.apache.org/apidocs/org/apache/calcite/sql/fun/SqlCaseOperator.html

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to