Repository navigation
Tokenize ~~ as LIKE only in PostgreSQL, Redshift and DuckDB - #2659
Open
LucaCappelletti94 wants to merge 1 commit into
Open
LucaCappelletti94 wants to merge 1 commit into
LucaCappelletti94 wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2659 +/- ##
==========================================
+ Coverage 81.31% 81.33% +0.02%
==========================================
Files 42 42
Lines 33977 34010 +33
Branches 33977 34010 +33
==========================================
+ Hits 27628 27662 +34
+ Misses 2785 2784 -1
Partials 3564 3564 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
LucaCappelletti94
force-pushed
the
sqlite-double-tilde
branch
2 times, most recently
from
October 20, 2026 10:57
480759d to
5b33d0e
Compare
alamb
approved these changes
Oct 20, 2026
LucaCappelletti94
force-pushed
the
sqlite-double-tilde
branch
from
October 21, 2026 07:31
5b33d0e to
ddbb2e8
Compare
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.
In SQLite
~is the unary bitwise NOT operator (https://www.sqlite.org/lang_expr.html#operators_and_parse_affecting_attributes), soSELECT ~~5applies it twice and returns5. The tokenizer always read~~as PostgreSQL'sLIKEmatch operator, soSELECT ~~a FROM tfailed to parse with the SQLite dialect (Expected: an expression, found: ~~).A new dialect method,
supports_tilde_like_match_operator, defaults totrueso every other dialect keeps today's tokenization, andSQLiteDialectreturnsfalse, which makes~~and~~~tokenize as separate~tokens. The SQLite test covers both, and the dialects that keep the operator are tested to still parsea ~~ band still reject a leading~~.