FrankChen021 commented on code in PR #5263:
URL: https://github.com/apache/calcite/pull/5263#discussion_r4011443170


##########
core/src/main/java/org/apache/calcite/sql/SqlCall.java:
##########
@@ -72,6 +72,25 @@ public void setOperand(int i, @Nullable SqlNode operand) {
     throw new UnsupportedOperationException();
   }
 
+  /**
+   * Replaces all operands. Allows some rewrite by {@link SqlValidator}; use
+   * sparingly.
+   *
+   * <p>The default implementation delegates to {@link #setOperand(int, 
SqlNode)}.
+   * Subclasses may override this method to replace all operands more 
efficiently.
+   *
+   * @param operands New operands
+   */
+  public void setOperandList(

Review Comment:
   `SqlCall` cannot use the `SqlBasicCall` implementation directly because it 
has no `operandList` field; other subclasses may store operands differently. 
The default loop preserves each subclass’s existing `setOperand` behavior, 
while `SqlBasicCall` overrides it to replace its immutable operand list in one 
copy.



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