-
- Downloads
[SPARK-20124][SQL] Join reorder should keep the same order of final project attributes
## What changes were proposed in this pull request? Join reorder algorithm should keep exactly the same order of output attributes in the top project. For example, if user want to select a, b, c, after reordering, we should output a, b, c in the same order as specified by user, instead of b, a, c or other orders. ## How was this patch tested? A new test case is added in `JoinReorderSuite`. Author: wangzhenhua <wangzhenhua@huawei.com> Closes #17453 from wzhfy/keepOrderInProject.
Showing
- sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/CostBasedJoinReorder.scala 16 additions, 8 deletions...e/spark/sql/catalyst/optimizer/CostBasedJoinReorder.scala
- sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/JoinReorderSuite.scala 13 additions, 0 deletions...pache/spark/sql/catalyst/optimizer/JoinReorderSuite.scala
- sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/plans/PlanTest.scala 2 additions, 2 deletions.../scala/org/apache/spark/sql/catalyst/plans/PlanTest.scala
Please register or sign in to comment