apache/seatunnel · warning

Default value is not supported for column {} in table {}. Sk

Error message

Default value is not supported for column {} in table {}. Skipping add column operation. event: {}

What it means

While generating ADD COLUMN DDL for a cross-catalog schema change, if the column is a NOT NULL TIMESTAMP and the dialect cannot append a default value (required by some databases for NOT NULL columns), the DDL fragment is not emitted and this warning is logged — the column may be added without NOT NULL or the operation is partially skipped.

Source

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

                        .append(tableIdentifier(tablePath))
                        .append(" ")
                        .append("ADD COLUMN")
                        .append(" ")
                        .append(quoteIdentifier(event.getColumn().getName()))
                        .append(" ")
                        .append(columnType);

        // Only decorate with default value when source dialect is same as sink dialect
        // Todo Support for cross-database default values for ddl statements
        if (event.getColumn().getDefaultValue() == null) {
            sqlBuilder.append(" ").append(event.getColumn().isNullable() ? "NULL" : "NOT NULL");
        } else {
            if (event.getColumn().isNullable()) {
                sqlBuilder.append(" NULL");
            } else if (sameCatalog) {
                sqlBuilder.append(" ").append(event.getColumn().isNullable() ? "NULL" : "NOT NULL");
            } else if (SqlType.TIMESTAMP.equals(event.getColumn().getDataType().getSqlType())) {
                log.warn(
                        "Default value is not supported for column {} in table {}. Skipping add column operation. event: {}",
                        event.getColumn().getName(),
                        tablePath.getFullName(),
                        event);
            } else {
                sqlBuilder.append(" NOT NULL");
            }
            if (sameCatalog) {
                sqlBuilder
                        .append(" ")
                        .append(sqlClauseWithDefaultValue(typeDefine, sourceDialectName));
            }
        }

        if (event.getColumn().getComment() != null) {
            sqlBuilder
                    .append(" ")
                    .append("COMMENT ")

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Make the column nullable in the upstream schema so NULL can be appended
  2. Add an explicit default value for the timestamp column before/instead of the evolution event
  3. Enable same-catalog evolution (sink and source same database type) to get NOT NULL handled natively
  4. Apply the column manually with the desired DDL, then let the pipeline continue

Example fix

// before
-- event: ADD COLUMN updated_at TIMESTAMP NOT NULL (no default)
// after
ALTER TABLE t ADD COLUMN updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;
Defensive patterns

Strategy: fallback

Validate before calling

// detect the unsupported combination before evolution
boolean bad = !column.isNullable()
    && SqlType.TIMESTAMP.equals(column.getDataType().getSqlType())
    && column.getDefaultValue() == null
    && !sameCatalog;
if (bad) { /* add default or make nullable */ }

Prevention

When it happens

Trigger: applySchemaChange adding a TIMESTAMP column that is non-nullable, where sameCatalog is false (cross-catalog/dialect translation) and no default value can be generated; the code path logs the warning instead of appending NOT NULL/default.

Common situations: Schema evolution from a CDC source into a different database type (e.g. MySQL -> Postgres) with NOT NULL timestamp columns lacking defaults; older DB versions requiring defaults on added NOT NULL columns.

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/0ad38654e71a9835. Report an issue: GitHub.