You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by GitBox <gi...@apache.org> on 2019/09/24 03:58:13 UTC

[GitHub] [zeppelin] prabhjyotsingh commented on a change in pull request #3425: [ZEPPELIN-4301] js double precision loss problem

prabhjyotsingh commented on a change in pull request #3425: [ZEPPELIN-4301]  js double precision loss problem
URL: https://github.com/apache/zeppelin/pull/3425#discussion_r327418103
 
 

 ##########
 File path: zeppelin-web/src/app/tabledata/tabledata.js
 ##########
 @@ -60,7 +60,7 @@ export default class TableData extends Dataset {
         } else {
           let valueOfCol;
           if (!(col[0] === '0' || col[0] === '+' || col.length > float64MaxDigits)) {
-            if (!isNaN(valueOfCol = parseFloat(col)) && isFinite(col)) {
+            if (!isNaN(valueOfCol = col) && isFinite(col)) {
 
 Review comment:
   Will changing this (removing `parseFloat`) matter in this case? If I understand it right, ideally it should not even come to this if.
   Which makes me wonder what is `typeof col`, ideally that should be string, and if it was a string and `col.length` in this case should have been 19, which is greater than 16 (float64MaxDigits). 
   Also if it is not a string then that a limitation of JS itself, as this is what I see on my browser console:
   ```
   let col=6703273802681287331;
   console.log(col);
   6703273802681288000
   ```
   
   Will try to repro this using JDBC interpreter,  what I used to test is the following paragraph:
   ```
   %sh
   echo -e "%table id\tage"
   echo -e "6703273802681287331\t2"
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services