apache/seatunnel · error · SeaTunnelException

Unsupported schemaChangeEvent : " + event.getEventType()

Error message

Unsupported schemaChangeEvent : " + event.getEventType()

What it means

SchemaUtils.applySchemaChange handles supported SchemaChangeEvent types (ADD COLUMN, DROP COLUMN, type changes, comment-only ignored) for the StarRocks sink. Any other event type falls through to the else branch and throws SeaTunnelException "Unsupported schemaChangeEvent : ...". It signals that the sink cannot synchronize this particular schema change to StarRocks.

Source

Thrown at seatunnel-connectors-v2/connector-starrocks/src/main/java/org/apache/seatunnel/connectors/seatunnel/starrocks/util/SchemaUtils.java:119

                AlterTableDropColumnEvent dropColumnEvent = (AlterTableDropColumnEvent) event;
                if (!columnExists(connection, tablePath, dropColumnEvent.getColumn())) {
                    log.warn(
                            "Column {} does not exist in table {}. Skipping drop column operation. event: {}",
                            dropColumnEvent.getColumn(),
                            tablePath.getFullName(),
                            event);
                    return;
                }
                applySchemaChange(connection, tablePath, dropColumnEvent);
            } else if (event instanceof AlterTableCommentEvent
                    || event instanceof AlterColumnCommentEvent) {
                // Comment-only changes are not supported by StarRocks sink, safely ignore
                log.info(
                        "Ignoring comment change event for table {} - StarRocks sink does not support comment sync: {}",
                        tablePath.getFullName(),
                        event.getEventType());
            } else {
                throw new SeaTunnelException(
                        "Unsupported schemaChangeEvent : " + event.getEventType());
            }
        }
    }

    public static void applySchemaChange(
            Connection connection, TablePath tablePath, AlterTableChangeColumnEvent event)
            throws SQLException {
        ComparableVersion targetVersion = new ComparableVersion(MIN_VERSION_TABLE_CHANGE_COLUMN);
        ComparableVersion currentVersion;
        try (Statement statement = connection.createStatement();
                ResultSet resultSet =
                        statement.executeQuery("SELECT CURRENT_VERSION() as version")) {
            resultSet.next();
            String version = resultSet.getString(1);
            log.debug("starrocks version: {}", version);
            String versionOne = version.split(" ")[0];
            currentVersion = new ComparableVersion(versionOne);

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Restrict the pipeline's schema-change events to supported ones (column add/drop/modify) or disable schema evolution in the source and apply DDL to StarRocks manually.
  2. Filter out unsupported events before the sink if the source supports event filtering.
  3. Upgrade SeaTunnel — newer versions may support more schema change event types for StarRocks.

Example fix

// before
schema_change_producer = "MySQL-CDC"  // rename/truncate events flow to sink
// after
// disable auto schema evolution; apply ALTERs to StarRocks manually
schema_change_producer = "NONE"
Defensive patterns

Strategy: try-catch

Validate before calling

// Pre-filter unsupported schema change event types before the sink
Set<SchemaChangeEventType> supported = Set.of(ADD_COLUMN, DROP_COLUMN, CHANGE_COLUMN_TYPE /* per sink version */);
if (!supported.contains(event.getEventType())) {
    log.warn("Skipping unsupported event {}", event.getEventType());
    return;
}

Type guard

function isSupportedSchemaEvent(eventType) {
  return ["ADD_COLUMN","DROP_COLUMN","CHANGE_COLUMN_TYPE"].includes(eventType);
}

Try / catch

try {
    SchemaUtils.applySchemaChange(event, conn, tablePath);
} catch (SeaTunnelException e) {
    if (e.getMessage().startsWith("Unsupported schemaChangeEvent")) {
        // apply the DDL manually to StarRocks or disable schema evolution in the source
    }
}

Prevention

When it happens

Trigger: A CDC pipeline emits a schema change event whose type is not in the supported set (e.g. TRUNCATE, RENAME TABLE, RENAME COLUMN or a change type added by a newer CDC source) and StarRocks sink's applySchemaChange receives it.

Common situations: MySQL CDC source captures DDL like table renames or truncates that StarRocks sink does not mirror; schema evolution enabled on a pipeline whose upstream generates event types beyond add/drop/modify column; version mismatch where a newer source connector emits events this sink version doesn't know.

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


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/1daaa40e1d4c3c6c. Report an issue: GitHub.