Repository navigation
Refactoring: Merge the IN expression variants into Expr::In - #2679
Open
LucaCappelletti94 wants to merge 2 commits into
Open
LucaCappelletti94 wants to merge 2 commits into
LucaCappelletti94 wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2679 +/- ##
==========================================
+ Coverage 81.31% 81.34% +0.03%
==========================================
Files 42 42
Lines 33977 33984 +7
Branches 33977 33984 +7
==========================================
+ Hits 27628 27645 +17
+ Misses 2785 2775 -10
Partials 3564 3564 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
LucaCappelletti94
force-pushed
the
in-expr-refactor
branch
from
October 18, 2026 14:39
653d166 to
a16fbaf
Compare
sabir-akhadov-localstack
approved these changes
Oct 19, 2026
LucaCappelletti94
force-pushed
the
in-expr-refactor
branch
from
October 20, 2026 12:34
5d8f8d5 to
358a424
Compare
alamb
approved these changes
Oct 20, 2026
alamb
left a comment
Contributor
There was a problem hiding this comment.
look like a nice cleanup to me
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.
Exprhad three variants for theINpredicate,InList,InSubqueryandInUnnest, each repeating the left-hand expression and theNOTflag, two of them repeating ClickHouse'sGLOBALflag, and each with its own copy of theDisplay,Spannedand parser code. Supporting another right-hand side, such as SQLite'sIN table_name, meant a fourth copy.They are now one
Expr::In { expr, target, negated, global }, wheretargetis anInTarget:List,SubqueryorUnnest. The SQL that parses and the text printed back are unchanged,GLOBALis still only accepted before a list or subquery, andsize_of::<Expr>()stays at 328 bytes. This is a breaking change for code that builds or matchesExpr::InList,Expr::InSubqueryorExpr::InUnnest, which now matchExpr::Inwith the correspondingInTarget.