aboutsummaryrefslogtreecommitdiff
path: root/docs/sql-programming-guide.md
diff options
context:
space:
mode:
authorYin Huai <huai@cse.ohio-state.edu>2014-10-02 11:37:24 -0700
committerMichael Armbrust <michael@databricks.com>2014-10-02 11:37:24 -0700
commit82a6a083a485140858bcd93d73adec59bb5cca64 (patch)
tree3fc209d56db7fa09052f01ee2d3a0818b941e367 /docs/sql-programming-guide.md
parent5b4a5b1acdc439a58aa2a3561ac0e3fb09f529d6 (diff)
downloadspark-82a6a083a485140858bcd93d73adec59bb5cca64.tar.gz
spark-82a6a083a485140858bcd93d73adec59bb5cca64.tar.bz2
spark-82a6a083a485140858bcd93d73adec59bb5cca64.zip
[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 <huai@cse.ohio-state.edu> Closes #2630 from yhuai/sqlDoc and squashes the following commits: 267d63e [Yin Huai] Update the output of printSchema and fix a typo.
Diffstat (limited to 'docs/sql-programming-guide.md')
-rw-r--r--docs/sql-programming-guide.md14
1 files changed, 7 insertions, 7 deletions
diff --git a/docs/sql-programming-guide.md b/docs/sql-programming-guide.md
index 818fd5ab80..368c3d0008 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.