{"record":{"id":"dc6b3ffd0dda7d03","repo":"apache/seatunnel","slug":"unsupported-sql-type-fallback-to-string","errorCode":null,"errorMessage":"Unsupported SQL type: {}, fallback to STRING","messagePattern":"Unsupported SQL type: (.+?), fallback to STRING","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-databend/src/main/java/org/apache/seatunnel/connectors/seatunnel/databend/util/DatabendTypeConverter.java","lineNumber":85,"sourceCode":"                        \"DECIMAL(%d,%d)\", decimalType.getPrecision(), decimalType.getScale());\n            case DATE:\n                return \"DATE\";\n            case TIME:\n                return \"TIME\";\n            case TIMESTAMP:\n                return \"TIMESTAMP\";\n            case BYTES:\n                return \"VARBINARY\";\n            case ARRAY:\n                return \"ARRAY(STRING)\";\n            case MAP:\n                return \"MAP(STRING, STRING)\";\n            case NULL:\n                return \"NULL\";\n            case ROW:\n                return \"STRING\";\n            default:\n                log.warn(\"Unsupported SQL type: {}, fallback to STRING\", sqlType);\n                return \"STRING\";\n        }\n    }\n}\n","sourceCodeStart":67,"sourceCodeEnd":90,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-databend/src/main/java/org/apache/seatunnel/connectors/seatunnel/databend/util/DatabendTypeConverter.java#L67-L90","documentation":"DatabendTypeConverter.mapToDatabendType converts a SeaTunnel catalog type to a Databend SQL type string. When the SeaTunnelDataType does not match any known case it logs this warning and falls back to the Databend STRING type. The schema generated for a sink table (or type expression) will therefore use STRING for that column, which may not match the intended upstream types.","triggerScenarios":"A sink catalog containing a SeaTunnel type with no explicit Databend mapping (e.g. certain ARRAY/MAP element combos or ROW besides the handled NULL/ROW cases) reaches the default branch while building the CREATE TABLE or type expression via databendType().","commonSituations":"Schemas inferred from sources with types Databend cannot represent directly; upstream CDC or transforms producing SeaTunnel ROW/MAP types; version drift between SeaTunnel API types and the converter's switch.","solutions":["Inspect the logged sqlType to see which SeaTunnel type fell through.","Explicitly cast/restructure the column in your pipeline to a supported type (STRING, ARRAY, MAP, primitives).","Extend the converter's switch if you own the code, adding the missing SeaTunnelType mapping.","Verify the sink schema with a manual CREATE TABLE and adjust the upstream catalog accordingly."],"exampleFix":"// before\n// converter falls through to STRING for the unsupported type\n// after\nSeaTunnelRowType schema = new SeaTunnelRowType(\n    new String[]{\"payload\"},\n    new SeaTunnelDataType<?>[]{BasicType.STRING_TYPE}); // cast upstream ROW -> STRING","handlingStrategy":"validation","validationCode":"SeaTunnelDataType<?> t = catalogColumn.getColumnType();\nif (t instanceof SeaTunnelRowType || t instanceof SeaTunnelMapType) {\n    // confirm the converter handles this type or cast to STRING upstream\n}","typeGuard":"if (sqlType instanceof BasicType || sqlType instanceof ArrayType || sqlType instanceof MapType) { /* handled path */ }","tryCatchPattern":null,"preventionTips":["Define sink catalogs with types Databend supports natively.","Cast ROW/complex columns to STRING in upstream transforms.","Add unit tests covering all SeaTunnel types used in your pipelines.","Keep the converter's switch in sync with SeaTunnel API type additions."],"tags":["type-conversion","fallback","databend","schema"],"backgroundTag":"type-mismatch","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"}