{"record":{"id":"c4eb1d5be17d77d2","repo":"apache/seatunnel","slug":"unsupported-data-type-c4eb1d","errorCode":"UNSUPPORTED_DATA_TYPE","errorMessage":"Unsupported data type: {dataType.getSqlType()}","messagePattern":"Unsupported data type: (.+?)","errorType":"error_code","errorClass":"DatabendConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-databend/src/main/java/org/apache/seatunnel/connectors/seatunnel/databend/catalog/DatabendCatalog.java","lineNumber":454,"sourceCode":"            case DOUBLE:\n                return \"DOUBLE\";\n            case DECIMAL:\n                DecimalType decimalType = (DecimalType) dataType;\n                return String.format(\n                        \"DECIMAL(%d, %d)\", decimalType.getPrecision(), decimalType.getScale());\n            case BYTES:\n                return \"VARBINARY\";\n            case STRING:\n                return \"VARCHAR\";\n            case DATE:\n                return \"DATE\";\n            case TIME:\n                return \"TIME\";\n            case TIMESTAMP:\n                LocalTimeType timeType = (LocalTimeType) dataType;\n                return \"TIMESTAMP\";\n            default:\n                throw new DatabendConnectorException(\n                        DatabendConnectorErrorCode.UNSUPPORTED_DATA_TYPE,\n                        \"Unsupported data type: \" + dataType.getSqlType());\n        }\n    }\n\n    private SeaTunnelDataType<?> convertDatabendType(\n            String typeName, int sqlType, int columnSize, int decimalDigits) {\n        // This method should convert Databend data types to SeaTunnel data types\n        // This is a simplified version, you'll need to adjust based on Databend's actual type\n        // system\n        typeName = typeName.toUpperCase();\n\n        switch (typeName) {\n            case \"BOOLEAN\":\n                return BasicType.BOOLEAN_TYPE;\n            case \"TINYINT\":\n            case \"INT8\":\n                return BasicType.BYTE_TYPE;","sourceCodeStart":436,"sourceCodeEnd":472,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-databend/src/main/java/org/apache/seatunnel/connectors/seatunnel/databend/catalog/DatabendCatalog.java#L436-L472","documentation":"DatabendCatalog.toDatabendTypeString encountered a SeaTunnel data type it cannot map to a Databend column type string. The method only handles a fixed set of supported types and throws in its default branch when the mapping is unknown, e.g. TIME or complex/array/map types. This prevents generating an invalid CREATE TABLE statement.","triggerScenarios":"Calling buildCreateTableSql (via catalog.createTable) when the CatalogTable schema contains a type outside the supported set, such as LocalTimeType.TIME, ARRAY, MAP, or ROW types.","commonSituations":"Source tables with TIME or nested (array/map/struct) columns being synced into Databend; schema inferred from a source connector that produces types Databend's type converter lacks cases for.","solutions":["Cast or transform the offending column to a supported type (e.g. map TIME to TIMESTAMP/DATETIME, flatten nested types) before writing to Databend","Update the source config to exclude or convert unsupported columns","Extend toDatabendTypeString with a case for the missing SqlType if you maintain the connector"],"exampleFix":"// before: schema contains TIME -> throws at default branch\ncase TIME:\n    return \"TIME\";\n// after: map TIME to a Databend-supported type\ncase TIME:\n    return \"TIMESTAMP\";","handlingStrategy":"validation","validationCode":"switch (dataType.getSqlType()) {\n    case STRING: case INT: case BIGINT: case TIMESTAMP:\n        break;\n    default:\n        throw new IllegalArgumentException(\n            \"Column type not supported by Databend sink: \" + dataType.getSqlType());\n}","typeGuard":"boolean isSupported(SeaTunnelDataType<?> t) {\n    return t instanceof BasicType || t instanceof LocalTimeType;\n}","tryCatchPattern":null,"preventionTips":["Pre-map TIME and nested types to supported types in the source transform","Review DatabendCatalog.toDatabendTypeString's supported cases before choosing column types","Test schemas with a dry-run before production sync"],"tags":["databend","catalog","type-mapping","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-14T11:17:12.474Z"}