Github user rxin commented on a diff in the pull request:
https://github.com/apache/spark/pull/16228#discussion_r91676653
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/basicLogicalOperators.scala
---
@@ -325,15 +326,17 @@ case class Join(
case _ => resolvedExceptNatural
}
- override lazy val statistics: Statistics = joinType match {
- case LeftAnti | LeftSemi =>
- // LeftSemi and LeftAnti won't ever be bigger than left
- left.statistics.copy()
- case _ =>
- // make sure we don't propagate isBroadcastable in other joins,
because
- // they could explode the size.
- super.statistics.copy(isBroadcastable = false)
- }
+ override lazy val statistics: Statistics =
JoinEstimation.estimate(this).getOrElse(
+ joinType match {
+ case LeftAnti | LeftSemi =>
+ // LeftSemi and LeftAnti won't ever be bigger than left
+ left.statistics.copy()
--- End diff --
why do we need copy here?
---
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]