morrySnow commented on code in PR #12433:
URL: https://github.com/apache/doris/pull/12433#discussion_r964796270


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/AggregateFunction.java:
##########
@@ -17,31 +17,59 @@
 
 package org.apache.doris.nereids.trees.expressions.functions;
 
+import org.apache.doris.nereids.exceptions.UnboundException;
 import org.apache.doris.nereids.trees.expressions.Expression;
 import org.apache.doris.nereids.trees.expressions.visitor.ExpressionVisitor;
 import org.apache.doris.nereids.types.DataType;
 
 /** AggregateFunction. */
 public abstract class AggregateFunction extends BoundFunction {
 
-    private DataType intermediate;
+    /**
+     * indicate current function used in local stage or global stage.
+     */
+    protected final boolean isLocal;
 
     public AggregateFunction(String name, Expression... arguments) {
+        this(name, false, arguments);
+    }
+
+    public AggregateFunction(String name, boolean isLocal, Expression... 
arguments) {
         super(name, arguments);
+        this.isLocal = isLocal;
+    }
+
+    public boolean isLocal() {
+        return isLocal;
     }
 
     public abstract DataType getIntermediateType();

Review Comment:
   this is useful in future



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to