You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by go...@apache.org on 2016/08/26 04:20:16 UTC

hive git commit: HIVE-14437: Vectorization: Optimize key misses in VectorMapJoinFastBytesHashTable (Gopal V, reviewed by Matt McCline)

Repository: hive
Updated Branches:
  refs/heads/master bde285d33 -> e5dd6fdc2


HIVE-14437: Vectorization: Optimize key misses in VectorMapJoinFastBytesHashTable (Gopal V, reviewed by Matt McCline)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/e5dd6fdc
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/e5dd6fdc
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/e5dd6fdc

Branch: refs/heads/master
Commit: e5dd6fdc21fa46a907dd9ca2af484cb7c18f258e
Parents: bde285d
Author: Gopal V <go...@apache.org>
Authored: Thu Aug 25 21:18:41 2016 -0700
Committer: Gopal V <go...@apache.org>
Committed: Thu Aug 25 21:18:41 2016 -0700

----------------------------------------------------------------------
 .../vector/mapjoin/fast/VectorMapJoinFastBytesHashTable.java    | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/e5dd6fdc/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/VectorMapJoinFastBytesHashTable.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/VectorMapJoinFastBytesHashTable.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/VectorMapJoinFastBytesHashTable.java
index 7987723..dc0476b 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/VectorMapJoinFastBytesHashTable.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/VectorMapJoinFastBytesHashTable.java
@@ -175,7 +175,10 @@ public abstract class VectorMapJoinFastBytesHashTable
     while (true) {
       int tripleIndex = slot * 3;
       // LOG.debug("VectorMapJoinFastBytesHashMap findReadSlot slot keyRefWord " + Long.toHexString(slotTriples[tripleIndex]) + " hashCode " + Long.toHexString(hashCode) + " entry hashCode " + Long.toHexString(slotTriples[tripleIndex + 1]) + " valueRefWord " + Long.toHexString(slotTriples[tripleIndex + 2]));
-      if (slotTriples[tripleIndex] != 0 && hashCode == slotTriples[tripleIndex + 1]) {
+      if (slotTriples[tripleIndex] == 0) {
+        // Given that we do not delete, an empty slot means no match.
+        return -1;
+      } else if (hashCode == slotTriples[tripleIndex + 1]) {
         // Finally, verify the key bytes match.
 
         if (keyStore.equalKey(slotTriples[tripleIndex], keyBytes, keyStart, keyLength, readPos)) {