Fix issue where redundant batches showing up after being partitioned and sent.
Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/98156ee7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/98156ee7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/98156ee7 Branch: refs/heads/master Commit: 98156ee70d0f6b04c24c7a1de442d5744f0fd63d Parents: add8c72 Author: Ben Becker <[email protected]> Authored: Mon Aug 12 00:48:06 2013 -0700 Committer: Jacques Nadeau <[email protected]> Committed: Thu Aug 15 18:31:31 2013 -0700 ---------------------------------------------------------------------- .../physical/impl/partitionsender/PartitionSenderRootExec.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/98156ee7/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/partitionsender/PartitionSenderRootExec.java ---------------------------------------------------------------------- diff --git a/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/partitionsender/PartitionSenderRootExec.java b/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/partitionsender/PartitionSenderRootExec.java index b2ca64e..476de7d 100644 --- a/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/partitionsender/PartitionSenderRootExec.java +++ b/sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/partitionsender/PartitionSenderRootExec.java @@ -213,11 +213,11 @@ class PartitionSenderRootExec implements RootExec { .arg(((JExpression) outgoingBatches.component(outIndex)).invoke("getRecordCount")) .arg(incomingVV)); - // generate the OutgoingRecordBatch helper invocations - cg.getBlock().add(((JExpression) outgoingBatches.component(outIndex)).invoke("incRecordCount")); - cg.getBlock().add(((JExpression) outgoingBatches.component(outIndex)).invoke("flushIfNecessary")); ++fieldId; } + // generate the OutgoingRecordBatch helper invocations + cg.getBlock().add(((JExpression) outgoingBatches.component(outIndex)).invoke("incRecordCount")); + cg.getBlock().add(((JExpression) outgoingBatches.component(outIndex)).invoke("flushIfNecessary")); try { // compile and setup generated code partitioner = context.getImplementationClassMultipleOutput(cg);
