Uploaded image for project: 'Zeppelin'
  1. Zeppelin
  2. ZEPPELIN-3972

Inaccurate result values in UI with BigInt values

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.8.0
    • None
    • front-end
    • None

    Description

      We are trying to display data from sql table using sql interpreter and found out that it is not possible to display numbers higher than Number.MAX_SAFE_INTEGER due to the way how results are being parsed in frontend. As a result, if we have large number in DB, zeppelin UI will display it wrong.

       

      In file apache-zeppelin/zeppelin-web/src/app/tabledata/tabledata.js  there is following piece of code in method loadParagraphResult

       if (!isNaN(valueOfCol = parseFloat(col)) && isFinite(col)) {
                  col = valueOfCol;
       }
      

      The problem is that in JS, following code:

      parseFloat("1234567890123456785", 10)
      

      returns 1234567890123456800 so the displayed results are not accurate. I think it should be possible to use e.g. BigInt [1] or maybe even avoid casting the value to number completely?

      [1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt

      Attachments

        Activity

          People

            Unassigned Unassigned
            vriha Láďa Říha
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: