You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2018/10/23 22:09:39 UTC

[GitHub] ilooner-mapr commented on a change in pull request #1508: DRILL-6804: Simplify usage of OperatorPhase in HashAgg.

ilooner-mapr commented on a change in pull request #1508: DRILL-6804: Simplify usage of OperatorPhase in HashAgg.
URL: https://github.com/apache/drill/pull/1508#discussion_r227583546
 
 

 ##########
 File path: exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/AggPrelBase.java
 ##########
 @@ -47,7 +47,39 @@
 
 public abstract class AggPrelBase extends DrillAggregateRelBase implements Prel {
 
-  public enum OperatorPhase {PHASE_1of1, PHASE_1of2, PHASE_2of2}
+  public enum OperatorPhase {
+    PHASE_1of1(false, true, "Single"),
+    PHASE_1of2(true, true, "1st"),
+    PHASE_2of2(true, false, "2nd");
+
+    private boolean hasTwo;
+    private boolean is1st;
+    private String name;
+
+    OperatorPhase(boolean hasTwo,
+                  boolean is1st,
+                  String name) {
+      this.hasTwo = hasTwo;
+      this.is1st = is1st;
+      this.name = name;
+    }
+
+    public boolean hasTwo() {
+      return hasTwo;
+    }
+
+    public boolean is1st() {
+      return is1st;
 
 Review comment:
   Thanks for catching this, fixed. And thanks for the review.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services