You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/08/30 09:32:40 UTC

[GitHub] [spark] mskapilks commented on a diff in pull request #37697: [SPARK-40248][SQL] Use larger number of bits to build Bloom filter

mskapilks commented on code in PR #37697:
URL: https://github.com/apache/spark/pull/37697#discussion_r958245866


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/BloomFilterAggregate.scala:
##########
@@ -55,6 +55,13 @@ case class BloomFilterAggregate(
       Multiply(estimatedNumItemsExpression, Literal(8L)))
   }
 
+  def this(child: Expression, estimatedNumItems: Long) = {
+    this(child, Literal(estimatedNumItems),
+      Literal(math.min(
+        BloomFilter.optimalNumOfBits(estimatedNumItems, estimatedNumItems / 3000000000L.toDouble),

Review Comment:
   Can you please explain this `estimatedNumItems / 3000000000L.toDouble`?
   Shouldn't we use `BloomFilter.DEFAULT_FPP` which is `0.03`?



-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org