diff --git a/paimon-core/src/main/java/org/apache/paimon/catalog/AbstractCatalog.java b/paimon-core/src/main/java/org/apache/paimon/catalog/AbstractCatalog.java index c71a644fac36..6e27cf1e5090 100644 --- a/paimon-core/src/main/java/org/apache/paimon/catalog/AbstractCatalog.java +++ b/paimon-core/src/main/java/org/apache/paimon/catalog/AbstractCatalog.java @@ -300,29 +300,21 @@ public void createTable(Identifier identifier, Schema schema, boolean ignoreIfEx } copyTableDefaultOptions(schema.options()); - try { - switch (Options.fromMap(schema.options()).get(TYPE)) { - case TABLE: - case MATERIALIZED_TABLE: - createTableImpl(identifier, schema); - break; - case OBJECT_TABLE: - createObjectTable(identifier, schema); - break; - case FORMAT_TABLE: - createFormatTable(identifier, schema); - break; - } - } catch (TableAlreadyExistException e) { - if (ignoreIfExists) { - return; - } - throw e; + switch (Options.fromMap(schema.options()).get(TYPE)) { + case TABLE: + case MATERIALIZED_TABLE: + createTableImpl(identifier, schema); + break; + case OBJECT_TABLE: + createObjectTable(identifier, schema); + break; + case FORMAT_TABLE: + createFormatTable(identifier, schema); + break; } } - private void createObjectTable(Identifier identifier, Schema schema) - throws TableAlreadyExistException { + private void createObjectTable(Identifier identifier, Schema schema) { RowType rowType = schema.rowType(); checkArgument( rowType.getFields().isEmpty() @@ -337,8 +329,7 @@ private void createObjectTable(Identifier identifier, Schema schema) createTableImpl(identifier, schema.copy(ObjectTable.SCHEMA)); } - protected abstract void createTableImpl(Identifier identifier, Schema schema) - throws TableAlreadyExistException; + protected abstract void createTableImpl(Identifier identifier, Schema schema); @Override public void renameTable(Identifier fromTable, Identifier toTable, boolean ignoreIfNotExists)