xuefuz commented on a change in pull request #8926: [FLINK-13021][table][hive]
unify catalog partition implementations
URL: https://github.com/apache/flink/pull/8926#discussion_r299243763
##########
File path:
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/HiveCatalog.java
##########
@@ -623,8 +622,10 @@ public void createPartition(ObjectPath tablePath,
CatalogPartitionSpec partition
checkNotNull(partitionSpec, "CatalogPartitionSpec cannot be
null");
checkNotNull(partition, "Partition cannot be null");
- if (!(partition instanceof HiveCatalogPartition)) {
- throw new CatalogException("Currently only supports
HiveCatalogPartition");
+ boolean isGeneric =
Boolean.valueOf(partition.getProperties().get(CatalogConfig.IS_GENERIC));
+
+ if (isGeneric) {
+ throw new CatalogException("Currently only supports
non-generic CatalogPartition");
Review comment:
nit: The msg doesn't seem to be a complete sentence. Maybe something like
"only xxx is supported currently". Same as below.
----------------------------------------------------------------
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