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/10 16:13:41 UTC

[GitHub] [spark] wangyum commented on a change in pull request #29726: [SPARK-32855][SQL] Improve DPP for some join type do not support broadcast filtering side

wangyum commented on a change in pull request #29726:
URL: https://github.com/apache/spark/pull/29726#discussion_r591660490



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/dynamicpruning/PartitionPruning.scala
##########
@@ -85,22 +86,36 @@ object PartitionPruning extends Rule[LogicalPlan] with PredicateHelper {
       filteringKey: Expression,
       filteringPlan: LogicalPlan,
       joinKeys: Seq[Expression],
-      partScan: LogicalRelation): LogicalPlan = {
-    val reuseEnabled = SQLConf.get.exchangeReuseEnabled
+      partScan: LogicalRelation,
+      canBuildBroadcast: Boolean): LogicalPlan = {
     val index = joinKeys.indexOf(filteringKey)
-    lazy val hasBenefit = pruningHasBenefit(pruningKey, partScan, filteringKey, filteringPlan)
-    if (reuseEnabled || hasBenefit) {
-      // insert a DynamicPruning wrapper to identify the subquery during query planning
+    lazy val hasBenefit = pruningHasBenefit(

Review comment:
       This is used to set `onlyInBroadcast` to false. Because `SQLConf.get.dynamicPartitionPruningReuseBroadcastOnly ||! hasBenefit` is always true by default.




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