public static Set<Integer> getInputRefs(List<RexNode> exprs) {
    InputRefsCollector irefColl = new InputRefsCollector(true);
    for (RexNode expr : exprs) {
      expr.accept(irefColl);
    }
    return irefColl.getInputRefSet();
  }
Walks over an expression and determines whether it is constant.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveCalciteUtil.java