bowenli86 commented on a change in pull request #8353: [FLINK-12233][hive]
Support table related operations in HiveCatalog
URL: https://github.com/apache/flink/pull/8353#discussion_r283056348
##########
File path:
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/HiveCatalogBase.java
##########
@@ -89,6 +101,34 @@ private static IMetaStoreClient
getMetastoreClient(HiveConf hiveConf) {
}
}
+ // ------ APIs ------
+
+ /**
+ * Validate input base table.
+ *
+ * @param catalogBaseTable the base table to be validated
+ * @throws IllegalArgumentException thrown if the input base table is
invalid.
+ */
+ protected abstract void validateCatalogBaseTable(CatalogBaseTable
catalogBaseTable)
Review comment:
Make sense. Though IllegalArgumentException can be thrown when any part of
the input table is invalid, a better signature may just be throwing
CatalogException to conform with that of other existing catalog APIs, since
we've defined CatalogException's use case as "in case of any runtime exception".
I don't think returning boolean is a good signature as the check can be
fairly complicated and the caller won't know which part is invalid. Returning
boolean would be a good option for a single criteria check like "bool
isTable()".
----------------------------------------------------------------
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