apache/seatunnel · warning
The length of string column {} is {}, which exceeds the maxi
Error message
The length of string column {} is {}, which exceeds the maximum length of {}, the length will be set to {} What it means
This is a WARN log emitted by RedshiftTypeConverter.reconvert during catalog/table conversion. When a SeaTunnel STRING column's declared length exceeds Redshift's maximum for VARCHAR in a SUPER-typed context (MAX_SUPER_LENGTH), the connector silently clamps the column length to the maximum and logs this warning instead of failing. The resulting DDL will use the clamped length, so data longer than the maximum may be truncated or rejected by Redshift.
Source
Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/redshift/RedshiftTypeConverter.java:305
builder.scale(scale);
break;
case STRING:
if (column.getColumnLength() == null || column.getColumnLength() <= 0) {
builder.columnType(
String.format(
"%s(%d)",
REDSHIFT_CHARACTER_VARYING, MAX_CHARACTER_VARYING_LENGTH));
builder.dataType(REDSHIFT_CHARACTER_VARYING);
builder.length((long) MAX_CHARACTER_VARYING_LENGTH);
} else if (column.getColumnLength() <= MAX_CHARACTER_VARYING_LENGTH) {
builder.columnType(
String.format(
"%s(%d)",
REDSHIFT_CHARACTER_VARYING, column.getColumnLength()));
builder.dataType(REDSHIFT_CHARACTER_VARYING);
builder.length(column.getColumnLength());
} else {
log.warn(
"The length of string column {} is {}, which exceeds the maximum length of {}, "
+ "the length will be set to {}",
column.getName(),
column.getColumnLength(),
MAX_SUPER_LENGTH,
MAX_SUPER_LENGTH);
builder.columnType(REDSHIFT_SUPER);
builder.dataType(REDSHIFT_SUPER);
}
break;
case BYTES:
if (column.getColumnLength() == null || column.getColumnLength() <= 0) {
builder.columnType(
String.format(
"%s(%d)", REDSHIFT_BINARY_VARYING, MAX_BINARY_VARYING_LENGTH));
builder.dataType(REDSHIFT_BINARY_VARYING);
} else if (column.getColumnLength() <= MAX_BINARY_VARYING_LENGTH) {
builder.columnType(View on GitHub (pinned to cf67b549a7)
Solutions
- Reduce the source column length to <= MAX_SUPER_LENGTH (e.g. via a transform casting or truncating the string column)
- Pre-create the Redshift table with an appropriate VARCHAR/SUPER column definition so reconvert's clamping is not applied
- Ignore the warning if clamping to MAX_SUPER_LENGTH is acceptable; verify no data truncation occurs
Example fix
// before: source reports length 2000000000 for column 'note'
// after: truncate in a transform before the sink
// transform: Sql {
// source_table {
// sql = "SELECT SUBSTRING(note, 1, 65535) AS note FROM source_table"
// }
// } Defensive patterns
Strategy: validation
Validate before calling
// Before writing to Redshift, check string lengths
for (CatalogColumn col : columns) {
if (col.getDataType() is string-like && col.getColumnLength() != null
&& col.getColumnLength() > maxSuperLength) {
// truncate or cast the column upstream
}
} Type guard
boolean fitsRedshiftStringLength(CatalogColumn col, long max) {
return col.getColumnLength() == null || col.getColumnLength() <= max;
} Prevention
- Declare explicit, bounded string lengths in the source catalog when possible
- Pre-create Redshift tables instead of relying on auto table creation
- Truncate/normalize long strings with a transform before the sink
- Monitor WARN logs from RedshiftTypeConverter during job runs
When it happens
Trigger: Writing an auto-created Redshift table where a SeaTunnel column is a string type whose getColumnLength() exceeds MAX_SUPER_LENGTH; occurs inside reconvert() when building the column's Redshift type string.
Common situations: Sources that report very large or default string lengths (e.g. Kafka/JSON sources producing Long.MAX_VALUE-length strings, or strings from text files without length metadata) targeting Redshift sink with auto table creation.
Understand the failure class
Background: "value must be between 0 and 1" / "out of range" / "must not be negative" errors: fixing range-validation failures across open-source libraries — this error's family across 42 libraries.
Related errors
- COMMON-17
- COMMON-19
- The decimal column {} type decimal({},{}) is out of range, w
- The length of binary column {} is {}, which exceeds the maxi
- The time column {} type time({}) is out of range, which exce
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/527a24fd2c6b4b4d.
Report an issue: GitHub.