caicancai commented on code in PR #3689:
URL: https://github.com/apache/calcite/pull/3689#discussion_r1496891494
##########
testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java:
##########
@@ -6222,6 +6222,49 @@ void checkRegexpExtract(SqlOperatorFixture f0,
FunctionAlias functionAlias) {
f.checkNull("log(10, cast(null as real))");
}
+ /** Test case for
+ * <a
href="https://issues.apache.org/jira/browse/CALCITE-6224">[CALCITE-6224]
+ * Add LOG2 function (enabled in MYSQL, Spark library)</a>. */
+ @Test void testLog2Func() {
+ final SqlOperatorFixture f0 = fixture();
+ f0.checkFails("^log2(4)^",
+ "No match found for function signature LOG2\\(<NUMERIC>\\)", false);
+ final Consumer<SqlOperatorFixture> consumer = f -> {
+ f.setFor(SqlLibraryOperators.LOG2);
Review Comment:
I may not understand what you mean. I wrote this based on how other
functions are written.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]