GitHub user mgaido91 opened a pull request:
https://github.com/apache/spark/pull/22957
[SPARK-25951][SQL] Remove Alias when canonicalize
## What changes were proposed in this pull request?
When we canonicalize an `Expression`, we do not remove `Alias`. So two
expressions which are the same but are renamed are considered to be
semantically different, while this is not true. This can cause - as showed in
the JIRA - missing some optimizations, eg. removing redundant shuffles, when a
column is renamed.
The PR proposes to remove `Alias`es when canonicalizing an expression.
## How was this patch tested?
added UT
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/mgaido91/spark SPARK-25951
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/22957.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 #22957
----
commit b566818bf17c2b69d06fed2e1500e608a25bb3b7
Author: Marco Gaido <marcogaido91@...>
Date: 2018-11-06T15:55:37Z
[SPARK-25951][SQL] Remove Alias when canonicalize
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]