@Override
  public boolean matches(RelOptRuleCall call) {
    final Filter filterRel = call.rel(1);
    RexNode condition = filterRel.getCondition();
    if (!HiveCalciteUtil.isDeterministic(condition)) {
      return false;
    }

    return super.matches(call);
  }
Planner rule that infers constant expressions from Filter into
a Project operator.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveProjectFilterPullUpConstantsRule.java