diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorHashKeyWrapper.java ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorHashKeyWrapper.java index 626cea5..aff3551 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorHashKeyWrapper.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorHashKeyWrapper.java @@ -143,7 +143,7 @@ private boolean bytesEquals(VectorHashKeyWrapper keyThat) { for (int i = 0; i < byteValues.length; ++i) { // the byte comparison is potentially expensive so is better to branch on null if (!isNull[longValues.length + doubleValues.length + i]) { - if (0 != StringExpr.compare( + if (!StringExpr.equal( byteValues[i], byteStarts[i], byteLengths[i], diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/CuckooSetBytes.java ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/CuckooSetBytes.java index a21162b..6383e8a 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/CuckooSetBytes.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/CuckooSetBytes.java @@ -82,7 +82,7 @@ public boolean lookup(byte[] b, int start, int len) { } private static boolean entryEqual(byte[][] t, int hash, byte[] b, int start, int len) { - return t[hash] != null && StringExpr.compare(t[hash], 0, t[hash].length, b, start, len) == 0; + return t[hash] != null && StringExpr.equal(t[hash], 0, t[hash].length, b, start, len); } public void insert(byte[] x) { diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerBigOnlyStringOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerBigOnlyStringOperator.java index 87a11c0..9f2d4c3 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerBigOnlyStringOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerBigOnlyStringOperator.java @@ -234,8 +234,8 @@ public void process(Object row, int tag) throws HiveException { */ if (!haveSaveKey || - StringExpr.compare(vector[saveKeyBatchIndex], start[saveKeyBatchIndex], length[saveKeyBatchIndex], - vector[batchIndex], start[batchIndex], length[batchIndex]) != 0) { + StringExpr.equal(vector[saveKeyBatchIndex], start[saveKeyBatchIndex], length[saveKeyBatchIndex], + vector[batchIndex], start[batchIndex], length[batchIndex]) == false) { // New key. diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerStringOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerStringOperator.java index 9f10ff1..5a5d54f 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerStringOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerStringOperator.java @@ -229,8 +229,8 @@ public void process(Object row, int tag) throws HiveException { */ if (!haveSaveKey || - StringExpr.compare(vector[saveKeyBatchIndex], start[saveKeyBatchIndex], length[saveKeyBatchIndex], - vector[batchIndex], start[batchIndex], length[batchIndex]) != 0) { + StringExpr.equal(vector[saveKeyBatchIndex], start[saveKeyBatchIndex], length[saveKeyBatchIndex], + vector[batchIndex], start[batchIndex], length[batchIndex]) == false) { // New key. diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinLeftSemiStringOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinLeftSemiStringOperator.java index 9ff1141..e9ce739 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinLeftSemiStringOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinLeftSemiStringOperator.java @@ -230,8 +230,8 @@ public void process(Object row, int tag) throws HiveException { */ if (!haveSaveKey || - StringExpr.compare(vector[saveKeyBatchIndex], start[saveKeyBatchIndex], length[saveKeyBatchIndex], - vector[batchIndex], start[batchIndex], length[batchIndex]) != 0) { + StringExpr.equal(vector[saveKeyBatchIndex], start[saveKeyBatchIndex], length[saveKeyBatchIndex], + vector[batchIndex], start[batchIndex], length[batchIndex]) == false) { // New key. diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinOuterStringOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinOuterStringOperator.java index 49efe1a..dfdd6d7 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinOuterStringOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinOuterStringOperator.java @@ -290,8 +290,8 @@ public void process(Object row, int tag) throws HiveException { */ if (!haveSaveKey || - StringExpr.compare(vector[saveKeyBatchIndex], start[saveKeyBatchIndex], length[saveKeyBatchIndex], - vector[batchIndex], start[batchIndex], length[batchIndex]) != 0) { + StringExpr.equal(vector[saveKeyBatchIndex], start[saveKeyBatchIndex], length[saveKeyBatchIndex], + vector[batchIndex], start[batchIndex], length[batchIndex]) == false) { // New key. if (haveSaveKey) {