Skip to content

Commit 0ffbf08

Browse files
hoffmannrxin
authored andcommitted
fix read/write mixup
Author: Peter Hoffmann <[email protected]> Closes #6815 from hoffmann/patch-1 and squashes the following commits: 2abb6da [Peter Hoffmann] fix read/write mixup (cherry picked from commit f3f2a43) Signed-off-by: Reynold Xin <[email protected]>
1 parent 2805d14 commit 0ffbf08

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/sql-programming-guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -995,11 +995,11 @@ List<String> teenagerNames = teenagers.javaRDD().map(new Function<Row, String>()
995995
schemaPeople # The DataFrame from the previous example.
996996

997997
# DataFrames can be saved as Parquet files, maintaining the schema information.
998-
schemaPeople.read.parquet("people.parquet")
998+
schemaPeople.write.parquet("people.parquet")
999999

10001000
# Read in the Parquet file created above. Parquet files are self-describing so the schema is preserved.
10011001
# The result of loading a parquet file is also a DataFrame.
1002-
parquetFile = sqlContext.write.parquet("people.parquet")
1002+
parquetFile = sqlContext.read.parquet("people.parquet")
10031003

10041004
# Parquet files can also be registered as tables and then used in SQL statements.
10051005
parquetFile.registerTempTable("parquetFile");

0 commit comments

Comments
 (0)