Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20624#discussion_r169235761
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/statsEstimation/AggregateEstimation.scala
 ---
    @@ -32,13 +32,18 @@ object AggregateEstimation {
         val childStats = agg.child.stats
         // Check if we have column stats for all group-by columns.
         val colStatsExist = agg.groupingExpressions.forall { e =>
    -      e.isInstanceOf[Attribute] && 
childStats.attributeStats.contains(e.asInstanceOf[Attribute])
    +      e.isInstanceOf[Attribute] && (
    +        childStats.attributeStats.get(e.asInstanceOf[Attribute]) match {
    --- End diff --
    
    nit: `childStats.attributeStats.get(e.asInstanceOf[Attribute]).exists(_. 
hasCountStats)`


---

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

Reply via email to