drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cliff Buchanan (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DRILL-1029) select column from a `select *` sub-query fails for schema-less file
Date Tue, 15 Jul 2014 21:37:06 GMT

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

Cliff Buchanan updated DRILL-1029:
----------------------------------

    Assignee: Jacques Nadeau  (was: Aditya Kishore)

> select column from a `select *` sub-query fails for schema-less file
> --------------------------------------------------------------------
>
>                 Key: DRILL-1029
>                 URL: https://issues.apache.org/jira/browse/DRILL-1029
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Xiao Meng
>            Assignee: Jacques Nadeau
>            Priority: Critical
>              Labels: Tableau
>
> When using the following custom SQL to import data in Tableau, 
> {code}
> select * from dfs.`default`.`/opt/drill/raw-files/click1.json`
> {code}
> Tableau will generate a query like
> {code}
> SELECT `TableauSQL`.`address` AS `address`,
>   `TableauSQL`.`br` AS `br`,
>   `TableauSQL`.`first_visit` AS `first_visit`,
>   `TableauSQL`.`gender` AS `gender`,
>   `TableauSQL`.`id` AS `id`,
>   `TableauSQL`.`la` AS `la`,
>   `TableauSQL`.`name` AS `name`,
>   `TableauSQL`.`os` AS `os`,
>   `TableauSQL`.`st` AS `st`,
>   `TableauSQL`.`user_category` AS `user_category`
> FROM (
>   select * from dfs.`default`.`/opt/drill/raw-files/click1.json`
> ) `TableauSQL`
> {code}
> but this query will fail.
> It seems happened in all schema-less file types when you run query in the form of select
column from a `select *` sub-query.
> For example, we observed this in SQLline:
> {code}
> 0: jdbc:drill:local=localhost:31010> select L_ORDERKEY from cp.`tpch/lineitem.parquet`
limit 1;
> +------------+
> | L_ORDERKEY |
> +------------+
> | 1          |
> +------------+
> 1 row selected (0.835 seconds)
> 0: jdbc:drill:local=localhost:31010> select L_ORDERKEY from (select * from cp.`tpch/lineitem.parquet`
limit 1);
> Query failed: org.apache.drill.exec.rpc.RpcException: Remote failure while running query.[error_id:
"3a387934-9cca-4f3a-8f37-74cdca365113"
> endpoint {
>   address: "localhost"
>   user_port: 31010
>   control_port: 31011
>   data_port: 31012
> }
> error_type: 0
> message: "Failure while parsing sql. < ValidationException:[ org.eigenbase.util.EigenbaseContextException:
From line 1, column 8 to line 1, column 17 ] < EigenbaseContextException:[ From line 1,
column 8 to line 1, column 17 ] < SqlValidatorException:[ Column 'L_ORDERKEY' not found
in any table ]"
> ]
> Error: exception while executing query (state=,code=0)
> {code}
> This will block using custom SQL for schema-less file in Tableau.



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

Mime
View raw message