-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-34923][SQL] Metadata output should be empty for more plans #32017
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
6b4cba3
Metadata output should be empty by default
karenfeng 6c3dde2
Clean up
karenfeng ce3ac0e
Revert unintended change
karenfeng a2d72ef
Address comments and merge conflicts
karenfeng a4a7d05
By default, propagate metadata output
karenfeng 5a04a7e
Use blocklist
karenfeng 73219d4
Retrigger tests
karenfeng b1c0183
Retrigger tests
karenfeng e8e6e7d
Retrigger tests
karenfeng File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Address comments and merge conflicts
Signed-off-by: Karen Feng <[email protected]>
- Loading branch information
commit a2d72ef544fcb3ea3e746a9b583e23ff8f49af9b
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You are viewing a condensed version of this merge commit. You can view the full changes here.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the logic here removed? Won't this cause resolution failures when referencing a metadata column via an alias? Like
SELECT s._file FROM (SELECT ...) s?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cloud-fan, should we support this case if it requires changing the query during analysis after being resolved?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should only expose the metadata column in a single SELECT group, e.g.
SELECT _file FROM t,SELECT t1._file FROM t1 JOIN t2.It's super weird if we can propagate the metadata column through SELECT groups, e.g.
SELECT s._file FROM (SELECT a, b FROM t) s. Thesis a subquery alias and the subquery has a clear output list which isa, b. It may surprise users if they can accesss._file.However, I do agree with @rdblue that simple alias should be supported. For example,
SELECT t1._file FROM t t1 JOIN t t2.SELECT s._file FROM (SELECT ...) swon't work anyway becauseProjectcan't propagate the metadata columns.That said, let's propagate metadata columns in
SubqueryAlias