public static Map<ASTNode, RexNode> genExprNode(ASTNode expr, TypeCheckCtx tcCtx)
      throws SemanticException {
    TypeCheckProcFactory<RexNode> factory =
        new TypeCheckProcFactory<>(new RexNodeExprFactory(tcCtx.getRexBuilder()));
    return factory.genExprNode(expr, tcCtx);
  }
Given an AST expression and a context, it will produce a map from AST nodes
to Calcite RexNode.
ql/src/java/org/apache/hadoop/hive/ql/parse/type/RexNodeTypeCheck.java