private VectorMapJoinFastHashTableContainerBase createHashTables(int newThreshold) {

    VectorMapJoinDesc vectorDesc = (VectorMapJoinDesc) desc.getVectorDesc();
    HashTableKind hashTableKind = vectorDesc.getHashTableKind();
    HashTableKeyType hashTableKeyType = vectorDesc.getHashTableKeyType();
    boolean isFullOuter = vectorDesc.getIsFullOuter();
    boolean minMaxEnabled = vectorDesc.getMinMaxEnabled();

    int writeBufferSize = HiveConf.getIntVar(hconf, HiveConf.ConfVars.HIVE_HASHTABLE_WB_SIZE);

    VectorMapJoinFastHashTableContainerBase htWrapper = null;
    switch (hashTableKeyType) {
    case BOOLEAN:
    case BYTE:
    case SHORT:
    case INT:
    case DATE:
    case LONG:
      switch (hashTableKind) {
      case HASH_MAP:
        htWrapper = new VectorMapJoinFastLongHashMapContainer(isFullOuter, minMaxEnabled,
            hashTableKeyType, newThreshold, loadFactor, writeBufferSize, estimatedKeyCount, desc.getKeyTblDesc(), numHTs);
        break;
      case HASH_MULTISET:
        htWrapper = new VectorMapJoinFastLongHashMultiSetContainer(isFullOuter, minMaxEnabled,
            hashTableKeyType, newThreshold, loadFactor, writeBufferSize, estimatedKeyCount, desc.getKeyTblDesc(), numHTs);
        break;
      case HASH_SET:
        htWrapper = new VectorMapJoinFastLongHashSetContainer(isFullOuter, minMaxEnabled,
            hashTableKeyType, newThreshold, loadFactor, writeBufferSize, estimatedKeyCount, desc.getKeyTblDesc(), numHTs);
        break;
      }
      break;

    case STRING:
      switch (hashTableKind) {
      case HASH_MAP:
        htWrapper = new VectorMapJoinFastStringHashMapContainer(isFullOuter, newThreshold,
            loadFactor, writeBufferSize, estimatedKeyCount, desc.getKeyTblDesc(), numHTs);
        break;
      case HASH_MULTISET:
        htWrapper = new VectorMapJoinFastStringHashMultiSetContainer(isFullOuter, newThreshold,
            loadFactor, writeBufferSize, estimatedKeyCount, desc.getKeyTblDesc(), numHTs);
        break;
      case HASH_SET:
        htWrapper = new VectorMapJoinFastStringHashSetContainer(isFullOuter, newThreshold,
            loadFactor, writeBufferSize, estimatedKeyCount, desc.getKeyTblDesc(), numHTs);
        break;
      }
      break;

    case MULTI_KEY:
      switch (hashTableKind) {
      case HASH_MAP:
        htWrapper = new VectorMapJoinFastMultiKeyHashMapContainer(isFullOuter, newThreshold,
            loadFactor, writeBufferSize, estimatedKeyCount, numHTs);
        break;
      case HASH_MULTISET:
        htWrapper = new VectorMapJoinFastMultiKeyHashMultiSetContainer(isFullOuter, newThreshold,
            loadFactor, writeBufferSize, estimatedKeyCount, numHTs);
        break;
      case HASH_SET:
        htWrapper = new VectorMapJoinFastMultiKeyHashSetContainer(isFullOuter, newThreshold,
            loadFactor, writeBufferSize, estimatedKeyCount, numHTs);
        break;
      }
      break;
    }
    return htWrapper;
  }
HashTableLoader for Tez constructs the hashtable from records read from
a broadcast edge.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/VectorMapJoinFastTableContainer.java