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

Standardise on bit64 package? #156

Closed
hadley opened this issue Feb 1, 2017 · 5 comments
Closed

Standardise on bit64 package? #156

hadley opened this issue Feb 1, 2017 · 5 comments

Comments

@hadley
Copy link
Member

hadley commented Feb 1, 2017

I think it's the best of the options because you can easily convert it to doubles (losing some precision) or characters (if you want to treat as ids).

@bquinart
Copy link

bquinart commented Feb 7, 2017

From a recent thread on R-devel I understand base R will not support 64 bit integers soon. Do we know if there is a specific reason to not try to address this in base R?
I lack any insight regarding appropriateness of bit64 packake. But I would be very happy if the problem is solved within reasonable timing.

@hadley
Copy link
Member Author

hadley commented Feb 7, 2017

We can not address it in base R, and R-core doesn't seem interested, so the question is moot. All we can do is promote the best-of-bad solutions.

@krlmlr
Copy link
Member

krlmlr commented Feb 28, 2017

With bit64 it's very easy to end up with wrong values, just strip the class attribute. I was considering a dedicated S3 class that stores lossless data in an attribute and provides as.character() and perhaps as.integer64() methods.

As for the specs, they will just ensure that conversion to character() and perhaps integer64 is lossless. This gives the implementer some freedom, and we may revisit the specs later.

@hadley
Copy link
Member Author

hadley commented Feb 28, 2017

@krlmlr yes, it's a little dangerous, but a lot of work has already been done with bit64. I think it's the best of a bad set of solutions. I think coming up with our own solution is out of scope.

@krlmlr
Copy link
Member

krlmlr commented Apr 5, 2017

With the current specs, DBI backends can implement 64-bit support with the bit64 package -- all we specify is that as.numeric() gives the (approximated) value and as.character() gives the accurate value. Both is fulfilled by the bit64 implementation.

@krlmlr krlmlr closed this as completed Apr 5, 2017
@github-actions github-actions bot locked and limited conversation to collaborators Oct 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants