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

Large numbers are getting rounded in sql tables

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 0.8.0
    • None
    • GUI
    • 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

              Unassigned Unassigned
              uzadude Ohad Raviv
              Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: