You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by mm...@apache.org on 2015/12/10 02:38:32 UTC
hive git commit: HIVE-12399: Filter out NULLs in the Native Vector
MapJoin operators. (Matt McCline via Gopal V)
Repository: hive
Updated Branches:
refs/heads/branch-1 744d85b21 -> 063a82b7d
HIVE-12399: Filter out NULLs in the Native Vector MapJoin operators. (Matt McCline via Gopal V)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/063a82b7
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/063a82b7
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/063a82b7
Branch: refs/heads/branch-1
Commit: 063a82b7dae00c89b7a7be199df6b75e5b2ecf06
Parents: 744d85b
Author: Matt McCline <mm...@hortonworks.com>
Authored: Wed Dec 9 17:38:26 2015 -0800
Committer: Matt McCline <mm...@hortonworks.com>
Committed: Wed Dec 9 17:38:26 2015 -0800
----------------------------------------------------------------------
.../hive/ql/exec/vector/VectorSerializeRow.java | 22 ++++--
.../VectorMapJoinInnerBigOnlyLongOperator.java | 63 ++++++++++------
...ctorMapJoinInnerBigOnlyMultiKeyOperator.java | 73 +++++++++++--------
...VectorMapJoinInnerBigOnlyStringOperator.java | 57 +++++++++------
.../mapjoin/VectorMapJoinInnerLongOperator.java | 63 ++++++++++------
.../VectorMapJoinInnerMultiKeyOperator.java | 73 +++++++++++--------
.../VectorMapJoinInnerStringOperator.java | 58 ++++++++-------
.../VectorMapJoinLeftSemiLongOperator.java | 63 ++++++++++------
.../VectorMapJoinLeftSemiMultiKeyOperator.java | 75 +++++++++++---------
.../VectorMapJoinLeftSemiStringOperator.java | 57 +++++++++------
.../VectorMapJoinOuterMultiKeyOperator.java | 5 +-
.../fast/VectorMapJoinFastLongHashTable.java | 7 +-
.../fast/VectorMapJoinFastStringCommon.java | 11 ++-
13 files changed, 375 insertions(+), 252 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/063a82b7/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorSerializeRow.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorSerializeRow.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorSerializeRow.java
index e2934e3..342bf67 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorSerializeRow.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorSerializeRow.java
@@ -627,17 +627,31 @@ public class VectorSerializeRow {
serializeWrite.setAppend(output);
}
+ private boolean hasAnyNulls;
+ private boolean isAllNulls;
+
/*
* Note that when serializing a row, the logical mapping using selected in use has already
* been performed. batchIndex is the actual index of the row.
*/
- public boolean serializeWrite(VectorizedRowBatch batch, int batchIndex) throws IOException {
- boolean anyNulls = false;
+ public void serializeWrite(VectorizedRowBatch batch, int batchIndex) throws IOException {
+
+ hasAnyNulls = false;
+ isAllNulls = true;
for (Writer writer : writers) {
if (!writer.apply(batch, batchIndex)) {
- anyNulls = true;
+ hasAnyNulls = true;
+ } else {
+ isAllNulls = false;
}
}
- return anyNulls;
+ }
+
+ public boolean getHasAnyNulls() {
+ return hasAnyNulls;
+ }
+
+ public boolean getIsAllNulls() {
+ return isAllNulls;
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/hive/blob/063a82b7/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerBigOnlyLongOperator.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerBigOnlyLongOperator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerBigOnlyLongOperator.java
index bb7efda..c42cfd9 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerBigOnlyLongOperator.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerBigOnlyLongOperator.java
@@ -179,13 +179,17 @@ public class VectorMapJoinInnerBigOnlyLongOperator extends VectorMapJoinInnerBig
* Single-Column Long specific repeated lookup.
*/
- long key = vector[0];
JoinUtil.JoinResult joinResult;
- if (useMinMax && (key < min || key > max)) {
- // Out of range for whole batch.
+ if (!joinColVector.noNulls && joinColVector.isNull[0]) {
joinResult = JoinUtil.JoinResult.NOMATCH;
} else {
- joinResult = hashMultiSet.contains(key, hashMultiSetResults[0]);
+ long key = vector[0];
+ if (useMinMax && (key < min || key > max)) {
+ // Out of range for whole batch.
+ joinResult = JoinUtil.JoinResult.NOMATCH;
+ } else {
+ joinResult = hashMultiSet.contains(key, hashMultiSetResults[0]);
+ }
}
/*
@@ -235,13 +239,21 @@ public class VectorMapJoinInnerBigOnlyLongOperator extends VectorMapJoinInnerBig
* Single-Column Long get key.
*/
- long currentKey = vector[batchIndex];
+ long currentKey;
+ boolean isNull;
+ if (!joinColVector.noNulls && joinColVector.isNull[batchIndex]) {
+ currentKey = 0;
+ isNull = true;
+ } else {
+ currentKey = vector[batchIndex];
+ isNull = false;
+ }
/*
* Equal key series checking.
*/
- if (!haveSaveKey || currentKey != saveKey) {
+ if (isNull || !haveSaveKey || currentKey != saveKey) {
// New key.
@@ -261,25 +273,30 @@ public class VectorMapJoinInnerBigOnlyLongOperator extends VectorMapJoinInnerBig
}
}
- // Regardless of our matching result, we keep that information to make multiple use
- // of it for a possible series of equal keys.
- haveSaveKey = true;
-
- /*
- * Single-Column Long specific save key.
- */
-
- saveKey = currentKey;
-
- /*
- * Single-Column Long specific lookup key.
- */
-
- if (useMinMax && (currentKey < min || currentKey > max)) {
- // Key out of range for whole hash table.
+ if (isNull) {
saveJoinResult = JoinUtil.JoinResult.NOMATCH;
+ haveSaveKey = false;
} else {
- saveJoinResult = hashMultiSet.contains(currentKey, hashMultiSetResults[hashMultiSetResultCount]);
+ // Regardless of our matching result, we keep that information to make multiple use
+ // of it for a possible series of equal keys.
+ haveSaveKey = true;
+
+ /*
+ * Single-Column Long specific save key.
+ */
+
+ saveKey = currentKey;
+
+ /*
+ * Single-Column Long specific lookup key.
+ */
+
+ if (useMinMax && (currentKey < min || currentKey > max)) {
+ // Key out of range for whole hash table.
+ saveJoinResult = JoinUtil.JoinResult.NOMATCH;
+ } else {
+ saveJoinResult = hashMultiSet.contains(currentKey, hashMultiSetResults[hashMultiSetResultCount]);
+ }
}
/*
http://git-wip-us.apache.org/repos/asf/hive/blob/063a82b7/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerBigOnlyMultiKeyOperator.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerBigOnlyMultiKeyOperator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerBigOnlyMultiKeyOperator.java
index c36f668..047af78 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerBigOnlyMultiKeyOperator.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerBigOnlyMultiKeyOperator.java
@@ -35,7 +35,7 @@ import org.apache.hadoop.hive.ql.plan.OperatorDesc;
import org.apache.hadoop.hive.ql.exec.vector.mapjoin.hashtable.VectorMapJoinBytesHashMultiSet;
// Multi-Key specific imports.
-import org.apache.hadoop.hive.ql.exec.vector.VectorSerializeRowNoNulls;
+import org.apache.hadoop.hive.ql.exec.vector.VectorSerializeRow;
import org.apache.hadoop.hive.serde2.ByteStream.Output;
import org.apache.hadoop.hive.serde2.binarysortable.fast.BinarySortableSerializeWrite;
@@ -65,7 +65,7 @@ public class VectorMapJoinInnerBigOnlyMultiKeyOperator extends VectorMapJoinInne
// Object that can take a set of columns in row in a vectorized row batch and serialized it.
// Known to not have any nulls.
- private transient VectorSerializeRowNoNulls keyVectorSerializeWriteNoNulls;
+ private transient VectorSerializeRow keyVectorSerializeWrite;
// The BinarySortable serialization of the current key.
private transient Output currentKeyOutput;
@@ -105,9 +105,9 @@ public class VectorMapJoinInnerBigOnlyMultiKeyOperator extends VectorMapJoinInne
* Initialize Multi-Key members for this specialized class.
*/
- keyVectorSerializeWriteNoNulls = new VectorSerializeRowNoNulls(
+ keyVectorSerializeWrite = new VectorSerializeRow(
new BinarySortableSerializeWrite(bigTableKeyColumnMap.length));
- keyVectorSerializeWriteNoNulls.init(bigTableKeyTypeNames, bigTableKeyColumnMap);
+ keyVectorSerializeWrite.init(bigTableKeyTypeNames, bigTableKeyColumnMap);
currentKeyOutput = new Output();
saveKeyOutput = new Output();
@@ -194,11 +194,16 @@ public class VectorMapJoinInnerBigOnlyMultiKeyOperator extends VectorMapJoinInne
* Multi-Key specific repeated lookup.
*/
- keyVectorSerializeWriteNoNulls.setOutput(currentKeyOutput);
- keyVectorSerializeWriteNoNulls.serializeWriteNoNulls(batch, 0);
- byte[] keyBytes = currentKeyOutput.getData();
- int keyLength = currentKeyOutput.getLength();
- JoinUtil.JoinResult joinResult = hashMultiSet.contains(keyBytes, 0, keyLength, hashMultiSetResults[0]);
+ keyVectorSerializeWrite.setOutput(currentKeyOutput);
+ keyVectorSerializeWrite.serializeWrite(batch, 0);
+ JoinUtil.JoinResult joinResult;
+ if (keyVectorSerializeWrite.getHasAnyNulls()) {
+ joinResult = JoinUtil.JoinResult.NOMATCH;
+ } else {
+ byte[] keyBytes = currentKeyOutput.getData();
+ int keyLength = currentKeyOutput.getLength();
+ joinResult = hashMultiSet.contains(keyBytes, 0, keyLength, hashMultiSetResults[0]);
+ }
/*
* Common repeated join result processing.
@@ -248,14 +253,15 @@ public class VectorMapJoinInnerBigOnlyMultiKeyOperator extends VectorMapJoinInne
*/
// Generate binary sortable key for current row in vectorized row batch.
- keyVectorSerializeWriteNoNulls.setOutput(currentKeyOutput);
- keyVectorSerializeWriteNoNulls.serializeWriteNoNulls(batch, batchIndex);
+ keyVectorSerializeWrite.setOutput(currentKeyOutput);
+ keyVectorSerializeWrite.serializeWrite(batch, batchIndex);
+ boolean isAnyNulls = keyVectorSerializeWrite.getHasAnyNulls();
/*
* Equal key series checking.
*/
- if (!haveSaveKey || !saveKeyOutput.arraysEquals(currentKeyOutput)) {
+ if (isAnyNulls || !haveSaveKey || !saveKeyOutput.arraysEquals(currentKeyOutput)) {
// New key.
@@ -275,25 +281,30 @@ public class VectorMapJoinInnerBigOnlyMultiKeyOperator extends VectorMapJoinInne
}
}
- // Regardless of our matching result, we keep that information to make multiple use
- // of it for a possible series of equal keys.
- haveSaveKey = true;
-
- /*
- * Multi-Key specific save key.
- */
-
- temp = saveKeyOutput;
- saveKeyOutput = currentKeyOutput;
- currentKeyOutput = temp;
-
- /*
- * Single-Column Long specific lookup key.
- */
-
- byte[] keyBytes = saveKeyOutput.getData();
- int keyLength = saveKeyOutput.getLength();
- saveJoinResult = hashMultiSet.contains(keyBytes, 0, keyLength, hashMultiSetResults[hashMultiSetResultCount]);
+ if (isAnyNulls) {
+ saveJoinResult = JoinUtil.JoinResult.NOMATCH;
+ haveSaveKey = false;
+ } else {
+ // Regardless of our matching result, we keep that information to make multiple use
+ // of it for a possible series of equal keys.
+ haveSaveKey = true;
+
+ /*
+ * Multi-Key specific save key.
+ */
+
+ temp = saveKeyOutput;
+ saveKeyOutput = currentKeyOutput;
+ currentKeyOutput = temp;
+
+ /*
+ * Single-Column Long specific lookup key.
+ */
+
+ byte[] keyBytes = saveKeyOutput.getData();
+ int keyLength = saveKeyOutput.getLength();
+ saveJoinResult = hashMultiSet.contains(keyBytes, 0, keyLength, hashMultiSetResults[hashMultiSetResultCount]);
+ }
/*
* Common inner big-only join result processing.
http://git-wip-us.apache.org/repos/asf/hive/blob/063a82b7/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerBigOnlyStringOperator.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerBigOnlyStringOperator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerBigOnlyStringOperator.java
index 9f2d4c3..c8852b0 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerBigOnlyStringOperator.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerBigOnlyStringOperator.java
@@ -175,10 +175,15 @@ public class VectorMapJoinInnerBigOnlyStringOperator extends VectorMapJoinInnerB
* Single-Column String specific repeated lookup.
*/
- byte[] keyBytes = vector[0];
- int keyStart = start[0];
- int keyLength = length[0];
- JoinUtil.JoinResult joinResult = hashMultiSet.contains(keyBytes, keyStart, keyLength, hashMultiSetResults[0]);
+ JoinUtil.JoinResult joinResult;
+ if (!joinColVector.noNulls && joinColVector.isNull[0]) {
+ joinResult = JoinUtil.JoinResult.NOMATCH;
+ } else {
+ byte[] keyBytes = vector[0];
+ int keyStart = start[0];
+ int keyLength = length[0];
+ joinResult = hashMultiSet.contains(keyBytes, keyStart, keyLength, hashMultiSetResults[0]);
+ }
/*
* Common repeated join result processing.
@@ -228,12 +233,13 @@ public class VectorMapJoinInnerBigOnlyStringOperator extends VectorMapJoinInnerB
*/
// Implicit -- use batchIndex.
+ boolean isNull = !joinColVector.noNulls && joinColVector.isNull[batchIndex];
/*
* Equal key series checking.
*/
- if (!haveSaveKey ||
+ if (isNull || !haveSaveKey ||
StringExpr.equal(vector[saveKeyBatchIndex], start[saveKeyBatchIndex], length[saveKeyBatchIndex],
vector[batchIndex], start[batchIndex], length[batchIndex]) == false) {
@@ -255,24 +261,29 @@ public class VectorMapJoinInnerBigOnlyStringOperator extends VectorMapJoinInnerB
}
}
- // Regardless of our matching result, we keep that information to make multiple use
- // of it for a possible series of equal keys.
- haveSaveKey = true;
-
- /*
- * Single-Column String specific save key.
- */
-
- saveKeyBatchIndex = batchIndex;
-
- /*
- * Single-Column String specific lookup key.
- */
-
- byte[] keyBytes = vector[batchIndex];
- int keyStart = start[batchIndex];
- int keyLength = length[batchIndex];
- saveJoinResult = hashMultiSet.contains(keyBytes, keyStart, keyLength, hashMultiSetResults[hashMultiSetResultCount]);
+ if (isNull) {
+ saveJoinResult = JoinUtil.JoinResult.NOMATCH;
+ haveSaveKey = false;
+ } else {
+ // Regardless of our matching result, we keep that information to make multiple use
+ // of it for a possible series of equal keys.
+ haveSaveKey = true;
+
+ /*
+ * Single-Column String specific save key.
+ */
+
+ saveKeyBatchIndex = batchIndex;
+
+ /*
+ * Single-Column String specific lookup key.
+ */
+
+ byte[] keyBytes = vector[batchIndex];
+ int keyStart = start[batchIndex];
+ int keyLength = length[batchIndex];
+ saveJoinResult = hashMultiSet.contains(keyBytes, keyStart, keyLength, hashMultiSetResults[hashMultiSetResultCount]);
+ }
/*
* Common inner big-only join result processing.
http://git-wip-us.apache.org/repos/asf/hive/blob/063a82b7/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerLongOperator.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerLongOperator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerLongOperator.java
index 9005d00..2f08cd2 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerLongOperator.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerLongOperator.java
@@ -177,13 +177,17 @@ public class VectorMapJoinInnerLongOperator extends VectorMapJoinInnerGenerateRe
* Single-Column Long specific repeated lookup.
*/
- long key = vector[0];
JoinUtil.JoinResult joinResult;
- if (useMinMax && (key < min || key > max)) {
- // Out of range for whole batch.
+ if (!joinColVector.noNulls && joinColVector.isNull[0]) {
joinResult = JoinUtil.JoinResult.NOMATCH;
} else {
- joinResult = hashMap.lookup(key, hashMapResults[0]);
+ long key = vector[0];
+ if (useMinMax && (key < min || key > max)) {
+ // Out of range for whole batch.
+ joinResult = JoinUtil.JoinResult.NOMATCH;
+ } else {
+ joinResult = hashMap.lookup(key, hashMapResults[0]);
+ }
}
/*
@@ -233,13 +237,21 @@ public class VectorMapJoinInnerLongOperator extends VectorMapJoinInnerGenerateRe
* Single-Column Long get key.
*/
- long currentKey = vector[batchIndex];
+ long currentKey;
+ boolean isNull;
+ if (!joinColVector.noNulls && joinColVector.isNull[batchIndex]) {
+ currentKey = 0;
+ isNull = true;
+ } else {
+ currentKey = vector[batchIndex];
+ isNull = false;
+ }
/*
* Equal key series checking.
*/
- if (!haveSaveKey || currentKey != saveKey) {
+ if (isNull || !haveSaveKey || currentKey != saveKey) {
// New key.
@@ -258,25 +270,30 @@ public class VectorMapJoinInnerLongOperator extends VectorMapJoinInnerGenerateRe
}
}
- // Regardless of our matching result, we keep that information to make multiple use
- // of it for a possible series of equal keys.
- haveSaveKey = true;
-
- /*
- * Single-Column Long specific save key.
- */
-
- saveKey = currentKey;
-
- /*
- * Single-Column Long specific lookup key.
- */
-
- if (useMinMax && (currentKey < min || currentKey > max)) {
- // Key out of range for whole hash table.
+ if (isNull) {
saveJoinResult = JoinUtil.JoinResult.NOMATCH;
+ haveSaveKey = false;
} else {
- saveJoinResult = hashMap.lookup(currentKey, hashMapResults[hashMapResultCount]);
+ // Regardless of our matching result, we keep that information to make multiple use
+ // of it for a possible series of equal keys.
+ haveSaveKey = true;
+
+ /*
+ * Single-Column Long specific save key.
+ */
+
+ saveKey = currentKey;
+
+ /*
+ * Single-Column Long specific lookup key.
+ */
+
+ if (useMinMax && (currentKey < min || currentKey > max)) {
+ // Key out of range for whole hash table.
+ saveJoinResult = JoinUtil.JoinResult.NOMATCH;
+ } else {
+ saveJoinResult = hashMap.lookup(currentKey, hashMapResults[hashMapResultCount]);
+ }
}
/*
http://git-wip-us.apache.org/repos/asf/hive/blob/063a82b7/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerMultiKeyOperator.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerMultiKeyOperator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerMultiKeyOperator.java
index b13ded6..2ce7a6f 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerMultiKeyOperator.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerMultiKeyOperator.java
@@ -34,7 +34,7 @@ import org.apache.hadoop.hive.ql.plan.OperatorDesc;
import org.apache.hadoop.hive.ql.exec.vector.mapjoin.hashtable.VectorMapJoinBytesHashMap;
// Multi-Key specific imports.
-import org.apache.hadoop.hive.ql.exec.vector.VectorSerializeRowNoNulls;
+import org.apache.hadoop.hive.ql.exec.vector.VectorSerializeRow;
import org.apache.hadoop.hive.serde2.ByteStream.Output;
import org.apache.hadoop.hive.serde2.binarysortable.fast.BinarySortableSerializeWrite;
@@ -63,7 +63,7 @@ public class VectorMapJoinInnerMultiKeyOperator extends VectorMapJoinInnerGenera
// Object that can take a set of columns in row in a vectorized row batch and serialized it.
// Known to not have any nulls.
- private transient VectorSerializeRowNoNulls keyVectorSerializeWriteNoNulls;
+ private transient VectorSerializeRow keyVectorSerializeWrite;
// The BinarySortable serialization of the current key.
private transient Output currentKeyOutput;
@@ -103,9 +103,9 @@ public class VectorMapJoinInnerMultiKeyOperator extends VectorMapJoinInnerGenera
* Initialize Multi-Key members for this specialized class.
*/
- keyVectorSerializeWriteNoNulls = new VectorSerializeRowNoNulls(
+ keyVectorSerializeWrite = new VectorSerializeRow(
new BinarySortableSerializeWrite(bigTableKeyColumnMap.length));
- keyVectorSerializeWriteNoNulls.init(bigTableKeyTypeNames, bigTableKeyColumnMap);
+ keyVectorSerializeWrite.init(bigTableKeyTypeNames, bigTableKeyColumnMap);
currentKeyOutput = new Output();
saveKeyOutput = new Output();
@@ -191,11 +191,16 @@ public class VectorMapJoinInnerMultiKeyOperator extends VectorMapJoinInnerGenera
* Multi-Key specific repeated lookup.
*/
- keyVectorSerializeWriteNoNulls.setOutput(currentKeyOutput);
- keyVectorSerializeWriteNoNulls.serializeWriteNoNulls(batch, 0);
- byte[] keyBytes = currentKeyOutput.getData();
- int keyLength = currentKeyOutput.getLength();
- JoinUtil.JoinResult joinResult = hashMap.lookup(keyBytes, 0, keyLength, hashMapResults[0]);
+ keyVectorSerializeWrite.setOutput(currentKeyOutput);
+ keyVectorSerializeWrite.serializeWrite(batch, 0);
+ JoinUtil.JoinResult joinResult;
+ if (keyVectorSerializeWrite.getHasAnyNulls()) {
+ joinResult = JoinUtil.JoinResult.NOMATCH;
+ } else {
+ byte[] keyBytes = currentKeyOutput.getData();
+ int keyLength = currentKeyOutput.getLength();
+ joinResult = hashMap.lookup(keyBytes, 0, keyLength, hashMapResults[0]);
+ }
/*
* Common repeated join result processing.
@@ -245,14 +250,15 @@ public class VectorMapJoinInnerMultiKeyOperator extends VectorMapJoinInnerGenera
*/
// Generate binary sortable key for current row in vectorized row batch.
- keyVectorSerializeWriteNoNulls.setOutput(currentKeyOutput);
- keyVectorSerializeWriteNoNulls.serializeWriteNoNulls(batch, batchIndex);
+ keyVectorSerializeWrite.setOutput(currentKeyOutput);
+ keyVectorSerializeWrite.serializeWrite(batch, batchIndex);
+ boolean isAnyNull = keyVectorSerializeWrite.getHasAnyNulls();
/*
* Equal key series checking.
*/
- if (!haveSaveKey || !saveKeyOutput.arraysEquals(currentKeyOutput)) {
+ if (isAnyNull || !haveSaveKey || !saveKeyOutput.arraysEquals(currentKeyOutput)) {
// New key.
@@ -271,25 +277,30 @@ public class VectorMapJoinInnerMultiKeyOperator extends VectorMapJoinInnerGenera
}
}
- // Regardless of our matching result, we keep that information to make multiple use
- // of it for a possible series of equal keys.
- haveSaveKey = true;
-
- /*
- * Multi-Key specific save key.
- */
-
- temp = saveKeyOutput;
- saveKeyOutput = currentKeyOutput;
- currentKeyOutput = temp;
-
- /*
- * Multi-Key specific lookup key.
- */
-
- byte[] keyBytes = saveKeyOutput.getData();
- int keyLength = saveKeyOutput.getLength();
- saveJoinResult = hashMap.lookup(keyBytes, 0, keyLength, hashMapResults[hashMapResultCount]);
+ if (isAnyNull) {
+ saveJoinResult = JoinUtil.JoinResult.NOMATCH;
+ haveSaveKey = false;
+ } else {
+ // Regardless of our matching result, we keep that information to make multiple use
+ // of it for a possible series of equal keys.
+ haveSaveKey = true;
+
+ /*
+ * Multi-Key specific save key.
+ */
+
+ temp = saveKeyOutput;
+ saveKeyOutput = currentKeyOutput;
+ currentKeyOutput = temp;
+
+ /*
+ * Multi-Key specific lookup key.
+ */
+
+ byte[] keyBytes = saveKeyOutput.getData();
+ int keyLength = saveKeyOutput.getLength();
+ saveJoinResult = hashMap.lookup(keyBytes, 0, keyLength, hashMapResults[hashMapResultCount]);
+ }
/*
* Common inner join result processing.
http://git-wip-us.apache.org/repos/asf/hive/blob/063a82b7/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerStringOperator.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerStringOperator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerStringOperator.java
index 5a5d54f..b2963d3 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerStringOperator.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerStringOperator.java
@@ -169,11 +169,15 @@ public class VectorMapJoinInnerStringOperator extends VectorMapJoinInnerGenerate
/*
* Single-Column String specific repeated lookup.
*/
-
- byte[] keyBytes = vector[0];
- int keyStart = start[0];
- int keyLength = length[0];
- JoinUtil.JoinResult joinResult = hashMap.lookup(keyBytes, keyStart, keyLength, hashMapResults[0]);
+ JoinUtil.JoinResult joinResult;
+ if (!joinColVector.noNulls && joinColVector.isNull[0]) {
+ joinResult = JoinUtil.JoinResult.NOMATCH;
+ } else {
+ byte[] keyBytes = vector[0];
+ int keyStart = start[0];
+ int keyLength = length[0];
+ joinResult = hashMap.lookup(keyBytes, keyStart, keyLength, hashMapResults[0]);
+ }
/*
* Common repeated join result processing.
@@ -223,12 +227,13 @@ public class VectorMapJoinInnerStringOperator extends VectorMapJoinInnerGenerate
*/
// Implicit -- use batchIndex.
+ boolean isNull = !joinColVector.noNulls && joinColVector.isNull[batchIndex];
/*
* Equal key series checking.
*/
- if (!haveSaveKey ||
+ if (isNull || !haveSaveKey ||
StringExpr.equal(vector[saveKeyBatchIndex], start[saveKeyBatchIndex], length[saveKeyBatchIndex],
vector[batchIndex], start[batchIndex], length[batchIndex]) == false) {
@@ -249,24 +254,29 @@ public class VectorMapJoinInnerStringOperator extends VectorMapJoinInnerGenerate
}
}
- // Regardless of our matching result, we keep that information to make multiple use
- // of it for a possible series of equal keys.
- haveSaveKey = true;
-
- /*
- * Single-Column String specific save key.
- */
-
- saveKeyBatchIndex = batchIndex;
-
- /*
- * Single-Column String specific lookup key.
- */
-
- byte[] keyBytes = vector[batchIndex];
- int keyStart = start[batchIndex];
- int keyLength = length[batchIndex];
- saveJoinResult = hashMap.lookup(keyBytes, keyStart, keyLength, hashMapResults[hashMapResultCount]);
+ if (isNull) {
+ saveJoinResult = JoinUtil.JoinResult.NOMATCH;
+ haveSaveKey = false;
+ } else {
+ // Regardless of our matching result, we keep that information to make multiple use
+ // of it for a possible series of equal keys.
+ haveSaveKey = true;
+
+ /*
+ * Single-Column String specific save key.
+ */
+
+ saveKeyBatchIndex = batchIndex;
+
+ /*
+ * Single-Column String specific lookup key.
+ */
+
+ byte[] keyBytes = vector[batchIndex];
+ int keyStart = start[batchIndex];
+ int keyLength = length[batchIndex];
+ saveJoinResult = hashMap.lookup(keyBytes, keyStart, keyLength, hashMapResults[hashMapResultCount]);
+ }
/*
* Common inner join result processing.
http://git-wip-us.apache.org/repos/asf/hive/blob/063a82b7/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinLeftSemiLongOperator.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinLeftSemiLongOperator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinLeftSemiLongOperator.java
index 712978a..529b3db 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinLeftSemiLongOperator.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinLeftSemiLongOperator.java
@@ -179,13 +179,17 @@ public class VectorMapJoinLeftSemiLongOperator extends VectorMapJoinLeftSemiGene
* Single-Column Long specific repeated lookup.
*/
- long key = vector[0];
JoinUtil.JoinResult joinResult;
- if (useMinMax && (key < min || key > max)) {
- // Out of range for whole batch.
+ if (!joinColVector.noNulls && joinColVector.isNull[0]) {
joinResult = JoinUtil.JoinResult.NOMATCH;
} else {
- joinResult = hashSet.contains(key, hashSetResults[0]);
+ long key = vector[0];
+ if (useMinMax && (key < min || key > max)) {
+ // Out of range for whole batch.
+ joinResult = JoinUtil.JoinResult.NOMATCH;
+ } else {
+ joinResult = hashSet.contains(key, hashSetResults[0]);
+ }
}
/*
@@ -234,13 +238,21 @@ public class VectorMapJoinLeftSemiLongOperator extends VectorMapJoinLeftSemiGene
* Single-Column Long get key.
*/
- long currentKey = vector[batchIndex];
+ long currentKey;
+ boolean isNull;
+ if (!joinColVector.noNulls && joinColVector.isNull[batchIndex]) {
+ currentKey = 0;
+ isNull = true;
+ } else {
+ currentKey = vector[batchIndex];
+ isNull = false;
+ }
/*
* Equal key series checking.
*/
- if (!haveSaveKey || currentKey != saveKey) {
+ if (isNull || !haveSaveKey || currentKey != saveKey) {
// New key.
@@ -259,25 +271,30 @@ public class VectorMapJoinLeftSemiLongOperator extends VectorMapJoinLeftSemiGene
}
}
- // Regardless of our matching result, we keep that information to make multiple use
- // of it for a possible series of equal keys.
- haveSaveKey = true;
-
- /*
- * Single-Column Long specific save key.
- */
-
- saveKey = currentKey;
-
- /*
- * Single-Column Long specific lookup key.
- */
-
- if (useMinMax && (currentKey < min || currentKey > max)) {
- // Key out of range for whole hash table.
+ if (isNull) {
saveJoinResult = JoinUtil.JoinResult.NOMATCH;
+ haveSaveKey = false;
} else {
- saveJoinResult = hashSet.contains(currentKey, hashSetResults[hashSetResultCount]);
+ // Regardless of our matching result, we keep that information to make multiple use
+ // of it for a possible series of equal keys.
+ haveSaveKey = true;
+
+ /*
+ * Single-Column Long specific save key.
+ */
+
+ saveKey = currentKey;
+
+ /*
+ * Single-Column Long specific lookup key.
+ */
+
+ if (useMinMax && (currentKey < min || currentKey > max)) {
+ // Key out of range for whole hash table.
+ saveJoinResult = JoinUtil.JoinResult.NOMATCH;
+ } else {
+ saveJoinResult = hashSet.contains(currentKey, hashSetResults[hashSetResultCount]);
+ }
}
/*
http://git-wip-us.apache.org/repos/asf/hive/blob/063a82b7/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinLeftSemiMultiKeyOperator.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinLeftSemiMultiKeyOperator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinLeftSemiMultiKeyOperator.java
index b941431..8ce91aa 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinLeftSemiMultiKeyOperator.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinLeftSemiMultiKeyOperator.java
@@ -35,7 +35,7 @@ import org.apache.hadoop.hive.ql.plan.OperatorDesc;
import org.apache.hadoop.hive.ql.exec.vector.mapjoin.hashtable.VectorMapJoinBytesHashSet;
// Multi-Key specific imports.
-import org.apache.hadoop.hive.ql.exec.vector.VectorSerializeRowNoNulls;
+import org.apache.hadoop.hive.ql.exec.vector.VectorSerializeRow;
import org.apache.hadoop.hive.serde2.ByteStream.Output;
import org.apache.hadoop.hive.serde2.binarysortable.fast.BinarySortableSerializeWrite;
@@ -64,7 +64,7 @@ public class VectorMapJoinLeftSemiMultiKeyOperator extends VectorMapJoinLeftSemi
// Object that can take a set of columns in row in a vectorized row batch and serialized it.
// Known to not have any nulls.
- private transient VectorSerializeRowNoNulls keyVectorSerializeWriteNoNulls;
+ private transient VectorSerializeRow keyVectorSerializeWrite;
// The BinarySortable serialization of the current key.
private transient Output currentKeyOutput;
@@ -104,9 +104,9 @@ public class VectorMapJoinLeftSemiMultiKeyOperator extends VectorMapJoinLeftSemi
* Initialize Multi-Key members for this specialized class.
*/
- keyVectorSerializeWriteNoNulls = new VectorSerializeRowNoNulls(
+ keyVectorSerializeWrite = new VectorSerializeRow(
new BinarySortableSerializeWrite(bigTableKeyColumnMap.length));
- keyVectorSerializeWriteNoNulls.init(bigTableKeyTypeNames, bigTableKeyColumnMap);
+ keyVectorSerializeWrite.init(bigTableKeyTypeNames, bigTableKeyColumnMap);
currentKeyOutput = new Output();
saveKeyOutput = new Output();
@@ -193,12 +193,17 @@ public class VectorMapJoinLeftSemiMultiKeyOperator extends VectorMapJoinLeftSemi
* Multi-Key specific repeated lookup.
*/
- keyVectorSerializeWriteNoNulls.setOutput(currentKeyOutput);
- keyVectorSerializeWriteNoNulls.serializeWriteNoNulls(batch, 0);
- byte[] keyBytes = currentKeyOutput.getData();
- int keyLength = currentKeyOutput.getLength();
- // LOG.debug(CLASS_NAME + " processOp all " + displayBytes(keyBytes, 0, keyLength));
- JoinUtil.JoinResult joinResult = hashSet.contains(keyBytes, 0, keyLength, hashSetResults[0]);
+ keyVectorSerializeWrite.setOutput(currentKeyOutput);
+ keyVectorSerializeWrite.serializeWrite(batch, 0);
+ JoinUtil.JoinResult joinResult;
+ if (keyVectorSerializeWrite.getHasAnyNulls()) {
+ joinResult = JoinUtil.JoinResult.NOMATCH;
+ } else {
+ byte[] keyBytes = currentKeyOutput.getData();
+ int keyLength = currentKeyOutput.getLength();
+ // LOG.debug(CLASS_NAME + " processOp all " + displayBytes(keyBytes, 0, keyLength));
+ joinResult = hashSet.contains(keyBytes, 0, keyLength, hashSetResults[0]);
+ }
/*
* Common repeated join result processing.
@@ -247,8 +252,9 @@ public class VectorMapJoinLeftSemiMultiKeyOperator extends VectorMapJoinLeftSemi
*/
// Generate binary sortable key for current row in vectorized row batch.
- keyVectorSerializeWriteNoNulls.setOutput(currentKeyOutput);
- keyVectorSerializeWriteNoNulls.serializeWriteNoNulls(batch, batchIndex);
+ keyVectorSerializeWrite.setOutput(currentKeyOutput);
+ keyVectorSerializeWrite.serializeWrite(batch, batchIndex);
+ boolean isAnyNull = keyVectorSerializeWrite.getHasAnyNulls();
// LOG.debug(CLASS_NAME + " currentKey " +
// VectorizedBatchUtil.displayBytes(currentKeyOutput.getData(), 0, currentKeyOutput.getLength()));
@@ -257,7 +263,7 @@ public class VectorMapJoinLeftSemiMultiKeyOperator extends VectorMapJoinLeftSemi
* Equal key series checking.
*/
- if (!haveSaveKey || !saveKeyOutput.arraysEquals(currentKeyOutput)) {
+ if (isAnyNull || !haveSaveKey || !saveKeyOutput.arraysEquals(currentKeyOutput)) {
// New key.
@@ -276,25 +282,30 @@ public class VectorMapJoinLeftSemiMultiKeyOperator extends VectorMapJoinLeftSemi
}
}
- // Regardless of our matching result, we keep that information to make multiple use
- // of it for a possible series of equal keys.
- haveSaveKey = true;
-
- /*
- * Multi-Key specific save key and lookup.
- */
-
- temp = saveKeyOutput;
- saveKeyOutput = currentKeyOutput;
- currentKeyOutput = temp;
-
- /*
- * Multi-key specific lookup key.
- */
-
- byte[] keyBytes = saveKeyOutput.getData();
- int keyLength = saveKeyOutput.getLength();
- saveJoinResult = hashSet.contains(keyBytes, 0, keyLength, hashSetResults[hashSetResultCount]);
+ if (isAnyNull) {
+ saveJoinResult = JoinUtil.JoinResult.NOMATCH;
+ haveSaveKey = false;
+ } else {
+ // Regardless of our matching result, we keep that information to make multiple use
+ // of it for a possible series of equal keys.
+ haveSaveKey = true;
+
+ /*
+ * Multi-Key specific save key and lookup.
+ */
+
+ temp = saveKeyOutput;
+ saveKeyOutput = currentKeyOutput;
+ currentKeyOutput = temp;
+
+ /*
+ * Multi-key specific lookup key.
+ */
+
+ byte[] keyBytes = saveKeyOutput.getData();
+ int keyLength = saveKeyOutput.getLength();
+ saveJoinResult = hashSet.contains(keyBytes, 0, keyLength, hashSetResults[hashSetResultCount]);
+ }
/*
* Common left-semi join result processing.
http://git-wip-us.apache.org/repos/asf/hive/blob/063a82b7/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinLeftSemiStringOperator.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinLeftSemiStringOperator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinLeftSemiStringOperator.java
index e9ce739..48f20b7 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinLeftSemiStringOperator.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinLeftSemiStringOperator.java
@@ -172,10 +172,15 @@ public class VectorMapJoinLeftSemiStringOperator extends VectorMapJoinLeftSemiGe
* Single-Column String specific repeated lookup.
*/
- byte[] keyBytes = vector[0];
- int keyStart = start[0];
- int keyLength = length[0];
- JoinUtil.JoinResult joinResult = hashSet.contains(keyBytes, keyStart, keyLength, hashSetResults[0]);
+ JoinUtil.JoinResult joinResult;
+ if (!joinColVector.noNulls && joinColVector.isNull[0]) {
+ joinResult = JoinUtil.JoinResult.NOMATCH;
+ } else {
+ byte[] keyBytes = vector[0];
+ int keyStart = start[0];
+ int keyLength = length[0];
+ joinResult = hashSet.contains(keyBytes, keyStart, keyLength, hashSetResults[0]);
+ }
/*
* Common repeated join result processing.
@@ -224,12 +229,13 @@ public class VectorMapJoinLeftSemiStringOperator extends VectorMapJoinLeftSemiGe
*/
// Implicit -- use batchIndex.
+ boolean isNull = !joinColVector.noNulls && joinColVector.isNull[batchIndex];
/*
* Equal key series checking.
*/
- if (!haveSaveKey ||
+ if (isNull || !haveSaveKey ||
StringExpr.equal(vector[saveKeyBatchIndex], start[saveKeyBatchIndex], length[saveKeyBatchIndex],
vector[batchIndex], start[batchIndex], length[batchIndex]) == false) {
@@ -250,24 +256,29 @@ public class VectorMapJoinLeftSemiStringOperator extends VectorMapJoinLeftSemiGe
}
}
- // Regardless of our matching result, we keep that information to make multiple use
- // of it for a possible series of equal keys.
- haveSaveKey = true;
-
- /*
- * Single-Column String specific save key and lookup.
- */
-
- saveKeyBatchIndex = batchIndex;
-
- /*
- * Single-Column String specific lookup key.
- */
-
- byte[] keyBytes = vector[batchIndex];
- int keyStart = start[batchIndex];
- int keyLength = length[batchIndex];
- saveJoinResult = hashSet.contains(keyBytes, keyStart, keyLength, hashSetResults[hashSetResultCount]);
+ if (isNull) {
+ saveJoinResult = JoinUtil.JoinResult.NOMATCH;
+ haveSaveKey = false;
+ } else {
+ // Regardless of our matching result, we keep that information to make multiple use
+ // of it for a possible series of equal keys.
+ haveSaveKey = true;
+
+ /*
+ * Single-Column String specific save key and lookup.
+ */
+
+ saveKeyBatchIndex = batchIndex;
+
+ /*
+ * Single-Column String specific lookup key.
+ */
+
+ byte[] keyBytes = vector[batchIndex];
+ int keyStart = start[batchIndex];
+ int keyLength = length[batchIndex];
+ saveJoinResult = hashSet.contains(keyBytes, keyStart, keyLength, hashSetResults[hashSetResultCount]);
+ }
/*
* Common left-semi join result processing.
http://git-wip-us.apache.org/repos/asf/hive/blob/063a82b7/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinOuterMultiKeyOperator.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinOuterMultiKeyOperator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinOuterMultiKeyOperator.java
index bea032a..6b2a9fc 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinOuterMultiKeyOperator.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinOuterMultiKeyOperator.java
@@ -294,9 +294,8 @@ public class VectorMapJoinOuterMultiKeyOperator extends VectorMapJoinOuterGenera
// Generate binary sortable key for current row in vectorized row batch.
keyVectorSerializeWrite.setOutput(currentKeyOutput);
- boolean isNull = keyVectorSerializeWrite.serializeWrite(batch, batchIndex);
-
- if (isNull) {
+ keyVectorSerializeWrite.serializeWrite(batch, batchIndex);
+ if (keyVectorSerializeWrite.getHasAnyNulls()) {
// Have that the NULL does not interfere with the current equal key series, if there
// is one. We do not set saveJoinResult.
http://git-wip-us.apache.org/repos/asf/hive/blob/063a82b7/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/VectorMapJoinFastLongHashTable.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/VectorMapJoinFastLongHashTable.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/VectorMapJoinFastLongHashTable.java
index 17855eb..d90849e 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/VectorMapJoinFastLongHashTable.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/VectorMapJoinFastLongHashTable.java
@@ -78,12 +78,7 @@ public abstract class VectorMapJoinFastLongHashTable
int keyLength = currentKey.getLength();
keyBinarySortableDeserializeRead.set(keyBytes, 0, keyLength);
if (keyBinarySortableDeserializeRead.readCheckNull()) {
- if (isOuterJoin) {
- return;
- } else {
- // For inner join, we expect all NULL values to have been filtered out before now.
- throw new HiveException("Unexpected NULL in map join small table");
- }
+ return;
}
long key = VectorMapJoinFastLongHashUtil.deserializeLongKey(
http://git-wip-us.apache.org/repos/asf/hive/blob/063a82b7/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/VectorMapJoinFastStringCommon.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/VectorMapJoinFastStringCommon.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/VectorMapJoinFastStringCommon.java
index 5c7792f..adb8044 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/VectorMapJoinFastStringCommon.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/VectorMapJoinFastStringCommon.java
@@ -26,12 +26,16 @@ import org.apache.hadoop.hive.serde2.fast.DeserializeRead.ReadStringResults;
import org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo;
import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory;
import org.apache.hadoop.io.BytesWritable;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/*
* An single byte array value hash map optimized for vector map join.
*/
public class VectorMapJoinFastStringCommon {
+ public static final Logger LOG = LoggerFactory.getLogger(VectorMapJoinFastStringCommon.class);
+
private boolean isOuterJoin;
private BinarySortableDeserializeRead keyBinarySortableDeserializeRead;
@@ -45,12 +49,7 @@ public class VectorMapJoinFastStringCommon {
int keyLength = currentKey.getLength();
keyBinarySortableDeserializeRead.set(keyBytes, 0, keyLength);
if (keyBinarySortableDeserializeRead.readCheckNull()) {
- if (isOuterJoin) {
- return;
- } else {
- // For inner join, we expect all NULL values to have been filtered out before now.
- throw new HiveException("Unexpected NULL in map join small table");
- }
+ return;
}
keyBinarySortableDeserializeRead.readString(readStringResults);