Ben-Zvi commented on a change in pull request #1358:  DRILL-6516: EMIT support 
in streaming agg
URL: https://github.com/apache/drill/pull/1358#discussion_r200793749
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/StreamingAggTemplate.java
 ##########
 @@ -297,16 +413,33 @@ private final void resetIndex() {
     incIndex();
   }
 
-  private final AggOutcome setOkAndReturn() {
-    if (first) {
-      this.outcome = IterOutcome.OK_NEW_SCHEMA;
+  /**
+   * Set the outcome to OK (or OK_NEW_SCHEMA) and return the AggOutcome 
parameter
+   * @param outcome
+   * @return outcome
+   */
+  private final AggOutcome setOkAndReturn( IterOutcome outcome) {
 
 Review comment:
   A suggestion: Split off another method - *setOkAndReturnForEmit()* - to be 
used when (outcome == EMIT). This would yield two simpler methods (fewer 
condition checks).  As in all places the current method is used, the value of 
"outcome" is known (EMIT or anything-else), then just call the appropriate one.
   

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


With regards,
Apache Git Services

Reply via email to