Skip to content

Conversation

thisisnic
Copy link
Member

@thisisnic thisisnic commented Jul 18, 2023

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

@thisisnic thisisnic requested a review from paleolimbot as a code owner July 18, 2023 19:05
@github-actions
Copy link

⚠️ GitHub issue #36720 has been automatically assigned in GitHub to PR creator.

@thisisnic thisisnic marked this pull request as draft July 19, 2023 10:24
@thisisnic thisisnic marked this pull request as ready for review July 19, 2023 14:01
Copy link
Member

@paleolimbot paleolimbot left a 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 🙂

@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting committer review Awaiting committer review labels Jul 19, 2023
Co-authored-by: Dewey Dunnington <dewey@dunnington.ca>
@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting merge Awaiting merge labels Jul 20, 2023
@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Jul 20, 2023
@thisisnic
Copy link
Member Author

CI failure is due to #36787 and not changes in this PR, so I'll merge

@thisisnic thisisnic merged commit 819b7d5 into apache:main Jul 20, 2023
Comment on lines +76 to +80
function_called <- call_name(pattern[1])

if (function_called %in% modifier_funcs) {
pattern[1] <- call2(function_called)
}
Copy link
Member

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

Copy link
Member Author

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

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting change review Awaiting change review labels Jul 20, 2023
chelseajonesr pushed a commit to chelseajonesr/arrow that referenced this pull request Jul 20, 2023
…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 <thisisnic@gmail.com>
Co-authored-by: Dewey Dunnington <dewey@dunnington.ca>
Signed-off-by: Nic Crane <thisisnic@gmail.com>
@conbench-apache-arrow
Copy link

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.

R-JunmingChen pushed a commit to R-JunmingChen/arrow that referenced this pull request Aug 20, 2023
…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 <thisisnic@gmail.com>
Co-authored-by: Dewey Dunnington <dewey@dunnington.ca>
Signed-off-by: Nic Crane <thisisnic@gmail.com>
loicalleyne pushed a commit to loicalleyne/arrow that referenced this pull request Nov 13, 2023
…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 <thisisnic@gmail.com>
Co-authored-by: Dewey Dunnington <dewey@dunnington.ca>
Signed-off-by: Nic Crane <thisisnic@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[R] stringr modifier functions cannot be called with namespace prefix
2 participants