You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/09/04 04:22:31 UTC

[GitHub] [beam] Hannah-Jiang commented on a change in pull request #12756: [BEAM-10824] [BEAM-7654] Change hash function in ApproximateUniqueCombineFn

Hannah-Jiang commented on a change in pull request #12756:
URL: https://github.com/apache/beam/pull/12756#discussion_r483374887



##########
File path: sdks/python/apache_beam/transforms/stats_test.py
##########
@@ -160,57 +159,13 @@ def test_get_sample_size_from_est_error(self):
     assert beam.ApproximateUnique._get_sample_size_from_est_error(0.05) == 1600
     assert beam.ApproximateUnique._get_sample_size_from_est_error(0.01) == 40000
 
-  @unittest.skip(
-      'Skip it because hash function is not good enough. '
-      'TODO: BEAM-7654')
   def test_approximate_unique_global_by_sample_size(self):
     # test if estimation error with a given sample size is not greater than
     # expected max error.
     sample_size = 16
     max_err = 2 / math.sqrt(sample_size)
-    test_input = [
-        4,
-        34,
-        29,
-        46,
-        80,
-        66,
-        51,
-        81,
-        31,
-        9,
-        26,
-        36,
-        10,
-        41,
-        90,
-        35,
-        33,
-        19,
-        88,
-        86,
-        28,
-        93,
-        38,
-        76,
-        15,
-        87,
-        12,
-        39,
-        84,
-        13,
-        32,
-        49,
-        65,
-        100,
-        16,
-        27,
-        23,
-        30,
-        96,
-        54
-    ]
-
+    test_input = list(range(100))

Review comment:
       A fixed dataset was used because random dataset cannot always pass the test even with retries and introduces flakiness. Does it always pass now? 




----------------------------------------------------------------
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.

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