lyne7-sc opened a new issue, #22726:
URL: https://github.com/apache/datafusion/issues/22726

   ### Describe the bug
   
   The optimizer rule that simplifies regex match operators has two bugs:
   
   1. Anchored matches (`^...$`) on a `Utf8View` / `LargeUtf8` column fail at 
execution with `Arrow error: Invalid comparison operation: Utf8View == Utf8`.
   
   2. Case-insensitive `~*` anchored matches return wrong (incomplete) results
   
   
   
   
   
   ### To Reproduce
   
   ```sql
     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_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to