Skip to content

ARROW-14239: [R] Don't use rlang::as_label - #11338

Closed
nealrichardson wants to merge 2 commits into
apache:masterfrom
nealrichardson:drop-as-label
Closed

nealrichardson wants to merge 2 commits into
apache:masterfrom
nealrichardson:drop-as-label

Conversation

@nealrichardson

Copy link
Copy Markdown
Member

r-lib/rlang#1277 changed the behavior of as_label when the call contains operators. On current release of rlang, we see:

> as_label(as_quosure(~nchar(chr, type = "bytes", allowNA = TRUE) == 1))
[1] "nchar(chr, type = \"bytes\", allowNA = TRUE) == 1"

On dev rlang, we get

> as_label(as_quosure(~nchar(chr, type = "bytes", allowNA = TRUE) == 1))
[1] "... == 1"

This causes a test failure, which we were told that we needed to address in advance of their release.

According to the tests added in that rlang PR, this is the intended behavior of as_label now, but it doesn't seem to be what we want. We can recover the behavior we're expecting by using deparse().

@github-actions

github-actions Bot commented Oct 6, 2021

Copy link
Copy Markdown

@nealrichardson

Copy link
Copy Markdown
Member Author

Opened r-lib/rlang#1295 to discuss a change in rlang instead.

@nealrichardson

Copy link
Copy Markdown
Member Author

Holding off on merging this in case the fix happens in rlang instead.

@nealrichardson

Copy link
Copy Markdown
Member Author

In case r-lib/rlang#1299 doesn't merge in time for their release, maybe we should just merge this now and we can revert to as_label if/when that lands.

@jonkeane jonkeane closed this in c6fdeaf Oct 18, 2021
@ursabot

ursabot commented Oct 18, 2021 •

Copy link
Copy Markdown

Benchmark runs are scheduled for baseline = 776d81c and contender = c6fdeaf. c6fdeaf is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Finished ⬇️0.0% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.36% ⬆️0.0%] ursa-thinkcentre-m75q
Supported benchmarks:
ursa-i9-9960x: langs = Python, R, JavaScript
ursa-thinkcentre-m75q: langs = C++, Java
ec2-t3-xlarge-us-east-2: cloud = True

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants