[ https://issues.apache.org/jira/browse/HIVE-21824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16856876#comment-16856876 ]
Vihang Karajgaonkar commented on HIVE-21824: -------------------------------------------- cc: [~ashutoshc] not sure if this is intentional. Looks weird to me to a two-dimensional view for storing column stats. > Weird output format of 'describe formatted' command > --------------------------------------------------- > > Key: HIVE-21824 > URL: https://issues.apache.org/jira/browse/HIVE-21824 > Project: Hive > Issue Type: Bug > Affects Versions: 3.1.0 > Reporter: Zoltán Borók-Nagy > Priority: Major > > Hive 3 changed the output format of the 'describe formatted' command. The new > format is vertical instead of the old horizontal format. > The expected output can be looked at the tests, e.g.: > [https://github.com/apache/hive/blob/10b6d70da1442cccf533bc97f56a622ec9f39661/ql/src/test/results/clientpositive/describe_table.q.out#L201-L216] > However, for Hive 3.1.0 (and probably for other Hive versions as well) the > output looks really strange: > {noformat} > jdbc:hive2://localhost:11050/default> describe formatted test i; > +------------------------+----------------------------------------------------+-------+-------+------------+-----------------+--------------+--------------+------------+-------------+------------+----------+ > | col_name | data_type | min | max | num_nulls | distinct_count | avg_col_len > | max_col_len | num_trues | num_falses | bitvector | comment | > +------------------------+----------------------------------------------------+-------+-------+------------+-----------------+--------------+--------------+------------+-------------+------------+----------+ > | col_name | i | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL > | NULL | > | data_type | int | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | > NULL | NULL | > | min | 1 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | > NULL | > | max | 3 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | > NULL | > | num_nulls | 0 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | > NULL | NULL | > | distinct_count | 3 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL > | NULL | NULL | > | avg_col_len | | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | > NULL | NULL | > | max_col_len | | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | > NULL | NULL | > | num_trues | | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL > | NULL | > | num_falses | | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL > | NULL | > | bitVector | | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL > | NULL | > | comment | from deserializer | NULL | NULL | NULL | NULL | NULL | NULL | > NULL | NULL | NULL | NULL | > | COLUMN_STATS_ACCURATE | > {\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"i\":\"true\"}} | NULL | NULL | > NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | > +------------------------+----------------------------------------------------+-------+-------+------------+-----------------+--------------+--------------+------------+-------------+------------+----------+{noformat} > Notice that the attribute names in the first column are the same as the > column names. And all the attribute values are listed in the 'data_type' > column. > On cwiki there is also another example to this weird output at > [https://cwiki.apache.org/confluence/display/Hive/StatsDev#StatsDev-ExistingTables], > search for "the output would look like this". But it doesn't seem > intentional to me. -- This message was sent by Atlassian JIRA (v7.6.3#76005)