[ 
https://issues.apache.org/jira/browse/HIVE-12184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15048181#comment-15048181
 ] 

Lefty Leverenz commented on HIVE-12184:
---------------------------------------

Shannon revised the Describe Partition section to include the column_name 
option with and without db_name.  Is the syntax correct now?

She also made a few edits to the new 2.0+ section, with my agreement.

Also, we liked your formatting of the example box (with a title) so much that I 
changed the rest of the DDL doc's example boxes to match -- thanks for the 
idea, [~ngangam], it makes the doc easier to read.

Finally, I suspect the syntax for DESCRIBE table_name (without partition) is 
wrong in the Describe Table/View/Column section and it ought to be treated as 
two cases, just like in the Describe Partition section.  Currently it says:

{code}
DESCRIBE [EXTENDED|FORMATTED] 
  [db_name.]table_name[.col_name ( [.field_name] | [.'$elem$'] | [.'$key$'] | 
[.'$value$'] )* ];
{code}

but [~xuefuz] wrote in a comment on HIVE-11241 "Describe command takes 
db_name.table_name as well as table_name.column_name. It doesn't take, however, 
db_name.table_name.column_name."

Here are the doc links:

* [Describe Table/View/Column | 
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-DescribeTable/View/Column]
* [Describe Partition | 
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-DescribePartition]
* [Hive 2.0+:  Syntax Change | 
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-Hive2.0+:SyntaxChange]
  (note change from "New Syntax" to "Syntax Change" -- that'll break previous 
links)

> DESCRIBE of fully qualified table fails when db and table name match and 
> non-default database is in use
> -------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-12184
>                 URL: https://issues.apache.org/jira/browse/HIVE-12184
>             Project: Hive
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.2.1
>            Reporter: Lenni Kuff
>            Assignee: Naveen Gangam
>             Fix For: 2.0.0
>
>         Attachments: HIVE-12184.10.patch, HIVE-12184.10.patch, 
> HIVE-12184.2.patch, HIVE-12184.3.patch, HIVE-12184.4.patch, 
> HIVE-12184.5.patch, HIVE-12184.6.patch, HIVE-12184.7.patch, 
> HIVE-12184.8.patch, HIVE-12184.9.patch, HIVE-12184.patch
>
>
> DESCRIBE of fully qualified table fails when db and table name match and 
> non-default database is in use.
> Repro:
> {code}
> : jdbc:hive2://localhost:10000/default> create database foo;
> No rows affected (0.116 seconds)
> 0: jdbc:hive2://localhost:10000/default> create table foo.foo(i int);
> 0: jdbc:hive2://localhost:10000/default> describe foo.foo;
> +-----------+------------+----------+--+
> | col_name  | data_type  | comment  |
> +-----------+------------+----------+--+
> | i         | int        |          |
> +-----------+------------+----------+--+
> 1 row selected (0.049 seconds)
> 0: jdbc:hive2://localhost:10000/default> use foo;
> 0: jdbc:hive2://localhost:10000/default> describe foo.foo;
> Error: Error while processing statement: FAILED: Execution Error, return code 
> 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Error in getting fields from 
> serde.Invalid Field foo (state=08S01,code=1)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to