deniskuzZ commented on code in PR #4807:
URL: https://github.com/apache/hive/pull/4807#discussion_r1435564713
##########
ql/src/test/org/apache/hadoop/hive/ql/exec/PartitionUtil.java:
##########
@@ -82,4 +88,26 @@ public static Set<CheckResult.PartitionResult>
createPartsNotInMs(int numOfParts
}
return partsNotInMs;
}
+
+
+ public static void addPartitions(IMetaStoreClient db, String dbName,
String tableName, String location,
+ HiveConf hiveConf, int numPartitions) throws Exception {
+ List<Partition> partitions = new ArrayList<>();
+ for (int i = 0; i < numPartitions; i++) {
+ partitions.add(buildPartition(dbName, tableName,
String.valueOf(i), location + "/city=" + i, hiveConf));
+ }
+ db.add_partitions(partitions, true, true);
+ }
+
+ protected static Partition buildPartition(String dbName, String tableName,
String value,
Review Comment:
why it's protected
--
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]