dengzhhu653 commented on code in PR #3905:
URL: https://github.com/apache/hive/pull/3905#discussion_r1065569454


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java:
##########
@@ -2607,6 +2614,9 @@ public boolean addPartitions(String catName, String 
dbName, String tblName, List
         tabColumnGrants = this.listTableAllColumnGrants(catName, dbName, 
tblName);
       }
       List<Object> toPersist = new ArrayList<>();

Review Comment:
   can `toPersist` be removed? when need to persist the objects via JDO, we can 
do like:
   ```java
    pm.makePersistentAll(mParts);
    if (!mPartPrivilegesList.isEmpty()) {
      pm.makePersistentAll(mPartPrivilegesList);
     }
    //...
    pm.flush();
   ```



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