{"record":{"id":"7d94a2545ee43d3b","repo":"apache/seatunnel","slug":"common-17-7d94a2","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/internal/dialect/kingbase/KingbaseTypeConverter.java","lineNumber":212,"sourceCode":"                    break;\n                case KB_BLOB:\n                    builder.dataType(PrimitiveByteArrayType.INSTANCE);\n                    builder.columnLength((long) (1024 * 1024 * 1024));\n                    break;\n                case KB_CLOB:\n                    builder.dataType(BasicType.STRING_TYPE);\n                    builder.columnLength(typeDefine.getLength());\n                    builder.columnLength((long) (1024 * 1024 * 1024));\n                    break;\n                case KB_BIT:\n                    builder.dataType(PrimitiveByteArrayType.INSTANCE);\n                    // BIT(M) -> BYTE(M/8)\n                    long byteLength = typeDefine.getLength() / 8;\n                    byteLength += typeDefine.getLength() % 8 > 0 ? 1 : 0;\n                    builder.columnLength(byteLength);\n                    break;\n                default:\n                    throw CommonError.convertToSeaTunnelTypeError(\n                            DatabaseIdentifier.KINGBASE,\n                            typeDefine.getDataType(),\n                            typeDefine.getName());\n            }\n            return builder.build();\n        }\n    }\n\n    @Override\n    public BasicTypeDefine reconvert(Column column) {\n        try {\n            return super.reconvert(column);\n        } catch (SeaTunnelRuntimeException e) {\n            throw CommonError.convertToConnectorTypeError(\n                    DatabaseIdentifier.KINGBASE,\n                    column.getDataType().getSqlType().name(),\n                    column.getName());\n        }","sourceCodeStart":194,"sourceCodeEnd":230,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/kingbase/KingbaseTypeConverter.java#L194-L230","documentation":"Thrown by KingbaseTypeConverter.convert() when a KingbaseES (人大金仓) column type cannot be mapped to a SeaTunnel data type. The switch handles common types (BIT handled explicitly with byte-length math); anything reaching the default branch has no mapping. This is a schema-conversion failure raised before data reading begins.","triggerScenarios":"convert(BasicTypeDefine) on KingbaseTypeConverter encountering a Kingbase type outside the supported set at KingbaseTypeConverter.java:212 — e.g. proprietary Kingbase types, user-defined domains, money, custom extensions inherited from Kingbase's PostgreSQL-plus extensions.","commonSituations":"Auto schema discovery (catalog table-path parse) on a Kingbase database with vendor-specific column types; tables created with Kingbase-specific extensions; BIT(M) variants beyond handled cases.","solutions":["Check the '<dataType>' in the message to identify the unsupported Kingbase column type.","Exclude or cast the column: SELECT supported columns explicitly, or CAST the column to TEXT/NUMERIC in a custom query.","Avoid relying on auto schema parse; define the SeaTunnel schema explicitly if the connector option allows (schema config).","Add a case for the type in KingbaseTypeConverter.convert() and submit upstream if the type should be supported."],"exampleFix":"// before\nSELECT * FROM orders;\n// after\nSELECT id, amount::numeric AS amount FROM orders;","handlingStrategy":"validation","validationCode":"// Verify Kingbase columns are convertible before running\nfor (BasicTypeDefine c : tableSchema.getColumns()) {\n    try { new KingbaseTypeConverter().convert(c); }\n    catch (SeaTunnelRuntimeException e) {\n        throw new IllegalStateException(\"Unsupported Kingbase type: \" + c.getDataType() + \" on column \" + c.getName());\n    }\n}","typeGuard":"boolean isKingbaseTypeSupported(BasicTypeDefine td) {\n    try { new KingbaseTypeConverter().convert(td); return true; }\n    catch (SeaTunnelRuntimeException e) { return false; }\n}","tryCatchPattern":"try {\n    converter.convert(typeDefine);\n} catch (SeaTunnelRuntimeException e) {\n    if (e.getMessage().contains(\"unsupported convert type\")) {\n        LOG.error(\"Kingbase column {} type {} unsupported; exclude or cast it\", typeDefine.getName(), typeDefine.getDataType());\n    }\n    throw e;\n}","preventionTips":["Check for Kingbase-specific types (money, domains, extensions) in table DDL before ingestion.","Prefer explicit projections over SELECT *.","Cast vendor types to standard SQL types in the source query.","Keep the connector updated for new Kingbase mappings."],"tags":["jdbc","type-conversion","kingbase","schema"],"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"}