Skip to content

Commit 8f7308f

Browse files
lianchengrxin
authored andcommitted
[SQL] [MINOR] Fixes a minor Java example error in SQL programming guide
Author: Cheng Lian <[email protected]> Closes apache#6749 from liancheng/java-sample-fix and squashes the following commits: 5b44585 [Cheng Lian] Fixes a minor Java example error in SQL programming guide
1 parent 2b550a5 commit 8f7308f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/sql-programming-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1479,7 +1479,7 @@ expressed in HiveQL.
14791479

14801480
{% highlight java %}
14811481
// sc is an existing JavaSparkContext.
1482-
HiveContext sqlContext = new org.apache.spark.sql.hive.HiveContext(sc);
1482+
HiveContext sqlContext = new org.apache.spark.sql.hive.HiveContext(sc.sc);
14831483

14841484
sqlContext.sql("CREATE TABLE IF NOT EXISTS src (key INT, value STRING)");
14851485
sqlContext.sql("LOAD DATA LOCAL INPATH 'examples/src/main/resources/kv1.txt' INTO TABLE src");

0 commit comments

Comments
 (0)