private void appendInputColumns(
            RelNode srcRel, List<RexNode> columnList, RowResolver outputRR, RowResolver inputRR)
            throws SemanticException {
      List<RexNode> originalInputRefs = Lists.transform(srcRel.getRowType().getFieldList(),
              input -> new RexInputRef(input.getIndex(), input.getType()));
      for (int i = 0; i < inputRR.getColumnInfos().size(); i++) {
        ColumnInfo colInfo = new ColumnInfo(inputRR.getColumnInfos().get(i));
        String internalName = SemanticAnalyzer.getColumnInternalName(outputRR.getColumnInfos().size());
        colInfo.setInternalName(internalName);
        // if there is any conflict, then we do not generate it in the new select
        // otherwise we add it into the calciteColLst and generate the new select
        if (!outputRR.putWithCheck(colInfo.getTabAlias(), colInfo.getAlias(), internalName,
            colInfo)) {
          LOG.trace("Column already present in RR. skipping.");
        } else {
          columnList.add(originalInputRefs.get(i));
        }
      }
    }
NOTE: there can only be one select caluse since we don't handle multi destination insert.
@param isAllColRefRewrite
         when it is true, it means that it is called from group by *, where we use
         genSelectLogicalPlan to rewrite *
@return RelNode: the select relnode RowResolver: i.e., originalRR, the RR after select when there is an order by.
ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java