-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-23356][SQL]Pushes Project to both sides of Union when expression is non-deterministic #20541
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
Conversation
|
@gatorsmile ,@cloud-fan Can you help me to review it. thanks. |
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.
do we push a + 1 to union children? or just a?
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.
if we push a + 1 to union, just a + 1.
seems this lack of test cases. let's add this test cases. thanks.
|
ok to test |
|
Test build #87210 has finished for PR 20541 at commit
|
36dbc9c to
4f5d46b
Compare
|
I'm confused about why we need |
|
Test build #87237 has finished for PR 20541 at commit
|
|
I think the use case is, by pushing projects into Union, we are more likely to combine adjacent Unions. So I don't think we need to improve it to push part of the project list and still leave a project above Union. |
|
in my opinion, this is considered that |
|
|
|
oh ,yeah, there is a little difference, for a + 1 and a + b. for a + b: So I think this may be the reason for the need to add the pushprojectionthroughunion rules. and to non-deterministic expression. |
|
I don't agree. |
|
oh, I see, I fallback to the modification of the non-deterministic expression, and to keep the newly added test cases for a+1 and a+b, can you? |
|
Can one of the admins verify this patch? |
gatorsmile
left a comment
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.
@heary-cao How about closing this PR and opening a new PR for adding new test cases?
|
@gatorsmile, OK, I will do it. |
…in SetOperationSuite ## What changes were proposed in this pull request? The purpose of this PR is supplement new test cases for a + 1,a + b and Rand in SetOperationSuite. It comes from the comment of closed PR:#20541, thanks. ## How was this patch tested? add new test cases Closes #23138 from heary-cao/UnionPushTestCases. Authored-by: caoxuewen <[email protected]> Signed-off-by: Wenchen Fan <[email protected]>
…in SetOperationSuite ## What changes were proposed in this pull request? The purpose of this PR is supplement new test cases for a + 1,a + b and Rand in SetOperationSuite. It comes from the comment of closed PR:apache#20541, thanks. ## How was this patch tested? add new test cases Closes apache#23138 from heary-cao/UnionPushTestCases. Authored-by: caoxuewen <[email protected]> Signed-off-by: Wenchen Fan <[email protected]>
What changes were proposed in this pull request?
Currently, PushProjectionThroughUnion optimizer only supports pushdown project operator to both sides of a Union operator when expression is deterministic , in fact, we can be like pushdown filters, also support pushdown project operator to both sides of a Union operator when expression is non-deterministic , this PR description fix this problem。now the explain looks like:
How was this patch tested?
add new test cases