private void buildResultForCurrentGroup(TsBlock block, int startIndex, int endIndex) {

    int length = endIndex - startIndex + 1;
    resultBuilder.declarePositions(length);

    Column helperColumn = block.getColumn(helperColumnIndex).getRegion(startIndex, length);
    for (int i = 0; i < outputColumnCount; i++) {
      Column column =
          fillArray[i].fill(helperColumn, block.getColumn(i).getRegion(startIndex, length));
      ColumnBuilder builder = resultBuilder.getColumnBuilder(i);
      for (int rowIndex = 0; rowIndex < length; rowIndex++) {
        if (column.isNull(rowIndex)) {
          builder.appendNull();
        } else {
          builder.write(column, rowIndex);
        }
      }
    }
  }
Used for table previous fill with group.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/PreviousFillWithGroupOperator.java