fix: Throw coercion error for LIKE operations for nested types.#20212
Open
jonathanc-n wants to merge 2 commits intoapache:mainfrom
Open
fix: Throw coercion error for LIKE operations for nested types.#20212jonathanc-n wants to merge 2 commits intoapache:mainfrom
LIKE operations for nested types.#20212jonathanc-n wants to merge 2 commits intoapache:mainfrom
Conversation
Jefffrey
approved these changes
Feb 8, 2026
| INSERT INTO t0(v0, v2) VALUES (123, true); | ||
|
|
||
| query error There isn't a common type to coerce .* in .* expression | ||
| SELECT true FROM t0 WHERE ((REGEXP_MATCH(t0.v1, t0.v1)) NOT LIKE (REGEXP_MATCH(t0.v1, t0.v1, 'jH'))); |
Contributor
There was a problem hiding this comment.
Would these be easier to read by replacing the second regexp_match with just an array literal?
Contributor
Author
There was a problem hiding this comment.
Yes good point, i made the changes for the others but kept this specific line:
SELECT true FROM t0 WHERE ((REGEXP_MATCH(t0.v1, t0.v1)) NOT LIKE (REGEXP_MATCH(t0.v1, t0.v1, 'jH')));
To just show replication of the query in the issue
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.
Which issue does this PR close?
Rationale for this change
Throw coercion error for LIKE adjacent operations. This matches DuckDB behaviour, just makes it clearer to users that nested types are not supported for this comparison.
Remove the list_coercion for LIKE comparisons
Are these changes tested?
SLT tests.