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

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

Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/987#discussion_r144914241
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/OperatorWrapper.java
 ---
    @@ -76,12 +77,14 @@ public String getId() {
       public String getContent() {
         TableBuilder builder = new TableBuilder(OPERATOR_COLUMNS, 
OPERATOR_COLUMNS_TOOLTIP, true);
     
    +    Map<String, String> attributeMap = new HashMap<String, String>(); 
//Reusing for different fragments
         for (ImmutablePair<ImmutablePair<OperatorProfile, Integer>, String> ip 
: opsAndHosts) {
           int minor = ip.getLeft().getRight();
           OperatorProfile op = ip.getLeft().getLeft();
     
    +      attributeMap.put("data-order", String.valueOf(minor)); //Overwrite 
values from previous fragments
    --- End diff --
    
    Not clear on how this works. If we are sorting on a string value, then the 
values must be zero padded so that 02 comes before 11. Otherwise, order will be 
1, 10, 11, 2, 3.


> 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