nk1506 commented on code in PR #9852: URL: https://github.com/apache/iceberg/pull/9852#discussion_r1527865180
########## hive-metastore/src/main/java/org/apache/iceberg/hive/HiveCatalog.java: ########## @@ -113,6 +124,24 @@ public void initialize(String inputName, Map<String, String> properties) { this.clients = new CachedClientPool(conf, properties); } + @Override + public TableBuilder buildTable(TableIdentifier identifier, Schema schema) { + if (viewExists(identifier)) { Review Comment: This might not be the right place to do this validation. But other catalogs are doing it in different way like [JDBC](https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/jdbc/JdbcCatalog.java#L820) doing the first check . [Nessie](https://github.com/apache/iceberg/blob/main/nessie/src/main/java/org/apache/iceberg/nessie/NessieTableOperations.java#L132) during commit with exceptions, [InMemory](https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/inmemory/InMemoryCatalog.java#L404) during commit too. In case of Hive, we should do before `doRefresh` Since we are the tableType check [Here](https://github.com/apache/iceberg/blob/main/hive-metastore/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java#L147). @szehon-ho Please share your thoughts. -- 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. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org