Redash: Redash transform integer wrong, like, select 331451557290541101

Created on 4 Jul 2018  Â·  5Comments  Â·  Source: getredash/redash

Execute sql :

select 331451557290541101 

the result: 331,451,557,290,541,120.00, they are not equal.

Redash can not support the type of bigint. l think it's a bug.

Technical details:

  • Redash Version: 4.0.1
  • Browser/OS: chrome
  • How did you install Redash: developer user-defined

All 5 comments

Hi @guzhenping.

Probably, because the number exceeds the max number which will be able to treat as JSON.

For example select 9007199254740992 returns 9,007,199,254,740,992. But select 9007199254740993 returns 9,007,199,254,740,992.

To fix this, first, parses as a string when making the response and returns it in server-side. Second, parse as a string and display as an integer in client-side.

Hitting the same issue on version 7 (obviously because nothing has changed since this issue was discovered)
Screen Shot 2019-05-30 at 12 10 10

Bump. Any update on this? Pretty annoying, our users are getting confused.

I reproduced this on our preview instance.

Looks like we can address this with https://www.npmjs.com/package/json-bigint. Just need to figure out if there are any performance implications.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Leedorado picture Leedorado  Â·  3Comments

dclong picture dclong  Â·  4Comments

alison985 picture alison985  Â·  3Comments

dersphere picture dersphere  Â·  4Comments

koooge picture koooge  Â·  3Comments