[ 
https://issues.apache.org/jira/browse/SPARK-10246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14725045#comment-14725045
 ] 

Alexey Grishchenko commented on SPARK-10246:
--------------------------------------------

Cannot reproduce, all the options with multiple conditions work on master 
branch:
{code}
>>> df.join(df4, ['name', 'age']).collect()
[Row(age=5, name=u'Bob', height=None)]
>>> df.join(df4, (df.name == df4.name) & (df.age == df4.age)).collect()
[Row(age=5, name=u'Bob', age=5, height=None, name=u'Bob')]
>>> cond = [df.name == df4.name, df.age == df4.age]
>>> df.join(df4, cond).collect()
Row(age=5, name=u'Bob', age=5, height=None, name=u'Bob')]
{code}

> Join in PySpark using a list of column names
> --------------------------------------------
>
>                 Key: SPARK-10246
>                 URL: https://issues.apache.org/jira/browse/SPARK-10246
>             Project: Spark
>          Issue Type: Bug
>          Components: PySpark, SQL
>            Reporter: Michal Monselise
>
> Currently, there are two supported methods to perform a join: join condition 
> and one column name.
> The documentation specifies that the join function can accept a list of 
> conditions or a list of column names but neither are currently supported. 
> This is discussed in issue SPARK-7197 as well.
> Functionality should match the documentation which currently contains an 
> example in /spark/python/pyspark/sql/dataframe.py line 560:
> >>> df.join(df4, ['name', 'age']).select(df.name, df.age).collect()
>         [Row(name=u'Bob', age=5)]
>         """



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to