You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by "Jens Rabe (JIRA)" <ji...@apache.org> on 2019/01/15 10:07:00 UTC

[jira] [Created] (ZEPPELIN-3948) Sorting of double columns incorrect - the whole numbers come first

Jens Rabe created ZEPPELIN-3948:
-----------------------------------

             Summary: Sorting of double columns incorrect - the whole numbers come first
                 Key: ZEPPELIN-3948
                 URL: https://issues.apache.org/jira/browse/ZEPPELIN-3948
             Project: Zeppelin
          Issue Type: Bug
    Affects Versions: 0.8.0
            Reporter: Jens Rabe
         Attachments: 2019-01-15 11_05_32-ReportVorbereitung - Zeppelin.png

When having a double value as an X axis, the chart is sorted incorrectly. e.g., if there are values 0.1, 0.2, ..., 1, 1.1, 1.2, ..., 2, there will first be 1, 2, 3, ..., then 0.1, 0.2, ...

Steps to reproduce:
 # Start a new notebook with *spark* interpreter
 # Submit the following:

{code:java}
sc.parallelize(0 until 100).map(x => (x.toDouble / 10.0, x)).toDF("x", "y").createOrReplaceTempView("sortbug"){code}

 # In the next block, use SQL and submit:

{code:java}
%sql select * from sortbug order by x{code}

 # Switch the table to bar chart.

Expected: The bar chart is sorted by x correctly (0, 0.1, 0.2, ..., 1, 1.1, ...)

Actual: There is first 0, 1, 2, ..., 9, then 0.1, 0.2, 0.3, ..., 0.9, 1.1, 1.2, ...

See attachment.

!2019-01-15 11_05_32-ReportVorbereitung - Zeppelin.png!



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)