{"record":{"id":"439b9aa014ac5aa3","repo":"apache/seatunnel","slug":"common-error-code-17-439b9a","errorCode":"COMMON_ERROR_CODE-17","errorMessage":"SeaTunnel array type not support this type [%s] now","messagePattern":"SeaTunnel array type not support this type \\[(.+?)\\] now","errorType":"exception","errorClass":"FileConnectorException","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":652,"sourceCode":"                        byte[][] bytesArray = new byte[origArray.size()][];\n                        for (int i = 0; i < origArray.size(); i++) {\n                            Object element = origArray.get(i);\n                            if (element instanceof ByteBuffer) {\n                                ByteBuffer buffer = (ByteBuffer) element;\n                                byte[] bytes = new byte[buffer.remaining()];\n                                buffer.get(bytes, 0, bytes.length);\n                                bytesArray[i] = bytes;\n                            } else if (element instanceof byte[]) {\n                                bytesArray[i] = (byte[]) element;\n                            }\n                        }\n                        return bytesArray;\n                    default:\n                        String errorMsg =\n                                String.format(\n                                        \"SeaTunnel array type not support this type [%s] now\",\n                                        elementType.getSqlType());\n                        throw new FileConnectorException(\n                                CommonErrorCodeDeprecated.UNSUPPORTED_DATA_TYPE, errorMsg);\n                }\n            case MAP:\n                HashMap<Object, Object> dataMap = new HashMap<>();\n                SeaTunnelDataType<?> keyType = ((MapType<?, ?>) fieldType).getKeyType();\n                SeaTunnelDataType<?> valueType = ((MapType<?, ?>) fieldType).getValueType();\n                HashMap<Object, Object> origDataMap = (HashMap<Object, Object>) field;\n                origDataMap.forEach(\n                        (key, value) ->\n                                dataMap.put(\n                                        resolveObject(key, keyType),\n                                        resolveObject(value, valueType)));\n                return dataMap;\n            case BOOLEAN:\n                return Boolean.parseBoolean(field.toString());\n            case INT:\n                return Integer.parseInt(field.toString());\n            case BIGINT:","sourceCodeStart":634,"sourceCodeEnd":670,"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#L634-L670","documentation":"When converting Parquet field values to SeaTunnel types, an ARRAY-typed field switches on the declared element SQL type; an element type outside the supported set has no conversion and raises UNSUPPORTED_DATA_TYPE. The message names the offending element SqlType.","triggerScenarios":"parquet schema (avro) field maps to SeaTunnel ArrayType whose elementType.getSqlType() hits the default branch — e.g. array of MAP/ROW/complex or other unsupported element types.","commonSituations":"Declaring SeaTunnel schema array<map<...>> for a parquet list column; parquet list of nested structs; schema mapping mismatches between the configured schema and the file.","solutions":["Check the configured schema's array element type and align it with supported element SQL types (primitives).","Flatten nested arrays into multiple columns or rows upstream.","Store complex elements as JSON strings in the parquet file.","Extend the array conversion switch to support the needed element type if justified."],"exampleFix":"// before (schema)\n{\"name\":\"tags\",\"type\":\"array<map<string,string>>\"}\n\n// after\n{\"name\":\"tags\",\"type\":\"array<string>\"} // elements pre-serialized as JSON","handlingStrategy":"validation","validationCode":"// Validate configured array element types against the supported set\nSqlType elem = ((ArrayType<?, ?>) fieldType).getElementType().getSqlType();\nSet<SqlType> ok = EnumSet.of(SqlType.STRING, SqlType.BOOLEAN, SqlType.TINYINT,\n    SqlType.SMALLINT, SqlType.INT, SqlType.BIGINT, SqlType.FLOAT, SqlType.DOUBLE,\n    SqlType.DECIMAL, SqlType.BYTES);\nif (!ok.contains(elem)) {\n    throw new IllegalStateException(\"Unsupported array element type in schema: \" + elem);\n}","typeGuard":"static boolean hasSupportedArrayElements(SeaTunnelDataType<?> t) {\n    return !(t instanceof ArrayType<?, ?> a)\n        || EnumSet.of(SqlType.STRING, SqlType.INT, SqlType.BIGINT, SqlType.DOUBLE,\n                      SqlType.FLOAT, SqlType.BOOLEAN).contains(a.getElementType().getSqlType());\n}","tryCatchPattern":"try {\n    rows = parquetSource.read();\n} catch (FileConnectorException e) {\n    if (e.getMessage().contains(\"SeaTunnel array type not support\")) {\n        // adjust schema element type or re-serialize upstream\n    } else throw e;\n}","preventionTips":["Declare array columns only with primitive element types","Match the configured SeaTunnel schema to the real parquet schema","Serialize nested elements as JSON strings","Dry-run the pipeline on a sample file before production"],"tags":["parquet","array-type","unsupported-dtype","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-14T11:17:12.474Z"}