ashish-kumar-sharma commented on a change in pull request #1419:
URL: https://github.com/apache/hive/pull/1419#discussion_r495132656
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
##########
@@ -5661,184 +5664,69 @@ public void dropConstraint(String dbName, String
tableName, String constraintNam
}
}
- public List<SQLDefaultConstraint> getDefaultConstraintList(String dbName,
String tblName) throws HiveException, NoSuchObjectException {
- try {
- return getMSC().getDefaultConstraints(new
DefaultConstraintsRequest(getDefaultCatalog(conf), dbName, tblName));
- } catch (NoSuchObjectException e) {
- throw e;
- } catch (Exception e) {
- throw new HiveException(e);
- }
- }
-
- public List<SQLCheckConstraint> getCheckConstraintList(String dbName, String
tblName) throws HiveException, NoSuchObjectException {
+ public SQLAllTableConstraints getTableConstraints(String dbName, String
tblName)
+ throws HiveException, NoSuchObjectException {
try {
- return getMSC().getCheckConstraints(new
CheckConstraintsRequest(getDefaultCatalog(conf),
- dbName, tblName));
+ return getMSC().getAllTableConstraints(new
AllTableConstraintsRequest(dbName, tblName, getDefaultCatalog(conf)));
} catch (NoSuchObjectException e) {
Review comment:
I have added NoSuchObjectException in getAllTableConstraints() So we
need to handle this here.
----------------------------------------------------------------
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]