[SQL] [MINOR] Fixes a minor Java example error in SQL programming guide
Author: Cheng Lian <lian@databricks.com>
Closes #6749 from liancheng/java-sample-fix and squashes the following commits:
5b44585 [Cheng Lian] Fixes a minor Java example error in SQL programming guide
(cherry picked from commit 8f7308f9c4
)
Signed-off-by: Reynold Xin <rxin@databricks.com>
This commit is contained in:
parent
a0a7f2f921
commit
7b88e6a1e3
|
@ -1475,7 +1475,7 @@ expressed in HiveQL.
|
|||
|
||||
{% highlight java %}
|
||||
// sc is an existing JavaSparkContext.
|
||||
HiveContext sqlContext = new org.apache.spark.sql.hive.HiveContext(sc);
|
||||
HiveContext sqlContext = new org.apache.spark.sql.hive.HiveContext(sc.sc);
|
||||
|
||||
sqlContext.sql("CREATE TABLE IF NOT EXISTS src (key INT, value STRING)");
|
||||
sqlContext.sql("LOAD DATA LOCAL INPATH 'examples/src/main/resources/kv1.txt' INTO TABLE src");
|
||||
|
|
Loading…
Reference in a new issue