GitHub user gatorsmile opened a pull request:
https://github.com/apache/spark/pull/11422
[SPARK-13544] [SQL] Rewrite/Propagate Constraints for Aliases in Aggregate
and Windows
#### What changes were proposed in this pull request?
After analysis by Analyzer, three operators could have alias. They are
`Project`, `Aggregate` and `Window`. So far, we only rewrite and propagate
constraints if `Alias` is defined in `Project`. This PR is to resolve this
issue in `Aggregate` and `Window`.
#### How was this patch tested?
Added a test case for `Aggregate` in `ConstraintPropagationSuite`. We do
not have a DSL for `Window`. It is a little bit tedious to add such a similar
case for `Windows`. Could we skip it? : )
@marmbrus @sameeragarwal
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/gatorsmile/spark validConstraintsInUnaryNodes
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/11422.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 #11422
----
commit 9c17ebefe58557850f3a6c6bb6232ca7f2cf7753
Author: gatorsmile <[email protected]>
Date: 2016-02-29T04:12:52Z
Propagate constraints for Aliases in Aggregate and Windows
----
---
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]