Uh oh!
There was an error while loading. Please reload this page.
Support "pre-image" for pruning predicate evaluation - #18789
Conversation
@alamb This works as is right now, but I like the idea of adding a new method The rule will check if there is a scalar function is present in the predicate expression and match the corresponding |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
2010YOUY01
left a comment
There was a problem hiding this comment.
Thank you, this is great 👍🏼
The implementation idea looks good to me. This should be good to go after the end-to-end tests are added, and also have the test coverage double checked.
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.
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.
Co-authored-by: Yongting You <2010youy01@gmail.com>
This comment was marked as outdated.
This comment was marked as outdated.
sdf-jkl
commented
Dec 15, 2025
Hey @alamb please check when you're available! |
alamb
commented
Dec 16, 2025
Thanks -- I'll try and find some time over the next day or two |
sdf-jkl
commented
Dec 19, 2025
@alamb 👀 |
sdf-jkl
left a comment
There was a problem hiding this comment.
Updated IsDistinctFrom and IsNotDistinctFrom null handling logic and updated tests.
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.
sdf-jkl
commented
Dec 29, 2025
Hey @alamb, I've made some changes and ready for another go. Please take a look when you have time, thanks! |
alamb
commented
Jan 9, 2026
Sorry for the dealy here @sdf-jkl -- I am trying to find time to review this but I have been out and other things came up that were higher priority. I hope to return to this next week |
alamb
commented
Jan 9, 2026
(it is hard for me to find time to review 1000 line PRs, unfortunately) |
sdf-jkl
commented
Jan 9, 2026
@alamb no worries. Maybe I restructure this into some smaller PRs, so it will be easier to review? |
alamb
commented
Jan 9, 2026
That would certainly help me 🙏 |
@alamb I split it in two:
Hope this will be helpful |
sdf-jkl
commented
Jan 19, 2026
|
Which issue does this PR close?
Rationale for this change
What changes are included in this PR?
Adding a new rule to expr_simplifier library -
udf_preimageThis rule performs the optimization for the following operators:
The rule currently supports optimization for
date_partfunction given 'year' literal is passed as the interval parameter.Are these changes tested?
Tested for all comparison operators above and all possible datatypes in unit tests and sqllogictests.
Are there any user-facing changes?