@Override
    public void onMatch(RelOptRuleCall call) {
      LOG.debug("JDBCExpandExpressionsRule.JoinCondition has been called");

      final Join join = call.rel(0);
      final RexNode condition = RexUtil.pullFactors(
          join.getCluster().getRexBuilder(), join.getCondition());

      RexNode newCondition = analyzeRexNode(
          join.getCluster().getRexBuilder(), condition);

      // If we could not transform anything, we bail out
      if (newCondition.toString().equals(condition.toString())) {
        return;
      }

      RelNode newNode = join.copy(join.getTraitSet(),
          newCondition,
          join.getLeft(),
          join.getRight(),
          join.getJoinType(),
          join.isSemiJoinDone());
      call.transformTo(newNode);
    }
Rule adapter to apply the transformation to Join conditions.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/jdbc/JDBCExpandExpressionsRule.java