CJWorkbench / cjworkbench

The data journalism platform with built in training
http://workbenchdata.com
Other
306 stars 45 forks source link

64-bit integers are rounded before displaying #220

Open adamhooper opened 3 years ago

adamhooper commented 3 years ago

Steps to reproduce:

  1. Add a Twitter Step
  2. Duplicate the "id" column and convert it to text

Expected results: the Text "id" column and Number "id" column have the same values Actual results: the Text "id" values are correct; the Number ones are incorrect

The problem: we send 64-bit integers as JSON, and the browser's parser converts them to Float and then converts them back to Integer to display them -- losing precision.

Solution: let's use a BigInt-compatible library for parsing JSON table data from the server.