You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by "Anton (JIRA)" <ji...@apache.org> on 2017/02/14 03:34:41 UTC

[jira] [Created] (ZEPPELIN-2111) Table display is losing precision on large integers, even if it is cast as a string

Anton created ZEPPELIN-2111:
-------------------------------

             Summary: Table display is losing precision on large integers, even if it is cast as a string
                 Key: ZEPPELIN-2111
                 URL: https://issues.apache.org/jira/browse/ZEPPELIN-2111
             Project: Zeppelin
          Issue Type: Bug
          Components: front-end
    Affects Versions: 0.6.2
            Reporter: Anton
            Priority: Minor


When displaying large integers in the table display, it rounds as if it was double precision.

This does not happen with spark. See below for an example:
{noformat}
// This code produces the correct results
spark.sql("""select 2010090230001410131
    ,   cast("2010090230001410131" as string)
    ,   cast("S2010090230001410131" as string)
    ,   cast(2010090230001410131 as bigint)""").show

+-------------------+-----------------------------------+------------------------------------+-----------------------------------+
|2010090230001410131|CAST(2010090230001410131 AS STRING)|CAST(S2010090230001410131 AS STRING)|CAST(2010090230001410131 AS BIGINT)|
+-------------------+-----------------------------------+------------------------------------+-----------------------------------+
|2010090230001410131|                2010090230001410131|                S2010090230001410131|                2010090230001410131|
+-------------------+-----------------------------------+------------------------------------+-----------------------------------+
{noformat}

However if we display the dataframe above using Zeppelin's table mode, we get a different result.
{noformat}
%sql
select  2010090230001410131
    ,   cast("2010090230001410131" as string)
    ,   cast("S2010090230001410131" as string)
    ,   cast(2010090230001410131 as bigint)
{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)