You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/03/08 16:58:59 UTC
[GitHub] [spark] maryannxue commented on a change in pull request #29726: [SPARK-32855][SQL] Improve DPP for some join type do not support broadcast filtering side
maryannxue commented on a change in pull request #29726:
URL: https://github.com/apache/spark/pull/29726#discussion_r589586920
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/dynamicpruning/PartitionPruning.scala
##########
@@ -147,10 +163,15 @@ object PartitionPruning extends Rule[LogicalPlan] with PredicateHelper {
case _ => fallbackRatio
}
+ val estimatePruningSideSize = filterRatio * partPlan.stats.sizeInBytes.toFloat
// the pruning overhead is the total size in bytes of all scan relations
val overhead = otherPlan.collectLeaves().map(_.stats.sizeInBytes).sum.toFloat
-
- filterRatio * partPlan.stats.sizeInBytes.toFloat > overhead.toFloat
+ if (canBuildBroadcast) {
+ estimatePruningSideSize > overhead
+ } else {
+ // We need to ensure that the otherPlan can collect to the driver.
+ canBroadcastBySize(otherPlan, SQLConf.get) && estimatePruningSideSize * 0.04 > overhead
Review comment:
what is this `0.04`?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org