soumyakanti3578 commented on code in PR #6391:
URL: https://github.com/apache/hive/pull/6391#discussion_r3011760015


##########
ql/src/test/queries/clientpositive/drop_histogram_stats_for_columns.q:
##########
@@ -0,0 +1,29 @@
+set hive.stats.kll.enable=true;
+set metastore.stats.fetch.bitvector=true;
+set metastore.stats.fetch.kll=true;
+set hive.stats.autogather=true;
+set hive.stats.column.autogather=true;
+
+CREATE TABLE test_stats (a string, b int, c double) STORED AS ORC;
+
+insert into test_stats (a, b, c) values ("a", 2, 1.1);
+insert into test_stats (a, b, c) values ("b", 2, 2.1);
+insert into test_stats (a, b, c) values ("c", 2, 2.1);
+insert into test_stats (a, b, c) values ("d", 2, 3.1);
+insert into test_stats (a, b, c) values ("e", 2, 3.1);
+insert into test_stats (a, b, c) values ("f", 2, 4.1);
+insert into test_stats (a, b, c) values ("g", 2, 5.1);
+insert into test_stats (a, b, c) values ("h", 2, 6.1);
+insert into test_stats (a, b, c) values ("i", 3, 6.1);

Review Comment:
   I think it's fine for column `b` to have just 2 unique values as this test 
is not really testing the histogram but whether the column stats are accurate 
after dropping column stats. And that is tested by the fact that before 
dropping column stats, the value for `COLUMN_STATS_ACCURATE` was:
   ```
   COLUMN_STATS_ACCURATE        
{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\",\"c\":\"true\"}}
   ```
   and after dropping stats it is:
   ```
   COLUMN_STATS_ACCURATE        {\"BASIC_STATS\":\"true\"}
   ```
   So this clearly shows that the column stats are not accurate.
   
   However, in the latest commit I have added more variance in the inserts.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to