public static HashMapDataStructureType of(JoinDesc conf) {
      ExprNodeDesc[][] keys = conf.getJoinKeys();
      if (keys != null && keys[0].length == 1) {
        TypeInfo typeInfo = keys[0][0].getTypeInfo();
        if (typeInfo instanceof PrimitiveTypeInfo) {
          PrimitiveTypeInfo pti = ((PrimitiveTypeInfo) typeInfo);
          PrimitiveCategory pCat = pti.getPrimitiveCategory();
          switch (pCat) {
          case BOOLEAN:
          case BYTE:
          case SHORT:
          case INT:
          case LONG:
            return HashMapDataStructureType.LONG_KEYED;
          default:
            break;
          }
        }
      }
      return HashMapDataStructureType.COMPOSITE_KEYED;
    }
ConvertJoinMapJoin is an optimization that replaces a common join
(aka shuffle join) with a map join (aka broadcast or fragment replicate
join when possible. Map joins have restrictions on which joins can be
converted (e.g.: full outer joins cannot be handled as map joins) as well
as memory restrictions (one side of the join has to fit into memory).
ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConvertJoinMapJoin.java