DanielZhu58 commented on code in PR #6198:
URL: https://github.com/apache/hive/pull/6198#discussion_r2876938949
##########
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java:
##########
@@ -1959,6 +1969,12 @@ public void testColumnStatistics() throws Throwable {
Lists.newArrayList(partitions.get(0), partitions.get(1),
partitions.get(2)), Lists.newArrayList(colName), ENGINE);
assertEquals(1, stats2.size());
assertEquals(2, stats2.get(partitions.get(2)).size());
+ // test if all columns are deleted from parameter COLUMN_STATS_ACCURATE
+ Partition partition_0 = client.getPartition(dbName, tblName,
partitions.get(0));
+ Map<String, String> partitionParams = partition_0.getParameters();
+ String partition_column_stats_accurate =
partitionParams.get("COLUMN_STATS_ACCURATE");
+ assertTrue("parameter COLUMN_STATS_ACCURATE is not accurate in " +
partitions.get(0),partition_column_stats_accurate == null ||
Review Comment:
Yes, we may need it. Because if the user decided to drop all the column
stats by specifying all the column names instead of leaving the column names
empty, then the COL_STATS_ACCURATE might not be null. So the purpose of this
test case is trying to defend that scenario.
--
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]