diff options
-rw-r--r-- | docs/sql-programming-guide.md | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/sql-programming-guide.md b/docs/sql-programming-guide.md index a506457eba..4623bb4247 100644 --- a/docs/sql-programming-guide.md +++ b/docs/sql-programming-guide.md @@ -170,7 +170,9 @@ A schema can be applied to an existing RDD by calling `applySchema` and providin for the JavaBean. {% highlight java %} -JavaSQLContext ctx = new org.apache.spark.sql.api.java.JavaSQLContext(sc) + +JavaSparkContext ctx = ...; // An existing JavaSparkContext. +JavaSQLContext sqlCtx = new org.apache.spark.sql.api.java.JavaSQLContext(ctx) // Load a text file and convert each line to a JavaBean. JavaRDD<Person> people = ctx.textFile("examples/src/main/resources/people.txt").map( |