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

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

                Author: ASF GitHub Bot
            Created on: 14/May/21 11:51
            Start Date: 14/May/21 11:51
    Worklog Time Spent: 10m 
      Work Description: kgyrtkirk commented on a change in pull request #2211:
URL: https://github.com/apache/hive/pull/2211#discussion_r632474203



##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/cache/CachedStore.java
##########
@@ -2688,13 +2734,21 @@ long getPartsFound() {
    * @throws MetaException
    */
   @Override
+  @Deprecated
   public SQLAllTableConstraints getAllTableConstraints(String catName, String 
dbName, String tblName)
       throws MetaException, NoSuchObjectException {
-    catName = StringUtils.normalizeIdentifier(catName);
-    dbName = StringUtils.normalizeIdentifier(dbName);
-    tblName = StringUtils.normalizeIdentifier(tblName);
+    AllTableConstraintsRequest request = new 
AllTableConstraintsRequest(dbName,tblName,catName);
+    return getAllTableConstraints(request);
+  }
+
+  @Override
+  public SQLAllTableConstraints 
getAllTableConstraints(AllTableConstraintsRequest request)
+      throws MetaException, NoSuchObjectException {
+    String catName = StringUtils.normalizeIdentifier(request.getCatName());
+    String dbName = StringUtils.normalizeIdentifier(request.getDbName());
+    String tblName = StringUtils.normalizeIdentifier(request.getTblName());

Review comment:
       having some common table reference object could remove this copy paste 
as well

##########
File path: 
standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift
##########
@@ -701,6 +705,8 @@ struct UniqueConstraintsRequest {
   1: required string catName,
   2: required string db_name,
   3: required string tbl_name,
+  4: optional string validWriteIdList,
+  5: optional i64 tableId=-1

Review comment:
       I meaned something which could retain that we may change the request 
further but have the table related stuff separated:
   {code}
   struct UniqueConstraintsRequest {
   1: TableReference table;
   }
   
   struct TableReference {
    1: required string catName,
     2: required string db_name,
     3: required string tbl_name,
     4: optional string validWriteIdList,
     5: optional i64 tableId=-1
   }
   
   {code}
   
   this could also help clean things up a bit




-- 
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:
us...@infra.apache.org


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

    Worklog Id:     (was: 596608)
    Time Spent: 1h 10m  (was: 1h)

> Send ValidWriteIdList and tableId to get_*_constraints HMS APIs
> ---------------------------------------------------------------
>
>                 Key: HIVE-23931
>                 URL: https://issues.apache.org/jira/browse/HIVE-23931
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Kishen Das
>            Assignee: Ashish Sharma
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Send ValidWriteIdList and tableId to get_*_constraints HMS APIs. This would 
> be required in order to decide whether the response should be served from the 
> Cache or backing DB.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to