drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Krystal (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (DRILL-495) Drill does not return columns in appropriate order for select all and aggregate selects
Date Tue, 20 May 2014 16:48:40 GMT

     [ https://issues.apache.org/jira/browse/DRILL-495?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Krystal resolved DRILL-495.
---------------------------

    Resolution: Fixed

git.commit.id.abbrev=5d7e3d3

This is fixed.

> 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)

Mime
View raw message