Github user wzhfy commented on a diff in the pull request: https://github.com/apache/spark/pull/20345#discussion_r180344118 --- 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 -- I'm a little hesitate to change this, because if we really forget to add a Project node after join reordering, the test can pass, but that's wrong.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org