[ 
https://issues.apache.org/jira/browse/DRILL-5863?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16201265#comment-16201265
 ] 

ASF GitHub Bot commented on DRILL-5863:
---------------------------------------

GitHub user kkhatua opened a pull request:

    https://github.com/apache/drill/pull/987

    DRILL-5863: Sortable table incorrectly sorts fragments/time lexically

    The DataTables jQuery library sorts data based on the value of the element 
in a column.
    However, since Drill publishes sortable items like fragment IDs and time 
durations as non-numeric text, the sorting is incorrect. 
    This PR fixes the fragment and duration ordering based on their implicit 
numeric values (minor ID and millisecond representation, respectively).

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kkhatua/drill DRILL-5863

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/drill/pull/987.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #987
    
----
commit dee20aae602f86d14ddb832e7185499556c6a1e1
Author: Kunal Khatua <[email protected]>
Date:   2017-10-12T00:17:03Z

    DRILL-5863: Sortable table incorrectly sorts fragments/time lexically
    
    The DataTables jQuery library sorts data based on the value of the element 
in a column.
    However, since Drill publishes sortable items like fragment IDs and time 
durations as non-numeric text, the sorting is incorrect. 
    This PR fixes the fragment and duration ordering based on their implicit 
numeric values (minor ID and millisecond representation, respectively).

----


> Sortable table incorrectly sorts minor fragments and time elements lexically 
> instead of sorting by implicit value
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: DRILL-5863
>                 URL: https://issues.apache.org/jira/browse/DRILL-5863
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Web Server
>    Affects Versions: 1.12.0
>            Reporter: Kunal Khatua
>            Assignee: Kunal Khatua
>            Priority: Minor
>             Fix For: 1.12.0
>
>
> The fix for this is to use dataTable library's {{data-order}} attribute for 
> the data elements that need to sort by an implicit value.
> ||Old order of Minor Fragment||New order of Minor Fragment||
> |...|...|
> |01-09-01  | 01-09-01|
> |01-10-01  | 01-10-01|
> |01-100-01 | 01-11-01|
> |01-101-01 | 01-12-01|
> |... | ... |
> ||Old order of Duration||New order of Duration|||
> |...|...|
> |1m15s  | 55.03s|
> |55s  | 1m15s|
> |...|...|



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to