JackieTien97 commented on code in PR #13853:
URL: https://github.com/apache/iotdb/pull/13853#discussion_r1809746807
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/TableAggregationTableScanOperator.java:
##########
@@ -768,15 +774,42 @@ public static boolean
isAllAggregatorsHasFinalResult(List<TableAggregator> aggre
return false;
}
}
+
+ this.allAggregatorsHasFinalResult = true;
return true;
}
+ private void checkIfAllAggregatorHasFinalResult() {
+ if (allAggregatorsHasFinalResult) {
+ // for SINGLE_TIME_ITERATOR, if allAggregatorsHasFinalResult, just
consume next device
+ if (timeIterator.getType() ==
ITableTimeRangeIterator.TimeIteratorType.SINGLE_TIME_ITERATOR) {
+ currentDeviceIndex++;
+ inputTsBlock = null;
+
+ if (currentDeviceIndex < deviceCount) {
+ // construct AlignedSeriesScanUtil for next device
+ this.seriesScanUtil =
+
constructAlignedSeriesScanUtil(deviceEntries.get(currentDeviceIndex));
+ queryDataSource.reset();
+ this.seriesScanUtil.initQueryDataSource(queryDataSource);
+ }
+
+ if (currentDeviceIndex >= deviceCount) {
+ // all devices have been consumed
+ timeIterator.setFinished();
+ }
Review Comment:
```suggestion
} else {
// all devices have been consumed
timeIterator.setFinished();
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]