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

Table display is losing precision on large integers, even if it is cast as a string

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Cannot Reproduce
    • 0.6.2
    • None
    • front-end

    Description

      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:

      // 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|
      +-------------------+-----------------------------------+------------------------------------+-----------------------------------+
      

      However if we display the dataframe above using Zeppelin's table mode, we get a different result.

      %sql
      select  2010090230001410131
          ,   cast("2010090230001410131" as string)
          ,   cast("S2010090230001410131" as string)
          ,   cast(2010090230001410131 as bigint)
      

      Attachments

        1. screenshot-1.png
          264 kB
          Hoon Park

        Issue Links

          Activity

            People

              1ambda Hoon Park
              Antonbl Anton
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: