[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.
This commit is contained in:
Dongjoon Hyun 2016-05-11 10:03:51 -07:00 committed by Yin Huai
parent a5f9fdbba3
commit e1576478bd
2 changed files with 5 additions and 5 deletions

View file

@ -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"))