@@ -80,7 +80,7 @@ public Person call(String line) {
8080 // SQL can be run over RDDs that have been registered as tables.
8181 DataFrame teenagers = sqlCtx .sql ("SELECT name FROM people WHERE age >= 13 AND age <= 19" );
8282
83- // The results of SQL queries are SchemaRDDs and support all the normal RDD operations.
83+ // The results of SQL queries are DataFrames and support all the normal RDD operations.
8484 // The columns of a row in the result can be accessed by ordinal.
8585 List <String > teenagerNames = teenagers .toJavaRDD ().map (new Function <Row , String >() {
8686 @ Override
@@ -93,12 +93,12 @@ public String call(Row row) {
9393 }
9494
9595 System .out .println ("=== Data source: Parquet File ===" );
96- // JavaSchemaRDDs can be saved as parquet files, maintaining the schema information.
96+ // DataFrames can be saved as parquet files, maintaining the schema information.
9797 schemaPeople .saveAsParquetFile ("people.parquet" );
9898
9999 // Read in the parquet file created above.
100100 // Parquet files are self-describing so the schema is preserved.
101- // The result of loading a parquet file is also a JavaSchemaRDD .
101+ // The result of loading a parquet file is also a DataFrame .
102102 DataFrame parquetFile = sqlCtx .parquetFile ("people.parquet" );
103103
104104 //Parquet files can also be registered as tables and then used in SQL statements.
@@ -119,7 +119,7 @@ public String call(Row row) {
119119 // A JSON dataset is pointed by path.
120120 // The path can be either a single text file or a directory storing text files.
121121 String path = "examples/src/main/resources/people.json" ;
122- // Create a JavaSchemaRDD from the file(s) pointed by path
122+ // Create a DataFrame from the file(s) pointed by path
123123 DataFrame peopleFromJsonFile = sqlCtx .jsonFile (path );
124124
125125 // Because the schema of a JSON dataset is automatically inferred, to write queries,
@@ -130,13 +130,13 @@ public String call(Row row) {
130130 // |-- age: IntegerType
131131 // |-- name: StringType
132132
133- // Register this JavaSchemaRDD as a table.
133+ // Register this DataFrame as a table.
134134 peopleFromJsonFile .registerTempTable ("people" );
135135
136136 // SQL statements can be run by using the sql methods provided by sqlCtx.
137137 DataFrame teenagers3 = sqlCtx .sql ("SELECT name FROM people WHERE age >= 13 AND age <= 19" );
138138
139- // The results of SQL queries are JavaSchemaRDDs and support all the normal RDD operations.
139+ // The results of SQL queries are DataFrame and support all the normal RDD operations.
140140 // The columns of a row in the result can be accessed by ordinal.
141141 teenagerNames = teenagers3 .toJavaRDD ().map (new Function <Row , String >() {
142142 @ Override
@@ -146,14 +146,14 @@ public String call(Row row) {
146146 System .out .println (name );
147147 }
148148
149- // Alternatively, a JavaSchemaRDD can be created for a JSON dataset represented by
149+ // Alternatively, a DataFrame can be created for a JSON dataset represented by
150150 // a RDD[String] storing one JSON object per string.
151151 List <String > jsonData = Arrays .asList (
152152 "{\" name\" :\" Yin\" ,\" address\" :{\" city\" :\" Columbus\" ,\" state\" :\" Ohio\" }}" );
153153 JavaRDD <String > anotherPeopleRDD = ctx .parallelize (jsonData );
154154 DataFrame peopleFromJsonRDD = sqlCtx .jsonRDD (anotherPeopleRDD .rdd ());
155155
156- // Take a look at the schema of this new JavaSchemaRDD .
156+ // Take a look at the schema of this new DataFrame .
157157 peopleFromJsonRDD .printSchema ();
158158 // The schema of anotherPeople is ...
159159 // root
0 commit comments