diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/VectorMapJoinFastTableContainer.java ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/VectorMapJoinFastTableContainer.java index bcfc807..08d474d 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/VectorMapJoinFastTableContainer.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/VectorMapJoinFastTableContainer.java @@ -32,13 +32,12 @@ import org.apache.hadoop.hive.ql.metadata.HiveException; import org.apache.hadoop.hive.ql.plan.MapJoinDesc; import org.apache.hadoop.hive.ql.plan.VectorMapJoinDesc; -import org.apache.hadoop.hive.ql.plan.VectorMapJoinDesc.HashTableImplementationType; import org.apache.hadoop.hive.ql.plan.VectorMapJoinDesc.HashTableKeyType; import org.apache.hadoop.hive.ql.plan.VectorMapJoinDesc.HashTableKind; import org.apache.hadoop.hive.serde2.SerDeException; import org.apache.hadoop.io.BytesWritable; import org.apache.hadoop.io.Writable; -import org.apache.tez.runtime.library.api.KeyValueReader; +import com.google.common.base.Preconditions; /** * HashTableLoader for Tez constructs the hashtable from records read from @@ -95,7 +94,6 @@ private VectorMapJoinFastHashTable createHashTable(int newThreshold) { boolean isOuterJoin = !desc.isNoOuterJoin(); VectorMapJoinDesc vectorDesc = desc.getVectorDesc(); - HashTableImplementationType hashTableImplementationType = vectorDesc.hashTableImplementationType(); HashTableKind hashTableKind = vectorDesc.hashTableKind(); HashTableKeyType hashTableKeyType = vectorDesc.hashTableKeyType(); boolean minMaxEnabled = vectorDesc.minMaxEnabled(); @@ -126,6 +124,8 @@ private VectorMapJoinFastHashTable createHashTable(int newThreshold) { minMaxEnabled, isOuterJoin, hashTableKeyType, newThreshold, loadFactor, writeBufferSize); break; + default: + throw new RuntimeException("Unexpected hash table kind " + hashTableKind.name()); } break; @@ -146,6 +146,8 @@ private VectorMapJoinFastHashTable createHashTable(int newThreshold) { isOuterJoin, newThreshold, loadFactor, writeBufferSize); break; + default: + throw new RuntimeException("Unexpected hash table kind " + hashTableKind.name()); } break; @@ -166,10 +168,14 @@ private VectorMapJoinFastHashTable createHashTable(int newThreshold) { isOuterJoin, newThreshold, loadFactor, writeBufferSize); break; + default: + throw new RuntimeException("Unexpected hash table kind " + hashTableKind.name()); } break; + default: + throw new RuntimeException("Unexpected hash table key type " + hashTableKeyType.name()); } - + Preconditions.checkState(hashTable != null); return hashTable; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/optimized/VectorMapJoinOptimizedCreateHashTable.java ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/optimized/VectorMapJoinOptimizedCreateHashTable.java index f34b1cd..53a5ea0 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/optimized/VectorMapJoinOptimizedCreateHashTable.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/optimized/VectorMapJoinOptimizedCreateHashTable.java @@ -27,6 +27,8 @@ import org.apache.hadoop.hive.ql.plan.VectorMapJoinDesc.HashTableKeyType; import org.apache.hadoop.hive.ql.plan.VectorMapJoinDesc.HashTableKind; +import com.google.common.base.Preconditions; + /** */ public class VectorMapJoinOptimizedCreateHashTable { @@ -69,6 +71,8 @@ public static VectorMapJoinOptimizedHashTable createHashTable(MapJoinDesc desc, minMaxEnabled, isOuterJoin, hashTableKeyType, mapJoinTableContainer, hashMapRowGetter); break; + default: + throw new RuntimeException("Unexpected hash table kind " + hashTableKind.name()); } break; @@ -89,6 +93,8 @@ public static VectorMapJoinOptimizedHashTable createHashTable(MapJoinDesc desc, isOuterJoin, mapJoinTableContainer, hashMapRowGetter); break; + default: + throw new RuntimeException("Unexpected hash table kind " + hashTableKind.name()); } break; @@ -109,9 +115,14 @@ public static VectorMapJoinOptimizedHashTable createHashTable(MapJoinDesc desc, isOuterJoin, mapJoinTableContainer, hashMapRowGetter); break; + default: + throw new RuntimeException("Unexpected hash table kind " + hashTableKind.name()); } break; + default: + throw new RuntimeException("Unexpected hash table key type " + hashTableKeyType.name()); } + Preconditions.checkState(hashTable != null); return hashTable; }