You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Zhiyong Liu (JIRA)" <ji...@apache.org> on 2014/05/19 19:38:38 UTC

[jira] [Commented] (DRILL-495) Drill does not return columns in appropriate order for select all and aggregate selects

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

Zhiyong Liu commented on DRILL-495:
-----------------------------------

Updates:
This has been fixed for the following query:

 select * from voter where age <=20;

But column order issue also happens with the following query:

select p.p_mfgr as mfgr, count(*) as mycount                                                              
   from part p                                                                                            
   where p.p_size < 100                                                                                   
              and p.p_type like '%NICKEL'                                                                 
group by p.p_mfgr                                                                                         
order by 1

on build:

git.commit.id.abbrev=70fab8c
git.commit.id=70fab8c968a6dc05471aa1f32009cd15945d4f3d

> Drill does not return columns in appropriate order for select all and aggregate selects
> ---------------------------------------------------------------------------------------
>
>                 Key: DRILL-495
>                 URL: https://issues.apache.org/jira/browse/DRILL-495
>             Project: Apache Drill
>          Issue Type: Bug
>    Affects Versions: 1.0.0
>         Environment: CentOS release 6.5
>            Reporter: Krystal
>
> I have a parquet file with the following columns:
> rownum  name   age   registration   contributions   voterzone   create_time
> I ran the following query via jdbc/sqlline:
> select * from voter where age <=20;
> I would expect the columns returned are the same as the order in the parquet data file.  However the returned result is as follows:
> 0: jdbc:drill:schema=dfs> select * from voter where age <=20;
> +------------+------------+---------------+------------+------------+--------------+-------------+
> |   rownum   |    age     | contributions | voterzone  |    name    | registration | create_time |
> +------------+------------+---------------+------------+------------+--------------+-------------+
> | 3          | 18         | 128.2         | 8750       | [B@3a942c3a | [B@55e3b1e1  | [B@57b356d4 |
> | 22         | 19         | 16.25         | 27833      | [B@3f09a547 | [B@1241f8a6  | [B@292b63a7 |
> | 57         | 19         | 265.9         | 11041      | [B@5f9b7e0e | [B@5970fa2b  | [B@8384aed  |
> | 59         | 18         | 835.31        | 11276      | [B@27bf11d2 | [B@712b0660  | [B@3fafc2ab |
> | 60         | 20         | 53.19         | 7506       | [B@2c158937 | [B@39e3907d  | [B@b231c3c  |
> | 70         | 18         | 94.03         | 12853      | [B@2e12acda | [B@4c1233d7  | [B@3f098f45 |
> | 85         | 19         | 497.94        | 8981       | [B@c9d1b58 | [B@1e6e34e0  | [B@55516dbb |
> I observed the same column ordering problem when using aggregates in the select statement.  For example:
> 0: jdbc:drill:schema=dfs> select name as col1, sum(contributions) as col2 from voter group by name order by name;
> +------------+------------+
> |    col2    |    col1    |
> +------------+------------+
> | 412.64     | [B@e2d9423 |
> | 777.23     | [B@52588d1a |
> | 4024.16    | [B@3397d032 |
> | 1417.0300000000002 | [B@33e59d14 |
> The columns returned should be col1 col2.



--
This message was sent by Atlassian JIRA
(v6.2#6252)