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 7, 2025
1 parent f91f167 commit 9842c50
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,11 @@ private void applyAddColumn(AddColumnEvent 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 Down Expand Up @@ -293,11 +297,7 @@ private void applyDropColumn(DropColumnEvent event) throws SchemaEvolveException
} catch (Catalog.TableNotExistException
| Catalog.ColumnAlreadyExistException
| Catalog.ColumnNotExistException e) {
if (e instanceof Catalog.ColumnAlreadyExistException) {
LOG.warn("{}, skip it.", e.getMessage());
} else {
throw new SchemaEvolveException(event, e.getMessage(), e);
}
throw new SchemaEvolveException(event, e.getMessage(), e);
}
}

Expand Down

0 comments on commit 9842c50

Please sign in to comment.