Reset outputCount on each outgoing batch in Streaming Aggregate

Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/734387b8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/734387b8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/734387b8

Branch: refs/heads/master
Commit: 734387b875e1e45211899a59cfe476b198d011ba
Parents: 4cc4b21
Author: Steven Phillips <[email protected]>
Authored: Sat Jun 7 19:36:21 2014 -0700
Committer: Steven Phillips <[email protected]>
Committed: Sat Jun 7 19:36:21 2014 -0700

----------------------------------------------------------------------
 .../drill/exec/physical/impl/aggregate/StreamingAggTemplate.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/734387b8/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/StreamingAggTemplate.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/StreamingAggTemplate.java
 
b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/StreamingAggTemplate.java
index d966299..9dc24c4 100644
--- 
a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/StreamingAggTemplate.java
+++ 
b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/StreamingAggTemplate.java
@@ -89,7 +89,8 @@ public abstract class StreamingAggTemplate implements 
StreamingAggregator {
   @Override
   public AggOutcome doWork() {
     try{ // outside loop to ensure that first is set to false after the first 
run.
-
+      outputCount = 0;
+      
       // if we're in the first state, allocate outgoing.
       if(first){
         allocateOutgoing();

Reply via email to