spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Reynold Xin (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SPARK-7990) Add methods to facilitate equi-join on multiple join keys
Date Mon, 01 Jun 2015 04:30:17 GMT

     [ https://issues.apache.org/jira/browse/SPARK-7990?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Reynold Xin updated SPARK-7990:
-------------------------------
    Description: 
We have a variant of the join function that facilitates equi-join on a single join key, but
we don't have one to do it for multiple join keys.

This is the existing Python API:
{code}
def join(self, other, joinExprs=None, joinType=None):
{code}

I think we should rename joinExprs to "on", and joinType to "how" to match Pandas. And then
the "on" column should support either a string, a join condition, a list of string, or a list
of join condition ("and" together).

In order to support the Python API, we'd need to add a variant for Scala as well. I think
we can add another join method that looks like
{code}
def join(other: DataFrame, on: Seq[String], joinType: String): DataFrame
{code}
and update the existing Scala one to call this one.


  was:
We have a variant of the join function that facilitates equi-join on a single join key, but
we don't have one to do it for multiple join keys.

This is the existing Python API:
{code}
def join(self, other, joinExprs=None, joinType=None):
{code}

I think we should rename joinExprs to "on", and joinType to "how" to match Pandas. And then
the "on" column should support either a string, a join condition, a list of string, or a list
of join condition.

In order to support the Python API, we'd need to add a variant for Scala as well. I think
we can add another join method that looks like
{code}
def join(other: DataFrame, on: Seq[String], joinType: String): DataFrame
{code}
and update the existing Scala one to call this one.



> Add methods to facilitate equi-join on multiple join keys
> ---------------------------------------------------------
>
>                 Key: SPARK-7990
>                 URL: https://issues.apache.org/jira/browse/SPARK-7990
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>            Reporter: Reynold Xin
>
> We have a variant of the join function that facilitates equi-join on a single join key,
but we don't have one to do it for multiple join keys.
> This is the existing Python API:
> {code}
> def join(self, other, joinExprs=None, joinType=None):
> {code}
> I think we should rename joinExprs to "on", and joinType to "how" to match Pandas. And
then the "on" column should support either a string, a join condition, a list of string, or
a list of join condition ("and" together).
> In order to support the Python API, we'd need to add a variant for Scala as well. I think
we can add another join method that looks like
> {code}
> def join(other: DataFrame, on: Seq[String], joinType: String): DataFrame
> {code}
> and update the existing Scala one to call this one.



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

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


Mime
View raw message