chunweilei 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_r353046030
 
 

 ##########
 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:
   IMO, we cannot deduce whether `NULLIF(x, -1)` is nullable or not when 
validating since we don't know whether `x` equals `1` or not.  Besides, there 
is already some test for it[1].
   
   [1] 
https://github.com/apache/calcite/blob/master/core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java#L603

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to