apache/seatunnel · error · CatalogException
Not support convert to milvus type, sqlType is %s
Error message
Not support convert to milvus type, sqlType is %s
What it means
MilvusSinkConverter.convertSqlTypeToDataType throws a plain CatalogException when a SeaTunnel SqlType has no mapping to a Milvus DataType. Unlike NOT_SUPPORT_TYPE, this fires during schema conversion (building FieldType definitions from CatalogTable columns), not during data serialization, and is a bare IllegalArgumentException-style failure with the offending SqlType formatted in.
Source
Thrown at seatunnel-connectors-v2/connector-milvus/src/main/java/org/apache/seatunnel/connectors/seatunnel/milvus/utils/sink/MilvusSinkConverter.java:301
return DataType.Array;
case MAP:
return DataType.JSON;
case FLOAT_VECTOR:
return DataType.FloatVector;
case BINARY_VECTOR:
return DataType.BinaryVector;
case FLOAT16_VECTOR:
return DataType.Float16Vector;
case BFLOAT16_VECTOR:
return DataType.BFloat16Vector;
case SPARSE_FLOAT_VECTOR:
return DataType.SparseFloatVector;
case DATE:
return DataType.VarChar;
case ROW:
return DataType.VarChar;
}
throw new CatalogException(
String.format("Not support convert to milvus type, sqlType is %s", sqlType));
}
public JsonObject buildMilvusData(
CatalogTable catalogTable,
ReadonlyConfig config,
List<String> jsonFields,
String dynamicField,
SeaTunnelRow element) {
SeaTunnelRowType seaTunnelRowType = catalogTable.getSeaTunnelRowType();
PrimaryKey primaryKey = catalogTable.getTableSchema().getPrimaryKey();
Boolean autoId = config.get(ENABLE_AUTO_ID);
Boolean enableNullableField = config.get(ENABLE_NULLABLE_FIELD);
String partitionKeyField = getPartitionKeyField(catalogTable, config);
JsonObject data = new JsonObject();
Gson gson = new Gson();
for (int i = 0; i < seaTunnelRowType.getFieldNames().length; i++) {View on GitHub (pinned to cf67b549a7)
Solutions
- Identify the offending SqlType from the message and reshape the upstream schema — cast or drop that column via a transform
- Map exotic columns to supported Milvus types (VARCHAR for ROW/DATE, JSON strings) before the sink
- Define the Milvus collection schema manually instead of relying on auto schema conversion
- Upgrade the connector if a newer version maps that SqlType
Example fix
// before: MAP column reaching schema conversion
Schema {
field { name = "attrs" type = map<string, string> }
}
// after: serialize MAP to JSON string upstream
transform = Sql {
query = "SELECT id, to_json(attrs) AS attrs_json, embedding FROM src"
} // declare attrs_json as string -> VarChar Defensive patterns
Strategy: validation
Validate before calling
// Validate every column maps to a Milvus DataType before auto schema creation
for (Column c : catalogTable.getTableSchema().getColumns()) {
if (Set.of(SqlType.MAP, SqlType.NULL, SqlType.TIME).contains(c.getSqlType()))
throw new IllegalStateException("Pre-convert column " + c.getName()
+ " (" + c.getSqlType() + ") to a Milvus-mappable type");
} Try / catch
try {
converter.convertToFieldType(column, catalogTable);
} catch (CatalogException e) {
logger.error("Milvus type mapping failed: {}", e.getMessage()); // names the SqlType
// reshape schema or declare the collection schema manually
} Prevention
- Avoid MAP/nested columns in tables feeding Milvus; serialize them to JSON strings upstream
- Use explicit upstream casts to STRING/arrays for exotic types
- Define the Milvus collection schema manually when auto-mapping is fragile
- Review the connector's SqlType->DataType switch when upgrading source schemas
When it happens
Trigger: convertToFieldType encounters a CatalogTable column whose SqlType is not in the switch's mapped cases (e.g. MAP, complex or newer types), so control reaches the throw after the switch while constructing the Milvus collection schema.
Common situations: Sink tables whose schema includes unmappable columns (nested MAP, Decimal in some versions, TIME types), schema evolution introducing new types, or auto-creating Milvus collections from heterogeneous upstream sources.
Related errors
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/f56c2f97f2998ffd.
Report an issue: GitHub.