sohami commented on a change in pull request #1490: DRILL-6766: Lateral Unnest
query : IllegalStateException - rowId in right batch of lateral is smaller than
rowId in left batch being processed
URL: https://github.com/apache/drill/pull/1490#discussion_r222782213
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/StreamingAggBatch.java
##########
@@ -259,15 +265,16 @@ public IterOutcome innerNext() {
throw new IllegalStateException(String.format("unknown outcome %s",
lastKnownOutcome));
}
} else {
- if ( lastKnownOutcome != NONE && firstBatchForDataSet &&
!aggregator.isDone()) {
+ if ( lastKnownOutcome != NONE && firstBatchForDataSet &&
!aggregator.isDone()
+ && aggregator.previousBatchProcessed()) {
Review comment:
This is the place where `StreamingAgg` after returning previous output batch
doesn't know if the incoming batch still has some rows leftover to process
before calling next(). The new added method `previousBatchProcessed` will
provide that info now.
----------------------------------------------------------------
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