apache/seatunnel · error · SeaTunnelRuntimeException
COMMON-19
COMMON-19
Error message
'${identifier}' unsupported convert SeaTunnel data type '${dataType}' of '${field}' to connector data type. What it means
StarRocksTypeConverter.reconvert() maps a SeaTunnel Column back to a StarRocks column type. Its switch over column.getDataType().getSqlType() covers NULL, BYTES, BOOLEAN, numerics, DATE/DATETIME, MAP, etc.; an unmapped SqlType reaches the default branch and throws this error with the identifier, the SqlType name, and the column name. It is invoked while deriving StarRocks column types for keys and values of MAP columns too (keyColumnType/valueColumnType), so an unsupported map key/value type surfaces here.
Source
Thrown at seatunnel-connectors-v2/connector-starrocks/src/main/java/org/apache/seatunnel/connectors/seatunnel/starrocks/datatypes/StarRocksTypeConverter.java:332
case DATE:
builder.columnType(SR_DATE);
builder.dataType(SR_DATE);
break;
case TIMESTAMP:
builder.columnType(SR_DATETIME);
builder.dataType(SR_DATETIME);
break;
case TIMESTAMP_TZ:
// StarRocks DATETIME does not store timezone info;
// TIMESTAMP_TZ (LTZ) is mapped to DATETIME with potential timezone loss.
builder.columnType(SR_DATETIME);
builder.dataType(SR_DATETIME);
break;
case MAP:
reconvertMap(column, builder);
break;
default:
throw CommonError.convertToConnectorTypeError(
identifier(), column.getDataType().getSqlType().name(), column.getName());
}
return builder.build();
}
private void setDecimalType(
PhysicalColumn.PhysicalColumnBuilder builder,
BasicTypeDefine<StarRocksType> typeDefine) {
Long p = 10L;
int scale = 0;
if (typeDefine.getPrecision() != null && typeDefine.getPrecision() > 0) {
p = typeDefine.getPrecision();
}
if (typeDefine.getScale() != null && typeDefine.getScale() > 0) {
scale = typeDefine.getScale();
}View on GitHub (pinned to cf67b549a7)
Solutions
- Identify the failing column from the error message and cast it to a supported SeaTunnel type (STRING/BIGINT/DECIMAL/DATE/TIMESTAMP...) before the sink.
- For MAP columns, ensure keys are simple primitives (STRING/INT/BIGINT) and values are supported types; flatten or stringify complex values.
- Use sink auto-create=false with a pre-created StarRocks table matching a convertible schema.
- Extend the switch in reconvert() with the missing SqlType mapping if the type should be supported.
Example fix
// before MapColumn(key: ROW(...), value: STRING) -> reconvert -> throws // after MapColumn(key: STRING, value: STRING) or stringify the key before the sink
Defensive patterns
Strategy: validation
Validate before calling
// before auto-creating a StarRocks table, check each column's SqlType is handled by reconvert()
java.util.Set<SqlType> reconvertible = java.util.Set.of(
SqlType.NULL, SqlType.BYTES, SqlType.BOOLEAN, SqlType.TINYINT, SqlType.SMALLINT,
SqlType.INT, SqlType.BIGINT, SqlType.FLOAT, SqlType.DOUBLE, SqlType.DECIMAL,
SqlType.STRING, SqlType.DATE, SqlType.TIMESTAMP, SqlType.MAP, SqlType.ARRAY);
for (Column c : rowType.getColumns()) {
SqlType st = c.getDataType().getSqlType();
if (!reconvertible.contains(st))
throw new IllegalStateException("Column " + c.getName() + " SqlType " + st + " not supported for StarRocks DDL");
if (st == SqlType.MAP) {
MapType<?, ?> mt = (MapType<?, ?>) c.getDataType();
// keys must be simple primitives
if (!java.util.Set.of(SqlType.STRING, SqlType.INT, SqlType.BIGINT).contains(mt.getKeyType().getSqlType()))
throw new IllegalStateException("Unsupported MAP key type for " + c.getName());
}
} Try / catch
try {
StarRocksTypeConverter.INSTANCE.reconvert(column);
} catch (Exception e) {
LOG.error("Column {} (SqlType {}) cannot map to StarRocks type; cast before sink", column.getName(), column.getDataType().getSqlType(), e);
throw e;
} Prevention
- Keep MAP keys as STRING/INT/BIGINT primitives
- Avoid TIME and nested ROW/ARRAY/MAP columns when targeting StarRocks auto table creation
- Serialize complex types to JSON STRING columns before the sink
- Test schema translation on a sample table before enabling auto-create in production
When it happens
Trigger: Calling reconvert(column) (directly or via reconvertMap -> keyColumnType/valueColumnType) with a column whose SeaTunnel SqlType has no case in the switch — e.g. TIME, TIMESTAMP_TZ variants, ROW, or nested types in positions where they are not allowed (such as a non-primitive MAP key).
Common situations: Auto-creating a StarRocks sink table from an upstream schema that includes types like TIME or nested ROW; a MAP column whose key type is not a supported primitive, so reconvert of the key fails; newer SeaTunnel SQL types (e.g. timestamp-with-local-time-zone) not yet mapped.
Related errors
- COMMON-19
- Not support convert to milvus type, sqlType is %s
- COMMON-17
- The decimal column {} type decimal({},{}) is out of range, w
- Expected Array type but got:
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/f9d8d7b9fb51f0e1.
Report an issue: GitHub.