hive-gitbox mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [hive] aasha commented on a change in pull request #2235: HIVE-25072: Optimise ObjectStore::alterPartitions
Date Tue, 04 May 2021 04:01:03 GMT

aasha commented on a change in pull request #2235:

File path: standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/
@@ -5095,14 +5095,18 @@ public Partition alterPartition(String catName, String dbname, String
name, List
       Iterator<List<String>> part_val_itr = part_vals.iterator();
       Set<MColumnDescriptor> oldCds = new HashSet<>();
       Ref<MColumnDescriptor> oldCdRef = new Ref<>();
+      MTable table = null;
       for (Partition tmpPart: newParts) {
         List<String> tmpPartVals =;
         if (writeId > 0) {
         oldCdRef.t = null;
+        if (table == null) {
+          table = this.getMTable(tmpPart.getCatName(), tmpPart.getDbName(), tmpPart.getTableName());
+        }
         Partition result = alterPartitionNoTxn(
-            catName, dbname, name, tmpPartVals, tmpPart, queryWriteIdList, oldCdRef);

Review comment:
       Do we need the alterPartitionNoTxn with the following signature anymore
   private Partition alterPartitionNoTxn(String catName, String dbname, String name,
         List<String> part_vals, Partition newPart, String validWriteIds, Ref<MColumnDescriptor>
   Even single alter partition can use the same call with the table already passed. Will not
result to any improvement but just a clean up of the code.

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.

For queries about this service, please contact Infrastructure at:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message