Uh oh!
There was an error while loading. Please reload this page.
[SPARK-27604][SQL] Enhance constant propagation - #24553
Conversation
peter-toth
commented
May 8, 2019
This PR is extracted from #24495 as @dongjoon-hyun suggested to make review easier. |
mgaido91
left a comment
There was a problem hiding this comment.
@peter-toth may you please also add some UTs? eg. the example you added in the scaladoc may be also formalized with a UT... thanks.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
peter-toth
commented
May 8, 2019
@mgaido91, I've moved the relevant UTs from the other PR here. |
dongjoon-hyun
commented
May 8, 2019
ok to test |
1 similar comment
HyukjinKwon
commented
May 9, 2019
ok to test |
SparkQA
commented
May 9, 2019
Test build #105274 has finished for PR 24553 at commit
|
mgaido91
commented
May 9, 2019
retest this please |
Uh oh!
There was an error while loading. Please reload this page.
SparkQA
commented
May 9, 2019
Test build #105275 has finished for PR 24553 at commit
|
SparkQA
commented
May 9, 2019
Test build #105278 has finished for PR 24553 at commit
|
Uh oh!
There was an error while loading. Please reload this page.
SparkQA
commented
May 9, 2019
Test build #105283 has finished for PR 24553 at commit
|
peter-toth
commented
May 13, 2019
Any comments or suggestions @dongjoon-hyun or @gatorsmile ? |
@dongjoon-hyun@gatorsmile@mgaido91@viirya@HyukjinKwon any feedback or suggestion is very welcome. |
mgaido91
left a comment
There was a problem hiding this comment.
I think the change makes sense in general, just some questions on the tests. Thanks @peter-toth
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
peter-toth
commented
May 24, 2019
Thanks so much @mgaido91 for the review. Please let me know if you have any more questions. |
SparkQA
commented
May 24, 2019
Test build #105769 has finished for PR 24553 at commit
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
SparkQA
commented
May 25, 2019
Test build #105780 has finished for PR 24553 at commit
|
mgaido91
commented
May 25, 2019
LGTM, thanks! |
peter-toth
commented
May 31, 2019
@dongjoon-hyun@gatorsmile@cloud-fan@viirya@HyukjinKwon could you please help me to review this PR? |
HyukjinKwon
left a comment
There was a problem hiding this comment.
From a cursory look, seems making sense but I guess @hvanhovell should take a look as well.
HyukjinKwon
commented
Jun 14, 2019
retest this please |
SparkQA
commented
Jun 14, 2019
Test build #106493 has finished for PR 24553 at commit
|
827cfe5 to
054624eCompareSparkQA
commented
Jun 22, 2019
Test build #106794 has finished for PR 24553 at commit
|
peter-toth
commented
Dec 26, 2019
retest this please |
peter-toth
commented
Jan 14, 2020
retest this please |
SparkQA
commented
Jan 14, 2020
Test build #116717 has finished for PR 24553 at commit
|
SparkQA
commented
Jan 14, 2020
Test build #116721 has finished for PR 24553 at commit
|
39c563d to
85d5430CompareSparkQA
commented
Jan 15, 2020
Test build #116792 has finished for PR 24553 at commit
|
SparkQA
commented
Jan 16, 2020
Test build #116861 has finished for PR 24553 at commit
|
SparkQA
commented
Jan 16, 2020
Test build #116866 has finished for PR 24553 at commit
|
SparkQA
commented
Jan 18, 2020
Test build #116980 has finished for PR 24553 at commit
|
4f0a89a to
5d67ffdCompareSparkQA
commented
Jan 24, 2020
Test build #117354 has finished for PR 24553 at commit
|
5d67ffd to
767233eCompareSparkQA
commented
Jan 29, 2020
Test build #117514 has finished for PR 24553 at commit
|
767233e to
6c33c71CompareSparkQA
commented
Jan 31, 2020
Test build #117661 has finished for PR 24553 at commit
|
6c33c71 to
63ea687CompareSparkQA
commented
Jan 31, 2020
Test build #117663 has finished for PR 24553 at commit
|
peter-toth
commented
Feb 3, 2020
@cloud-fan, @dongjoon-hyun, @maropu I improved |
SparkQA
commented
Feb 13, 2020
Test build #118355 has finished for PR 24553 at commit
|
We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable. |
What changes were proposed in this pull request?
This PR improves
ConstantPropagationrule, the new implementation:e.g.
a = 1 AND a = 2=>a = 1 AND 1 = 2Before this PR this unsatisfiable filter was not reduced:
e.g.
abs(a) = 5 AND b = abs(a) + 3=>abs(a) = 5 AND b = 8EqualToandEqualNullSafeexpressions:e.g.
a = 5 AND b < a + 3=>a = 5 AND b < 8Projectand other nodes (except forJoin):e.g.
SELECT a = 5 AND b = a + 3=>SELECT a = 5 AND b = 8Before this PR only
Filterwas supported.e.g.
... WHERE IF(..., a = 5 AND b = a + 3, ...)=>... WHERE IF(..., a = 5 AND b = 8, ...)Before this PR only top level
And/Or/Notnodes were supported.... WHERE a = c AND f(a)orIF(a = c AND f(a), ..., ...)whereais a nullable expression andcis a constant thenullresult ofa = c AND f(a)means the same as if it resultedfalsetherefore constant propagation can be safely applied (a = c AND f(a)=>a = c AND f(c)).SELECT a = c AND f(a)thenullresult really meansnull. In this context constant propagation can't be applied safely.Notin which the context flips. E.g. constant propagation can't be applied onWHERE NOT(a = c AND f(a))but can be again onWHERE NOT(IF(..., NOT(a = c AND f(a)), ...).Why are the changes needed?
Improve performance.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
New UTs.