LuciferYang commented on code in PR #42414:
URL: https://github.com/apache/spark/pull/42414#discussion_r1293238286


##########
common/sketch/src/main/java/org/apache/spark/util/sketch/BloomFilter.java:
##########
@@ -195,13 +195,14 @@ private static int optimalNumOfHashFunctions(long n, long 
m) {
   /**
    * Computes m (total bits of Bloom filter) which is expected to achieve, for 
the specified
    * expected insertions, the required false positive probability.
-   *
-   * See 
http://en.wikipedia.org/wiki/Bloom_filter#Probability_of_false_positives for 
the formula.
+   * <p>
+   * See <a 
href="http://en.wikipedia.org/wiki/Bloom_filter#Probability_of_false_positives";>
+   *     
http://en.wikipedia.org/wiki/Bloom_filter#Probability_of_false_positives</a> 
for the formula.
    *
    * @param n expected insertions (must be positive)
    * @param p false positive rate (must be 0 < p < 1)
    */
-  private static long optimalNumOfBits(long n, double p) {
+  public static long optimalNumOfBits(long n, double p) {

Review Comment:
   If you find `(must be 0 &lt; p &lt; 1)` to be quite messy, we can try 
changing it to `(must be {@literal 0 < p < 1})`



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