ashish-kumar-sharma commented on a change in pull request #2211: URL: https://github.com/apache/hive/pull/2211#discussion_r626395719
########## File path: standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java ########## @@ -9479,43 +9479,38 @@ void updateMetrics() throws MetaException { @Override public PrimaryKeysResponse get_primary_keys(PrimaryKeysRequest request) throws TException { - String catName = request.isSetCatName() ? request.getCatName() : getDefaultCatalog(conf); - String db_name = request.getDb_name(); - String tbl_name = request.getTbl_name(); - startTableFunction("get_primary_keys", catName, db_name, tbl_name); + if (!request.isSetCatName()) + request.setCatName(getDefaultCatalog(conf)); + startTableFunction("get_primary_keys", request.getCatName(), request.getDb_name(), request.getTbl_name()); List<SQLPrimaryKey> ret = null; Exception ex = null; try { - ret = getMS().getPrimaryKeys(catName, db_name, tbl_name); + ret = getMS().getPrimaryKeys(request); } catch (Exception e) { ex = e; throwMetaException(e); } finally { - endFunction("get_primary_keys", ret != null, ex, tbl_name); + endFunction("get_primary_keys", ret != null, ex, request.getTbl_name()); } return new PrimaryKeysResponse(ret); } @Override public ForeignKeysResponse get_foreign_keys(ForeignKeysRequest request) throws TException { - String catName = request.isSetCatName() ? request.getCatName() : getDefaultCatalog(conf); - String parent_db_name = request.getParent_db_name(); - String parent_tbl_name = request.getParent_tbl_name(); - String foreign_db_name = request.getForeign_db_name(); - String foreign_tbl_name = request.getForeign_tbl_name(); - startFunction("get_foreign_keys", " : parentdb=" + parent_db_name + - " parenttbl=" + parent_tbl_name + " foreigndb=" + foreign_db_name + - " foreigntbl=" + foreign_tbl_name); + if (!request.isSetCatName()) Review comment: Done ########## File path: standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java ########## @@ -9532,93 +9527,85 @@ private void throwMetaException(Exception e) throws MetaException, } @Override - public UniqueConstraintsResponse get_unique_constraints(UniqueConstraintsRequest request) - throws TException { - String catName = request.isSetCatName() ? request.getCatName() : getDefaultCatalog(conf); - String db_name = request.getDb_name(); - String tbl_name = request.getTbl_name(); - startTableFunction("get_unique_constraints", catName, db_name, tbl_name); + public UniqueConstraintsResponse get_unique_constraints(UniqueConstraintsRequest request) throws TException { + if (!request.isSetCatName()) 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org