private ImmutableMap<String, Integer> buildHiveColNameToInputPosMap(
        List<RexNode> columnList, RowResolver inputRR) {
      final ImmutableBitSet refs =
          RelOptUtil.InputFinder.bits(columnList, null);
      ImmutableMap.Builder<String, Integer> hiveColNameToInputPosMapBuilder =
          new ImmutableMap.Builder<>();
      for (int ref : refs) {
        hiveColNameToInputPosMapBuilder.put(
            inputRR.getColumnInfos().get(ref).getInternalName(), ref);
      }
      return hiveColNameToInputPosMapBuilder.build();
    }
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