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



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

Review comment:
       ah, I didn't realize that it's used twice, then your previous solution 
is better, sorry for the back and forth!




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to