@Override
    public HiveLoptOptimizeJoinRule toRule() {
      return new HiveLoptOptimizeJoinRule(this);
    }
Determines if the equality portion of a self-join condition is between
identical keys that are unique.

@param mq Metadata query
@param leftRel left side of the join
@param rightRel right side of the join
@param joinFilters the join condition

@return true if the equality join keys are the same and unique
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveLoptOptimizeJoinRule.java