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/04/06 06:10:14 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #31984: [SPARK-34884][SQL] Improve DPP evaluation to make filtering side must can broadcast by size or broadcast by hint

cloud-fan commented on a change in pull request #31984:
URL: https://github.com/apache/spark/pull/31984#discussion_r607540865



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/dynamicpruning/PartitionPruning.scala
##########
@@ -160,8 +160,7 @@ object PartitionPruning extends Rule[LogicalPlan] with PredicateHelper with Join
       // We can't reuse the broadcast because the join type doesn't support broadcast,
       // and doing DPP means running an extra query that may have significant overhead.
       // We need to make sure the pruning side is very big so that DPP is still worthy.
-      canBroadcastBySize(otherPlan, conf) &&

Review comment:
       Previously, we only check `canBroadcastBySize` in the else branch. That means, if broadcastOnly=false, we can do DPP if the join type allows doing broadcast, and we don't care if the size is large or not, we only care the cost `estimatePruningSideSize > overhead`.
   
   This is a bit aggressive but it was the behavior since the beginning. Shall we restore the behavior? @wangyum 




-- 
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