[ https://issues.apache.org/jira/browse/HIVE-25032?focusedWorklogId=851355&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-851355 ]
ASF GitHub Bot logged work on HIVE-25032: ----------------------------------------- Author: ASF GitHub Bot Created on: 16/Mar/23 13:19 Start Date: 16/Mar/23 13:19 Worklog Time Spent: 10m Work Description: henrib commented on code in PR #4028: URL: https://github.com/apache/hive/pull/4028#discussion_r1138649561 ########## standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/PartitionIterable.java: ########## @@ -103,11 +107,17 @@ private void getNextBatch() { batch_counter++; } try { - String dbName = prependCatalogToDbName(table.getCatName(), table.getDbName(), null); - GetPartitionsByNamesRequest req = - convertToGetPartitionsByNamesRequest(dbName, table.getTableName(), nameBatch); - batchIter = - msc.getPartitionsByNames(req).getPartitionsIterator(); + if (request != null) { + request.setFilterSpec(new GetPartitionsFilterSpec()); Review Comment: May be introduce a local variable for 'new GetPartitionsFilterSpec' and avoid the getters after. Issue Time Tracking ------------------- Worklog Id: (was: 851355) Time Spent: 4h 50m (was: 4h 40m) > Optimise PartitionManagementTask > -------------------------------- > > Key: HIVE-25032 > URL: https://issues.apache.org/jira/browse/HIVE-25032 > Project: Hive > Issue Type: Improvement > Reporter: Rajesh Balamohan > Assignee: Zhihua Deng > Priority: Major > Labels: pull-request-available > Time Spent: 4h 50m > Remaining Estimate: 0h > > When large number of tables and dbs are present, it takes lot of time to > iterate over all tables in PartitionManagementTask. > If table parameters are populated in TableMeta, it will cut down lots of > interactions with HMS in PartitionManagementTask. > > Code Ref: > [https://github.com/apache/hive/blob/master/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/PartitionManagementTask.java#L126] > > [https://github.com/apache/hive/blob/master/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/PartitionManagementTask.java#L132] > -- This message was sent by Atlassian Jira (v8.20.10#820010)