@Override
  public TsBlock skipPointsOutOfCurWindow(TsBlock inputTsBlock) {

    if (!needSkip || inputTsBlock == null || inputTsBlock.isEmpty()) {
      return inputTsBlock;
    }

    Column controlColumn = conditionWindow.getControlColumn(inputTsBlock);
    Column timeColumn = inputTsBlock.getTimeColumn();
    int i = 0;
    int k = 0;
    int size = inputTsBlock.getPositionCount();
    for (; i < size && !needBreak(controlColumn, i); i++) {

      // if ignoreNull is true, ignore the controlColumn of null.
      if (isIgnoringNull() && controlColumn.isNull(i)) {
        continue;
      }

      // update endTime and record the row processed, only the first phrase of skip in current
      // window need to record them.
      if (isFirstSkip) {
        k++;
        updateTime(timeColumn.getLong(i));
      }
    }

    // record the row processed in the first phrase of skip. If the tsBlock is null, the skip may
    // not finish.
    if (isFirstSkip) {
      if (i != size) {
        isFirstSkip = false;
      }
      conditionWindow.setKeep(conditionWindow.getKeep() + k);
      return inputTsBlock.subTsBlock(i);
    }

    if (i < size) {
      // we can create a new window beginning at index i of inputTsBlock.
      needSkip = false;
    }
    return inputTsBlock.subTsBlock(i);
  }
skipPointsOutOfBound has two phrases in ConditionWindowManager. First phrase is to skip the row
with the controlColumn of true in current window, which usually happens when FIRST_VALUE() or
MAX_TIME() leaves early in aggregator. Second phrase is to skip the row with the controlColumn
of false/null which don't belong to current window. isFirstSkip is used to identify the phrase.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/window/ConditionWindowManager.java