ashish-kumar-sharma commented on a change in pull request #1419:
URL: https://github.com/apache/hive/pull/1419#discussion_r487375367



##########
File path: 
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/DummyRawStoreForJdoConnection.java
##########
@@ -1014,6 +1015,11 @@ public FileMetadataHandler 
getFileMetadataHandler(FileMetadataExprType type) {
     return null;
   }
 
+  @Override public SQLAllTableConstraints getAllTableConstraints(String 
catName, String db_name, String tbl_name)

Review comment:
       Done

##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/RawStore.java
##########
@@ -1485,6 +1485,16 @@ void getFileMetadataByExpr(List<Long> fileIds, 
FileMetadataExprType type, byte[]
   List<SQLCheckConstraint> getCheckConstraints(String catName, String db_name,
                                                    String tbl_name) throws 
MetaException;
 
+  /**
+   *  Get all constraints of the table
+   * @param catName catalog name
+   * @param db_name database name
+   * @param tbl_name table name
+   * @return all constraints for this table
+   * @throws MetaException error accessing the RDBMS
+   */
+  SQLAllTableConstraints getAllTableConstraints(String catName, String 
db_name, String tbl_name)

Review comment:
       Done

##########
File path: 
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
##########
@@ -2811,6 +2811,26 @@ public GetFieldsResponse 
getFieldsRequest(GetFieldsRequest req)
     return client.get_check_constraints(req).getCheckConstraints();
   }
 
+  @Override
+  public SQLAllTableConstraints 
getAllTableConstraints(AllTableConstraintsRequest req)
+      throws MetaException, NoSuchObjectException, TException {
+    long t1 = System.currentTimeMillis();
+
+    try {
+      if (!req.isSetCatName()) {
+        req.setCatName(getDefaultCatalog(conf));
+      }
+
+      return client.get_all_table_constraints(req).getAllTableConstraints();
+    } finally {
+      long diff = System.currentTimeMillis() - t1;

Review comment:
       done




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