NobiGo commented on code in PR #3869:
URL: https://github.com/apache/calcite/pull/3869#discussion_r1687305529


##########
core/src/main/java/org/apache/calcite/sql/fun/SqlTrimFunction.java:
##########
@@ -130,6 +130,9 @@ public SqlTrimFunction(String name, SqlKind kind,
       if (operands[1] == null) {
         operands[1] = SqlLiteral.createCharString(" ", pos);
       }
+      if (operands[2] == null) {

Review Comment:
   @mihaibudiu @timgrein Perhaps we can refer to SparkSQL's exception 
information.
   SparkSQL:
   ```
   spark-sql> select trim();
   Error in query: Invalid number of arguments for function trim. Expected: one 
of 1 and 2; Found: 0; line 1 pos 7
   ```
   
   



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

Reply via email to