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

    https://github.com/apache/spark/pull/20062#discussion_r158806400
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/statsEstimation/FilterEstimation.scala
 ---
    @@ -253,7 +252,7 @@ case class FilterEstimation(plan: Filter) extends 
Logging {
           1.0 - nullPercent
         }
     
    -    Some(percent)
    +    Some(percent.toDouble)
    --- End diff --
    
    This is because `nullPercent` is calculated by `colStat.nullCount / 
rowCount`, both `nullCount` and rowCount` are BigInt, and need to be converted 
to BigDecimal..


---

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

Reply via email to