thisisnic commented on issue #39191:
URL: https://github.com/apache/arrow/issues/39191#issuecomment-1854389209

   You got it, yeah!  
   
   That `arrow_r_string_replace_function()` is a generic function which can be 
used for all of `sub/gsub/str_replace/str_replace_all`, so if you changed the 
error message to something more generic like `` `pattern` must be length 1 ``, 
then it'd cover multiple cases.
   
   The codebase can be a bit tricky to work through manually, but what I 
usually do in cases like this is find similar unit tests, then write a unit 
test for the thing I want to change (in this case it would be attempting to 
pass in a vector with `replacement` having length > 1), and then just see if my 
change makes the new test pass without making other existing tests fail.  
   
   If you open a PR, it'll be easier to walk you through any other changes on 
there :)


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

Reply via email to