private RelNode createProjectWithAdditionalExprs(
          RelNode input,
          List<Pair<RexNode, String>> additionalExprs) {
    final List<RelDataTypeField> fieldList =
            input.getRowType().getFieldList();
    List<Pair<RexNode, String>> projects = Lists.newArrayList();
    for (Ord<RelDataTypeField> field : Ord.zip(fieldList)) {
      projects.add(
              Pair.of(
                      (RexNode) rexBuilder.makeInputRef(
                              field.e.getType(), field.i),
                      field.e.getName()));
    }
    projects.addAll(additionalExprs);
    return RelOptUtil.createProject(input, Pair.left(projects), Pair.right(projects),
        false, relBuilder);
  }
Projects all {@code input} output fields plus the additional expressions.

@param input        Input relational expression
@param additionalExprs Additional expressions and names
@return the new Project
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveRelDecorrelator.java