{"record":{"id":"d4761925e0fe1d7a","repo":"apache/seatunnel","slug":"unsupported-type-datatype","errorCode":null,"errorMessage":"Unsupported type: ${dataType}","messagePattern":"Unsupported type: (.+?)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-hudi/src/main/java/org/apache/seatunnel/connectors/seatunnel/hudi/sink/convert/RowDataToAvroConverters.java","lineNumber":201,"sourceCode":"                            @Override\n                            public Object convert(Schema schema, Object object) {\n                                BigDecimal javaDecimal = (BigDecimal) object;\n                                return DECIMAL_CONVERSION.toFixed(\n                                        javaDecimal, schema, schema.getLogicalType());\n                            }\n                        };\n                break;\n            case ARRAY:\n                converter = createArrayConverter((ArrayType<?, ?>) dataType);\n                break;\n            case ROW:\n                converter = createRowConverter((SeaTunnelRowType) dataType);\n                break;\n            case MAP:\n                converter = createMapConverter(dataType);\n                break;\n            default:\n                throw new UnsupportedOperationException(\"Unsupported type: \" + dataType);\n        }\n\n        // wrap into nullable converter\n        return new RowDataToAvroConverter() {\n            private static final long serialVersionUID = 1L;\n\n            @Override\n            public Object convert(Schema schema, Object object) {\n                if (object == null) {\n                    return null;\n                }\n\n                // get actual schema if it is a nullable schema\n                Schema actualSchema;\n                if (schema.getType() == Schema.Type.UNION) {\n                    List<Schema> types = schema.getTypes();\n                    int size = types.size();\n                    if (size == 2 && types.get(1).getType() == Schema.Type.NULL) {","sourceCodeStart":183,"sourceCodeEnd":219,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-hudi/src/main/java/org/apache/seatunnel/connectors/seatunnel/hudi/sink/convert/RowDataToAvroConverters.java#L183-L219","documentation":"RowDataToAvroConverters.createConverter maps SeaTunnelRowType SQL type families to Avro row converters; any type outside the handled cases (ROW, MAP, and primitive branches) falls to default and throws UnsupportedOperationException because there is no Avro conversion path for it.","triggerScenarios":"A SeaTunnel schema (SeaTunnelRowType) passed to elementConverter/valueConverter contains a field whose SeaTunnelType has no case in createConverter's switch (e.g. certain array/nested or unsupported complex types).","commonSituations":"Reading from a source producing exotic types (e.g. specific array element types, bytes variants) and sinking to Hudi; schema evolution adding a new column type; version mismatch between SeaTunnel API types supported by the connector.","solutions":["Change the offending column to a supported type via a Cast/SQL transform before the Hudi sink","Flatten or convert the unsupported complex type (e.g. MAP<...> to string/JSON) upstream","Upgrade SeaTunnel if a newer version added a converter for this type","Extend createConverter with a new converter for the type if contributing"],"exampleFix":"// before: schema includes ARRAY<MAP<STRING,STRING>> (unsupported)\n// after: cast to STRING upstream\nSQL transform: SELECT CAST(my_array_col AS STRING) AS my_array_col, ...","handlingStrategy":"validation","validationCode":"// before creating the sink, verify each field type is supported\nfor (SeaTunnelDataType<?> t : rowType.getFieldTypes()) {\n    if (!(t.getSqlType() == SqlType.ROW || t.getSqlType() == SqlType.MAP\n        || t.getSqlType() == SqlType.STRING || t.getSqlType() == SqlType.INT\n        || t.getSqlType() == SqlType.BOOLEAN /* ...primitives */)) {\n        throw new IllegalArgumentException(\"Unsupported type for Hudi sink: \" + t);\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    sink.write(row);\n} catch (UnsupportedOperationException e) {\n    LOG.error(\"Column type not supported by Hudi Avro conversion: {}\", e.getMessage());\n    // route row to dead-letter or cast upstream and restart\n}","preventionTips":["Cast complex columns to STRING/JSON before the Hudi sink","Check connector docs for supported SeaTunnel types","Bump SeaTunnel version if a needed converter was added upstream"],"tags":["hudi","avro","type-mismatch","unsupported"],"backgroundTag":"unsupported-operation","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"}