public static List<ExprNodeDesc> getExprNodes(List<Integer> inputRefs, RelNode inputRel,
      String inputTabAlias) {
    List<ExprNodeDesc> exprNodes = new ArrayList<ExprNodeDesc>();
    List<RexNode> rexInputRefs = getInputRef(inputRefs, inputRel);
    List<RexNode> exprs = inputRel instanceof Project ? ((Project) inputRel).getProjects() : null;
    // TODO: Change ExprNodeConverter to be independent of Partition Expr
    ExprNodeConverter exprConv = new ExprNodeConverter(inputTabAlias, inputRel.getRowType(),
        new HashSet<Integer>(), inputRel.getCluster().getTypeFactory());
    for (int index = 0; index < rexInputRefs.size(); index++) {
      // The following check is only a guard against failures.
      // TODO: Knowing which expr is constant in GBY's aggregation function
      // arguments could be better done using Metadata provider of Calcite.
      //check the corresponding expression in exprs to see if it is literal
      if (exprs != null && index < exprs.size() && exprs.get(inputRefs.get(index)) instanceof RexLiteral) {
        //because rexInputRefs represent ref expr corresponding to value in inputRefs it is used to get
        //  corresponding index
        ExprNodeDesc exprNodeDesc = exprConv.visitLiteral((RexLiteral) exprs.get(inputRefs.get(index)));
        exprNodes.add(exprNodeDesc);
      } else {
        RexNode iRef = rexInputRefs.get(index);
        exprNodes.add(iRef.accept(exprConv));
      }
    }
    return exprNodes;
  }
Given a list of predicates to push down, this methods returns the set of predicates
that still need to be pushed. Predicates need to be pushed because 1) their String
representation is not included in input set of predicates to exclude, or 2) they are
already in the subtree rooted at the input node.
This method updates the set of predicates to exclude with the String representation
of the predicates in the output and in the subtree.

@param predicatesToExclude String representation of predicates that should be excluded
@param inp root of the subtree
@param predsToPushDown candidate predicates to push down through the subtree
@return list of predicates to push down
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveCalciteUtil.java