xuefuz commented on a change in pull request #8449: [FLINK-12235][hive] Support
partition related operations in HiveCatalog
URL: https://github.com/apache/flink/pull/8449#discussion_r284844282
##########
File path:
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/GenericInMemoryCatalog.java
##########
@@ -540,25 +536,18 @@ private boolean isPartitionSpecValid(ObjectPath
tablePath, CatalogPartitionSpec
return false;
}
- CatalogTable table = (CatalogTable) baseTable;
+ CatalogTable table = (CatalogTable) baseTable;
List<String> partitionKeys = table.getPartitionKeys();
Map<String, String> spec = partitionSpec.getPartitionSpec();
// The size of partition spec should not exceed the size of
partition keys
- if (partitionKeys.size() < spec.size()) {
- return false;
- } else {
- int size = spec.size();
+ return partitionKeys.size() == spec.size() &&
spec.keySet().containsAll(partitionKeys);
Review comment:
This is different in semantics from the original code.
----------------------------------------------------------------
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]
With regards,
Apache Git Services