Uh oh!
There was an error while loading. Please reload this page.
[SPARK-42548][SQL] Add ReferenceAllColumns to skip rewriting attributes - #40154
Closed
ulysses-you wants to merge 1 commit into
Closed
[SPARK-42548][SQL] Add ReferenceAllColumns to skip rewriting attributes#40154ulysses-you wants to merge 1 commit into
ulysses-you wants to merge 1 commit into
Conversation
ulysses-you
commented
Feb 24, 2023
ContributorAuthor
There was a problem hiding this comment.
before, it would throworg.apache.spark.sql.catalyst.analysis.UnresolvedException: Invalid call to toAttribute on unresolved object
Contributor
There was a problem hiding this comment.
how about ReferenceAllColumns
cloud-fan
approved these changes
Feb 24, 2023
ulysses-you
commented
Feb 28, 2023
ContributorAuthor
@cloud-fan can we have this in branch-3.4 ? since it prevent potential bug and it's friendly for developers. |
cloud-fan
commented
Feb 28, 2023
Contributor
thanks, merging to master/3.4! |
cloud-fan pushed a commit
that referenced
this pull request
Feb 28, 2023
### What changes were proposed in this pull request? Add a new trait `ReferenceAllColumns ` that overrides `references` using children output. Then we can skip it during rewriting attributes in transformUpWithNewOutput. ### Why are the changes needed? There are two reasons with this new trait: 1. it's dangerous to call `references` on an unresolved plan that all of references come from children 2. it's unnecessary to rewrite its attributes that all of references come from children ### Does this PR introduce _any_ user-facing change? prevent potential bug ### How was this patch tested? add test and pass CI Closes#40154 from ulysses-you/references. Authored-by: ulysses-you <ulyssesyou18@gmail.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com> (cherry picked from commit db0e822) Signed-off-by: Wenchen Fan <wenchen@databricks.com>
snmvaughan pushed a commit
to snmvaughan/spark
that referenced
this pull request
Jun 20, 2023
### What changes were proposed in this pull request? Add a new trait `ReferenceAllColumns ` that overrides `references` using children output. Then we can skip it during rewriting attributes in transformUpWithNewOutput. ### Why are the changes needed? There are two reasons with this new trait: 1. it's dangerous to call `references` on an unresolved plan that all of references come from children 2. it's unnecessary to rewrite its attributes that all of references come from children ### Does this PR introduce _any_ user-facing change? prevent potential bug ### How was this patch tested? add test and pass CI Closesapache#40154 from ulysses-you/references. Authored-by: ulysses-you <ulyssesyou18@gmail.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com> (cherry picked from commit db0e822) Signed-off-by: Wenchen Fan <wenchen@databricks.com>
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
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changes were proposed in this pull request?
Add a new trait
ReferenceAllColumnsthat overridesreferencesusing children output. Then we can skip it during rewriting attributes in transformUpWithNewOutput.Why are the changes needed?
There are two reasons with this new trait:
referenceson an unresolved plan that all of references come from childrenDoes this PR introduce any user-facing change?
prevent potential bug
How was this patch tested?
add test and pass CI