julianhyde commented on a change in pull request #2255:
URL: https://github.com/apache/calcite/pull/2255#discussion_r521497121



##########
File path: core/src/main/java/org/apache/calcite/sql/SqlCallBinding.java
##########
@@ -145,10 +144,11 @@ public SqlCall getCall() {
       }
       final SqlOperandCountRange range = checker.getOperandCountRange();
       final List<SqlNode> list = Lists.newArrayList(operandList);
+      final SqlCall defaultCall = createDefaultCall();
       while (list.size() < range.getMax()
           && checker.isOptional(list.size())
           && checker.isFixedParameters()) {
-        list.add(DEFAULT_CALL);
+        list.add(defaultCall);

Review comment:
       Suggest you don’t create the defaultCall outside the loop. Most calls do 
not need default arguments. 
   
   You could in-line the defaultCall method, because it’s very simple.




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


Reply via email to