@Override
    public void onMatch(RelOptRuleCall call) {
      final Project project = call.rel(0);
      RexInBetweenExpander expander = new RexInBetweenExpander(
          project.getCluster().getRexBuilder());
      List<RexNode> newProjects = new ArrayList<>();
      for (RexNode expr : project.getProjects()) {
        newProjects.add(expander.apply(expr));
      }

      if (!expander.modified) {
        return;
      }

      Project newProject = project.copy(project.getTraitSet(),
          project.getInput(), newProjects, project.getRowType());

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