Github user maropu commented on a diff in the pull request: https://github.com/apache/spark/pull/20345#discussion_r180616142 --- Diff: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/JoinOptimizationSuite.scala --- @@ -116,7 +127,12 @@ class JoinOptimizationSuite extends PlanTest { ) queryAnswers foreach { queryAnswerPair => - val optimized = Optimize.execute(queryAnswerPair._1.analyze) + val optimized = Optimize.execute(queryAnswerPair._1.analyze) match { + // `ReorderJoin` may add `Project` to keep the same order of output attributes. + // So, we drop a top `Project` for tests. + case project: Project => project.child --- End diff -- yea, great suggestion and I think so. I'll try to fix.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org