private void collectTimeSeries(int i) {
    int rowSize = inputTsBlocks[i].getPositionCount();
    for (int row = 0; row < rowSize; row++) {
      Binary key = getTimeSeries(inputTsBlocks[i], row);
      Location location = timeSeriesSelector.get(key);
      if (location == null
          || inputTsBlocks[i].getTimeByIndex(row)
              > inputTsBlocks[location.tsBlockIndex].getTimeByIndex(location.rowIndex)) {
        timeSeriesSelector.put(key, new Location(i, row));
      }
    }
  }
prepare next batch

@return true if need to break current loop, otherwise false
@throws Exception errors happened while fetching next batch data
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/last/LastQueryMergeOperator.java