diff --git a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/ColumnPruningSuite.scala b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/ColumnPruningSuite.scala index 9f0f7e111295b..3f41f4b144096 100644 --- a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/ColumnPruningSuite.scala +++ b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/ColumnPruningSuite.scala @@ -256,7 +256,7 @@ class ColumnPruningSuite extends PlanTest { x.select('a) .sortBy(SortOrder('a, Ascending)).analyze - comparePlans(optimized, analysis.EliminateSubqueryAliases(correctAnswer)) + comparePlans(optimized, correctAnswer) // push down invalid val originalQuery1 = { @@ -271,7 +271,7 @@ class ColumnPruningSuite extends PlanTest { .sortBy(SortOrder('a, Ascending)) .select('b).analyze - comparePlans(optimized1, analysis.EliminateSubqueryAliases(correctAnswer1)) + comparePlans(optimized1, correctAnswer1) } test("Column pruning on Window with useless aggregate functions") { diff --git a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/FilterPushdownSuite.scala b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/FilterPushdownSuite.scala index 4a23179fc745c..a9c2306e37fd5 100644 --- a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/FilterPushdownSuite.scala +++ b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/FilterPushdownSuite.scala @@ -504,7 +504,7 @@ class FilterPushdownSuite extends PlanTest { } val optimized = Optimize.execute(originalQuery.analyze) - comparePlans(analysis.EliminateSubqueryAliases(originalQuery.analyze), optimized) + comparePlans(originalQuery.analyze, optimized) } test("joins: conjunctive predicates") { @@ -523,7 +523,7 @@ class FilterPushdownSuite extends PlanTest { left.join(right, condition = Some("x.b".attr === "y.b".attr)) .analyze - comparePlans(optimized, analysis.EliminateSubqueryAliases(correctAnswer)) + comparePlans(optimized, correctAnswer) } test("joins: conjunctive predicates #2") { @@ -542,7 +542,7 @@ class FilterPushdownSuite extends PlanTest { left.join(right, condition = Some("x.b".attr === "y.b".attr)) .analyze - comparePlans(optimized, analysis.EliminateSubqueryAliases(correctAnswer)) + comparePlans(optimized, correctAnswer) } test("joins: conjunctive predicates #3") { @@ -566,7 +566,7 @@ class FilterPushdownSuite extends PlanTest { condition = Some("z.a".attr === "x.b".attr)) .analyze - comparePlans(optimized, analysis.EliminateSubqueryAliases(correctAnswer)) + comparePlans(optimized, correctAnswer) } test("joins: push down where clause into left anti join") { @@ -581,7 +581,7 @@ class FilterPushdownSuite extends PlanTest { x.where("x.a".attr > 10) .join(y, LeftAnti, Some("x.b".attr === "y.b".attr)) .analyze - comparePlans(optimized, analysis.EliminateSubqueryAliases(correctAnswer)) + comparePlans(optimized, correctAnswer) } test("joins: only push down join conditions to the right of a left anti join") { @@ -598,7 +598,7 @@ class FilterPushdownSuite extends PlanTest { LeftAnti, Some("x.b".attr === "y.b".attr && "x.a".attr > 10)) .analyze - comparePlans(optimized, analysis.EliminateSubqueryAliases(correctAnswer)) + comparePlans(optimized, correctAnswer) } test("joins: only push down join conditions to the right of an existence join") { @@ -616,7 +616,7 @@ class FilterPushdownSuite extends PlanTest { ExistenceJoin(fillerVal), Some("x.a".attr > 1)) .analyze - comparePlans(optimized, analysis.EliminateSubqueryAliases(correctAnswer)) + comparePlans(optimized, correctAnswer) } val testRelationWithArrayType = LocalRelation('a.int, 'b.int, 'c_arr.array(IntegerType)) diff --git a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/JoinOptimizationSuite.scala b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/JoinOptimizationSuite.scala index 97733a754ccc2..ccd9d8dd4d213 100644 --- a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/JoinOptimizationSuite.scala +++ b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/JoinOptimizationSuite.scala @@ -17,7 +17,6 @@ package org.apache.spark.sql.catalyst.optimizer -import org.apache.spark.sql.catalyst.analysis import org.apache.spark.sql.catalyst.analysis.EliminateSubqueryAliases import org.apache.spark.sql.catalyst.dsl.expressions._ import org.apache.spark.sql.catalyst.dsl.plans._ @@ -118,7 +117,7 @@ class JoinOptimizationSuite extends PlanTest { queryAnswers foreach { queryAnswerPair => val optimized = Optimize.execute(queryAnswerPair._1.analyze) - comparePlans(optimized, analysis.EliminateSubqueryAliases(queryAnswerPair._2.analyze)) + comparePlans(optimized, queryAnswerPair._2.analyze) } }