Uh oh!
There was an error while loading. Please reload this page.
Enable inlist support for preimage - #20051
Conversation
masonh22
left a comment
There was a problem hiding this comment.
This looks good, one small comment
Uh oh!
There was an error while loading. Please reload this page.
sdf-jkl
commented
Jan 29, 2026
Thanks for your review @masonh22. I am thinking about |
masonh22
commented
Jan 30, 2026
Hmmm, I see that you are already checking whether the list contains null and not applying the rule in that case. I'm not really sure what the semantics are for null values in InList. I see that Does that make sense? Is that what you were thinking about? |
sdf-jkl
commented
Jan 30, 2026
If we pass a When looping through the expressions in the list we would check if But I don't think this is relevant because if you want |
masonh22
commented
Jan 30, 2026
Oh right I see what you mean. I think you could skip over nulls while looping over the expressions but I don't think you need to add |
@comphead The issue with existing inlist_simplifier.rs is this guard: }) = expr
&& !list.is_empty()
&& (// For lists with only 1 value we allow more complex expressions to be simplified// e.g SUBSTR(c1, 2, 3) IN ('1') -> SUBSTR(c1, 2, 3) = '1'// for more than one we avoid repeating this potentially expensive// expressions
list.len() == 1
|| list.len() <= THRESHOLD_INLINE_INLIST
&& expr.try_as_col().is_some()// <--- this point here)When I was thinking about adding support inside There is an issue for that: |
Uh oh!
There was an error while loading. Please reload this page.
sdf-jkl
commented
Feb 3, 2026
Given that some To avoid unidentified behaviors and bugs I propose to add slt tests to |
alamb
commented
Feb 3, 2026
I personally think it would be better to put the tests in |
sdf-jkl
commented
Feb 4, 2026
Given that the |
alamb
commented
Feb 5, 2026
Uh oh!
There was an error while loading. Please reload this page.
## Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closesapache#123` indicates that this PR will close issue apache#123. --> - Closesapache#20050 ## Rationale for this change Check issue <!-- Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed. Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes. --> ## What changes are included in this PR? Match arm to support preimage for InList expressions in expr_simplifier.rs <!-- There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR. --> ## Are these changes tested? Yes, added two tests for `IN LIST` and `NOT IN LIST` support. <!-- We typically require tests for all PRs in order to: 1. Prevent the code from being accidentally broken by subsequent changes 2. Serve as another way to document the expected behavior of the code If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? --> ## Are there any user-facing changes? <!-- If there are user-facing changes then we may require documentation to be updated before approving the PR. --> No <!-- If there are any breaking changes to public APIs, please add the `api change` label. -->
Which issue does this PR close?
Rationale for this change
Check issue
What changes are included in this PR?
Match arm to support preimage for InList expressions in expr_simplifier.rs
Are these changes tested?
Yes, added two tests for
IN LISTandNOT IN LISTsupport.Are there any user-facing changes?
No