{"record":{"id":"f45e1c8698483ac7","repo":"apache/seatunnel","slug":"unsupported-convert-s-to-s","errorCode":null,"errorMessage":"Unsupported convert %s to %s","messagePattern":"Unsupported convert (.+?) to (.+?)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"seatunnel-api/src/main/java/org/apache/seatunnel/api/table/converter/BasicDataConverter.java","lineNumber":90,"sourceCode":"                return convertLocalDate(value);\n            case TIME:\n                return convertTime(value);\n            case TIMESTAMP:\n                return convertLocalDateTime(value);\n            case TIMESTAMP_TZ:\n                return convertOffsetDateTime(value);\n            case BYTES:\n                return convertBytes(value);\n            case STRING:\n                return convertString(value);\n            case ROW:\n                return convertRow((SeaTunnelRowType) typeDefine, value);\n            case ARRAY:\n                return convertArray((ArrayType) typeDefine, value);\n            case MAP:\n                return convertMap((MapType) typeDefine, value);\n            default:\n                throw new UnsupportedOperationException(\n                        \"Unsupported convert \"\n                                + value.getClass()\n                                + \" to \"\n                                + typeDefine.getSqlType());\n        }\n    }\n\n    @Override\n    default Object convert(T typeDefine, Column columnDefine, Object value) {\n        if (value == null) {\n            return null;\n        }\n        switch (columnDefine.getDataType().getSqlType()) {\n            case NULL:\n                return null;\n            case BOOLEAN:\n                return convertBoolean(typeDefine, value);\n            case TINYINT:","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-api/src/main/java/org/apache/seatunnel/api/table/converter/BasicDataConverter.java#L72-L108","documentation":"BasicDataConverter.convert dispatches on the SeaTunnelDataType's SqlType and has no handler for the given type (e.g. ROW/ARRAY handled, but the value/type fell to default). It throws UnsupportedOperationException naming the value's Java class and the target SqlType, meaning this converter cannot transform that combination.","triggerScenarios":"Calling convert(typeDefine, value) where typeDefine.getSqlType() is one not supported by this converter (e.g. MAP handled but ROW passed, or vice versa) — commonly reached indirectly through convertArray or convertRow converting nested elements.","commonSituations":"Sink connectors using BasicDataConverter on nested schemas containing exotic types (e.g. nested MAP inside ARRAY/ROW), or schema evolution introducing a type the converter was never written for.","solutions":["Extend BasicDataConverter (or use the appropriate converter subclass) to handle the unsupported SqlType","Flatten/simplify the schema to avoid the unsupported nested type","Pre-convert the value before calling convert so its type matches a supported SqlType"],"exampleFix":"// before\nconverter.convert(mapType, rowValue); // ROW value with MAP/other type define\n// after\nswitch (typeDefine.getSqlType()) {\n    case ROW: return convertRow((RowType) typeDefine, value); // handle the type explicitly\n}\n// or ensure value type matches typeDefine before calling convert","handlingStrategy":"type-guard","validationCode":"switch (typeDefine.getSqlType()) {\n    case ROW: case ARRAY: case MAP: break;\n    default: throw new IllegalArgumentException(\"Converter does not support \" + typeDefine.getSqlType());\n}","typeGuard":"boolean convertible = typeDefine.getSqlType() == SqlType.ROW || typeDefine.getSqlType() == SqlType.ARRAY || typeDefine.getSqlType() == SqlType.MAP;","tryCatchPattern":"try { return converter.convert(typeDefine, value); } catch (UnsupportedOperationException e) { throw new IllegalStateException(\"Unsupported type in schema: \" + e.getMessage(), e); }","preventionTips":["Match converter implementation to your schema's SqlTypes before running jobs","Avoid unsupported nested types or pre-convert them to supported ones","Add unit tests converting every type present in your schema"],"tags":["type-conversion","unsupported-operation","sql-type"],"backgroundTag":"unsupported-operation","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"}