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_r281853049
########## File path: flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/HiveCatalog.java ########## @@ -85,49 +86,39 @@ public void alterDatabase(String name, CatalogDatabase newDatabase, boolean igno // ------ tables and views------ - @Override - public void dropTable(ObjectPath tablePath, boolean ignoreIfNotExists) - throws TableNotExistException, CatalogException { - throw new UnsupportedOperationException(); - } - - @Override - public void renameTable(ObjectPath tablePath, String newTableName, boolean ignoreIfNotExists) - throws TableNotExistException, TableAlreadyExistException, CatalogException { - throw new UnsupportedOperationException(); - } - @Override public void createTable(ObjectPath tablePath, CatalogBaseTable table, boolean ignoreIfExists) throws TableAlreadyExistException, DatabaseNotExistException, CatalogException { - throw new UnsupportedOperationException(); - } - @Override - public void alterTable(ObjectPath tableName, CatalogBaseTable newTable, boolean ignoreIfNotExists) - throws TableNotExistException, CatalogException { - throw new UnsupportedOperationException(); - } + validateHiveCatalogTable(table); - @Override - public List<String> listTables(String databaseName) - throws DatabaseNotExistException, CatalogException { - throw new UnsupportedOperationException(); + createHiveTable( + tablePath, + HiveCatalogUtil.createHiveTable(tablePath, table), + ignoreIfExists); } @Override - public List<String> listViews(String databaseName) throws DatabaseNotExistException, CatalogException { - throw new UnsupportedOperationException(); + public void alterTable(ObjectPath tablePath, CatalogBaseTable newTable, boolean ignoreIfNotExists) + throws TableNotExistException, CatalogException { + validateHiveCatalogTable(newTable); Review comment: Wouldn't we want to do similar validation for GenericHiveMetastoreCatalog? ---------------------------------------------------------------- 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