Skip to content

Conversation

@thisisnic
Copy link
Member

@thisisnic thisisnic commented May 9, 2023

This PR implements the .default argument for case_when and raises errors if non-NULL values are supplied for .ptype and .size.

@thisisnic thisisnic requested a review from paleolimbot as a code owner May 9, 2023 07:35
@github-actions
Copy link

github-actions bot commented May 9, 2023

@github-actions
Copy link

github-actions bot commented May 9, 2023

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

@github-actions github-actions bot added Component: R awaiting committer review Awaiting committer review labels May 9, 2023
@thisisnic
Copy link
Member Author

We could implement .ptype in a follow-up ticket if there is user interest in it. A possible implementation might involve calling cast on the case_when expression to cast it to the correct type. We might want to use infer_type() so users can pass in e.g. integer() like in the .ptype example in the dplyr tests. To do this, we can implement infer_type.DataType which just passes the input object back out - then users can input either R objects or Arrow datatypes to this function.

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting committer review Awaiting committer review labels May 9, 2023
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.

Thanks!

@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting changes Awaiting changes labels May 10, 2023
@eitsupi
Copy link
Contributor

eitsupi commented May 10, 2023

Doesn't the note need to be described this way?

notes = c(
"accepts a `unit` argument not present in the `base` function.",
'Valid values are "s", "ms" (default), "us", "ns".'
)

@thisisnic thisisnic merged commit 1a038ad into apache:main May 11, 2023
@ursabot
Copy link

ursabot commented May 11, 2023

Benchmark runs are scheduled for baseline = dec4453 and contender = 1a038ad. 1a038ad 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 ⬇️2.76% ⬆️0.03%] test-mac-arm
[Failed ⬇️0.0% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.42% ⬆️0.06%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] 1a038ada ec2-t3-xlarge-us-east-2
[Finished] 1a038ada test-mac-arm
[Failed] 1a038ada ursa-i9-9960x
[Finished] 1a038ada ursa-thinkcentre-m75q
[Finished] dec44537 ec2-t3-xlarge-us-east-2
[Finished] dec44537 test-mac-arm
[Finished] dec44537 ursa-i9-9960x
[Finished] dec44537 ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

@ursabot
Copy link

ursabot commented May 11, 2023

['Python', 'R'] benchmarks have high level of regressions.
test-mac-arm

ArgusLi pushed a commit to Bit-Quill/arrow that referenced this pull request May 15, 2023
…lyr (apache#35502)

This PR implements the `.default` argument for `case_when` and raises errors if non-NULL values are supplied for `.ptype` and `.size`.  
* Closes: apache#32282

Authored-by: Nic Crane <thisisnic@gmail.com>
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] Update case_when() binding to match changes in dplyr

4 participants