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

[Bug]: bigint values missing precision #2966

Open
JWambaugh opened this issue Jan 2, 2025 · 0 comments
Open

[Bug]: bigint values missing precision #2966

JWambaugh opened this issue Jan 2, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@JWambaugh
Copy link

Describe the bug

When reading a bigint value from my mysql database, bigint values are losing their precision inside of evidence.

For example:
Mysql database: 1498392753700442114
In Evidence: 1498392753700442000

In my use case, string values are sufficient, so I was able to work around this issue by converting it to a char in my source query:

    CONVERT(twitter_id, char) as twitter_id,

Steps to Reproduce

  • Create a table in MYSQL with a BIGINT column.
  • Insert a row with a large integer like 1498392753700442114
  • add the table as a source to evidence.
  • Read the value in evidence. It will lose precision and give a value like 1498392753700442000

Logs

System Info

System:
    OS: macOS 15.0
    CPU: (8) arm64 Apple M1 Pro
    Memory: 64.88 MB / 16.00 GB
    Shell: 0.99.1 - /opt/homebrew/bin/nu
  Binaries:
    Node: 20.16.0 - ~/.nvm/versions/node/v20.16.0/bin/node
    Yarn: 1.22.22 - ~/.nvm/versions/node/v20.16.0/bin/yarn
    npm: 10.8.1 - ~/.nvm/versions/node/v20.16.0/bin/npm
    Watchman: 2024.01.22.00 - /opt/homebrew/bin/watchman
  Browsers:
    Chrome: 131.0.6778.205
    Edge: 131.0.2903.112
    Safari: 18.0
  npmPackages:
    @evidence-dev/bigquery: ^2.0.9 => 2.0.9 
    @evidence-dev/core-components: ^5.0.3 => 5.0.3 
    @evidence-dev/csv: ^1.0.14 => 1.0.14 
    @evidence-dev/databricks: ^1.0.8 => 1.0.8 
    @evidence-dev/duckdb: ^1.0.13 => 1.0.13 
    @evidence-dev/evidence: ^40.0.3 => 40.0.3 
    @evidence-dev/motherduck: ^1.0.4 => 1.0.4 
    @evidence-dev/mssql: ^1.1.2 => 1.1.2 
    @evidence-dev/mysql: ^1.1.4 => 1.1.4 
    @evidence-dev/postgres: ^1.0.7 => 1.0.7 
    @evidence-dev/snowflake: ^1.2.2 => 1.2.2 
    @evidence-dev/sqlite: ^2.0.7 => 2.0.7 
    @evidence-dev/trino: ^1.0.9 => 1.0.9

Severity

serious, but I can work around it

Additional Information, or Workarounds

Converting the value to a char in the source lets me get the full-precision value as a string, which works for my use case, but it could be problematic if I was trying to put it into a graph.

@JWambaugh JWambaugh added bug Something isn't working to-review Evidence team to review labels Jan 2, 2025
@archiewood archiewood removed the to-review Evidence team to review label Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants