Skip to content

Commit

Permalink
remove Catalog.ColumnAlreadyExistException when apply applyAddColumnE…
Browse files Browse the repository at this point in the history
…ventWithPosition in paimon. because use may create table already before with the target column.
  • Loading branch information
[email protected] committed Jan 1, 2025
1 parent 7025537 commit 45f460e
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,11 @@ private void applyDropColumn(DropColumnEvent event) throws SchemaEvolveException
} catch (Catalog.TableNotExistException
| Catalog.ColumnAlreadyExistException
| Catalog.ColumnNotExistException e) {
throw new SchemaEvolveException(event, e.getMessage(), e);
if (e instanceof Catalog.ColumnAlreadyExistException) {
LOG.warn("{}, skip it.", e.getMessage());
} else {
throw new SchemaEvolveException(event, e.getMessage(), e);
}
}
}

Expand All @@ -312,6 +316,7 @@ private void applyRenameColumn(RenameColumnEvent event) throws SchemaEvolveExcep
} catch (Catalog.TableNotExistException
| Catalog.ColumnAlreadyExistException
| Catalog.ColumnNotExistException e) {

throw new SchemaEvolveException(event, e.getMessage(), e);
}
}
Expand Down

0 comments on commit 45f460e

Please sign in to comment.