Skip to content

Conversation

@bkrieger
Copy link

@bkrieger bkrieger commented Jul 23, 2018

Cherrypicked from apache#21508.
Corresponding ticket: https://issues.apache.org/jira/browse/SPARK-24488.

Currently, the Analyzer throws an exception if your try to nest a generator. However, it special cases generators "nested" in an alias, and allows that. If you try to alias a generator twice, it is not caught by the special case, so an exception is thrown.

This PR trims the unnecessary, non-top-level aliases, so that the generator is allowed.

new tests in AnalysisSuite.

Author: Brandon Krieger <[email protected]>

Closes apache#21508 from bkrieger/bk/SPARK-24488.
@bkrieger bkrieger changed the title Cherrypick from upstream [SPARK-24488][SQL] Fix issue when generator is aliased multiple times [SPARK-24488][SQL] Fix issue when generator is aliased multiple times Jul 23, 2018
Copy link

@robert3005 robert3005 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't cherry pick unless it's an unmerged pr or something to fix the build. It becomes extremely hard to manage state once you start to selectively cherry-pick.

@bkrieger
Copy link
Author

That's fair. I tried to merge in all of upstream, but there are a few conflicts and I don't have the Spark knowledge to resolve them. Do you think you'd be able to merge in upstream soon?

@robert3005
Copy link

@bkrieger will do it today along with writeup so you can do future ones yourself

@bkrieger
Copy link
Author

Sounds good, thanks!

@bkrieger bkrieger closed this Jul 23, 2018
@bkrieger bkrieger deleted the bk/cherry branch July 23, 2018 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants