[
https://issues.apache.org/jira/browse/HIVE-29301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Thomas Rebele updated HIVE-29301:
---------------------------------
Attachment: hive-29301-bad.q
hive-29301-ok.q
> Missing histogram info in DESCRIBE FORMATTED when executing another DESCRIBE
> FORMATTED before setting metastore.stats.fetch.kll
> -------------------------------------------------------------------------------------------------------------------------------
>
> Key: HIVE-29301
> URL: https://issues.apache.org/jira/browse/HIVE-29301
> Project: Hive
> Issue Type: Bug
> Affects Versions: 4.1.0
> Reporter: Thomas Rebele
> Priority: Major
> Attachments: hive-29301-bad.q, hive-29301-bad.q.out, hive-29301-ok.q,
> hive-29301-ok.q.out
>
>
> I had already observed several times an issue with DESCRIBE FORMATTED:
> sometimes the "histogram" info is empty, even when setting
> hive.stats.kll.enable and metastore.stats.fetch.kll. This time I managed to
> create a MRE (minimum reproducible example):
> The following qfile shows the wrong behavior ({{{}histogram
> {}}}):
> {code:java}
> CREATE TABLE tab1 AS (SELECT 1 as key);
> DESCRIBE FORMATTED tab1 key;
> set metastore.stats.fetch.kll=true;
> CREATE TABLE tab2 AS (SELECT 1 as key);
> set hive.stats.kll.enable=true;
> ANALYZE TABLE tab2 COMPUTE STATISTICS FOR COLUMNS;
> DESCRIBE FORMATTED tab2 key;
> {code}
> While the following qfile works as expected:
> {code:java}
> CREATE TABLE tab1 AS (SELECT 1 as key);
> set metastore.stats.fetch.kll=true;
> DESCRIBE FORMATTED tab1 key;
> CREATE TABLE tab2 AS (SELECT 1 as key);
> set hive.stats.kll.enable=true;
> ANALYZE TABLE tab2 COMPUTE STATISTICS FOR COLUMNS;
> DESCRIBE FORMATTED tab2 key;
> {code}
> resulting in a {{histogram Q1: 1, Q2: 1, Q3: 1}}
> The only change is the order of {{set metastore.stats.fetch.kll=true;}} and
> {{DESCRIBE FORMATTED tab1 key;}}. Please note that the interchanged DESCRIBE
> FORMATTED is a command on an unrelated table!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)