private <T> List<T> lookupAll(Class<T> clazz, Object key) {
    EquivGroup group = objectMap.get(key);
    if (group == null) {
      throw new NoSuchElementException(Objects.toString(key));
    }
    return group.getAll(clazz);
  }
Links and optionally merges the groups identified by the two objects.
ql/src/java/org/apache/hadoop/hive/ql/plan/mapper/PlanMapper.java