cloud-fan commented on a change in pull request #23303: [SPARK-26352][SQL]
ReorderJoin should not change the order of columns
URL: https://github.com/apache/spark/pull/23303#discussion_r241360083
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/CostBasedJoinReorder.scala
##########
@@ -48,8 +48,18 @@ object CostBasedJoinReorder extends Rule[LogicalPlan] with
PredicateHelper {
if projectList.forall(_.isInstanceOf[Attribute]) =>
reorder(p, p.output)
}
- // After reordering is finished, convert OrderedJoin back to Join
+
+ // Cleanups
result transformDown {
+ // if a Project was created to keep output attribute order after join
reordering, but
Review comment:
is this an improvement? Maybe we should do it in another PR, so that this PR
can be backported to old branches.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]