[ https://issues.apache.org/jira/browse/DRILL-984?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jacques Nadeau resolved DRILL-984. ---------------------------------- Resolution: Fixed > 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 > Fix For: Future > > > 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.3.4#6332)