[MINOR][DOCS] Remove remaining sqlContext in documentation at examples
This PR removes `sqlContext` in examples. Actual usage was all replaced in https://github.com/apache/spark/pull/12809 but there are some in comments. Manual style checking. Author: hyukjinkwon <gurwls223@gmail.com> Closes #13006 from HyukjinKwon/minor-docs.
This commit is contained in:
parent
671b382a80
commit
2992a215c9
|
@ -133,7 +133,7 @@ public class JavaSparkSQL {
|
|||
// Register this DataFrame as a table.
|
||||
peopleFromJsonFile.registerTempTable("people");
|
||||
|
||||
// SQL statements can be run by using the sql methods provided by sqlContext.
|
||||
// SQL statements can be run by using the sql methods provided by `spark`
|
||||
Dataset<Row> teenagers3 = spark.sql("SELECT name FROM people WHERE age >= 13 AND age <= 19");
|
||||
|
||||
// The results of SQL queries are DataFrame and support all the normal RDD operations.
|
||||
|
|
|
@ -69,7 +69,7 @@ if __name__ == "__main__":
|
|||
# Register this DataFrame as a temporary table.
|
||||
people.registerTempTable("people")
|
||||
|
||||
# SQL statements can be run by using the sql methods provided by sqlContext
|
||||
# SQL statements can be run by using the sql methods provided by `spark`
|
||||
teenagers = spark.sql("SELECT name FROM people WHERE age >= 13 AND age <= 19")
|
||||
|
||||
for each in teenagers.collect():
|
||||
|
|
Loading…
Reference in a new issue