kishendas commented on a change in pull request #1956:
URL: https://github.com/apache/hive/pull/1956#discussion_r577841886



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
##########
@@ -3195,17 +3196,24 @@ public void alterPartitions(String dbName, String 
tableName,
   public List<org.apache.hadoop.hive.metastore.api.Partition> 
getPartitionsByNames(String dbName, String tableName,
       List<String> partitionNames) throws HiveException {
     try {
-      return getMSC().getPartitionsByNames(dbName, tableName, partitionNames);
+      GetPartitionsByNamesRequest req = new GetPartitionsByNamesRequest();
+      req.setDb_name(dbName);
+      req.setTbl_name(tableName);
+      req.setNames(partitionNames);
+      return getPartitionsByNames(req, null);
     } catch (Exception e) {
       LOG.error("Failed getPartitionsByNames", e);
       throw new HiveException(e);
     }
   }
 
-    public List<org.apache.hadoop.hive.metastore.api.Partition> 
getPartitionsByNames(GetPartitionsByNamesRequest req)
+    public List<org.apache.hadoop.hive.metastore.api.Partition> 
getPartitionsByNames(GetPartitionsByNamesRequest req,
+      Table table)
         throws HiveException {
     try {
-      Table table = getTable(req.getDb_name(), req.getTbl_name());
+      if( table == null ) {
+        table = getTable(req.getDb_name(), req.getTbl_name());

Review comment:
       TableId is still required for the remote cache to decide whether it can 
serve the data from cache or has to refresh it from HMS. 




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to