Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15990#discussion_r89351269
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/HyperLogLogPlusPlus.scala
 ---
    @@ -306,7 +307,7 @@ case class HyperLogLogPlusPlus(
         val estimate = if (V > 0) {
           // Use linear counting for small cardinality estimates.
           val H = m * Math.log(m / V)
    -      if (H <= THRESHOLDS(p - 4)) {
    +      if ((p < 19 && H <= THRESHOLDS(p - 4)) || E <= 2.5 * m) {
    --- End diff --
    
    I know the 2.5m bit is from the Flajolet paper but was it just missing here 
before?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to