Repository: spark
Updated Branches:
  refs/heads/master a5f9fdbba -> e1576478b


[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 <[email protected]>

Closes #13053 from dongjoon-hyun/hotfix_sqlquerysuite.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/e1576478
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/e1576478
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/e1576478

Branch: refs/heads/master
Commit: e1576478bde2b9146bdbd4f2bae20a4011b20229
Parents: a5f9fdb
Author: Dongjoon Hyun <[email protected]>
Authored: Wed May 11 10:03:51 2016 -0700
Committer: Yin Huai <[email protected]>
Committed: Wed May 11 10:03:51 2016 -0700

----------------------------------------------------------------------
 .../java/org/apache/spark/examples/ml/JavaLDAExample.java    | 2 +-
 .../org/apache/spark/sql/hive/execution/SQLViewSuite.scala   | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/e1576478/examples/src/main/java/org/apache/spark/examples/ml/JavaLDAExample.java
----------------------------------------------------------------------
diff --git 
a/examples/src/main/java/org/apache/spark/examples/ml/JavaLDAExample.java 
b/examples/src/main/java/org/apache/spark/examples/ml/JavaLDAExample.java
index 7102ddd..9041244 100644
--- a/examples/src/main/java/org/apache/spark/examples/ml/JavaLDAExample.java
+++ b/examples/src/main/java/org/apache/spark/examples/ml/JavaLDAExample.java
@@ -53,7 +53,7 @@ public class JavaLDAExample {
     double lp = model.logPerplexity(dataset);
     System.out.println("The lower bound on the log likelihood of the entire 
corpus: " + ll);
     System.out.println("The upper bound bound on perplexity: " + lp);
-    
+
     // Describe topics.
     Dataset<Row> topics = model.describeTopics(3);
     System.out.println("The topics described by their top-weighted terms:");

http://git-wip-us.apache.org/repos/asf/spark/blob/e1576478/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLViewSuite.scala
----------------------------------------------------------------------
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 5c72ec5..42dbe18 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"))


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to