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

Large numbers are getting rounded in sql tables

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 0.8.0
    • Fix Version/s: None
    • Component/s: GUI
    • Labels:
      None

      Description

      in spark.sql we 're getting wrong (rounded) display for relatively large numbers, 

      for example: 

      %spark.sql

      select '2176329053680287235' 

      displays:

      2176329053680287200

      that is critical as all our IDs are wrong.

      we tracked the source of it to:

      https://github.com/apache/zeppelin/blob/master/zeppelin-web/src/app/tabledata/tabledata.js#L63

      if (!isNaN(valueOfCol = parseFloat(col)) && isFinite(col)) ..

      because the number is bigger than max float, it should be like it was in:

      https://github.com/apache/zeppelin/blob/master/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js#L1258

      somthing like:

      let valueOfCol = Number(col);
      if (valueOfCol > Number.MAX_SAFE_INTEGER || valueOfCol < Number.MIN_SAFE_INTEGER) {
      valueOfCol = col;
      }
      cols.push(valueOfCol);

       

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                uzadude Ohad Raviv
              • Votes:
                8 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated: