Skip to content
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

ARROW-12283: [R] Bindings for basic type convert functions in dplyr verbs #9942

Closed
wants to merge 3 commits into from

Conversation

ianmcook
Copy link
Member

@ianmcook ianmcook commented Apr 7, 2021

This adds support for as.character(), as.double(), as.integer(), bit64::as.integer64(), as.logical(), and as.numeric() in dplyr

@nealrichardson
Copy link
Member

On the one hand, this is helpful and if nothing else may prevent some cryptic errors. On the other hand, it's a little inconsistent because they don't actually yield character (e.g.) vectors, and I wonder if that will cause other unexpected behavior. It's also different (FWIW) from the same methods on Array defined outside of dplyr (which may or may not be very useful): https://github.com/apache/arrow/blob/master/r/R/arrow-datum.R#L138-L145

Do dbplyr backends typically include these?

@ianmcook
Copy link
Member Author

ianmcook commented Apr 7, 2021

I think these are important for basic usability of any dplyr backend. dbplyr defines them for all of the major databases (https://github.com/tidyverse/dbplyr/search?q=%22as.numeric%22+backend) and many other dplyr backends do too. I hear your qualms about mixing R and Arrow paradigms, but I think practically speaking these are too important not to implement.

@github-actions
Copy link

github-actions bot commented Apr 7, 2021

@ianmcook
Copy link
Member Author

ianmcook commented Apr 8, 2021

I created ARROW-12292 for us to reconsider whether the ArrowDatum methods of the same names should perhaps behave differently

GeorgeAp pushed a commit to sirensolutions/arrow that referenced this pull request Jun 7, 2021
…erbs

This adds support for `as.character()`, `as.double()`, `as.integer()`, `bit64::as.integer64()`, `as.logical()`, and `as.numeric()` in dplyr

Closes apache#9942 from ianmcook/ARROW-12283

Authored-by: Ian Cook <ianmcook@gmail.com>
Signed-off-by: Neal Richardson <neal.p.richardson@gmail.com>
michalursa pushed a commit to michalursa/arrow that referenced this pull request Jun 10, 2021
…erbs

This adds support for `as.character()`, `as.double()`, `as.integer()`, `bit64::as.integer64()`, `as.logical()`, and `as.numeric()` in dplyr

Closes apache#9942 from ianmcook/ARROW-12283

Authored-by: Ian Cook <ianmcook@gmail.com>
Signed-off-by: Neal Richardson <neal.p.richardson@gmail.com>
michalursa pushed a commit to michalursa/arrow that referenced this pull request Jun 13, 2021
…erbs

This adds support for `as.character()`, `as.double()`, `as.integer()`, `bit64::as.integer64()`, `as.logical()`, and `as.numeric()` in dplyr

Closes apache#9942 from ianmcook/ARROW-12283

Authored-by: Ian Cook <ianmcook@gmail.com>
Signed-off-by: Neal Richardson <neal.p.richardson@gmail.com>
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