apache/seatunnel · error · AerospikeConnectorException
UNSUPPORTED_DATA_TYPE
UNSUPPORTED_DATA_TYPE
Error message
Invalid ARRAY type:
What it means
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.
Source
Thrown at seatunnel-connectors-v2/connector-aerospike/src/main/java/org/apache/seatunnel/connectors/seatunnel/aerospike/sink/AerospikeTypeConverter.java:83
}
}
}
private AerospikeDataType mapSeaTunnelType(SeaTunnelDataType<?> seaTunnelType) {
switch (seaTunnelType.getSqlType()) {
case STRING:
return AerospikeDataType.STRING;
case INT:
return AerospikeDataType.INTEGER;
case BIGINT:
return AerospikeDataType.LONG;
case DOUBLE:
return AerospikeDataType.DOUBLE;
case BOOLEAN:
return AerospikeDataType.BOOLEAN;
case ARRAY:
if (!(seaTunnelType instanceof ArrayType)) {
throw new AerospikeConnectorException(
AerospikeErrorCode.UNSUPPORTED_DATA_TYPE,
"Invalid ARRAY type: " + seaTunnelType.getClass().getSimpleName());
}
return AerospikeDataType.BYTEARRAY;
case DATE:
case TIMESTAMP:
return AerospikeDataType.LONG;
default:
throw new AerospikeConnectorException(
AerospikeErrorCode.UNSUPPORTED_DATA_TYPE,
"Unsupported SeaTunnel type: " + seaTunnelType.getSqlType());
}
}
public AerospikeDataType getFieldType(String fieldName) {
AerospikeDataType type = fieldTypeMapping.get(fieldName);
if (type == null) {
throw new AerospikeConnectorException(View on GitHub (pinned to cf67b549a7)
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.
Example fix
// before (source schema)
customListColumn : SqlType.ARRAY (not ArrayType)
// after
field_types = {customListColumn = BYTEARRAY} // or use a standard ArrayType in the source Defensive patterns
Strategy: validation
Validate before calling
for (int i = 0; i < rowType.getTotalFields(); i++) {
SeaTunnelDataType<?> t = rowType.getFieldType(i);
if (t.getSqlType() == SqlType.ARRAY && !(t instanceof ArrayType)) {
throw new IllegalArgumentException("Column '" + rowType.getFieldName(i)
+ "' uses non-standard ARRAY type " + t.getClass().getName());
}
} Type guard
boolean isStandardArrayType(SeaTunnelDataType<?> t) {
return t.getSqlType() != SqlType.ARRAY || t instanceof ArrayType;
} Try / catch
try {
new AerospikeTypeConverter(rowType, config);
} catch (AerospikeConnectorException e) {
if (e.getCode() == AerospikeErrorCode.UNSUPPORTED_DATA_TYPE
&& e.getMessage().startsWith("Invalid ARRAY type")) {
// set field_types for that column or change the source to ArrayType
} else {
throw e;
}
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Expected Array type but got:
- Unsupported AEROSPIKE data type:
- INVALID_CONFIG
- Unsupported SQL type:
- Unsupported Vitess catalog SQL type:
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/4b1f23d66d9889aa.
Report an issue: GitHub.