{"record":{"id":"bd024a0b5e3327ca","repo":"apache/seatunnel","slug":"common-19-bd024a","errorCode":"COMMON-19","errorMessage":"'${identifier}' unsupported convert SeaTunnel data type '${dataType}' of '${field}' to connector data type.","messagePattern":"'(.+?)' unsupported convert SeaTunnel data type '(.+?)' of '(.+?)' to connector data type\\.","errorType":"error_code","errorClass":"SeaTunnelRuntimeException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-starrocks/src/main/java/org/apache/seatunnel/connectors/seatunnel/starrocks/catalog/StarRocksDataTypeConvertor.java","lineNumber":194,"sourceCode":"                return MysqlType.BIGINT;\n            case FLOAT:\n                return MysqlType.FLOAT;\n            case DOUBLE:\n                return MysqlType.DOUBLE;\n            case DECIMAL:\n                return MysqlType.DECIMAL;\n            case NULL:\n                return MysqlType.NULL;\n            case BYTES:\n                return MysqlType.BIT;\n            case DATE:\n                return MysqlType.DATE;\n            case TIME:\n                return MysqlType.DATETIME;\n            case TIMESTAMP:\n                return MysqlType.TIMESTAMP;\n            default:\n                throw CommonError.convertToConnectorTypeError(\n                        \"StarRocks\", sqlType.toString(), field);\n        }\n    }\n\n    @Override\n    public String getIdentity() {\n        return \"StarRocks\";\n    }\n}\n","sourceCodeStart":176,"sourceCodeEnd":204,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-starrocks/src/main/java/org/apache/seatunnel/connectors/seatunnel/starrocks/catalog/StarRocksDataTypeConvertor.java#L176-L204","documentation":"StarRocksDataTypeConvertor.toConnectorType() maps a SeaTunnel SQL type (SqlType enum) to a MySQL-compatible MysqlType used by the legacy StarRocks catalog. It supports a fixed whitelist (STRING, BOOLEAN, numeric, DECIMAL, BYTES, DATE/TIME/TIMESTAMP, and container types mapped to VARCHAR). Any SqlType outside the switch falls to the default branch, which throws this error naming the identifier 'StarRocks', the offending sqlType, and the field name.","triggerScenarios":"Calling toConnectorType(field, seaTunnelDataType, properties) with a SeaTunnel data type whose getSqlType() is not in the switch (e.g. a ROW/struct in paths not handled, or a new SqlType added to SeaTunnel API but not yet mapped here); table creation/sink schema translation through the legacy StarRocks catalog when a column carries an unmapped type.","commonSituations":"Using the legacy StarRocks catalog to auto-create tables from a source schema that contains types the converter has not mapped; running an older SeaTunnel build against schemas produced by newer versions that introduce new SqlType values; custom transforms emitting exotic column types before the StarRocks sink.","solutions":["Inspect the failing field's SeaTunnel SqlType and cast/transform it to a supported type (STRING/INT/BIGINT/DOUBLE/DECIMAL/DATE/TIMESTAMP) before the StarRocks sink.","Upgrade SeaTunnel to a version where the StarRocks type converter supports the type, or use the StarRocksTypeConverter (datatypes package) path which supports ARRAY/MAP natively.","Pre-create the StarRocks table with a compatible schema so the connector does not need to auto-convert the unmapped type.","If the type genuinely should be supported, extend the switch in StarRocksDataTypeConvertor.toConnectorType() with a mapping."],"exampleFix":"// before: sink receives an unmapped type (e.g. ROW)\nrowColumn -> StarRocks sink -> CommonError.convertToConnectorTypeError\n// after: cast to a supported type upstream\nSeaTunnelRowType with STRING column, or in a transform map the field to BasicType.STRING_TYPE","handlingStrategy":"validation","validationCode":"// before sink/table-creation, verify every column type is convertible\njava.util.Set<SqlType> supported = java.util.Set.of(\n    SqlType.ARRAY, SqlType.MAP, SqlType.ROW, SqlType.STRING, SqlType.BOOLEAN,\n    SqlType.TINYINT, SqlType.SMALLINT, SqlType.INT, SqlType.BIGINT,\n    SqlType.FLOAT, SqlType.DOUBLE, SqlType.DECIMAL, SqlType.NULL,\n    SqlType.BYTES, SqlType.DATE, SqlType.TIME, SqlType.TIMESTAMP);\nfor (Column c : rowType.getColumns()) {\n    if (!supported.contains(c.getDataType().getSqlType()))\n        throw new IllegalStateException(\"Unsupported for StarRocks: \" + c.getName());\n}","typeGuard":"static boolean isStarRocksConvertible(SeaTunnelDataType<?> t) {\n    switch (t.getSqlType()) {\n        case ARRAY: case MAP: case ROW: case STRING: case BOOLEAN:\n        case TINYINT: case SMALLINT: case INT: case BIGINT:\n        case FLOAT: case DOUBLE: case DECIMAL: case NULL: case BYTES:\n        case DATE: case TIME: case TIMESTAMP:\n            return true;\n        default:\n            return false;\n    }\n}","tryCatchPattern":"try {\n    catalog.toConnectorType(field, dataType, props);\n} catch (Exception e) {\n    LOG.error(\"Field {} type {} not convertible to StarRocks; cast to STRING upstream\", field, dataType, e);\n    throw e;\n}","preventionTips":["Pre-create StarRocks tables with explicit compatible schemas instead of relying on auto type translation","Whitelist columns in your source query so only convertible types flow to the StarRocks sink","Cast exotic types to STRING in a transform before the sink","Check the converter's supported types for your SeaTunnel version before upgrading schema sources"],"tags":["starrocks","type-conversion","schema","sink"],"backgroundTag":"unsupported-dtype","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}