Repository: spark Updated Branches: refs/heads/branch-1.1 c52c231c7 -> 68693519e
[SQL][Docs] Update the output of printSchema and fix a typo in SQL programming guide. We have changed the output format of `printSchema`. This PR will update our SQL programming guide to show the updated format. Also, it fixes a typo (the value type of `StructType` in Java API). Author: Yin Huai <[email protected]> Closes #2630 from yhuai/sqlDoc and squashes the following commits: 267d63e [Yin Huai] Update the output of printSchema and fix a typo. (cherry picked from commit 82a6a083a485140858bcd93d73adec59bb5cca64) Signed-off-by: Michael Armbrust <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/68693519 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/68693519 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/68693519 Branch: refs/heads/branch-1.1 Commit: 68693519ea6b08de39d50ddd84e24fb762a3a44d Parents: c52c231 Author: Yin Huai <[email protected]> Authored: Thu Oct 2 11:37:24 2014 -0700 Committer: Michael Armbrust <[email protected]> Committed: Thu Oct 2 11:37:53 2014 -0700 ---------------------------------------------------------------------- docs/sql-programming-guide.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/68693519/docs/sql-programming-guide.md ---------------------------------------------------------------------- diff --git a/docs/sql-programming-guide.md b/docs/sql-programming-guide.md index 6d24972..90ac971 100644 --- a/docs/sql-programming-guide.md +++ b/docs/sql-programming-guide.md @@ -620,8 +620,8 @@ val people = sqlContext.jsonFile(path) // The inferred schema can be visualized using the printSchema() method. people.printSchema() // root -// |-- age: IntegerType -// |-- name: StringType +// |-- age: integer (nullable = true) +// |-- name: string (nullable = true) // Register this SchemaRDD as a table. people.registerTempTable("people") @@ -658,8 +658,8 @@ JavaSchemaRDD people = sqlContext.jsonFile(path); // The inferred schema can be visualized using the printSchema() method. people.printSchema(); // root -// |-- age: IntegerType -// |-- name: StringType +// |-- age: integer (nullable = true) +// |-- name: string (nullable = true) // Register this JavaSchemaRDD as a table. people.registerTempTable("people"); @@ -697,8 +697,8 @@ people = sqlContext.jsonFile(path) # The inferred schema can be visualized using the printSchema() method. people.printSchema() # root -# |-- age: IntegerType -# |-- name: StringType +# |-- age: integer (nullable = true) +# |-- name: string (nullable = true) # Register this SchemaRDD as a table. people.registerTempTable("people") @@ -1394,7 +1394,7 @@ please use factory methods provided in </tr> <tr> <td> <b>StructType</b> </td> - <td> org.apache.spark.sql.api.java </td> + <td> org.apache.spark.sql.api.java.Row </td> <td> DataType.createStructType(<i>fields</i>)<br /> <b>Note:</b> <i>fields</i> is a List or an array of StructFields. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
