feat(executor): implement ILIKE [CLAUDE] - #8144
Merged
Merged
Conversation
ILIKE was absent from the executor's ENV entirely, so both it and NOT ILIKE
raised `name 'ILIKE' is not defined` rather than answering:
>>> execute("SELECT s FROM t WHERE s ILIKE 'bump%'", tables=t).rows
ExecuteError: Step 'Join: t (...)' failed: name 'ILIKE' is not defined
The loose end from tobymao#8139, which taught the generator to honor negate on both
Like and ILike -- the flag now reaches an ILIKE the ENV could not resolve.
Implemented as LIKE with re.IGNORECASE, sharing one helper so the two cannot
drift: the escaping and anchoring semantics landed in 44b73a0 are exactly
what ILIKE needs too, and that expression moves into the helper unchanged.
Tests mirror test_like_semantics, with each pattern run in both cases and
expected to give the same rows -- the property that distinguishes ILIKE from
LIKE, and one that hand-cased patterns assert only incidentally. A row
carrying a literal dot keeps the "." patterns telling a literal apart from
the "_" wildcard.
georgesittas
approved these changes
Aug 12, 2026
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.
The gap
ILIKEis absent from the executor'sENVentirely, so both it andNOT ILIKEraise rather than answering:This is the loose end from #8139, which taught the generator to honor
negateon bothLikeandILike— so the flag now reaches anILIKEthe ENV cannot resolve.The change
ILIKEisLIKEwithre.IGNORECASE, through one shared helper so the two cannot drift. The escaping and anchoring from 44b73a0 is exactly whatILIKEneeds, and that expression moves into the helper unchanged.Tests
Each pattern is run in both cases and expected to give the same rows, which is the property that actually distinguishes
ILIKEfromLIKE. Hand-cased patterns assert it only incidentally: they would still pass withIGNORECASEdropped, for whichever spelling happened to match. Verified by removingre.IGNORECASE— the test fails immediately.The table carries
"B.mp Version"alongside"Bump Version"so the.rows discriminate a literal dot from the_wildcard, rather than only asserting a non-match.Full suite: 1317 tests, OK.