You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by rx...@apache.org on 2015/04/08 22:42:59 UTC
spark git commit: [SPARK-6767][SQL] Fixed Query DSL error in spark
sql Readme
Repository: spark
Updated Branches:
refs/heads/master 6ada4f6f5 -> 2f482d706
[SPARK-6767][SQL] Fixed Query DSL error in spark sql Readme
Fixed the following error
query.where('key > 30).select(avg('key)).collect()
<console>:43: error: value > is not a member of Symbol
query.where('key > 30).select(avg('key)).collect()
Author: Tijo Thomas <ti...@gmail.com>
Closes #5415 from tijoparacka/ERROR_SQL_DATAFRAME_EXAMPLE and squashes the following commits:
234751e [Tijo Thomas] Fixed Query DSL error in spark sql Readme
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/2f482d70
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/2f482d70
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/2f482d70
Branch: refs/heads/master
Commit: 2f482d706b9d38820472c3152dbd1612c98729bd
Parents: 6ada4f6
Author: Tijo Thomas <ti...@gmail.com>
Authored: Wed Apr 8 13:42:29 2015 -0700
Committer: Reynold Xin <rx...@databricks.com>
Committed: Wed Apr 8 13:42:29 2015 -0700
----------------------------------------------------------------------
sql/README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/2f482d70/sql/README.md
----------------------------------------------------------------------
diff --git a/sql/README.md b/sql/README.md
index fbb3200..237620e 100644
--- a/sql/README.md
+++ b/sql/README.md
@@ -56,6 +56,6 @@ res2: Array[org.apache.spark.sql.Row] = Array([238,val_238], [86,val_86], [311,v
You can also build further queries on top of these `DataFrames` using the query DSL.
```
-scala> query.where('key > 30).select(avg('key)).collect()
+scala> query.where(query("key") > 30).select(avg(query("key"))).collect()
res3: Array[org.apache.spark.sql.Row] = Array([274.79025423728814])
```
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org