wecharyu commented on code in PR #4905:
URL: https://github.com/apache/hive/pull/4905#discussion_r1410296242
##########
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:
Sure, will add a test to cover 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]