saihemanth-cloudera commented on code in PR #4517:
URL: https://github.com/apache/hive/pull/4517#discussion_r1316190670
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java:
##########
@@ -532,6 +535,66 @@ public void addPartitions(List<MPartition> parts,
List<List<MPartitionPrivilege>
directSqlInsertPart.addPartitions(parts, partPrivilegesList,
partColPrivilegesList);
}
+ /**
+ * Alter partitions in batch using direct SQL
+ * @param table the target table
+ * @param partNames list of partition names
+ * @param newParts list of new partitions
+ * @param queryWriteIdList valid write id list
+ * @return
+ * @throws MetaException
+ */
+ public List<Partition> alterPartitions(Table table, List<String> partNames,
+ List<Partition> newParts, String queryWriteIdList) throws MetaException {
+ String filter = "" + PARTITIONS + ".\"PART_NAME\" in (" +
makeParams(partNames.size()) + ")";
Review Comment:
I think Oracle or Postgres would error out if the partNames.size() > 1000 in
the 'IN' clause.
--
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]