drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacques Nadeau (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-623) Unable to run query containing quoted schema name
Date Sat, 03 May 2014 13:23:15 GMT

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

Jacques Nadeau commented on DRILL-623:
--------------------------------------

We need the root Schema exposing the second schemas as the double name. We should also add
a check that no existing storage instance names have periods in them.  We should an unwrap
method as well to our schemas such that we can expose a property isShownInInformationSchema()
 so we can hide some things,  including these and the default schemas available at the first
level. 

> 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
>            Reporter: George Chow
>            Assignee: Venki Korukanti
>            Priority: Blocker
>
> 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.2#6252)

Mime
View raw message