Skip to content

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

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