GitHub user liancheng opened a pull request:
https://github.com/apache/spark/pull/11822
[SPARK-14004][SQL] NamedExpressions should have at most one qualifier
## What changes were proposed in this pull request?
This is a more aggressive version of PR #11820, which not only fixes the
original problem, but also does the following updates to enforce the
at-most-one-qualifier constraint:
- Renames `NamedExpression.qualifiers` to `NamedExpression.qualifier`
- Uses `Option[String]` rather than `Seq[String]` for
`NamedExpression.qualifier`
Quoted PR description of #11820 here:
> Current implementations of `AttributeReference.sql` and `Alias.sql` joins
all available qualifiers, which is logically wrong. But this implementation
mistake doesn't cause any real SQL generation bugs though, since there is
always at most one qualifier for any given `AttributeReference` or `Alias`.
## How was this patch tested?
Existing tests should be enough.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/liancheng/spark spark-14004-aggressive
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/11822.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 #11822
----
commit b9be69dcf6ab05af0e0ce29e9cd8500d784614e2
Author: Cheng Lian <[email protected]>
Date: 2016-03-18T10:45:51Z
Only uses the first qualifier to generate SQL string
commit c1f08b04e2bd80115b8ff1b5f1d51f1e01ada88f
Author: Cheng Lian <[email protected]>
Date: 2016-03-18T11:25:05Z
Uses Option[String] rather than Seq[String] to represent qualifiers
----
---
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]