@Override
    public RelNode visit(HiveJoin join) {
      join.setJoinAlgorithm(HiveDefaultCostModel.DefaultJoinAlgorithm.INSTANCE);
      return super.visit(join);
    }
Rule to trigger {@link HiveCardinalityPreservingJoinOptimization} on top of the plan.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveCardinalityPreservingJoinRule.java