This is an automated email from the ASF dual-hosted git repository. hui pushed a commit to branch lmh/aggrOpRefactor in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit e59e079f7c793374e104fefaf10d6194d5eb7ef9 Author: Minghui Liu <[email protected]> AuthorDate: Thu Jul 7 17:20:10 2022 +0800 bug fix: reset canCallNext & fix end bound in SlidingWindowAggregationOperator --- .../execution/operator/process/SlidingWindowAggregationOperator.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/execution/operator/process/SlidingWindowAggregationOperator.java b/server/src/main/java/org/apache/iotdb/db/mpp/execution/operator/process/SlidingWindowAggregationOperator.java index 94db70e1a9..ed1106725d 100644 --- a/server/src/main/java/org/apache/iotdb/db/mpp/execution/operator/process/SlidingWindowAggregationOperator.java +++ b/server/src/main/java/org/apache/iotdb/db/mpp/execution/operator/process/SlidingWindowAggregationOperator.java @@ -95,6 +95,7 @@ public class SlidingWindowAggregationOperator implements ProcessOperator { @Override public TsBlock next() { resultTsBlockBuilder.reset(); + canCallNext = true; while ((curTimeRange != null || timeRangeIterator.hasNextTimeRange()) && !resultTsBlockBuilder.isFull()) { if (!calculateNextResult()) { @@ -153,8 +154,8 @@ public class SlidingWindowAggregationOperator implements ProcessOperator { curSubTimeRange = subTimeRangeIterator.nextTimeRange(); } return ascending - ? curSubTimeRange.getMin() >= curTimeRange.getMax() - : curSubTimeRange.getMax() <= curTimeRange.getMin(); + ? curSubTimeRange.getMin() > curTimeRange.getMax() + : curSubTimeRange.getMax() < curTimeRange.getMin(); } private void calcFromTsBlock() {
