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

    https://github.com/apache/spark/pull/16228#discussion_r100296198
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/basicLogicalOperators.scala
 ---
    @@ -340,14 +340,22 @@ case class Join(
         case _ => resolvedExceptNatural
       }
     
    -  override def computeStats(conf: CatalystConf): Statistics = joinType 
match {
    -    case LeftAnti | LeftSemi =>
    -      // LeftSemi and LeftAnti won't ever be bigger than left
    -      left.stats(conf).copy()
    -    case _ =>
    -      // make sure we don't propagate isBroadcastable in other joins, 
because
    -      // they could explode the size.
    -      super.computeStats(conf).copy(isBroadcastable = false)
    +  override def computeStats(conf: CatalystConf): Statistics = {
    +    def simpleEstimation: Statistics = joinType match {
    +      case LeftAnti | LeftSemi =>
    +        // LeftSemi and LeftAnti won't ever be bigger than left
    +        left.stats(conf)
    +      case _ =>
    +        // Make sure we don't propagate isBroadcastable in other joins, 
because
    +        // they could explode the size.
    +        super.computeStats(conf).copy(isBroadcastable = false)
    --- End diff --
    
    not related to this PR, but `super.computeStats(conf)` won't produce a 
stats with `isBroadcastable = true`


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to