You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Venki Korukanti (JIRA)" <ji...@apache.org> on 2014/06/14 02:40:01 UTC
[jira] [Commented] (DRILL-984) DESCRIBE VIEW works inconsistently
[ https://issues.apache.org/jira/browse/DRILL-984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14031365#comment-14031365 ]
Venki Korukanti commented on DRILL-984:
---------------------------------------
Why do you need to give {{./}} in a view name? View is a table and refer to it by its name.
> DESCRIBE VIEW works inconsistently
> ----------------------------------
>
> Key: DRILL-984
> URL: https://issues.apache.org/jira/browse/DRILL-984
> Project: Apache Drill
> Issue Type: Bug
> Reporter: George Chow
>
> I created a view and can work with it in some circumstances:
> {code}
> 0: jdbc:drill:local=localhost:31010> select * from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA='dfs.tmp';
> +---------------+--------------+------------+------------+
> | TABLE_CATALOG | TABLE_SCHEMA | TABLE_NAME | TABLE_TYPE |
> +---------------+--------------+------------+------------+
> | DRILL | dfs.tmp | georgecview | VIEW |
> +---------------+--------------+------------+------------+
> 1 row selected (1.551 seconds)
> 0: jdbc:drill:local=localhost:31010> use dfs.tmp;
> +------------+------------+
> | ok | summary |
> +------------+------------+
> | true | Default schema changed to 'dfs.tmp' |
> +------------+------------+
> 1 row selected (0.437 seconds)
> 0: jdbc:drill:local=localhost:31010> describe georgecview;
> +-------------+------------+-------------+
> | COLUMN_NAME | DATA_TYPE | IS_NULLABLE |
> +-------------+------------+-------------+
> | * | ANY | NO |
> +-------------+------------+-------------+
> 1 row selected (1.684 seconds)
> {code}
> However, working with it in a more general setting (fully-qualified with its schema) doesn't:
> {code}
> 0: jdbc:drill:local=localhost:31010> describe `dfs.tmp`.`./georgecview`;
> Query failed: org.apache.drill.exec.rpc.RpcException: Remote failure while running query.[error_id: "3b52da4b-8b0b-4750-94ae-e200c9485d1a"
> endpoint {
> address: "192.168.39.43"
> user_port: 31010
> control_port: 31011
> data_port: 31012
> }
> error_type: 0
> message: "Failure while parsing sql. < RelConversionException:[ Error while rewriting DESCRIBE query: Table dfs.tmp../georgecview is not valid ] < RelConversionException:[ Table dfs.tmp../georgecview is not valid ]"
> ]
> Error: exception while executing query (state=,code=0)
> 0: jdbc:drill:local=localhost:31010> describe `dfs.tmp`.`./georgecview.drill`;
> Query failed: org.apache.drill.exec.rpc.RpcException: Remote failure while running query.[error_id: "8edb3ff1-651c-4117-a772-8c51b7028083"
> endpoint {
> address: "192.168.39.43"
> user_port: 31010
> control_port: 31011
> data_port: 31012
> }
> error_type: 0
> message: "Failure while parsing sql. < RelConversionException:[ Error while rewriting DESCRIBE query: Table dfs.tmp../georgecview.drill is not valid ] < RelConversionException:[ Table dfs.tmp../georgecview.drill is not valid ]"
> ]
> Error: exception while executing query (state=,code=0)
> {code}
> The problem seems to be the leading './':
> {code}
> 0: jdbc:drill:local=localhost:31010> describe `dfs.tmp`.`georgecview`;
> +-------------+------------+-------------+
> | COLUMN_NAME | DATA_TYPE | IS_NULLABLE |
> +-------------+------------+-------------+
> | * | ANY | NO |
> +-------------+------------+-------------+
> 1 row selected (1.957 seconds)
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)