@Override
  public void processPartialResult(PartialAggregationResult partialResult) {
    if (partialResult.isNull()) {
      return;
    }

    while (!deque.isEmpty()
        && comparator.compare(
                partialResult.getPartialResult()[0], deque.getLast().getPartialResult()[0])
            > 0) {
      deque.removeLast();
    }
    deque.addLast(partialResult);
    this.accumulator.addIntermediate(deque.getFirst().getPartialResult());
  }
When computing MAX_VALUE, MIN_VALUE, EXTREME, we only add partial aggregation results that
maintain monotonicity to queue. The aggregation result always appears at the head of the queue.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/slidingwindow/MonotonicQueueSlidingWindowAggregator.java