Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Hive Compute Statistics not showing any statistics while describe table

avatar

Trying to see statistics on a particular column. I executed the ANALYZE command first and then tried to see the stats by DESCRIBE FORMATTED <table_name> <col_name>. I cant see any values in this. Any idea why its not showing any values?

I tried MSCK and analyzed the table again and checked for stats. No luck so far.

Thanks

Anil

1 ACCEPTED SOLUTION

avatar
Below Statement worked for me finally .

hive> desc formatted testdb.table col_name partition (data_dt='20180715');

View solution in original post

4 REPLIES 4

avatar
@Anil Varghese

I suspect that the table is partitioned because of which the "describe formatted" does not show any stats related information.

Try running "describe extended" for particular partition spec.

avatar

@Sindhu, Thanks for the reply.

I tried the same and it wont return any values. But the compute statistics command worked fine though

hive> analyze table testdb.table partition(data_dt) compute statistics for columns order_dispatch_diff;
Query ID = anil_20181004181226_ed6afd54-fed8-4601-8b54-29214a8dbfc3
Total jobs = 1
Launching Job 1 out of 1
Status: Running (Executing on YARN cluster with App id application_1537195062060_1102639)
--------------------------------------------------------------------------------
        VERTICES      STATUS  TOTAL  COMPLETED  RUNNING  PENDING  FAILED  KILLED
--------------------------------------------------------------------------------
Map 1 ..........   SUCCEEDED     62         62        0        0       0       0
Reducer 2 ......   SUCCEEDED      1          1        0        0       0       0
--------------------------------------------------------------------------------
VERTICES: 02/02  [==========================>>] 100%  ELAPSED TIME: 101.08 s
--------------------------------------------------------------------------------
OK
Time taken: 108.142 seconds
hive> desc extended testdb.table order_dispatch_diff;
OK
order_dispatch_diff     int                     from deserializer
Time taken: 0.041 seconds, Fetched: 1 row(s)

avatar

Yes, second that, observing the same behaviour surprisingly.

desc formatted/extended shows no values for the column stats for the partition even after analyse. Is this a reported bug?

avatar
Below Statement worked for me finally .

hive> desc formatted testdb.table col_name partition (data_dt='20180715');