GitHub user dongjoon-hyun opened a pull request:

    https://github.com/apache/spark/pull/14527

    [SPARK-16938][SQL] `dropDuplicate` should not raise exception on qualified 
column names

    ## What changes were proposed in this pull request?
    
    This PR fixes `dropDuplicate` not to raise exceptions on qualified column 
names. This bug is recently introduced by 
[SPARK-15230](https://issues.apache.org/jira/browse/SPARK-15230) with commit 
https://github.com/apache/spark/commit/925884a612dd88beaddf555c74d90856ab040ec7 
.
    
    **Reported Scenarios**
    ```scala
    scala> val dfa = Seq((1, 2), (2, 3)).toDF("id", "a").alias("dfa")
    scala> val dfb = Seq((1, 0), (1, 1)).toDF("id", "b").alias("dfb")
    scala> dfa.join(dfb, dfa("id") === 
dfb("id")).dropDuplicates(Array("dfa.id", "dfb.id"))
    org.apache.spark.sql.AnalysisException: Cannot resolve column name "dfa.id" 
among (id, a, id, b);
    ```
    
    ## How was this patch tested?
    
    Pass the Jenkins tests with a newly added test case.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/dongjoon-hyun/spark SPARK-16938

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/14527.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 #14527
    
----
commit 62c238a619422cbf7065d13fa7dd2980921ff9c8
Author: Dongjoon Hyun <[email protected]>
Date:   2016-08-07T22:57:05Z

    [SPARK-16938][SQL] `dropDuplicate` should not raise exception on qualified 
column names.

----


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to