public static ITimeRangeIterator initTimeRangeIterator(
      GroupByTimeParameter groupByTimeParameter,
      boolean ascending,
      boolean outputPartialTimeWindow,
      ZoneId zoneId) {
    if (groupByTimeParameter == null) {
      return new SingleTimeWindowIterator(Long.MIN_VALUE, Long.MAX_VALUE);
    } else {
      return TimeRangeIteratorFactory.getTimeRangeIterator(
          groupByTimeParameter.getStartTime(),
          groupByTimeParameter.getEndTime(),
          groupByTimeParameter.getInterval(),
          groupByTimeParameter.getSlidingStep(),
          ascending,
          groupByTimeParameter.isLeftCRightO(),
          outputPartialTimeWindow,
          zoneId);
    }
  }
If groupByTimeParameter is null, which means it's an aggregation query without down sampling.
Aggregation query has only one time window and the result set of it does not contain a
timestamp, so it doesn't matter what the time range returns.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/AggregationUtil.java