aboutsummaryrefslogtreecommitdiff
path: root/docs/sql-programming-guide.md
diff options
context:
space:
mode:
authorTijo Thomas <tijoparacka@gmail.com>2015-03-17 18:50:19 -0700
committerReynold Xin <rxin@databricks.com>2015-03-17 18:50:19 -0700
commita012e08635dc2d643715e11680fd6a3fb3afe44a (patch)
tree314e1ab49a0ab48b92d35f03da8f19e9dc422b69 /docs/sql-programming-guide.md
parentdc9c9196d63aa465e86ac52f0e86e10c12472100 (diff)
downloadspark-a012e08635dc2d643715e11680fd6a3fb3afe44a.tar.gz
spark-a012e08635dc2d643715e11680fd6a3fb3afe44a.tar.bz2
spark-a012e08635dc2d643715e11680fd6a3fb3afe44a.zip
[SPARK-6383][SQL]Fixed compiler and errors in Dataframe examples
Author: Tijo Thomas <tijoparacka@gmail.com> Closes #5068 from tijoparacka/fix_sql_dataframe_example and squashes the following commits: 6953ac1 [Tijo Thomas] Handled Java and Python example sections 0751a74 [Tijo Thomas] Fixed compiler and errors in Dataframe examples
Diffstat (limited to 'docs/sql-programming-guide.md')
-rw-r--r--docs/sql-programming-guide.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/sql-programming-guide.md b/docs/sql-programming-guide.md
index 11c29e2063..2cbb4c967e 100644
--- a/docs/sql-programming-guide.md
+++ b/docs/sql-programming-guide.md
@@ -170,14 +170,14 @@ df.select("name").show()
// Justin
// Select everybody, but increment the age by 1
-df.select("name", df("age") + 1).show()
+df.select(df("name"), df("age") + 1).show()
// name (age + 1)
// Michael null
// Andy 31
// Justin 20
// Select people older than 21
-df.filter(df("name") > 21).show()
+df.filter(df("age") > 21).show()
// age name
// 30 Andy
@@ -220,14 +220,14 @@ df.select("name").show();
// Justin
// Select everybody, but increment the age by 1
-df.select("name", df.col("age").plus(1)).show();
+df.select(df.col("name"), df.col("age").plus(1)).show();
// name (age + 1)
// Michael null
// Andy 31
// Justin 20
// Select people older than 21
-df.filter(df("name") > 21).show();
+df.filter(df.col("age").gt(21)).show();
// age name
// 30 Andy
@@ -270,14 +270,14 @@ df.select("name").show()
## Justin
# Select everybody, but increment the age by 1
-df.select("name", df.age + 1).show()
+df.select(df.name, df.age + 1).show()
## name (age + 1)
## Michael null
## Andy 31
## Justin 20
# Select people older than 21
-df.filter(df.name > 21).show()
+df.filter(df.age > 21).show()
## age name
## 30 Andy