diff options
author | Paul Power <paul.power@peerside.com> | 2015-03-02 13:08:47 -0800 |
---|---|---|
committer | Michael Armbrust <michael@databricks.com> | 2015-03-02 13:09:35 -0800 |
commit | d9a8bae77826a0cc77df29d85883e914d0f0b4f3 (patch) | |
tree | e1a80bdae73e1ca335e9007cd3e2f203b86db6c1 /sql/core | |
parent | af2effdd7b54316af0c02e781911acfb148b962b (diff) | |
download | spark-d9a8bae77826a0cc77df29d85883e914d0f0b4f3.tar.gz spark-d9a8bae77826a0cc77df29d85883e914d0f0b4f3.tar.bz2 spark-d9a8bae77826a0cc77df29d85883e914d0f0b4f3.zip |
[DOCS] 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")
Author: Paul Power <paul.power@peerside.com>
Closes #4847 from peerside/master and squashes the following commits:
ebc1efa [Paul Power] Merge pull request #1 from peerside/peerside-patch-1
e353340 [Paul Power] Updated comments use correct sample code for Dataframe joins
Diffstat (limited to 'sql/core')
-rw-r--r-- | sql/core/src/main/scala/org/apache/spark/sql/DataFrame.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/DataFrame.scala b/sql/core/src/main/scala/org/apache/spark/sql/DataFrame.scala index 060ab5e9a0..f3aac0826a 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/DataFrame.scala +++ b/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").equalTo(col("df2Key")), "outer"); * }}} * * @param right Right side of the join. |