You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Steven Phillips (JIRA)" <ji...@apache.org> on 2014/06/11 11:14:03 UTC

[jira] [Commented] (DRILL-863) query returns incorrect data when columns selected in the reverse order of their existence in the view

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

Steven Phillips commented on DRILL-863:
---------------------------------------

This is not a problem with views, but rather with the Text reader.

There is a bug in project push down, where if the list of column IDs to select is not sorted, the text reader doesn't read the data and store the data correctly.

the simplest solution is just to sort the column IDs when creating the reader. That seems to fix this issue.

> query returns incorrect data when columns selected in the reverse order of their existence in the view
> ------------------------------------------------------------------------------------------------------
>
>                 Key: DRILL-863
>                 URL: https://issues.apache.org/jira/browse/DRILL-863
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: SQL Parser
>            Reporter: Vivian Summers
>            Assignee: Steven Phillips
>             Fix For: 1.0.0-BETA1
>
>
> I have a view beacon_aster, uid column appears before country and this works fine:
> : jdbc:drill:schema=dfs> SELECT uid, country FROM beacon_aster limit 1;
> +------------+------------+
> |    uid     |  country   |
> +------------+------------+
> | 937021026  | US         |
> +------------+------------+
> 1 row selected (6.52 seconds)
> But if select country first, it returns other columns after uid:
> 0: jdbc:drill:schema=dfs> SELECT country, uid FROM beacon_aster limit 1;
> +------------+------------+
> |  country   |    uid     |
> +------------+------------+
> | US         | 937021026	2816d925-6902-2014-8017-113468677480	2012-09-25 00:00:27.132	20120906.02	60f2761d0e6192a88305054eb06877cb	1	-8	US	9 |
> Some cases it throws error:
> This works:
> 0: jdbc:drill:schema=dfs> SELECT recorded, country FROM beacon_aster limit 1;
> +------------+------------+
> |  recorded  |  country   |
> +------------+------------+
> | 2012-09-25T00:00:27.132-07:00 | US         |
> +------------+------------+
> 1 row selected (8.279 seconds)
> But this throws IllegalArgumentException, recorded columns appears before country column:
> 0: jdbc:drill:schema=dfs> SELECT country, recorded FROM beacon_aster limit 1;
> Query failed: org.apache.drill.exec.rpc.RpcException: Remote failure while running query.[error_id: "4cd5263c-039d-4e04-a4c7-2b31c5bd4139"
> endpoint {
>   address: "mfs101.qa.lab"
>   user_port: 31010
>   control_port: 31011
>   data_port: 31012
> }
> error_type: 0
> message: "Failure while running fragment. < IllegalArgumentException:[ Invalid format: "2012-09-25 00:00:27.132	20120906.02	60f2761d0e6192a8830..." is malformed at "	20120906.02	60f2761d0e6192a8830..." ]"
> ]
> Error: exception while executing query (state=,code=0)



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