GH-36720: [R] stringr modifier functions cannot be called with namespace prefix#36758
Conversation
|
|
paleolimbot
left a comment
There was a problem hiding this comment.
Looks great! Just one suggestion that might simplify things a tiny bit 🙂
Co-authored-by: Dewey Dunnington <[email protected]>
|
CI failure is due to #36787 and not changes in this PR, so I'll merge |
| function_called <- call_name(pattern[1]) | ||
|
|
||
| if (function_called %in% modifier_funcs) { | ||
| pattern[1] <- call2(function_called) | ||
| } |
There was a problem hiding this comment.
This bit can be reduced to pattern[1] <- call2(function_called) (since is_call() took care of the name/namespace matching).
There was a problem hiding this comment.
Nice catch, will chuck this into a follow-up
|
After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit 819b7d5. There were 5 benchmark results indicating a performance regression:
The full Conbench report has more details. It also includes information about possible false positives for unstable benchmarks that are known to sometimes produce them. |
…namespace prefix (apache#36758) ### Rationale for this change Bug in implementation of string modified functions caused them to be swallowed when prefixed with stringr namespace ### What changes are included in this PR? Strips out the `stringr::` prefix when expressions contain `stringr::fixed`, `stringr::coll`, `string::boundary` or `stringr::regex` ### Are these changes tested? Yes ### Are there any user-facing changes? Yes * Closes: apache#36720 Lead-authored-by: Nic Crane <[email protected]> Co-authored-by: Dewey Dunnington <[email protected]> Signed-off-by: Nic Crane <[email protected]>
Rationale for this change
Bug in implementation of string modified functions caused them to be swallowed when prefixed with stringr namespace
What changes are included in this PR?
Strips out the
stringr::prefix when expressions containstringr::fixed,stringr::coll,string::boundaryorstringr::regexAre these changes tested?
Yes
Are there any user-facing changes?
Yes