[ https://issues.apache.org/jira/browse/HIVE-12184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15050037#comment-15050037 ]
Naveen Gangam commented on HIVE-12184: -------------------------------------- Hey Shannon, 1) Technically yes, but I dont believe I saw a unit test for that scenario. I could be wrong. 2) The "field_name" refers to an element of struct datatype. For example, hive> describe src_thrift; OK aint int from deserializer astring string from deserializer lint array<int> from deserializer lstring array<string> from deserializer lintstring array<struct<myint:int,mystring:string,underscore_int:int>> from deserializer mstringstring map<string,string> from deserializer attributes map<string,map<string,map<string,uniontype<int,bigint,string,double,boolean,array<string>,map<string,string>>>>> from deserializer unionfield1 uniontype<int,bigint,string,double,boolean,array<string>,map<string,string>> from deserializer unionfield2 uniontype<int,bigint,string,double,boolean,array<string>,map<string,string>> from deserializer unionfield3 uniontype<int,bigint,string,double,boolean,array<string>,map<string,string>> from deserializer Time taken: 0.312 seconds, Fetched: 10 row(s) hive> describe src_thrift.lintString.$elem$.myint; OK myint int from deserializer Time taken: 0.075 seconds, Fetched: 1 row(s) In the above describe statement, lintString (is an array of struct) is the columnName of the table and "myint" is the first field in the struct (mystring and underscore_int being other 2 fields). Hope this helps. > 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)