drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Khurram Faraaz <kfar...@mapr.com>
Subject Re: Column ordering is incorrect when ORDER BY is used with LIMIT clause in query over parquet data
Date Tue, 07 Feb 2017 16:36:02 GMT
Can someone please look at this. Is this a bug ?


Thanks,

Khurram

________________________________
From: Khurram Faraaz <kfaraaz@mapr.com>
Sent: Monday, February 6, 2017 2:52:25 PM
To: dev@drill.apache.org
Subject: Column ordering is incorrect when ORDER BY is used with LIMIT clause in query over
parquet data

All,


This looks incorrect.


Query with order by + limit clause, the ordering of the columns returned in the query results
is NOT the same as the column ordering in the parquet file.


{noformat}

0: jdbc:drill:schema=dfs.tmp> SELECT * FROM typeall_l ORDER BY col_int limit 1;
+----------+----------+-------------+------------+----------+-----------------+----------------+-----------+------------------------+----------------+-------------+
| col_bln  | col_chr  |   col_dt    |  col_flt   | col_int  | col_intrvl_day  | col_intrvl_yr
 |  col_tim  |       col_tmstmp       |   col_vrchr1   | col_vrchr2  |
+----------+----------+-------------+------------+----------+-----------------+----------------+-----------+------------------------+----------------+-------------+
| false    | MI       | 1967-05-01  | 32.901897  | 0        | P12DT20775S     | P196M    
     | 19:50:17  | 2004-10-15 17:49:36.0  | Felecia Gourd  | NLBQMg9     |
+----------+----------+-------------+------------+----------+-----------------+----------------+-----------+------------------------+----------------+-------------+
1 row selected (0.279 seconds)

{noformat}

Without the ORDER BY clause the columns are returned in correct order, same as the ordering
in the parquet file.

{noformat}
0: jdbc:drill:schema=dfs.tmp> SELECT * FROM typeall_l limit 1;
+----------+----------+----------------+---------------------------------------------------------------------------------------------------------------------+-------------+-----------+------------------------+------------+----------------+-----------------+----------+
| col_int  | col_chr  |   col_vrchr1   |                                                 
   col_vrchr2                                                      |   col_dt    |  col_tim
 |       col_tmstmp       |  col_flt   | col_intrvl_yr  | col_intrvl_day  | col_bln  |
+----------+----------+----------------+---------------------------------------------------------------------------------------------------------------------+-------------+-----------+------------------------+------------+----------------+-----------------+----------+
| 45436    | WV       | John Mcginity  | Rhbf6VFLJguvH9ejrWNkY1CDO8QqumTZAGjwa9cHfjBnLmNIWvo9YfcGObxbeXwa1NkemW9ULxsq5293wEA2v5FFCduwt03D7ysI3RlH8b4B0XAPKY
 | 2011-11-04  | 18:02:26  | 1988-09-23 16:58:42.0  | 10.193293  | P314M          | P26DT27386S
    | false    |
+----------+----------+----------------+---------------------------------------------------------------------------------------------------------------------+-------------+-----------+------------------------+------------+----------------+-----------------+----------+
1 row selected (0.22 seconds)


{noformat}


Thanks,

Khurram

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message