apache/seatunnel · info

Column {} already exists in table {}. Skipping add column op

Error message

Column {} already exists in table {}. Skipping add column operation. event: {}

What it means

When applying an AlterTableAddColumnEvent, JdbcDialect first checks columnExists(); if the column is already present the DDL is skipped and this warning is logged. This makes add-column schema evolution idempotent across restarts and replays.

Source

Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/JdbcDialect.java:542

                            && columnExists(
                                    connection,
                                    tablePath,
                                    changeColumnEvent.getColumn().getName())) {
                        log.warn(
                                "Column {} already exists in table {}. Skipping change column operation. event: {}",
                                changeColumnEvent.getColumn().getName(),
                                tablePath.getFullName(),
                                event);
                        return;
                    }
                }
                applySchemaChange(connection, tablePath, changeColumnEvent);
            } else if (event instanceof AlterTableModifyColumnEvent) {
                applySchemaChange(connection, tablePath, (AlterTableModifyColumnEvent) event);
            } else if (event instanceof AlterTableAddColumnEvent) {
                AlterTableAddColumnEvent addColumnEvent = (AlterTableAddColumnEvent) event;
                if (columnExists(connection, tablePath, addColumnEvent.getColumn().getName())) {
                    log.warn(
                            "Column {} already exists in table {}. Skipping add column operation. event: {}",
                            addColumnEvent.getColumn().getName(),
                            tablePath.getFullName(),
                            event);
                    return;
                }
                applySchemaChange(connection, tablePath, addColumnEvent);
            } else if (event instanceof AlterTableDropColumnEvent) {
                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);

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Benign if the column already matches the desired schema — no action required
  2. If column exists with a different type than intended, alter it manually or via a modify-column event
  3. Check upstream for duplicate schema-change event emission (multiple writers, replay after restart)
Defensive patterns

Strategy: validation

Validate before calling

// check before emitting add-column DDL
if (columnExists(conn, tablePath, columnName)) {
    log.info("column already exists; skip ADD COLUMN");
}

Prevention

When it happens

Trigger: applySchemaChange receives an AlterTableAddColumnEvent for a column that already exists in the target table (duplicate or already-applied event).

Common situations: Task restart/replay of schema change events; upstream resends the same add-column; another job already added the column; name collision with an existing column.

Understand the failure class

Background: "already exists" / EEXIST / FileAlreadyExistsException: what the 'file already exists' error means and how to fix it — this error's family across 37 libraries.

Related errors


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