public void setTableColumnToTsBlockIndexMap(OutputNode outputNode) {
    List<Symbol> childOutputSymbols = outputNode.getChild().getOutputSymbols();
    Map<Symbol, Integer> outputSymbolsIndexMap = new HashMap<>(childOutputSymbols.size());
    for (int i = 0; i < childOutputSymbols.size(); i++) {
      outputSymbolsIndexMap.put(childOutputSymbols.get(i), i);
    }

    this.columnToTsBlockIndexMap = new HashMap<>();
    this.columnIndex2TsBlockColumnIndexList =
        new ArrayList<>(outputNode.getOutputColumnNames().size());
    for (int i = 0; i < outputNode.getOutputColumnNames().size(); i++) {
      int index = outputSymbolsIndexMap.get(outputNode.getOutputSymbols().get(i));
      columnToTsBlockIndexMap.put(outputNode.getOutputColumnNames().get(i), index);
      columnIndex2TsBlockColumnIndexList.add(index);
    }
  }
The header of query result dataset.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/common/header/DatasetHeader.java