apache/seatunnel · error · UnsupportedOperationException
Unsupported alter table event
Error message
Unsupported alter table event: ${event} What it means
AlterPaimonTableSchemaEventHandler.apply() dispatches a SchemaChangeEvent to a known handler branch (AddColumn, DropColumn, RenameColumn, AlterColumnType, AlterTableColumn, AlterTableComment). Any other event type reaches the final else branch and is rejected with UnsupportedOperationException because Paimon sink cannot sync it.
Solutions
- Log the event's class name and check which SchemaChangeEvent types AlterPaimonTableSchemaEventHandler supports
- Filter/drop the unsupported event upstream before applying schema evolution
- Add an explicit handler branch for the event type if Paimon can express the change
- Upgrade the connector version which may support more event types
Example fix
// before
if (event instanceof SomeNewEvent) { handler.apply(event); }
// after
if (event instanceof SomeNewEvent && isSupported(event)) { handler.apply(event); }
else { log.warn("Skipping unsupported event {}", event.getClass()); } Defensive patterns
Strategy: try-catch
Validate before calling
boolean supported = event instanceof AddColumnEvent || event instanceof DropColumnEvent || event instanceof RenameColumnEvent || event instanceof AlterColumnTypeEvent || event instanceof AlterTableColumnEvent || event instanceof AlterTableCommentEvent;
Type guard
boolean isSupportedSchemaEvent(SchemaChangeEvent e) { return e instanceof AddColumnEvent || e instanceof DropColumnEvent || e instanceof RenameColumnEvent || e instanceof AlterColumnTypeEvent || e instanceof AlterTableColumnEvent || e instanceof AlterTableCommentEvent; } Try / catch
try { handler.apply(event); } catch (UnsupportedOperationException e) { log.warn("Skipping schema event {}: {}", event.getClass().getSimpleName(), e.getMessage()); } Prevention
- Filter schema-change events to supported types before schema evolution
- Keep connector-paimon and CDC source versions aligned
- Log unsupported event classes for monitoring instead of failing the job
When it happens
Trigger: Feeding a schema-change event not covered by the if/else chain (e.g. unsupported Paimon SchemaChangeEvent subclass) into apply() while evolving a Paimon table schema from upstream CDC events.
Common situations: CDC pipelines forwarding raw schema-change events from MySQL/other sources into Paimon where the upstream emits an event type the handler has no branch for (e.g. new event types added in a newer connector or catalog version).
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Cannot convert field
- ColumnAlreadyExistException
- ColumnNotExistException
- Failed to resolve schemaChangeEvent, just skip.
- [FileSchemaEvolution] DROP event references unknown column
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/6e1f02b8545e97e2.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/sink/schema/handler/AlterPaimonTableSchemaEventHandler.java:94
this.paimonCatalog = paimonCatalog;
this.sinkPaimonTableSchema = sinkPaimonTableSchema;
this.paimonTablePath = paimonTablePath;
this.branch = branch;
}
public TableSchema apply(SchemaChangeEvent event) {
TableSchema newSchema = TABLESCHEMACHANGER.reset(sourceTableSchema).apply(event);
if (event instanceof AlterTableColumnsEvent) {
for (AlterTableColumnEvent columnEvent : ((AlterTableColumnsEvent) event).getEvents()) {
applySingleSchemaChangeEvent(columnEvent);
}
} else if (event instanceof AlterTableColumnEvent) {
applySingleSchemaChangeEvent(event);
} else if (event instanceof AlterTableCommentEvent) {
// Table-level comment changes, handle gracefully
applySingleSchemaChangeEvent(event);
} else {
throw new UnsupportedOperationException("Unsupported alter table event: " + event);
}
return newSchema;
}
private void applySingleSchemaChangeEvent(SchemaChangeEvent event) {
Identifier identifier = toIdentifier();
if (event instanceof AlterTableAddColumnEvent) {
AlterTableAddColumnEvent alterTableAddColumnEvent = (AlterTableAddColumnEvent) event;
Column column = alterTableAddColumnEvent.getColumn();
String afterColumnName = alterTableAddColumnEvent.getAfterColumn();
SchemaChange.Move move =
StringUtils.isBlank(afterColumnName)
? null
: SchemaChange.Move.after(column.getName(), afterColumnName);
BasicTypeDefine<DataType> reconvertColumn = PaimonTypeMapper.INSTANCE.reconvert(column);
DataType nativeType = reconvertColumn.getNativeType();
List<SchemaChange> schemaChanges = new ArrayList<>();
schemaChanges.add(View on GitHub (pinned to cf67b549a7)