FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Don't truncate BigInts by gabegorelick · Pull Request #268 · databricks/databricks-sql-nodejs · GitHub

Don't truncate BigInts - #268

Open
gabegorelick wants to merge 1 commit into
databricks:mainfrom
gabegorelick:bigint-truncation
Open

Don't truncate BigInts#268
gabegorelick wants to merge 1 commit into
databricks:mainfrom
gabegorelick:bigint-truncation

Conversation

Copy link
Copy Markdown

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 thread lib/result/utils.ts
Comment on lines -55 to -57
if (value instanceof Int64) {
return value.toNumber();
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Updated

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

Fixes databricks#259
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL