You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/11/19 10:10:58 UTC

[GitHub] [hive] kasakrisz commented on a change in pull request #2783: HIVE-23095: NDV might be overestimated for a table with ~70 value

kasakrisz commented on a change in pull request #2783:
URL: https://github.com/apache/hive/pull/2783#discussion_r753054838



##########
File path: standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/common/ndv/hll/TestHyperLogLog.java
##########
@@ -333,6 +334,26 @@ public void testHLLSparseDenseSquash() {
     }
 
     p14HLL.squash(p10HLL.getNumRegisterIndexBits());
-    assertEquals((double) size, p14HLL.count(), longRangeTolerance * size / 100.0);
+    assertEquals(size, p14HLL.count(), longRangeTolerance * size / 100.0);
   }
+
+  @Test
+  public void testAbletoRetainAccuracyUpToSwitchThreshold() {
+    int maxThreshold = HyperLogLog.builder().setSizeOptimized().build().getEncodingSwitchThreshold();
+    testRetainAccuracy(70);

Review comment:
       Please split these to 3 test cases




-- 
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: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org