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

Robert Hou commented on DRILL-5898:
-----------------------------------

Boaz, you are correct.  The order shown in the output is not correct.  The test 
framework handles order by verification separately, so what you see is not the 
order in which the results are displayed.  We do this because on a distributed 
cluster, if a query does not have an order by clause (majority of our tests), 
then results can be returned in any order, and can differ from run to run.  So 
we can display the order of the results in various orders.

I ran the query through sqlline, and the order is displayed correctly.  If we 
detected an incorrect order, then a different error message would have appeared.



> Query returns columns in the wrong order
> ----------------------------------------
>
>                 Key: DRILL-5898
>                 URL: https://issues.apache.org/jira/browse/DRILL-5898
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Relational Operators
>    Affects Versions: 1.11.0
>            Reporter: Robert Hou
>            Assignee: Robert Hou
>            Priority: Blocker
>             Fix For: 1.12.0
>
>
> This is a regression.  It worked with this commit:
> {noformat}
> f1d1945b3772bb782039fd6811e34a7de66441c8      DRILL-5582: C++ Client: [Threat 
> Modeling] Drillbit may be spoofed by an attacker and this may lead to data 
> being written to the attacker's target instead of Drillbit
> {noformat}
> It fails with this commit, although there are six commits total between the 
> last good one and this one:
> {noformat}
> b0c4e0486d6d4620b04a1bb8198e959d433b4840      DRILL-5876: Use openssl profile 
> to include netty-tcnative dependency with the platform specific classifier
> {noformat}
> Query is:
> {noformat}
> select * from 
> dfs.`/drill/testdata/tpch100_dir_partitioned_50000files/lineitem` where 
> dir0=2006 and dir1=12 and dir2=15 and l_discount=0.07 order by l_orderkey, 
> l_extendedprice limit 10
> {noformat}
> Columns are returned in a different order.  Here are the expected results:
> {noformat}
> foxes. furiously final ideas cajol    1994-05-27      0.07    1731.42 4       
> F       653442  4965666.0       1.0     1994-06-23      A       1994-06-22    
>   NONE    SHIP    215671  0.07    2006    12      15 (1 time(s))
> lly final account     1994-11-09      0.07    45881.78        3       F       
> 653412  1.320809E7      46.0    1994-11-24      R       1994-11-08      TAKE 
> BACK RETURN        REG AIR 458104  0.08    2006    12      15 (1 time(s))
>  the asymptotes       1997-12-29      0.07    60882.8 6       O       653413  
> 1.4271413E7     44.0    1998-02-04      N       1998-01-20      DELIVER IN 
> PERSON       MAIL    21456   0.05    2006    12      15 (1 time(s))
> carefully a   1996-09-23      0.07    5381.88 2       O       653378  
> 1.6702792E7     3.0     1996-11-14      N       1996-10-15      NONE    REG 
> AIR 952809  0.05    2006    12      15 (1 time(s))
> ly final requests. boldly ironic theo 1995-09-04      0.07    2019.94 2       
> O       653380  2416094.0       2.0     1995-11-14      N       1995-10-18    
>   COLLECT COD     FOB     166101  0.02    2006    12      15 (1 time(s))
> alongside of the even, e      1996-02-14      0.07    86140.32        2       
> O       653409  5622872.0       48.0    1996-05-02      N       1996-04-22    
>   NONE    SHIP    372888  0.04    2006    12      15 (1 time(s))
> es. regular instruct  1996-10-18      0.07    25194.0 1       O       653382  
> 6048060.0       25.0    1996-08-29      N       1996-08-20      DELIVER IN 
> PERSON       AIR     798079  0.0     2006    12      15 (1 time(s))
> en package    1993-09-19      0.07    18718.32        2       F       653440  
> 1.372054E7      12.0    1993-09-12      A       1993-09-09      DELIVER IN 
> PERSON       TRUCK   970554  0.0     2006    12      15 (1 time(s))
> ly regular deposits snooze. unusual, even     1998-01-18      0.07    
> 12427.92        1       O       653413  2822631.0       8.0     1998-02-09    
>   N       1998-02-05      TAKE BACK RETURN        REG AIR 322636  0.01    
> 2006    12      15 (1 time(s))
>  ironic ideas. bra    1996-10-13      0.07    64711.53        3       O       
> 653383  6806672.0       41.0    1996-12-06      N       1996-11-10      TAKE 
> BACK RETURN        AIR     556691  0.01    2006    12      15 (1 time(s))
> {noformat}
> Here are the actual results:
> {noformat}
> 2006  12      15      653383  6806672 556691  3       41.0    64711.53        
> 0.07    0.01    N       O       1996-11-10      1996-10-13      1996-12-06    
>   TAKE BACK RETURN        AIR      ironic ideas. bra
> 2006  12      15      653378  16702792        952809  2       3.0     5381.88 
> 0.07    0.05    N       O       1996-10-15      1996-09-23      1996-11-14    
>   NONE    REG AIR carefully a
> 2006  12      15      653380  2416094 166101  2       2.0     2019.94 0.07    
> 0.02    N       O       1995-10-18      1995-09-04      1995-11-14      
> COLLECT COD     FOB     ly final requests. boldly ironic theo
> 2006  12      15      653413  2822631 322636  1       8.0     12427.92        
> 0.07    0.01    N       O       1998-02-05      1998-01-18      1998-02-09    
>   TAKE BACK RETURN        REG AIR ly regular deposits snooze. unusual, even 
> 2006  12      15      653382  6048060 798079  1       25.0    25194.0 0.07    
> 0.0     N       O       1996-08-20      1996-10-18      1996-08-29      
> DELIVER IN PERSON       AIR     es. regular instruct
> 2006  12      15      653442  4965666 215671  4       1.0     1731.42 0.07    
> 0.07    A       F       1994-06-22      1994-05-27      1994-06-23      NONE  
>   SHIP    foxes. furiously final ideas cajol
> 2006  12      15      653413  14271413        21456   6       44.0    60882.8 
> 0.07    0.05    N       O       1998-01-20      1997-12-29      1998-02-04    
>   DELIVER IN PERSON       MAIL     the asymptotes
> 2006  12      15      653412  13208090        458104  3       46.0    
> 45881.78        0.07    0.08    R       F       1994-11-08      1994-11-09    
>   1994-11-24      TAKE BACK RETURN        REG AIR lly final account
> 2006  12      15      653440  13720540        970554  2       12.0    
> 18718.32        0.07    0.0     A       F       1993-09-09      1993-09-19    
>   1993-09-12      DELIVER IN PERSON       TRUCK   en package
> 2006  12      15      653409  5622872 372888  2       48.0    86140.32        
> 0.07    0.04    N       O       1996-04-22      1996-02-14      1996-05-02    
>   NONE    SHIP    alongside of the even, e
> {noformat}



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

Reply via email to