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

Parth Chandra updated DRILL-623:
--------------------------------
    Component/s: Storage - Hive

> Unable to run query containing quoted schema name
> -------------------------------------------------
>
>                 Key: DRILL-623
>                 URL: https://issues.apache.org/jira/browse/DRILL-623
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - Hive
>            Reporter: George Chow
>            Assignee: Venki Korukanti
>            Priority: Blocker
>             Fix For: 0.4.0
>
>         Attachments: DRILL-623-1.patch
>
>
> This is particularly for the Hive storage-engine where the schema name is 
> composed of a root followed by the storage-engine's own schema name. E.g., 
> configuring Hive leads to a schema name "hivestg.default":
> 0: jdbc:drill:schema=hivestg> select * from INFORMATION_SCHEMA.SCHEMATA;
> +--------------+-------------+--------------+
> | CATALOG_NAME | SCHEMA_NAME | SCHEMA_OWNER |
> +--------------+-------------+--------------+
> | DRILL        | hivestg.default | <owner>      |
> | DRILL        | hivestg     | <owner>      |
> | DRILL        | dfs.default | <owner>      |
> | DRILL        | dfs         | <owner>      |
> | DRILL        | cp.default  | <owner>      |
> | DRILL        | cp          | <owner>      |
> | DRILL        | INFORMATION_SCHEMA | <owner>      |
> +--------------+-------------+--------------+
> 7 rows selected (0.131 seconds)
> Given tables inside hivestg.default as follows:
> 0: jdbc:drill:schema=hivestg> select * from INFORMATION_SCHEMA.`TABLES`;
> +---------------+--------------+------------+------------+
> | TABLE_CATALOG | TABLE_SCHEMA | TABLE_NAME | TABLE_TYPE |
> +---------------+--------------+------------+------------+
> | DRILL         | hivestg.default | sneaky     | TABLE      |
> | DRILL         | hivestg.default | bit_table  | TABLE      |
> | DRILL         | hivestg.default | stinyint_table | TABLE      |
> | DRILL         | hivestg.default | no_null_integer_table | TABLE      |
> | DRILL         | hivestg.default | real_table | TABLE      |
> | DRILL         | hivestg.default | integer_table | TABLE      |
> A generated query would look as follows:
> SELECT * FROM `hivestg.default`.`integer_table`
> This fails to execute with the following error:
> 0: jdbc:drill:schema=hivestg> SELECT * FROM `hivestg.default`.`integer_table`;
> Query failed: org.apache.drill.exec.rpc.RpcException: Remote failure while 
> running query.[error_id: "fe7731f0-c032-4049-9204-61bb7c7340cb"
> 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 15 to line 
> 1, column 47 ] < EigenbaseContextException:[ From line 1, column 15 to line 
> 1, column 47 ] < SqlValidatorException:[ Table 
> \'hivestg.default.integer_table\' not found ]"
> ]
> Error: exception while executing query (state=,code=0)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to