@Override
    public void onMatch(RelOptRuleCall call) {
      final Filter filter = call.rel(0);
      RexInBetweenExpander expander = new RexInBetweenExpander(
          filter.getCluster().getRexBuilder());
      RexNode condition = expander.apply(filter.getCondition());

      if (!expander.modified) {
        return;
      }

      RelNode newFilter = filter.copy(filter.getTraitSet(),
          filter.getInput(), condition);

      call.transformTo(newFilter);
    }
Rule adapter to apply the transformation to Filter conditions.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveInBetweenExpandRule.java