You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by peerside <gi...@git.apache.org> on 2015/03/02 07:43:18 UTC
[GitHub] spark pull request: Refactored Dataframe join comment to use corre...
GitHub user peerside opened a pull request:
https://github.com/apache/spark/pull/4847
Refactored Dataframe join comment to use correct parameter ordering
The API signatire for join requires the JoinType to be the third parameter. The code examples provided for join show JoinType being provided as the 2nd parater resuling in errors (i.e. "df1.join(df2, "outer", $"df1Key" === $"df2Key") ). The correct sample code is df1.join(df2, $"df1Key" === $"df2Key", "outer")
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/peerside/spark master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/4847.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #4847
----
commit e35334043148f79807e94d266f6ec649872a9dd7
Author: Paul Power <pa...@peerside.com>
Date: 2015-03-02T06:41:35Z
Updated comments use correct sample code for Dataframe joins
The API signatire for join requires the JoinType to be the third parameter. The code examples provided for join show JoinType being provided as the 2nd parater resuling in errors (i.e. "df1.join(df2, "outer", $"df1Key" === $"df2Key") ). The correct example should be df1.join(df2, $"df1Key" === $"df2Key", "outer")
commit ebc1efa773932ebe1769070b3c99d2f08873953c
Author: Paul Power <pa...@peerside.com>
Date: 2015-03-02T06:42:33Z
Merge pull request #1 from peerside/peerside-patch-1
Updated comments use correct sample code for Dataframe joins
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: Refactored Dataframe join comment to use corre...
Posted by marmbrus <gi...@git.apache.org>.
Github user marmbrus commented on the pull request:
https://github.com/apache/spark/pull/4847#issuecomment-76823596
Thanks! Merged to master and 1.3 with a small change for java.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: Refactored Dataframe join comment to use corre...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/spark/pull/4847
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: Refactored Dataframe join comment to use corre...
Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on the pull request:
https://github.com/apache/spark/pull/4847#issuecomment-76675615
LGTM since it's definitely the last arg that specifies the join type, as you can see there, but will give @rxin a day to look
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: Refactored Dataframe join comment to use corre...
Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on a diff in the pull request:
https://github.com/apache/spark/pull/4847#discussion_r25584861
--- Diff: sql/core/src/main/scala/org/apache/spark/sql/DataFrame.scala ---
@@ -337,11 +337,11 @@ class DataFrame protected[sql](
* {{{
* // Scala:
* import org.apache.spark.sql.functions._
- * df1.join(df2, "outer", $"df1Key" === $"df2Key")
+ * df1.join(df2, $"df1Key" === $"df2Key", "outer")
*
* // Java:
* import static org.apache.spark.sql.functions.*;
- * df1.join(df2, "outer", col("df1Key") === col("df2Key"));
+ * df1.join(df2, col("df1Key") === col("df2Key"), "outer");
--- End diff --
actually while you are at it, do you mind fixing the java example? it definitely wouldn't work with col("df1key") === col("df2key").
I think you need col("df1Key").equalTo(col("df2Key"))
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: Refactored Dataframe join comment to use corre...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:
https://github.com/apache/spark/pull/4847#issuecomment-76665628
Can one of the admins verify this patch?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org