wangyum commented on a change in pull request #34051:
URL: https://github.com/apache/spark/pull/34051#discussion_r716439637
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/dynamicpruning/PartitionPruning.scala
##########
@@ -172,8 +172,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:
I'm thinking could we remove it to make `PartitionPruning` more clear.
This is because this approach has 2 disadvantages:
1. Disable `spark.sql.optimizer.dynamicPartitionPruning.reuseBroadcastOnly`.
2. The filtering side will be evaluated 2 times. For example:
https://github.com/apache/spark/pull/29726#issuecomment-780266596
Instead, we can use bloom filter join pruning. It has 2 advantages:
1. Do not need consider broadcast.
2. Reuse shuffle exchange to avoid the filtering side evaluate 2 times. For
example: https://github.com/apache/spark/pull/33914#issuecomment-913120675
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]