apapi commented on a change in pull request #27077: [SPARK-30408][SQL] Should not remove orderBy in sortBy clause in Optimizer URL: https://github.com/apache/spark/pull/27077#discussion_r364580910
########## File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/EliminateSortsSuite.scala ########## @@ -308,4 +308,11 @@ class EliminateSortsSuite extends PlanTest { val correctAnswer = PushDownOptimizer.execute(noOrderByPlan.analyze) comparePlans(optimized, correctAnswer) } + + test("should not remove orderBy in sortBy clause") { + val plan = testRelation.orderBy('a.asc).sortBy('b.desc) + val optimized = Optimize.execute(plan.analyze) + val correctAnswer = testRelation.orderBy('a.asc).sortBy('b.desc).analyze + comparePlans(optimized, correctAnswer) Review comment: I add new UT for this. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org