@Override
  public boolean hasNextTimeRange() {
    if (hasCachedTimeRange) {
      return true;
    }
    if (curTimeRange == null) {
      curTimeRange = getFirstTimeRange();
      hasCachedTimeRange = true;
    }
    return hasCachedTimeRange;
  }
Used for aggregation with only one time window. i.e. Aggregation without group by.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/timerangeiterator/SingleTimeWindowIterator.java