Ohad Raviv created ZEPPELIN-3574: ------------------------------------ Summary: Large numbers are getting rounded in sql tables Key: ZEPPELIN-3574 URL: https://issues.apache.org/jira/browse/ZEPPELIN-3574 Project: Zeppelin Issue Type: Improvement Components: GUI Affects Versions: 0.8.0 Reporter: Ohad Raviv
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] {code:java} if (!isNaN(valueOfCol = parseFloat(col)) && isFinite(col)) ..{code} 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: {code:java} let valueOfCol = Number(col); if (valueOfCol > Number.MAX_SAFE_INTEGER || valueOfCol < Number.MIN_SAFE_INTEGER) { valueOfCol = col; } cols.push(valueOfCol);{code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)