julianhyde commented on code in PR #3785: URL: https://github.com/apache/calcite/pull/3785#discussion_r1597166998
########## testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java: ########## @@ -10036,6 +10036,34 @@ void assertSubFunReturns(boolean binary, String s, int start, checkNvl(f, FunctionAlias.of(SqlLibraryOperators.NVL)); } + /** Test case for + * <a href="https://issues.apache.org/jira/browse/CALCITE-6397">[CALCITE-6397] + * Add NVL2 function (enabled in Spark library). </a>. + */ + @Test void testNvl2Func() { + final SqlOperatorFixture f = fixture(); + f.setFor(SqlLibraryOperators.NVL2, VmName.EXPAND); + f.checkFails("^nvl2(NULL, 2, 1)^", + "No match found for function signature " + + "NVL2\\(<NULL>, <NUMERIC>, <NUMERIC>\\)", false); + + final SqlOperatorFixture f12 = f Review Comment: need cases like one argument is `DECIMAL(3, 1)` and another is `DECIMAL(4, 3)` you only seem to be testing the easy cases e.g. two `CHAR(2)`, two `CHAR(3)`. The users won't test the easy cases. -- 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: commits-unsubscr...@calcite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org