zabetak commented on a change in pull request #1605: [CALCITE-3536] Wrong
semantics in CoalesceImplementor
URL: https://github.com/apache/calcite/pull/1605#discussion_r350647450
##########
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 would prefer if we didn't introduce new production code just for tests
even if it is tagged. I guess you can reproduce the problem by creating
explicitly a query using the `RelBuilder` and execute it afterwards (see
examples in `EnumerableRepeatUnionTest`). An alternative would be to create a
test with a custom validator that does not rewrite calls.
----------------------------------------------------------------
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