[SPARK-13771][SQL][WIP] Eliminate child columns from project if the project with no references to its child#11602
Closed
viirya wants to merge 1 commit intoapache:masterfrom
Closed
[SPARK-13771][SQL][WIP] Eliminate child columns from project if the project with no references to its child#11602viirya wants to merge 1 commit intoapache:masterfrom
viirya wants to merge 1 commit intoapache:masterfrom
Conversation
Member
|
LGTM : ) |
| } | ||
|
|
||
| // Eliminate the child from the Projects with no references to its child | ||
| case p @ Project(projectList, child) if p.references.intersect(child.outputSet).isEmpty => |
Contributor
There was a problem hiding this comment.
But this will change the number of rows right?
Member
Author
There was a problem hiding this comment.
Yea. I think it is changed to 1 row. Indeed this causes problem.
Contributor
|
This is an optimizable case, but I think we need a new relation that can produce n empty rows. |
Member
|
You are right. |
|
Test build #52735 has finished for PR 11602 at commit
|
Contributor
|
And looks like our data source can handle this case, they will take an empty array as |
Member
Author
|
I will change this later. Marked it as WIP now. |
Member
Author
|
Rethink about this. I would like to close it for now. |
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 free
to 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.
JIRA: https://issues.apache.org/jira/browse/SPARK-13771
What changes were proposed in this pull request?
This is a corner case that a `Project` node can have no references to its child. E.g.,
We can actually replace the input with a dummy
OneRowRelation.This PR is inspired by #11599. The test case is slightly modified from #11599 too.
How was this patch tested?
ColumnPruningSuite.