morningman commented on code in PR #33119: URL: https://github.com/apache/doris/pull/33119#discussion_r1547271992
########## fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergMetadataOps.java: ########## @@ -109,6 +132,14 @@ public void createTable(CreateTableStmt stmt) throws UserException { throw new UserException("Failed to get database: '" + dbName + "' in catalog: " + dorisCatalog.getName()); } String tableName = stmt.getTableName(); + if (db.getTable(tableName).isPresent()) { Review Comment: Same comment as hive catalog ########## fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HiveMetadataOps.java: ########## @@ -186,24 +212,22 @@ public void createTable(CreateTableStmt stmt) throws UserException { } } - private static List<FieldSchema> parsePartitionKeys(Map<String, String> props) { - List<FieldSchema> parsedKeys = new ArrayList<>(); - String pkStr = props.getOrDefault("partition_keys", ""); - if (pkStr.isEmpty()) { - return parsedKeys; - } else { - // TODO: parse string to partition keys list - return parsedKeys; - } - } - @Override public void dropTable(DropTableStmt stmt) throws DdlException { String dbName = stmt.getDbName(); ExternalDatabase<?> db = catalog.getDbNullable(stmt.getDbName()); if (db == null) { throw new DdlException("Failed to get database: '" + dbName + "' in catalog: " + catalog.getName()); } + ExternalTable table = db.getTableNullable(stmt.getTableName()); Review Comment: I think we should check whether table exist in hms, not just in Doris. Same as `databaseExist()` -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org