GitHub user mgaido91 opened a pull request:

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

    [SPARK-25691][SQL] Use semantic equality in order to compare attributes

    ## What changes were proposed in this pull request?
    
    When we compare attributes, in general, we should always refer to semantic 
equality, as the default `equal` method can return false when there are 
"cosmetic" differences between them, but still they are the same thing; at 
least we have to consider them so when analyzing/optimizing queries.
    
    The PR focuses on the usage and comparison of the `output` of a 
`LogicalPlan`, which is a `Seq[Attribute]`. In this case, using equality 
implicitly fails to check the semantic equality. In analyzer and optimizer, the 
occurrences of such a comparison have been replaced with proper comparison 
using semantic equality.
    
    ## How was this patch tested?
    
    running the tests with the patch provided by @maryannxue in 
https://github.com/apache/spark/pull/22060

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

    $ git pull https://github.com/mgaido91/spark SPARK-25691

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

    https://github.com/apache/spark/pull/22713.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 #22713
    
----
commit 87fc62ab80324552ab6811aa05b7d897402a5464
Author: Marco Gaido <marcogaido91@...>
Date:   2018-10-13T17:17:18Z

    [SPARK-25691][SQL] Use semantic equality in order to compare attributes

----


---

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

Reply via email to