apache/seatunnel · warning
Skipping unsupported default value for column {} in table {}
Error message
Skipping unsupported default value for column {} in table {}. What it means
During SQL Server schema-change (DDL) application, a column has a default value that the dialect cannot translate into a `ALTER TABLE ... ADD CONSTRAINT ... DEFAULT ... FOR <col>` clause, so the ADD-DEFAULT DDL is skipped and a warning is logged. The column is still created/modified; only its default value is not applied.
Source
Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/sqlserver/SqlServerDialect.java:423
.append(quoteIdentifier(constraintName));
ddlSQL.add(dropConstraintSQL.toString());
}
}
// Process column default
String defaultValueClause =
sqlClauseWithDefaultValue(typeDefine, sourceDialectName);
if (StringUtils.isNotBlank(defaultValueClause)) {
StringBuilder defaultSqlBuilder =
buildAlterTablePrefix(tablePath)
.append(" ADD ")
.append(defaultValueClause)
.append(" FOR ")
.append(quoteIdentifier(column.getName()));
ddlSQL.add(defaultSqlBuilder.toString());
}
} else {
log.warn(
"Skipping unsupported default value for column {} in table {}.",
column.getName(),
tablePath.getFullName());
}
}
// Process column comment
if (column.getComment() != null) {
ddlSQL.add(buildColumnCommentSQL(tablePath, column));
}
// Build the SQL statement that modifies the column
StringBuilder sqlBuilder =
buildAlterTablePrefix(tablePath)
.append(" ALTER COLUMN ")
.append(quoteIdentifier(column.getName()))
.append(" ")
.append(columnType);View on GitHub (pinned to cf67b549a7)
Solutions
- Check the log to identify the column, then manually add the default in SQL Server: ALTER TABLE <t> ADD CONSTRAINT <c> DEFAULT <expr> FOR <col>.
- Simplify the source column's default value to a plain literal that the dialect can render.
- If the default is not needed for the sink, ignore the warning.
- Upgrade/patch SqlServerDialect.defaultValueClause to support the missing default expression type.
Example fix
// before (source column with unsupported default)
Column.of("created", LocalDateTimeType()).withDefaultValue(...complex expression...)
// after
Column.of("created", LocalDateTimeType()).withDefaultValue(DefaultValue.of(null)) // or a literal; set the default manually in SQL Server Defensive patterns
Strategy: validation
Validate before calling
// Before running schema evolution, check every column's default value is a plain literal:
boolean hasSupportedDefault(CatalogColumn c) {
return c.getDefaultValue() == null || c.getDefaultValue().getValue() instanceof Number
|| c.getDefaultValue().getValue() instanceof String
|| c.getDefaultValue().getValue() instanceof Boolean;
}
columns.stream().filter(c -> !hasSupportedDefault(c)).forEach(c -> log.warn("Manual default needed for " + c.getName())); Type guard
boolean isPlainLiteralDefault(Object v) { return v == null || v instanceof Number || v instanceof String || v instanceof Boolean; } Prevention
- Keep default values as simple literals in source schemas
- Audit source tables for function/expression defaults before schema evolution
- Plan to apply complex defaults manually post-migration
When it happens
Trigger: Running schema evolution (applySchemaChange) on SQL Server when a CatalogColumn carries a defaultValue whose literal type or expression is not supported by SqlServerDialect's defaultValueClause builder (e.g. complex/function-based defaults, unsupported literal types).
Common situations: CDC/schema-evolution jobs syncing tables whose source columns have non-literal defaults (CURRENT_TIMESTAMP expressions, sequence defaults, bind variables); tables mirrored from other databases with exotic default expressions.
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
- Error executing SqlServer SQL: ${ddlSQL}
- Column '{}' in table {} is NOT NULL but has no DEFAULT; addi
- Column {} already exists in table {}. Skipping change column
- Column {} already exists in table {}. Skipping add column op
- Column {} does not exist in table {}. Skipping drop column o
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/093cb3ed01bf01a8.
Report an issue: GitHub.