wecharyu commented on code in PR #5141:
URL: https://github.com/apache/hive/pull/5141#discussion_r1554921073


##########
standalone-metastore/metastore-tools/metastore-benchmarks/src/main/java/org/apache/hadoop/hive/metastore/tools/HMSBenchmarks.java:
##########
@@ -416,15 +416,31 @@ static DescriptiveStatistics 
benchmarkGetPartitionsByFilter(@NotNull MicroBenchm
     final HMSClient client = data.getClient();
     String dbName = data.dbName;
     String tableName = data.tableName;
+    List<String> partitionList = Arrays.asList("date", "hour");
 
-    BenchmarkUtils.createPartitionedTable(client, dbName, tableName);
+    BenchmarkUtils.createPartitionedTable(client, dbName, tableName, 
partitionList);
     try {
-      addManyPartitionsNoException(client, dbName, tableName, null,
-              Collections.singletonList("d"), count);
-      return bench.measure(
+      try {
+        Table table = client.getTable(dbName, tableName);
+        List<Partition> partitionValueList = new ArrayList<>();
+        for (int i = 0; i < count / 24; i++) {

Review Comment:
   The count would take no effect in some cases, for example if count is less 
than 24, then no partitions will be added.



-- 
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