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

Don't truncate BigInts #268

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gabegorelick
Copy link

BigInts are currently converted to JS Numbers, which can't fit values over 2**53.

Fixes #259

This is a breaking change, and I don't expect this to be merged as-is (it might make sense to make this change in behavior opt in for now). But hopefully this can spur discussion.

Comment on lines 55 to 57
if (value instanceof Int64) {
return value.toNumber();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, these lines has to be kept, but instead of converting Int64 to Number it has to be converted to BigInt

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

BigInts are currently converted to JS Numbers, which can't fit values
over 2**53.

Fixes databricks#259
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

Successfully merging this pull request may close these issues.

BigNumbers/BigInt not handled
2 participants