jinxing64 commented on a change in pull request #1605: [CALCITE-3536] Wrong 
semantics in CoalesceImplementor
URL: https://github.com/apache/calcite/pull/1605#discussion_r350567757
 
 

 ##########
 File path: 
core/src/main/java/org/apache/calcite/sql/fun/SqlCoalesceFunction.java
 ##########
 @@ -29,12 +29,21 @@
 import org.apache.calcite.sql.validate.SqlValidator;
 import org.apache.calcite.util.Util;
 
+import com.google.common.annotations.VisibleForTesting;
+
 import java.util.List;
 
 /**
  * The <code>COALESCE</code> function.
  */
 public class SqlCoalesceFunction extends SqlFunction {
+
+  /**
+   * Only used for testing.
+   */
+  @VisibleForTesting
+  public static boolean enableRewriteCall = true;
 
 Review comment:
   I didn't find a better way to give a sql and test the codegen and verify the 
results;
   >  I have impression that there are some test cases that can shot the 
CoalesceImplementor. Maybe you can try to remove it from RexImpTable and run 
tests to find out the ones.
   
   I only find some IT in QuidemTest failed, but as I mentioned in the JIRA 
description, they are generated when optimization. And I think running a 
COALESCE by sql explicitly would be a better way for testing.

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