garyconan1224 opened a new pull request, #22357:
URL: https://github.com/apache/datafusion/pull/22357

   ## Which issue does this PR close?
   
   Closes #22253.
   
   ## Rationale for this change
   
   PostgreSQL treats `replace` with an empty search string as a no-op. 
DataFusion currently inserts the replacement string around each character, so 
`replace('abc', '', 'x')` returns `xaxbxcx` instead of `abc`.
   
   ## What changes are included in this PR?
   
   - Return the input string unchanged when the `from` argument to `replace` is 
empty.
   - Add SQLLogicTest coverage for Utf8, Utf8View, and LargeUtf8 inputs.
   
   ## Are these changes tested?
   
   - `git diff --check`
   - I could not run Rust tests locally because this environment does not have 
`cargo`/`rustc` installed; the added SQLLogicTest cases are intended for CI 
verification.
   


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