-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-36720: [R] stringr modifier functions cannot be called with namespace prefix #36758
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch, will chuck this into a follow-up
…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]>
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]>
…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::boundary
orstringr::regex
Are these changes tested?
Yes
Are there any user-facing changes?
Yes