andygrove opened a new issue, #3344:
URL: https://github.com/apache/datafusion-comet/issues/3344

   ## Description
   
   Comet's native `replace()` function returns incorrect results when the 
search string is empty.
   
   Spark behavior: `replace('hello', '', 'x')` returns `xhxexlxlxox` (inserts 
replacement between every character and at boundaries).
   
   Comet behavior: returns `hello` (no replacement).
   
   ## How to Reproduce
   
   ```sql
   SELECT replace('hello', '', 'x');
   ```
   
   Expected: `xhxexlxlxox`
   Actual (Comet): `hello`
   
   ## Expected Behavior
   
   Comet should match Spark's semantics for empty-string search in `replace()`.


-- 
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