{"record":{"id":"4b1f23d66d9889aa","repo":"apache/seatunnel","slug":"unsupported-data-type","errorCode":"UNSUPPORTED_DATA_TYPE","errorMessage":"Invalid ARRAY type: ","messagePattern":"Invalid ARRAY type: ","errorType":"error_code","errorClass":"AerospikeConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-aerospike/src/main/java/org/apache/seatunnel/connectors/seatunnel/aerospike/sink/AerospikeTypeConverter.java","lineNumber":83,"sourceCode":"            }\n        }\n    }\n\n    private AerospikeDataType mapSeaTunnelType(SeaTunnelDataType<?> seaTunnelType) {\n        switch (seaTunnelType.getSqlType()) {\n            case STRING:\n                return AerospikeDataType.STRING;\n            case INT:\n                return AerospikeDataType.INTEGER;\n            case BIGINT:\n                return AerospikeDataType.LONG;\n            case DOUBLE:\n                return AerospikeDataType.DOUBLE;\n            case BOOLEAN:\n                return AerospikeDataType.BOOLEAN;\n            case ARRAY:\n                if (!(seaTunnelType instanceof ArrayType)) {\n                    throw new AerospikeConnectorException(\n                            AerospikeErrorCode.UNSUPPORTED_DATA_TYPE,\n                            \"Invalid ARRAY type: \" + seaTunnelType.getClass().getSimpleName());\n                }\n                return AerospikeDataType.BYTEARRAY;\n            case DATE:\n            case TIMESTAMP:\n                return AerospikeDataType.LONG;\n            default:\n                throw new AerospikeConnectorException(\n                        AerospikeErrorCode.UNSUPPORTED_DATA_TYPE,\n                        \"Unsupported SeaTunnel type: \" + seaTunnelType.getSqlType());\n        }\n    }\n\n    public AerospikeDataType getFieldType(String fieldName) {\n        AerospikeDataType type = fieldTypeMapping.get(fieldName);\n        if (type == null) {\n            throw new AerospikeConnectorException(","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-aerospike/src/main/java/org/apache/seatunnel/connectors/seatunnel/aerospike/sink/AerospikeTypeConverter.java#L65-L101","documentation":"mapSeaTunnelType() maps a SeaTunnel column type to an AerospikeDataType. When the SeaTunnel SQL type is ARRAY, it additionally asserts the concrete SeaTunnelDataType is an instance of ArrayType; if not (an ARRAY-typed type implemented by a different class), it throws AerospikeConnectorException with code UNSUPPORTED_DATA_TYPE. In practice this guards against array-like columns the converter cannot map, since ARRAY is otherwise forced to AerospikeDataType.BYTEARRAY.","triggerScenarios":"AerospikeTypeConverter is built without field_types (auto-mapping path) and a column's SeaTunnelDataType reports SqlType.ARRAY but is not an ArrayType instance — e.g. a custom or Map/List-based type implementation, or a source plugin exposing arrays via a non-standard type class — during convertValue-time mapping in the constructor.","commonSituations":"Source connectors that model arrays with custom SeaTunnelDataType subclasses; upstream schema evolution replacing ArrayType with a map/list type whose SqlType still reports ARRAY; using a plugin version whose array type class differs from the connector's expectation.","solutions":["Change the column's SeaTunnel type to a standard ArrayType (e.g. ArrayType.INTEGER_ARRAY/STRING_ARRAY) in the source schema.","Explicitly set 'field_types' for the array column in the sink config (e.g. field_types = {tags = BYTEARRAY}) so mapSeaTunnelType is bypassed for that field.","Flatten or serialize the array to a string upstream (transform) so the column maps to STRING instead of ARRAY.","If this comes from a third-party source plugin, report/fix the plugin to emit standard ArrayType instances."],"exampleFix":"// before (source schema)\ncustomListColumn : SqlType.ARRAY (not ArrayType)\n\n// after\nfield_types = {customListColumn = BYTEARRAY}  // or use a standard ArrayType in the source","handlingStrategy":"validation","validationCode":"for (int i = 0; i < rowType.getTotalFields(); i++) {\n    SeaTunnelDataType<?> t = rowType.getFieldType(i);\n    if (t.getSqlType() == SqlType.ARRAY && !(t instanceof ArrayType)) {\n        throw new IllegalArgumentException(\"Column '\" + rowType.getFieldName(i)\n            + \"' uses non-standard ARRAY type \" + t.getClass().getName());\n    }\n}","typeGuard":"boolean isStandardArrayType(SeaTunnelDataType<?> t) {\n    return t.getSqlType() != SqlType.ARRAY || t instanceof ArrayType;\n}","tryCatchPattern":"try {\n    new AerospikeTypeConverter(rowType, config);\n} catch (AerospikeConnectorException e) {\n    if (e.getCode() == AerospikeErrorCode.UNSUPPORTED_DATA_TYPE\n            && e.getMessage().startsWith(\"Invalid ARRAY type\")) {\n        // set field_types for that column or change the source to ArrayType\n    } else {\n        throw e;\n    }\n}","preventionTips":["Ensure source schemas use standard ArrayType implementations for array columns.","Provide explicit field_types entries for array columns to bypass auto-mapping.","Serialize complex/array-like columns to strings upstream when the sink only supports BYTEARRAY."],"tags":["aerospike","type-mapping","array","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-14T05:17:10.506Z"}