xuefuz 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_r282198787
########## File path: flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/GenericHiveMetastoreCatalog.java ########## @@ -95,144 +106,103 @@ public void alterDatabase(String name, CatalogDatabase newDatabase, boolean igno // ------ tables and views------ @Override - public void dropTable(ObjectPath tablePath, boolean ignoreIfNotExists) - throws TableNotExistException, CatalogException { - try { - client.dropTable( - tablePath.getDatabaseName(), - tablePath.getObjectName(), - // Indicate whether associated data should be deleted. - // Set to 'true' for now because Flink tables shouldn't have data in Hive. Can be changed later if necessary - true, - ignoreIfNotExists); - } catch (NoSuchObjectException e) { - if (!ignoreIfNotExists) { - throw new TableNotExistException(catalogName, tablePath); - } - } catch (TException e) { - throw new CatalogException( - String.format("Failed to drop table %s", tablePath.getFullName()), e); + public void validateCatalogBaseTable(CatalogBaseTable table) throws IllegalArgumentException { + // TODO: invalidate HiveCatalogView + if (table instanceof HiveCatalogTable) { Review comment: I'm wondering if we should specify what we are expecting and throw exceptions if condition isn't met. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services