private boolean isCalculationDone() {
    if (curSubTimeRange == null) {
      if (!subTimeRangeIterator.hasNextTimeRange()) {
        return true;
      } else {
        curSubTimeRange = subTimeRangeIterator.nextTimeRange();
      }
    }

    return ascending
        ? curSubTimeRange.getMin() > curTimeRange.getMax()
        : curSubTimeRange.getMax() < curTimeRange.getMin();
  }
return if already get the result.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/SlidingWindowAggregationOperator.java