mihaibudiu commented on code in PR #3869:
URL: https://github.com/apache/calcite/pull/3869#discussion_r1687097864
##########
testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java:
##########
@@ -10857,6 +10857,7 @@ void assertSubFunReturns(boolean binary, String s, int
start,
f.checkFails("trim('' from 'abcde')",
"Trim error: trim character must be exactly 1 character",
true);
+ f.checkFails("trim()", "String to trim cannot be null", false);
Review Comment:
If the function trim() need to have arguments, then the type checker should
have complained about not finding a function with a signature without
arguments. I don't expect the parser to complain about it, that is strange. The
parser should just accept the function, and the type checker should validate it.
The original message is not good, since clearly there is no 'null' involved.
However, if the error comes from the parser, there isn't much you can do about
it.
--
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]