{"record":{"id":"1daaa40e1d4c3c6c","repo":"apache/seatunnel","slug":"unsupported-schemachangeevent-event-getevent","errorCode":null,"errorMessage":"Unsupported schemaChangeEvent : \" + event.getEventType()","messagePattern":"Unsupported schemaChangeEvent : \" \\+ event\\.getEventType\\(\\)","errorType":"exception","errorClass":"SeaTunnelException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-starrocks/src/main/java/org/apache/seatunnel/connectors/seatunnel/starrocks/util/SchemaUtils.java","lineNumber":119,"sourceCode":"                AlterTableDropColumnEvent dropColumnEvent = (AlterTableDropColumnEvent) event;\n                if (!columnExists(connection, tablePath, dropColumnEvent.getColumn())) {\n                    log.warn(\n                            \"Column {} does not exist in table {}. Skipping drop column operation. event: {}\",\n                            dropColumnEvent.getColumn(),\n                            tablePath.getFullName(),\n                            event);\n                    return;\n                }\n                applySchemaChange(connection, tablePath, dropColumnEvent);\n            } else if (event instanceof AlterTableCommentEvent\n                    || event instanceof AlterColumnCommentEvent) {\n                // Comment-only changes are not supported by StarRocks sink, safely ignore\n                log.info(\n                        \"Ignoring comment change event for table {} - StarRocks sink does not support comment sync: {}\",\n                        tablePath.getFullName(),\n                        event.getEventType());\n            } else {\n                throw new SeaTunnelException(\n                        \"Unsupported schemaChangeEvent : \" + event.getEventType());\n            }\n        }\n    }\n\n    public static void applySchemaChange(\n            Connection connection, TablePath tablePath, AlterTableChangeColumnEvent event)\n            throws SQLException {\n        ComparableVersion targetVersion = new ComparableVersion(MIN_VERSION_TABLE_CHANGE_COLUMN);\n        ComparableVersion currentVersion;\n        try (Statement statement = connection.createStatement();\n                ResultSet resultSet =\n                        statement.executeQuery(\"SELECT CURRENT_VERSION() as version\")) {\n            resultSet.next();\n            String version = resultSet.getString(1);\n            log.debug(\"starrocks version: {}\", version);\n            String versionOne = version.split(\" \")[0];\n            currentVersion = new ComparableVersion(versionOne);","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-starrocks/src/main/java/org/apache/seatunnel/connectors/seatunnel/starrocks/util/SchemaUtils.java#L101-L137","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["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.","Filter out unsupported events before the sink if the source supports event filtering.","Upgrade SeaTunnel — newer versions may support more schema change event types for StarRocks."],"exampleFix":"// before\nschema_change_producer = \"MySQL-CDC\"  // rename/truncate events flow to sink\n// after\n// disable auto schema evolution; apply ALTERs to StarRocks manually\nschema_change_producer = \"NONE\"","handlingStrategy":"try-catch","validationCode":"// Pre-filter unsupported schema change event types before the sink\nSet<SchemaChangeEventType> supported = Set.of(ADD_COLUMN, DROP_COLUMN, CHANGE_COLUMN_TYPE /* per sink version */);\nif (!supported.contains(event.getEventType())) {\n    log.warn(\"Skipping unsupported event {}\", event.getEventType());\n    return;\n}","typeGuard":"function isSupportedSchemaEvent(eventType) {\n  return [\"ADD_COLUMN\",\"DROP_COLUMN\",\"CHANGE_COLUMN_TYPE\"].includes(eventType);\n}","tryCatchPattern":"try {\n    SchemaUtils.applySchemaChange(event, conn, tablePath);\n} catch (SeaTunnelException e) {\n    if (e.getMessage().startsWith(\"Unsupported schemaChangeEvent\")) {\n        // apply the DDL manually to StarRocks or disable schema evolution in the source\n    }\n}","preventionTips":["Only enable schema evolution when upstream DDL is limited to supported column changes.","Manually manage renames/truncates — the StarRocks sink will not mirror them.","Upgrade SeaTunnel when the CDC source emits event types newer than the sink's mapping."],"tags":["schema-change","starrocks","cdc","unsupported-event"],"backgroundTag":"unsupported-operation","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}