peter-toth commented on a change in pull request #28885:
URL: https://github.com/apache/spark/pull/28885#discussion_r446632302
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/execution/PlannerSuite.scala
##########
@@ -474,9 +475,9 @@ class PlannerSuite extends SharedSparkSession with
AdaptiveSparkPlanHelper {
Inner,
None,
shuffle,
- shuffle)
+ shuffle.copy())
Review comment:
Yes, so I think the whole point of exchange reuse is to find different
exchange instances which result the same data and keep only one instance and
reuse its output where we can (i.e. call `execute`/`executeBroadcast` multiple
times on one exchange instance instead of call `execute`/`executeBroadcast`
once on each instances). In this example the 2 children points to the same
exchange instance (`shuffle`) so there is no point in reuse here.
(We could wrap one of them in a `ReusedExcahngeExec` node, but it wouldn't
make any difference from performance point of view.)
----------------------------------------------------------------
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]