{"record":{"id":"f4e8e4b052117372","repo":"apache/seatunnel","slug":"common-17-f4e8e4","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-iceberg/src/main/java/org/apache/seatunnel/connectors/seatunnel/iceberg/data/IcebergTypeMapper.java","lineNumber":80,"sourceCode":"                }\n                // withoutZone() → NTZ → TIMESTAMP\n                return LocalTimeType.LOCAL_DATE_TIME_TYPE;\n            case STRING:\n                return BasicType.STRING_TYPE;\n            case FIXED:\n            case BINARY:\n                return PrimitiveByteArrayType.INSTANCE;\n            case DECIMAL:\n                Types.DecimalType decimalType = (Types.DecimalType) icebergType;\n                return new DecimalType(decimalType.precision(), decimalType.scale());\n            case STRUCT:\n                return mappingStructType((Types.StructType) icebergType);\n            case LIST:\n                return mappingListType(field, (Types.ListType) icebergType);\n            case MAP:\n                return mappingMapType(field, (Types.MapType) icebergType);\n            default:\n                throw CommonError.convertToSeaTunnelTypeError(\n                        \"Iceberg\", icebergType.toString(), field);\n        }\n    }\n\n    private static SeaTunnelRowType mappingStructType(Types.StructType structType) {\n        List<Types.NestedField> fields = structType.fields();\n        List<String> fieldNames = new ArrayList<>(fields.size());\n        List<SeaTunnelDataType<?>> fieldTypes = new ArrayList<>(fields.size());\n        for (Types.NestedField field : fields) {\n            fieldNames.add(field.name());\n            fieldTypes.add(mapping(field.name(), field.type()));\n        }\n        return new SeaTunnelRowType(\n                fieldNames.toArray(new String[0]), fieldTypes.toArray(new SeaTunnelDataType[0]));\n    }\n\n    private static ArrayType mappingListType(String field, Types.ListType listType) {\n        switch (listType.elementType().typeId()) {","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-iceberg/src/main/java/org/apache/seatunnel/connectors/seatunnel/iceberg/data/IcebergTypeMapper.java#L62-L98","documentation":"IcebergTypeMapper.mapping converts an Iceberg Type to a SeaTunnel type. If the Iceberg type is not one of the handled kinds (primitives, STRUCT, LIST, MAP — e.g. certain nested or logical types), the default branch throws COMMON-17 convertToSeaTunnelTypeError with 'Iceberg', the type's toString, and the field name.","triggerScenarios":"mapping() is called with an Iceberg Types.Type whose TypeID falls into the switch default — e.g. nested types not covered by the handled cases or unusual logical types reached recursively from struct/map/list fields.","commonSituations":"Iceberg tables with UUID, fixed(n), or time-type columns reached in nested positions; tables written by newer Iceberg writers with types added after this mapper was written; deep nested structs containing exotic leaf types.","solutions":["Identify the unsupported Iceberg type from the error message (dataType field)","Change the column type in the Iceberg table (e.g. cast fixed/uuid to binary/string where supported)","Upgrade SeaTunnel to a version whose IcebergTypeMapper supports the type","Add a mapping case for the type in a custom build of IcebergTypeMapper"],"exampleFix":"// before\nTypes.UUIDType.get()\n// after\nTypes.StringType.get()","handlingStrategy":"validation","validationCode":"// Validate Iceberg types before mapping\norg.apache.iceberg.types.TypeUtil.visit(icebergSchema.asStruct(),\n    new org.apache.iceberg.types.TypeUtil.CustomOrderTypeVisitor<Object>(null) {\n        @Override public Object primitive(org.apache.iceberg.types.Types.PrimitiveType p) {\n            if (p.typeId() == org.apache.iceberg.types.Type.TypeID.UUID\n                || p.typeId() == org.apache.iceberg.types.Type.TypeID.FIXED) {\n                throw new IllegalArgumentException(\"Unsupported Iceberg type: \" + p);\n            }\n            return null;\n        }\n    });","typeGuard":"boolean isSupportedIcebergType(org.apache.iceberg.types.Type t) {\n    switch (t.typeId()) {\n        case BOOLEAN: case INTEGER: case LONG: case FLOAT:\n        case DOUBLE: case STRING: case DATE: case TIMESTAMP:\n        case DECIMAL: case BINARY: case STRUCT: case LIST: case MAP:\n            return true;\n        default:\n            return false; // e.g. UUID, FIXED\n    }\n}","tryCatchPattern":null,"preventionTips":["Avoid UUID and fixed(n) columns in Iceberg tables read by SeaTunnel","Cast unsupported nested leaf types to supported ones in table DDL","Keep the Iceberg writer and SeaTunnel connector versions aligned","Walk the full nested schema with TypeUtil before ingestion"],"tags":["iceberg","type-conversion","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-23T08:17:48.524Z"}