This is an automated email from the ASF dual-hosted git repository.
rubenada pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/calcite.git
The following commit(s) were added to refs/heads/main by this push:
new 8bd302692e [CALCITE-7659] Add AggregateCall#withFunction API
8bd302692e is described below
commit 8bd302692e22f01469068a2046aec7abc092caba
Author: Ruben Quesada Lopez <[email protected]>
AuthorDate: Mon Jul 20 16:31:34 2026 +0100
[CALCITE-7659] Add AggregateCall#withFunction API
---
core/src/main/java/org/apache/calcite/rel/core/AggregateCall.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/core/src/main/java/org/apache/calcite/rel/core/AggregateCall.java
b/core/src/main/java/org/apache/calcite/rel/core/AggregateCall.java
index 95ca99e13a..47164f94de 100644
--- a/core/src/main/java/org/apache/calcite/rel/core/AggregateCall.java
+++ b/core/src/main/java/org/apache/calcite/rel/core/AggregateCall.java
@@ -388,6 +388,13 @@ public final SqlAggFunction getAggregation() {
return aggFunction;
}
+ /** Withs {@link #aggFunction}. */
+ public AggregateCall withFunction(SqlAggFunction aggFunction) {
+ return aggFunction.equals(this.aggFunction) ? this
+ : new AggregateCall(pos, aggFunction, distinct, approximate,
ignoreNulls,
+ rexList, argList, filterArg, distinctKeys, collation, type, name);
+ }
+
/**
* Returns the aggregate ordering definition (the {@code WITHIN GROUP} clause
* in SQL), or the empty list if not specified.