Repository: spark Updated Branches: refs/heads/branch-2.0 0858a82c1 -> 403ba6513
[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. (cherry picked from commit e1576478bde2b9146bdbd4f2bae20a4011b20229) Signed-off-by: Yin Huai <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/403ba651 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/403ba651 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/403ba651 Branch: refs/heads/branch-2.0 Commit: 403ba65133c3bb45ad6e236464218d8970b893c9 Parents: 0858a82 Author: Dongjoon Hyun <[email protected]> Authored: Wed May 11 10:03:51 2016 -0700 Committer: Yin Huai <[email protected]> Committed: Wed May 11 10:04:00 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/403ba651/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/403ba651/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]
