xiedeyantu commented on code in PR #4577:
URL: https://github.com/apache/calcite/pull/4577#discussion_r2427470717
##########
core/src/main/java/org/apache/calcite/sql/SqlBasicFunction.java:
##########
@@ -180,35 +195,40 @@ public static SqlBasicFunction create(String name,
return dynamic;
}
+ @Override public boolean isIdempotent() {
+ return idempotent;
+ }
+
/** Returns a copy of this function with a given name. */
public SqlBasicFunction withName(String name) {
return new SqlBasicFunction(name, kind, syntax, deterministic,
getReturnTypeInference(), getOperandTypeInference(), operandHandler,
getOperandTypeChecker(), callValidator,
- getFunctionType(), monotonicityInference, dynamic);
+ getFunctionType(), monotonicityInference, dynamic, idempotent);
Review Comment:
I didn't quite understand your comment. Here, a similar function to "copy"
requires ensuring idempotency with previously set values.
--
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]