private List<RexNode> getPartitionKeys(PartitionSpec ps,
        RowResolver inputRR) throws SemanticException {
      List<RexNode> pKeys = new ArrayList<>();
      if (ps != null) {
        List<PartitionExpression> pExprs = ps.getExpressions();
        for (PartitionExpression pExpr : pExprs) {
          TypeCheckCtx tcCtx = new TypeCheckCtx(inputRR, cluster.getRexBuilder());
          tcCtx.setAllowStatefulFunctions(true);
          tcCtx.setUnparseTranslator(unparseTranslator);
          RexNode exp = genRexNode(pExpr.getExpression(), inputRR, tcCtx, conf);
          pKeys.add(exp);
        }
      }

      return pKeys;
    }
Generate OB RelNode and input Select RelNode that should be used to
introduce top constraining Project. If Input select RelNode is not
present then don't introduce top constraining select.

@param qb
@param selPair
@param outermostOB
@return RelNode OB RelNode
@throws SemanticException
ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java