[
https://issues.apache.org/jira/browse/DRILL-4514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15208799#comment-15208799
]
ASF GitHub Bot commented on DRILL-4514:
---------------------------------------
Github user julianhyde commented on the pull request:
https://github.com/apache/drill/pull/436#issuecomment-200448075
Yes, I think this would be good in Calcite. Thanks for offering.
DESCRIBE is in the SQL standard (the latest draft, anyway; I didn't check
any others) with a slightly different purpose -- to describe the columns of a
query. (It reminds me a bit of MySQL, where DESCRIBE and EXPLAIN are synonyms.)
That's good news, because it means we're not adding another reserved word, but
we also need to make sure that DESCRIBE TABLE, DESCRIBE SCHEMA, DESCRIBE
DATABASE are compatible with the standard syntax.
```
20.9 <describe statement>
This Subclause is modified by Subclause 17.4, “<describe statement>”, in
ISO/IEC 9075-9.
Function
Obtain information about the <select list> columns or
<dynamic parameter specification>s contained in a prepared statement
or about the columns of the result set associated with a cursor.
Format
<describe statement> ::=
<describe input statement>
| <describe output statement>
<describe input statement> ::=
DESCRIBE INPUT <SQL statement name> <using descriptor> [ <nesting
option> ]
<describe output statement> ::=
DESCRIBE [ OUTPUT ] <described object> <using descriptor> [ <nesting
option> ]
<nesting option> ::=
WITH NESTING
| WITHOUT NESTING
<using descriptor> ::=
USING [ SQL ] DESCRIPTOR <descriptor name>
<described object> ::=
<SQL statement name>
| CURSOR <cursor name> STRUCTURE
```
The output for DESCRIBE TABLE should be the same as Jdbc getTables. Do you
agree?
> Add describe schema <schema_name> command
> -----------------------------------------
>
> Key: DRILL-4514
> URL: https://issues.apache.org/jira/browse/DRILL-4514
> Project: Apache Drill
> Issue Type: New Feature
> Affects Versions: Future
> Reporter: Arina Ielchiieva
> Assignee: Arina Ielchiieva
>
> Add describe database <db_name> command which will return directory
> associated with a database on the fly.
> Syntax:
> describe database <db_name>
> describe schema <schema_name>
> Output:
> {noformat}
> DESCRIBE SCHEMA xdf.proc;
> +---------------------+----------------------------+
> | name | location |
> +---------------------+----------------------------+
> | xdf.proc | maprfs://dl.data/processed |
> +---------------------+----------------------------+
> {noformat}
> Current implementation covers only dfs schema.
> For all other "<INFORMATION UNAVAILABLE>" will be returned.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)