{"record":{"id":"b2f6a89185055d33","repo":"apache/seatunnel","slug":"common-17-b2f6a8","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-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/ParquetReadStrategy.java","lineNumber":283,"sourceCode":"        if (logicalTypeAnnotation == null) {\n            SeaTunnelRowType rowType = (SeaTunnelRowType) fieldType;\n            Group childGroup = group.getGroup(fieldIndex, 0);\n            Object[] objects = new Object[rowType.getTotalFields()];\n            for (int i = 0; i < rowType.getTotalFields(); i++) {\n                objects[i] =\n                        resolveGroupObject(\n                                childGroup, groupType.getType(i), i, rowType.getFieldType(i));\n            }\n            return new SeaTunnelRow(objects);\n        }\n        OriginalType originalType = logicalTypeAnnotation.toOriginalType();\n        if (originalType == OriginalType.LIST) {\n            return readList(group, groupType, fieldIndex, fieldType);\n        }\n        if (originalType == OriginalType.MAP) {\n            return readMap(group, groupType, fieldIndex, fieldType);\n        }\n        throw CommonError.convertToSeaTunnelTypeError(\n                PARQUET, parquetType.toString(), parquetType.getName());\n    }\n\n    /**\n     * Reads a LIST field from a Parquet Group using the native Group API. Handles both the standard\n     * 3-level LIST encoding (group → repeated list → element) and the legacy 2-level encoding\n     * (group → repeated element directly).\n     */\n    private Object readList(\n            Group group,\n            GroupType parentGroupType,\n            int listFieldIndex,\n            SeaTunnelDataType<?> fieldType) {\n        // Check if the LIST field is present\n        if (group.getFieldRepetitionCount(listFieldIndex) == 0) {\n            return new Object[0];\n        }\n","sourceCodeStart":265,"sourceCodeEnd":301,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/ParquetReadStrategy.java#L265-L301","documentation":"ParquetReadStrategy resolves Parquet groups to SeaTunnel types using the native Group API. When a field's Parquet logical/original type is not one the reader can convert (at resolveGroupType it only handles LIST and MAP group annotations), it throws COMMON-17 'unsupported convert type ... to SeaTunnel data type'. It means the reader encountered a Parquet type in the file schema it has no mapping for.","triggerScenarios":"Thrown in ParquetReadStrategy.resolveGroupType (line 283) when a Parquet GroupType field has a LogicalTypeAnnotation that is neither LIST nor MAP (e.g. an unannotated nested group or an unsupported annotation), called from resolveGroupObject during schema resolution or row conversion.","commonSituations":"1) Files written with nested structures (structs/groups) that the reader doesn't support. 2) Parquet files written by tools using uncommon logical type annotations (e.g. variant, custom annotations). 3) Schema drift: a column type changed in the upstream writer to a nested type. 4) Reading files produced by an older/newer writer with types outside the reader's supported set.","solutions":["Inspect the Parquet schema (parquet-tools / pyspark printSchema) and identify the unsupported field; re-write the file casting it to a supported type (primitive, LIST, MAP).","Exclude or project out the unsupported nested column in the upstream writer so the SeaTunnel file source only sees supported types.","Upgrade SeaTunnel to a newer version where more Parquet group types are supported.","Flatten the nested struct into top-level primitive columns before writing the Parquet file."],"exampleFix":"// before (upstream Spark write with a nested struct column)\ndf.write.parquet(\"s3://bucket/data\")  // df contains column 'addr' of struct type\n// after\ndf.drop(\"addr\").write.parquet(\"s3://bucket/data\")\n// or flatten: df.select(col(\"addr.city\").as(\"city\"), col(\"addr.zip\").as(\"zip\"))","handlingStrategy":"validation","validationCode":"// Inspect the Parquet schema before reading\nimport org.apache.parquet.hadoop.ParquetFileReader;\nimport org.apache.parquet.schema.MessageType;\ntry (ParquetFileReader r = ParquetFileReader.open(new org.apache.hadoop.fs.Path(path))) {\n    MessageType schema = r.getFooter().getSchema();\n    schema.getFields().forEach(f -> {\n        if (f.isPrimitive() == false\n                && f.asGroupType().getLogicalTypeAnnotation() != null\n                && !f.asGroupType().getLogicalTypeAnnotation()\n                       .toString().matches(\".*(LIST|MAP).*\")) {\n            throw new IllegalStateException(\"Unsupported nested group: \" + f.getName());\n        }\n    });\n}","typeGuard":null,"tryCatchPattern":"try {\n    strategy.resolveGroupObject(group, groupType, fieldIndex, fieldType);\n} catch (RuntimeException e) {\n    if (e.getMessage() != null && e.getMessage().contains(\"unsupported convert type\")) {\n        LOGGER.error(\"Parquet field {} has a type the reader cannot map; rewrite or drop it\", field, e);\n        return null; // or fail fast after logging schema details\n    }\n    throw e;\n}","preventionTips":["Run parquet-tools schema on incoming files to confirm only supported types (primitives, LIST, MAP) are present.","Avoid nested struct/group columns in Parquet files intended for the SeaTunnel file source; flatten them upstream.","Standardize on modern writers that emit the 3-level LIST encoding.","Pin writer tool versions so schema shapes stay stable across pipeline deployments."],"tags":["parquet","type-conversion","schema","file-source"],"backgroundTag":"unsupported-enum-value","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"}