{"record":{"id":"6572042da7ff4f60","repo":"apache/seatunnel","slug":"common-17-657204","errorCode":"COMMON-17","errorMessage":"'<identifier>' unsupported convert type '<dataType>' of '<field>' to SeaTunnel data type.","messagePattern":"'<identifier>' unsupported convert type '<dataType>' of '<field>' to SeaTunnel data type\\.","errorType":"error_code","errorClass":"org.apache.seatunnel.common.exception.SeaTunnelRuntimeException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/catalog/tidb/TiDBDataTypeConvertor.java","lineNumber":95,"sourceCode":"                break;\n            default:\n                dataTypeProperties = Collections.emptyMap();\n                break;\n        }\n        return toSeaTunnelType(field, mysqlType, dataTypeProperties);\n    }\n\n    // todo: It's better to wrapper MysqlType to a pojo in ST, since MysqlType doesn't contains\n    // properties.\n    @Override\n    public SeaTunnelDataType<?> toSeaTunnelType(\n            String field, MysqlType mysqlType, Map<String, Object> dataTypeProperties) {\n        try {\n            return MYSQL_CONVERTOR.toSeaTunnelType(field, mysqlType, dataTypeProperties);\n        } catch (SeaTunnelRuntimeException e) {\n            if (CommonErrorCode.CONVERT_TO_SEATUNNEL_TYPE_ERROR_SIMPLE.equals(\n                    e.getSeaTunnelErrorCode())) {\n                throw CommonError.convertToSeaTunnelTypeError(\n                        DatabaseIdentifier.TIDB, mysqlType.getName(), field);\n            }\n            throw e;\n        }\n    }\n\n    @Override\n    public MysqlType toConnectorType(\n            String field,\n            SeaTunnelDataType<?> seaTunnelDataType,\n            Map<String, Object> dataTypeProperties) {\n        try {\n            return MYSQL_CONVERTOR.toConnectorType(field, seaTunnelDataType, dataTypeProperties);\n        } catch (SeaTunnelRuntimeException e) {\n            if (CommonErrorCode.CONVERT_TO_CONNECTOR_TYPE_ERROR_SIMPLE.equals(\n                    e.getSeaTunnelErrorCode())) {\n                throw CommonError.convertToConnectorTypeError(\n                        DatabaseIdentifier.TIDB, seaTunnelDataType.getSqlType().name(), field);","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/catalog/tidb/TiDBDataTypeConvertor.java#L77-L113","documentation":"TiDB JDBC catalog failed to map a TiDB (MySQL-protocol) column type to a SeaTunnel data type. TiDBDataTypeConvertor.toSeaTunnelType delegates to the MySQL convertor; if that throws CONVERT_TO_SEATUNNEL_TYPE_ERROR_SIMPLE it is re-wrapped as a TiDB-specific CommonError with the dialect name, the MySQL type name, and the field.","triggerScenarios":"Calling TiDBDataTypeConvertor.toSeaTunnelType(field, mysqlType, dataTypeProperties) with a MysqlType that the underlying MySQL convertor does not support (e.g. exotic or newer MySQL types like BIT, GEOMETRY, JSON depending on version).","commonSituations":"Reading TiDB tables with columns of unsupported MySQL types (geometry, bit, enums/sets in some versions); schema discovery during catalog read; TiDB version introducing column types not yet handled.","solutions":["Alter the table column to a supported type or exclude/cast the unsupported column in the source query","Upgrade SeaTunnel to a version whose MySQL/TiDB convertor supports the type","Contribute/extend MysqlTypeConvertor's mapping to add the missing MysqlType"],"exampleFix":"// before\nCREATE TABLE t (g GEOMETRY);\n// after\nCREATE TABLE t (g STRING); -- or select CONVERT(g, CHAR) instead of the raw column","handlingStrategy":"validation","validationCode":"for (Column col : tableColumns) {\n    MysqlType mt = MysqlType.getByName(col.getTypeName());\n    if (!SUPPORTED.contains(mt)) {\n        log.warn(\"TiDB column {} has unsupported type {} - cast or exclude it\", col.getName(), mt);\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    return tidbConvertor.toSeaTunnelType(field, mysqlType, props);\n} catch (SeaTunnelRuntimeException e) {\n    if (CommonErrorCode.CONVERT_TO_SEATUNNEL_TYPE_ERROR_SIMPLE.equals(e.getSeaTunnelErrorCode())) {\n        log.warn(\"Unsupported TiDB type {} for field {}; excluding column\", mysqlType, field);\n        return null;\n    }\n    throw e;\n}","preventionTips":["Review table DDL before reading TiDB and avoid/cast unsupported MySQL types (GEOMETRY, BIT, etc.)","Select explicit column lists instead of SELECT * so unsupported columns can be cast in SQL","Keep the TiDB/MySQL connector family updated to gain new type mappings"],"tags":["jdbc","tidb","type-conversion","catalog"],"backgroundTag":"unsupported-dtype","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}