aboutsummaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorDongjoon Hyun <dongjoon@apache.org>2016-05-11 10:03:51 -0700
committerYin Huai <yhuai@databricks.com>2016-05-11 10:03:51 -0700
commite1576478bde2b9146bdbd4f2bae20a4011b20229 (patch)
tree5745cad034fea502bc2c6cec7e8e9c9b5c3e5c9f /sql
parenta5f9fdbba3bbefb56ca9ab33271301a2ff0834b5 (diff)
downloadspark-e1576478bde2b9146bdbd4f2bae20a4011b20229.tar.gz
spark-e1576478bde2b9146bdbd4f2bae20a4011b20229.tar.bz2
spark-e1576478bde2b9146bdbd4f2bae20a4011b20229.zip
[SPARK-14933][HOTFIX] Replace `sqlContext` with `spark`.
## What changes were proposed in this pull request? This fixes compile errors. ## How was this patch tested? Pass the Jenkins tests. Author: Dongjoon Hyun <dongjoon@apache.org> Closes #13053 from dongjoon-hyun/hotfix_sqlquerysuite.
Diffstat (limited to 'sql')
-rw-r--r--sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLViewSuite.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLViewSuite.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLViewSuite.scala
index 5c72ec57f5..42dbe188fb 100644
--- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLViewSuite.scala
+++ b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLViewSuite.scala
@@ -308,11 +308,11 @@ class SQLViewSuite extends QueryTest with SQLTestUtils with TestHiveSingleton {
test("SPARK-14933 - create view from hive parquet tabale") {
withTable("t_part") {
withView("v_part") {
- sqlContext.sql(
+ spark.sql(
"""create table t_part (c1 int, c2 int)
|stored as parquet as select 1 as a, 2 as b
""".stripMargin)
- sqlContext.sql("create view v_part as select * from t_part")
+ spark.sql("create view v_part as select * from t_part")
checkAnswer(
sql("select * from t_part"),
sql("select * from v_part"))
@@ -323,11 +323,11 @@ class SQLViewSuite extends QueryTest with SQLTestUtils with TestHiveSingleton {
test("SPARK-14933 - create view from hive orc tabale") {
withTable("t_orc") {
withView("v_orc") {
- sqlContext.sql(
+ spark.sql(
"""create table t_orc (c1 int, c2 int)
|stored as orc as select 1 as a, 2 as b
""".stripMargin)
- sqlContext.sql("create view v_orc as select * from t_orc")
+ spark.sql("create view v_orc as select * from t_orc")
checkAnswer(
sql("select * from t_orc"),
sql("select * from v_orc"))