[WIP][SPARK-28103][SQL] Fix constraints of a Union Logical Plan#24912
Closed
William1104 wants to merge 1 commit intoapache:masterfrom
Closed
[WIP][SPARK-28103][SQL] Fix constraints of a Union Logical Plan#24912William1104 wants to merge 1 commit intoapache:masterfrom
William1104 wants to merge 1 commit intoapache:masterfrom
Conversation
…tied when a subtable is converted into empty local relation
|
Test build #4802 has finished for PR 24912 at commit
|
Contributor
|
@William1104 Is this still work in progress? |
Contributor
Author
Hi @venkata91, I am sorry that I have to put this work on hold at this moment. I hope I will work on it again some time later. |
Member
|
@William1104, please reopen the PR when you start to work on this. |
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.
[ Work in progress]
What changes were proposed in this pull request?
Currently, the constraints of a union table could be turned empty if any subtable is turned into an empty local relation. The side effect is filter cannot be inferred correctly (by InferFiltersFromConstrains).
This PR updates how the constraints of a Union table is calculated. Basically, it skips a child if it is based on an empty local relation.
We may reproduce the issue with the following setup:
After applying the above fix, the constraints of the union table is not empty anymore and the filter should be inferred properly.
How was this patch tested?