private TsBlock getFilterTsBlock(TsBlock input) {
    final Column originTimeColumn = input.getTimeColumn();
    final int positionCount = originTimeColumn.getPositionCount();
    // feed Filter ColumnTransformer, including TimeStampColumnTransformer and constant
    for (LeafColumnTransformer leafColumnTransformer : filterLeafColumnTransformerList) {
      leafColumnTransformer.initFromTsBlock(input);
    }

    filterOutputTransformer.tryEvaluate();

    Column filterColumn = filterOutputTransformer.getColumn();

    // reuse this builder
    filterTsBlockBuilder.reset();

    List<Column> resultColumns = new ArrayList<>();
    for (int i = 0, n = input.getValueColumnCount(); i < n; i++) {
      resultColumns.add(input.getColumn(i));
    }

    if (!hasNonMappableUDF) {
      // get result of calculated common sub expressions
      for (ColumnTransformer columnTransformer : commonTransformerList) {
        // CASE WHEN clause would clear all its cache
        // evaluate again to acquire cache
        columnTransformer.tryEvaluate();
        resultColumns.add(columnTransformer.getColumn());
      }
    }

    final ColumnBuilder[] columnBuilders = filterTsBlockBuilder.getValueColumnBuilders();
    if (originTimeColumn instanceof RunLengthEncodedColumn) {
      int rowCount =
          constructFilteredTsBlock(resultColumns, filterColumn, columnBuilders, positionCount);
      filterTsBlockBuilder.declarePositions(rowCount);

      return filterTsBlockBuilder.build(originTimeColumn.getRegion(0, rowCount));

    } else {
      final TimeColumnBuilder timeBuilder = filterTsBlockBuilder.getTimeColumnBuilder();
      int rowCount =
          constructFilteredTsBlock(
              resultColumns,
              timeBuilder,
              filterColumn,
              originTimeColumn,
              columnBuilders,
              positionCount);

      filterTsBlockBuilder.declarePositions(rowCount);
      return filterTsBlockBuilder.build();
    }
  }
Return the TsBlock that contains both initial input columns and columns of common
subexpressions after filtering.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/FilterAndProjectOperator.java