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

Big integers in Opal become NA #17

Open
tomkuipers1402 opened this issue Aug 18, 2022 · 2 comments
Open

Big integers in Opal become NA #17

tomkuipers1402 opened this issue Aug 18, 2022 · 2 comments

Comments

@tomkuipers1402
Copy link

Hi,

I have a problem with retrieving large numbers using opal.table_get().
In my Opal db I have a column with value type "integer", e.g., 11433052800. When retrieving a table with these values using opal.table_get() the created dataframe only contains NA for these large numbers. As a test I tried converting the value type to decimal, which works but is not a permanent solution. Also, because my values will then look like, e.g., 1.14330528E10 (which is not informative for me).

Hope you might know what's going on! Thanks!

@ymarcon
Copy link
Member

ymarcon commented Aug 18, 2022

A big integer will not fit in R: https://rdrr.io/r/base/integer.html

Note that current implementations of R use 32-bit integers for integer vectors, so the range of representable integers is restricted to about +/-2*10^9: doubles can hold much larger integers exactly.

that is why the decimal type works because it is mapped to a double in R.

As per the "1.14330528E10" value, this is the default string representation of a java's Double object.

@tomkuipers1402
Copy link
Author

Aha I see. Any chance I can change the default behavior for java's Double notation in Opal?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants