Describe the bug
The optimizer rule that simplifies regex match operators has two bugs:
-
Anchored matches (^...$) on a Utf8View / LargeUtf8 column fail at execution with Arrow error: Invalid comparison operation: Utf8View == Utf8.
-
Case-insensitive ~* anchored matches return wrong (incomplete) results
To Reproduce
CREATE TABLE t(s VARCHAR) AS VALUES ('foo'), ('Bazzz');
SELECT * FROM t WHERE s ~ '^Bazzz$'; -- Bug 1: Invalid comparison Utf8View == Utf8
SELECT * FROM t WHERE s ~* '^foo$'; -- Bug 2: case-insensitive match returns wrong result
Expected behavior
- Anchored simplification works on Utf8View / LargeUtf8 without errors.
~* anchored matches return correct case-insensitive results.
Additional context
No response
Describe the bug
The optimizer rule that simplifies regex match operators has two bugs:
Anchored matches (
^...$) on aUtf8View/LargeUtf8column fail at execution withArrow error: Invalid comparison operation: Utf8View == Utf8.Case-insensitive
~*anchored matches return wrong (incomplete) resultsTo Reproduce
Expected behavior
~*anchored matches return correct case-insensitive results.Additional context
No response