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


##########
standalone-metastore/metastore-tools/metastore-benchmarks/src/main/java/org/apache/hadoop/hive/metastore/tools/HMSBenchmarks.java:
##########
@@ -123,6 +123,31 @@ static DescriptiveStatistics 
benchmarkDeleteWithPartitions(@NotNull MicroBenchma
         null);
   }
 
+  static DescriptiveStatistics benchmarkDeleteMetaOnlyWithPartitions(@NotNull 
MicroBenchmark bench,
+                                                                        
@NotNull BenchData data,
+                                                                        int 
howMany,
+                                                                        int 
nparams) {
+    final HMSClient client = data.getClient();
+    String dbName = data.dbName;
+    String tableName = data.tableName;
+
+    // Create many parameters
+    Map<String, String> parameters = new HashMap<>(nparams);
+    for (int i = 0; i < nparams; i++) {
+      parameters.put(PARAM_KEY + i, PARAM_VALUE + i);
+    }
+
+    return bench.measure(
+            () -> throwingSupplierWrapper(() -> {
+              BenchmarkUtils.createPartitionedTable(client, dbName, tableName);
+              addManyPartitions(client, dbName, tableName, parameters,
+                      Collections.singletonList("d"), howMany);

Review Comment:
   It's a prefix of the partition value, in this benchmark the created 
partitions in mysql looks as follows:
   ```sql
   mysql> select * from PARTITIONS limit 3;
   
+---------+-------------+------------------+-----------+--------+--------+----------+
   | PART_ID | CREATE_TIME | LAST_ACCESS_TIME | PART_NAME | SD_ID  | TBL_ID | 
WRITE_ID |
   
+---------+-------------+------------------+-----------+--------+--------+----------+
   |  301296 |  1681524241 |                0 | date=d0   | 302595 |   1299 |   
     0 |
   |  301297 |  1681524241 |                0 | date=d1   | 302596 |   1299 |   
     0 |
   |  301298 |  1681524241 |                0 | date=d2   | 302597 |   1299 |   
     0 |
   
+---------+-------------+------------------+-----------+--------+--------+----------+
   3 rows in set (0.00 sec)
   ```



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