aboutsummaryrefslogtreecommitdiff
path: root/sql/core/src/test/scala
diff options
context:
space:
mode:
authorHerman van Hovell <hvanhovell@databricks.com>2016-08-17 07:03:24 -0700
committerDavies Liu <davies.liu@gmail.com>2016-08-17 07:03:24 -0700
commit0b0c8b95e3594db36d87ef0e59a30eefe8508ac1 (patch)
treeb3f8bb96171a72a422d5e64caacc110fee5319bc /sql/core/src/test/scala
parent56d86742d2600b8426d75bd87ab3c73332dca1d2 (diff)
downloadspark-0b0c8b95e3594db36d87ef0e59a30eefe8508ac1.tar.gz
spark-0b0c8b95e3594db36d87ef0e59a30eefe8508ac1.tar.bz2
spark-0b0c8b95e3594db36d87ef0e59a30eefe8508ac1.zip
[SPARK-17106] [SQL] Simplify the SubqueryExpression interface
## What changes were proposed in this pull request? The current subquery expression interface contains a little bit of technical debt in the form of a few different access paths to get and set the query contained by the expression. This is confusing to anyone who goes over this code. This PR unifies these access paths. ## How was this patch tested? (Existing tests) Author: Herman van Hovell <hvanhovell@databricks.com> Closes #14685 from hvanhovell/SPARK-17106.
Diffstat (limited to 'sql/core/src/test/scala')
-rw-r--r--sql/core/src/test/scala/org/apache/spark/sql/QueryTest.scala4
-rw-r--r--sql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/TPCDSQueryBenchmark.scala1
2 files changed, 2 insertions, 3 deletions
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/QueryTest.scala b/sql/core/src/test/scala/org/apache/spark/sql/QueryTest.scala
index 304881d4a4..cff9d22d08 100644
--- a/sql/core/src/test/scala/org/apache/spark/sql/QueryTest.scala
+++ b/sql/core/src/test/scala/org/apache/spark/sql/QueryTest.scala
@@ -292,7 +292,7 @@ abstract class QueryTest extends PlanTest {
p.expressions.foreach {
_.foreach {
case s: SubqueryExpression =>
- s.query.foreach(collectData)
+ s.plan.foreach(collectData)
case _ =>
}
}
@@ -334,7 +334,7 @@ abstract class QueryTest extends PlanTest {
case p =>
p.transformExpressions {
case s: SubqueryExpression =>
- s.withNewPlan(s.query.transformDown(renormalize))
+ s.withNewPlan(s.plan.transformDown(renormalize))
}
}
val normalized2 = jsonBackPlan.transformDown(renormalize)
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/TPCDSQueryBenchmark.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/TPCDSQueryBenchmark.scala
index 957a1d6426..3988d9750b 100644
--- a/sql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/TPCDSQueryBenchmark.scala
+++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/TPCDSQueryBenchmark.scala
@@ -26,7 +26,6 @@ import org.apache.spark.sql.catalyst.analysis.UnresolvedRelation
import org.apache.spark.sql.catalyst.expressions.SubqueryExpression
import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan
import org.apache.spark.sql.catalyst.util._
-import org.apache.spark.sql.internal.SQLConf
import org.apache.spark.util.Benchmark
/**