wecharyu commented on code in PR #5104:
URL: https://github.com/apache/hive/pull/5104#discussion_r1509948957
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java:
##########
@@ -4392,19 +4392,17 @@ private List<Partition> createPartitionFolders(final
List<Partition> partitionsT
@Override
public AddPartitionsResult add_partitions_req(AddPartitionsRequest request)
throws TException {
- startFunction("add_partitions_req",
- ": db=" + request.getDbName() + " tab=" + request.getTblName());
- AddPartitionsResult result = new AddPartitionsResult();
- if (request.getParts().isEmpty()) {
- return result;
- }
String catName = request.isSetCatName() ? request.getCatName() :
getDefaultCatalog(conf);
String dbName = request.getDbName();
String tblName = request.getTblName();
startTableFunction("add_partitions_req", catName, dbName, tblName);
+ AddPartitionsResult result = new AddPartitionsResult();
Exception ex = null;
try {
+ if (request.getParts().isEmpty()) {
+ return result;
Review Comment:
If we do not move this code into try clause, the `endFunction()` calls would
be missed.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]