[ 
https://issues.apache.org/jira/browse/DRILL-6804?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16661368#comment-16661368
 ] 

ASF GitHub Bot commented on DRILL-6804:
---------------------------------------

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:
[email protected]


> Simplify Usage of OperatorPhase in HashAgg Template
> ---------------------------------------------------
>
>                 Key: DRILL-6804
>                 URL: https://issues.apache.org/jira/browse/DRILL-6804
>             Project: Apache Drill
>          Issue Type: Sub-task
>            Reporter: Timothy Farkas
>            Assignee: Timothy Farkas
>            Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to