diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/src/main/java/org/apache/spark/examples/sql/JavaSparkSQL.java | 2 | ||||
-rw-r--r-- | examples/src/main/python/sql.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/src/main/java/org/apache/spark/examples/sql/JavaSparkSQL.java b/examples/src/main/java/org/apache/spark/examples/sql/JavaSparkSQL.java index 755b4f5381..d956750dc7 100644 --- a/examples/src/main/java/org/apache/spark/examples/sql/JavaSparkSQL.java +++ b/examples/src/main/java/org/apache/spark/examples/sql/JavaSparkSQL.java @@ -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. diff --git a/examples/src/main/python/sql.py b/examples/src/main/python/sql.py index 5594223465..d2e895d931 100644 --- a/examples/src/main/python/sql.py +++ b/examples/src/main/python/sql.py @@ -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(): |