You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2019/12/02 19:58:35 UTC

[GitHub] [calcite] 11moon11 commented on a change in pull request #1611: [CALCITE-3355] Deduce whether CASE and COALESCE may produce NULL values

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


With regards,
Apache Git Services