Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
I created a view and can work with it in some circumstances:
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)
However, working with it in a more general setting (fully-qualified with its schema) doesn't:
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)
The problem seems to be the leading './':
0: jdbc:drill:local=localhost:31010> describe `dfs.tmp`.`georgecview`; +-------------+------------+-------------+ | COLUMN_NAME | DATA_TYPE | IS_NULLABLE | +-------------+------------+-------------+ | * | ANY | NO | +-------------+------------+-------------+ 1 row selected (1.957 seconds)