This is an automated email from the ASF dual-hosted git repository.
sankarh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push:
new 1a6212e HIVE-25446: Wrong exception thrown if capacity<=0 (Ashish
Sharma, reviewed by Nikhil Gupta, Adesh Rao)
1a6212e is described below
commit 1a6212e6aa76f28b464f1e835f31527d679a8c63
Author: Ashish Kumar Sharma <[email protected]>
AuthorDate: Wed Mar 23 09:55:59 2022 +0530
HIVE-25446: Wrong exception thrown if capacity<=0 (Ashish Sharma, reviewed
by Nikhil Gupta, Adesh Rao)
Signed-off-by: Sankar Hariappan <[email protected]>
Closes (#3092)
---
.../ql/exec/vector/mapjoin/fast/VectorMapJoinFastHashTable.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git
a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/VectorMapJoinFastHashTable.java
b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/VectorMapJoinFastHashTable.java
index 84095c8..37ea1e7 100644
---
a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/VectorMapJoinFastHashTable.java
+++
b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/VectorMapJoinFastHashTable.java
@@ -63,12 +63,12 @@ public abstract class VectorMapJoinFastHashTable implements
VectorMapJoinHashTab
}
private static void validateCapacity(long capacity) {
- if (Long.bitCount(capacity) != 1) {
- throw new AssertionError("Capacity must be a power of two " + capacity);
- }
if (capacity <= 0) {
throw new AssertionError("Invalid capacity " + capacity);
}
+ if (Long.bitCount(capacity) != 1) {
+ throw new AssertionError("Capacity must be a power of two " + capacity);
+ }
}
private static int nextHighestPowerOfTwo(int v) {