Kikyou1997 commented on code in PR #9993:
URL: https://github.com/apache/incubator-doris/pull/9993#discussion_r894134956


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/AggregateInfo.java:
##########
@@ -277,29 +271,27 @@ public static boolean 
estimateIfContainsMultiDistinct(List<FunctionCallExpr> dis
      * - aggTupleDesc
      * - a complete secondPhaseDistinctAggInfo
      * - mergeAggInfo
-     *
+     * <p>
      * At the moment, we require that all distinct aggregate
      * functions be applied to the same set of exprs (ie, we can't do something
      * like SELECT COUNT(DISTINCT id), COUNT(DISTINCT address)).
      * Aggregation happens in two successive phases:
      * - the first phase aggregates by all grouping exprs plus all parameter 
exprs
-     *   of DISTINCT aggregate functions
-     *
+     * of DISTINCT aggregate functions
+     * <p>
      * Example:

Review Comment:
   done



##########
fe/fe-core/src/main/java/org/apache/doris/analysis/AggregateInfo.java:
##########
@@ -38,49 +38,48 @@
  * Encapsulates all the information needed to compute the aggregate functions 
of a single
  * Select block, including a possible 2nd phase aggregation step for DISTINCT 
aggregate
  * functions and merge aggregation steps needed for distributed execution.
- *
+ * <p>
  * The latter requires a tree structure of AggregateInfo objects which express 
the
  * original aggregate computations as well as the necessary merging aggregate
  * computations.
  * TODO: get rid of this by transforming
  *   SELECT COUNT(DISTINCT a, b, ..) GROUP BY x, y, ...
  * into an equivalent query with a inline view:
  *   SELECT COUNT(*) FROM (SELECT DISTINCT a, b, ..., x, y, ...) GROUP BY x, 
y, ...
- *
+ * <p>
  * The tree structure looks as follows:
  * - for non-distinct aggregation:
- *   - aggInfo: contains the original aggregation functions and grouping exprs
- *   - aggInfo.mergeAggInfo: contains the merging aggregation functions 
(grouping
- *     exprs are identical)
+ * - aggInfo: contains the original aggregation functions and grouping exprs
+ * - aggInfo.mergeAggInfo: contains the merging aggregation functions (grouping
+ * exprs are identical)
  * - for distinct aggregation (for an explanation of the phases, see
- *   SelectStmt.createDistinctAggInfo()):
- *   - aggInfo: contains the phase 1 aggregate functions and grouping exprs
- *   - aggInfo.2ndPhaseDistinctAggInfo: contains the phase 2 aggregate 
functions and
- *     grouping exprs
- *   - aggInfo.mergeAggInfo: contains the merging aggregate functions for the 
phase 1
- *     computation (grouping exprs are identical)
- *   - aggInfo.2ndPhaseDistinctAggInfo.mergeAggInfo: contains the merging 
aggregate
- *     functions for the phase 2 computation (grouping exprs are identical)
- *
+ * SelectStmt.createDistinctAggInfo()):
+ * - aggInfo: contains the phase 1 aggregate functions and grouping exprs
+ * - aggInfo.2ndPhaseDistinctAggInfo: contains the phase 2 aggregate functions 
and
+ * grouping exprs
+ * - aggInfo.mergeAggInfo: contains the merging aggregate functions for the 
phase 1
+ * computation (grouping exprs are identical)
+ * - aggInfo.2ndPhaseDistinctAggInfo.mergeAggInfo: contains the merging 
aggregate
+ * functions for the phase 2 computation (grouping exprs are identical)
+ * <p>
  * In general, merging aggregate computations are idempotent; in other words,
  * aggInfo.mergeAggInfo == aggInfo.mergeAggInfo.mergeAggInfo.
- *
+ * <p>
  * TODO: move the merge construction logic from SelectStmt into AggregateInfo
  * TODO: Add query tests for aggregation with intermediate tuples with 
num_nodes=1.
  */
 public final class AggregateInfo extends AggregateInfoBase {
     private final static Logger LOG = 
LogManager.getLogger(AggregateInfo.class);
 
     public enum AggPhase {
-        FIRST,
-        FIRST_MERGE,
-        SECOND,
-        SECOND_MERGE;
+        FIRST, FIRST_MERGE, SECOND, SECOND_MERGE;

Review Comment:
   done



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to