apache/seatunnel · warning
The String type in StarRocks can only store up to 2GB…
Error message
The String type in StarRocks can only store up to 2GB bytes, and the current field [%s] length is [%s] bytes. If it is greater than the maximum length of the String in Doris, it may not be able to write data
What it means
StarRocks STRING columns can hold at most 2GB. When a source string column's declared length exceeds MAX_STRING_LENGTH, this warning notes the oversized field; the connector still maps it to STRING, but very large values may fail to write (message text mentions Doris due to shared code).
Solutions
- Cap the source column length to a realistic value under 2GB
- Cast oversized columns to a smaller bounded type via a transform before the sink
- If truly huge payloads exist, consider external object storage plus a reference column instead of inline strings
Defensive patterns
Strategy: validation
Validate before calling
if (col.getSqlType() == StringType && col.getColumnLength() > 2147483648L) {
throw new IllegalArgumentException("Column " + col.getName() + " exceeds StarRocks 2GB string limit");
} Prevention
- Bound source string column lengths to realistic values
- Externalize very large payloads to object storage
- Watch for source engines reporting huge/undefined lengths (LongText, varchar(max))
When it happens
Trigger: reconvertString -> sampleReconvertString is given a string column whose getColumnLength() exceeds 2GB (2147483648 bytes).
Common situations: Sources declaring varchar/max or text columns with unbounded/absurd lengths (e.g. LongText mapped to MAX_VALUE); metadata reporting length in different units inflating the value.
Understand the failure class
Background: "File too large" / "file size exceeds limit" errors: why libraries cap file sizes and how to fix them — this error's family across 46 libraries.
Related errors
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/a9e8f3719cd5cc49.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-starrocks/src/main/java/org/apache/seatunnel/connectors/seatunnel/starrocks/datatypes/StarRocksTypeConverter.java:617
builder.columnType(String.format("%s(%s)", SR_CHAR, column.getColumnLength()));
builder.dataType(SR_CHAR);
}
return;
}
if (column.getColumnLength() <= 65533) {
builder.columnType(String.format("%s(%s)", SR_VARCHAR, column.getColumnLength()));
builder.dataType(SR_VARCHAR);
return;
}
if (column.getColumnLength() <= MAX_STRING_LENGTH) {
builder.columnType(SR_STRING);
builder.dataType(SR_STRING);
return;
}
log.warn(
String.format(
"The String type in StarRocks can only store up to 2GB bytes, and the current field [%s] length is [%s] bytes. If it is greater than the maximum length of the String in Doris, it may not be able to write data",
column.getName(), column.getColumnLength()));
builder.columnType(SR_STRING);
builder.dataType(SR_STRING);
}
private void reconvertMap(
Column column, BasicTypeDefine.BasicTypeDefineBuilder<StarRocksType> builder) {
MapType dataType = (MapType) column.getDataType();
SeaTunnelDataType keyType = dataType.getKeyType();
SeaTunnelDataType valueType = dataType.getValueType();
Column keyColumn =
PhysicalColumn.of(
column.getName() + ".key",
(SeaTunnelDataType<?>) keyType,
(Long) null,
true,View on GitHub (pinned to cf67b549a7)