diff --git ql/src/test/org/apache/hadoop/hive/ql/exec/persistence/TestBytesBytesMultiHashMap.java ql/src/test/org/apache/hadoop/hive/ql/exec/persistence/TestBytesBytesMultiHashMap.java index c417b6f..aed9214 100644 --- ql/src/test/org/apache/hadoop/hive/ql/exec/persistence/TestBytesBytesMultiHashMap.java +++ ql/src/test/org/apache/hadoop/hive/ql/exec/persistence/TestBytesBytesMultiHashMap.java @@ -43,6 +43,9 @@ public void testCapacityValidation() { assertEquals(CAPACITY, map.getCapacity()); map = new BytesBytesMultiHashMap(9, LOAD_FACTOR, WB_SIZE); assertEquals(16, map.getCapacity()); + + // Verify the scenario when maxProbeSize is a very small value, it doesn't fail + BytesBytesMultiHashMap map1 = new BytesBytesMultiHashMap(1024, (float) 0.75, 524288, 1); } @Test diff --git ql/src/test/org/apache/hadoop/hive/ql/exec/persistence/TestHashPartition.java ql/src/test/org/apache/hadoop/hive/ql/exec/persistence/TestHashPartition.java new file mode 100644 index 0000000..a6e52bd --- /dev/null +++ ql/src/test/org/apache/hadoop/hive/ql/exec/persistence/TestHashPartition.java @@ -0,0 +1,29 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.hive.ql.exec.persistence; + +import org.apache.hadoop.hive.ql.exec.persistence.HybridHashTableContainer.HashPartition; +import org.junit.Test; + +public class TestHashPartition { + + @Test + public void testHashPartition() throws Exception { + HashPartition hashPartition = new HashPartition(1024, (float) 0.75, 524288, 1, true); + } +}