zhangbutao commented on code in PR #4905:
URL: https://github.com/apache/hive/pull/4905#discussion_r1414001092
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java:
##########
@@ -5158,20 +5157,27 @@ public DropPartitionsResult drop_partitions_req(
}
}
}
+ if (result.isEmpty()) {
+ hasMissingParts = true;
+ if (!ifExists) {
+ // fail-fast for missing partition expr
+ break;
+ }
+ }
parts.addAll(result);
}
} else if (spec.isSetNames()) {
partNames = spec.getNames();
- minCount = partNames.size();
parts = ms.getPartitionsByNames(catName, dbName, tblName,
new GetPartitionsArgs.GetPartitionsArgsBuilder()
.partNames(partNames).skipColumnSchemaForPartition(request.isSkipColumnSchemaForPartition())
.build());
+ hasMissingParts = (parts.size() != partNames.size());
Review Comment:
https://github.com/apache/hive/pull/4905/commits/7870dadeca8f73ae92619cc0c0014cecba0c689e
You added the `dropPartitionsByNames` api, does it mean we never use this
`else if` clause before?
If so, please revert this commit
https://github.com/apache/hive/pull/4905/commits/7870dadeca8f73ae92619cc0c0014cecba0c689e,
we don't need add a redundant new api to test it.
--
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]