{"record":{"id":"dcb643e2162beb0a","repo":"apache/seatunnel","slug":"column-already-exists-in-table-skipping-cha-dcb643","errorCode":null,"errorMessage":"Column {} already exists in table {}. Skipping change column operation. event: {}","messagePattern":"Column (.+?) already exists in table (.+?)\\. Skipping change column operation\\. event: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/JdbcDialect.java","lineNumber":528,"sourceCode":"    default void applySchemaChange(\n            Connection connection, TablePath tablePath, SchemaChangeEvent event)\n            throws SQLException {\n        if (event instanceof AlterTableColumnsEvent) {\n            for (AlterTableColumnEvent columnEvent : ((AlterTableColumnsEvent) event).getEvents()) {\n                applySchemaChange(connection, tablePath, columnEvent);\n            }\n        } else {\n            if (event instanceof AlterTableChangeColumnEvent) {\n                AlterTableChangeColumnEvent changeColumnEvent = (AlterTableChangeColumnEvent) event;\n                if (!changeColumnEvent\n                        .getOldColumn()\n                        .equals(changeColumnEvent.getColumn().getName())) {\n                    if (!columnExists(connection, tablePath, changeColumnEvent.getOldColumn())\n                            && columnExists(\n                                    connection,\n                                    tablePath,\n                                    changeColumnEvent.getColumn().getName())) {\n                        log.warn(\n                                \"Column {} already exists in table {}. Skipping change column operation. event: {}\",\n                                changeColumnEvent.getColumn().getName(),\n                                tablePath.getFullName(),\n                                event);\n                        return;\n                    }\n                }\n                applySchemaChange(connection, tablePath, changeColumnEvent);\n            } else if (event instanceof AlterTableModifyColumnEvent) {\n                applySchemaChange(connection, tablePath, (AlterTableModifyColumnEvent) event);\n            } else if (event instanceof AlterTableAddColumnEvent) {\n                AlterTableAddColumnEvent addColumnEvent = (AlterTableAddColumnEvent) event;\n                if (columnExists(connection, tablePath, addColumnEvent.getColumn().getName())) {\n                    log.warn(\n                            \"Column {} already exists in table {}. Skipping add column operation. event: {}\",\n                            addColumnEvent.getColumn().getName(),\n                            tablePath.getFullName(),\n                            event);","sourceCodeStart":510,"sourceCodeEnd":546,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/JdbcDialect.java#L510-L546","documentation":"During schema-evolution application, when handling a change-column event, JdbcDialect checks whether the new column name already exists while the old one does not. If so, the rename/change was evidently already applied (idempotency guard), so the operation is skipped with this warning and returns without error.","triggerScenarios":"applySchemaChange receives an AlterTableChangeColumnEvent whose target column already exists in the target table and whose old column no longer exists — i.e. a duplicate/replayed schema-change event.","commonSituations":"Schema-change events replayed after checkpoint/task restart; multiple sinks or upstream connectors emitting the same rename; CDC source resending evolution history.","solutions":["No action needed — the change was already applied; the warning confirms idempotent skip","If the rename was NOT intended, verify the upstream CDC/schema-change configuration and column mapping","Ensure only one pipeline writes schema changes to the same table to avoid duplicate events"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// idempotency pre-check before applying change-column\nif (columnExists(conn, tablePath, newName) && !columnExists(conn, tablePath, oldName)) {\n    log.info(\"change column already applied; skip\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Design schema-evolution handlers to be idempotent (check-before-alter)","Avoid multiple pipelines writing schema changes to the same table","Deduplicate/replay-protect CDC schema-change events"],"tags":["schema-evolution","jdbc","idempotency","ddl"],"backgroundTag":"file-already-exists","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"}