[
https://issues.apache.org/jira/browse/DRILL-984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14031414#comment-14031414
]
George Chow commented on DRILL-984:
-----------------------------------
The {code}./{code} is an artifact of the logic for generating the pathname for
an object in the DFS schema.
I think the fix may be as simple as introducing some handling for objects with
the .view.drill/.drill extension (in the same way that JSON, CSV etc are dealt
with today).
That aside, I'm mildly concern about potential problems with ambiguities (e.g.,
a view named with a trailing ".drill").
> 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.view.drill`;
> Query failed: org.apache.drill.exec.rpc.RpcException: Remote failure while
> running query.[error_id: "99c57bf2-bbb9-4bdd-9321-03c59aff9c27"
> 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.view.drill is not valid ]
> < RelConversionException:[ Table dfs.tmp.georgecview.view.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)