sqltools-bigquery-driver icon indicating copy to clipboard operation
sqltools-bigquery-driver copied to clipboard

BIGINT types lose precision above safe integer limit

Open archiewood opened this issue 1 year ago • 3 comments

SELECT 9223372036854775807 AS max_bigint;

Expected

max_bigint
---
9223372036854775807

Result

max_bigint
---
9223372036854776000

archiewood avatar Sep 17 '24 10:09 archiewood

I am having this issue as well. Mysql database: 1498392753700442114 In Evidence: 1498392753700442000

For my usecase, I'd be fine if there was a way to get the value as a string instead.

EDIT: I worked around this by converting the bigint value to char in my source sql:

    CONVERT(twitter_id, char) as twitter_id,

JWambaugh avatar Jan 02 '25 22:01 JWambaugh

I think you meant to post this at https://github.com/evidence-dev/evidence?

archiewood avatar Jan 02 '25 23:01 archiewood

I think you meant to post this at https://github.com/evidence-dev/evidence?

Ah yes, my bad. google took me here. Feel free to delete my comments

JWambaugh avatar Jan 02 '25 23:01 JWambaugh