Aggarwal-Raghav commented on code in PR #6239:
URL: https://github.com/apache/hive/pull/6239#discussion_r2659817099


##########
ql/src/test/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/TestVectorMapJoinFastRowHashMap.java:
##########
@@ -495,6 +495,47 @@ public void testBigIntRowsExact() throws Exception {
         /* doClipping */ false, /* useExactBytes */ true);
   }
 
+  @Test
+  public void testDateRowsExact() throws Exception {
+    random = new Random(44332);
+
+    // Use a large capacity that doesn't require expansion, yet.
+    VectorMapJoinFastLongHashMapContainer map =
+        new VectorMapJoinFastLongHashMapContainer(
+            false,
+            false,
+            HashTableKeyType.DATE,
+            LARGE_CAPACITY,
+            LOAD_FACTOR,
+            LARGE_WB_SIZE,
+            -1,
+            tableDesc,
+            4);
+
+    VerifyFastRowHashMap verifyTable = new VerifyFastRowHashMap();
+    VectorRandomRowSource valueSource = new VectorRandomRowSource();
+
+    valueSource.init(
+        random,
+        VectorRandomRowSource.SupportedTypes.ALL,
+        4,
+        /* allowNulls */ false, /* isUnicodeOk */

Review Comment:
   ack



##########
ql/src/test/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/TestVectorMapJoinFastRowHashMap.java:
##########
@@ -495,6 +495,47 @@ public void testBigIntRowsExact() throws Exception {
         /* doClipping */ false, /* useExactBytes */ true);
   }
 
+  @Test
+  public void testDateRowsExact() throws Exception {
+    random = new Random(44332);
+
+    // Use a large capacity that doesn't require expansion, yet.
+    VectorMapJoinFastLongHashMapContainer map =
+        new VectorMapJoinFastLongHashMapContainer(
+            false,
+            false,
+            HashTableKeyType.DATE,
+            LARGE_CAPACITY,
+            LOAD_FACTOR,
+            LARGE_WB_SIZE,
+            -1,
+            tableDesc,
+            4);
+
+    VerifyFastRowHashMap verifyTable = new VerifyFastRowHashMap();
+    VectorRandomRowSource valueSource = new VectorRandomRowSource();
+
+    valueSource.init(
+        random,
+        VectorRandomRowSource.SupportedTypes.ALL,
+        4,
+        /* allowNulls */ false, /* isUnicodeOk */
+        false);
+
+    int rowCount = 1000;
+    Object[][] rows = valueSource.randomRows(rowCount);
+
+    addAndVerifyRows(
+        valueSource,
+        rows,
+        map,
+        HashTableKeyType.DATE,
+        verifyTable,
+        new String[] {"date"},
+        /* doClipping */ false, /* useExactBytes */

Review Comment:
   ack



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to