[ 
https://issues.apache.org/jira/browse/HIVE-26035?focusedWorklogId=838273&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-838273
 ]

ASF GitHub Bot logged work on HIVE-26035:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 10/Jan/23 09:59
            Start Date: 10/Jan/23 09:59
    Worklog Time Spent: 10m 
      Work Description: 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();
   ```





Issue Time Tracking
-------------------

    Worklog Id:     (was: 838273)
    Time Spent: 50m  (was: 40m)

> Explore moving to directsql for ObjectStore::addPartitions
> ----------------------------------------------------------
>
>                 Key: HIVE-26035
>                 URL: https://issues.apache.org/jira/browse/HIVE-26035
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Rajesh Balamohan
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> Currently {{addPartitions}} uses datanuclues and is super slow for large 
> number of partitions. It will be good to move to direct sql. Lots of repeated 
> SQLs can be avoided as well (e.g SDS, SERDE, TABLE_PARAMS)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to