apache/seatunnel · error · SeaTunnelRuntimeException

COMMON-17

COMMON-17

Error message

'${identifier}' unsupported convert type '${dataType}' of '${field}' to SeaTunnel data type.

What it means

MaxCompute catalog converter's toSeaTunnelType() throws this when an ARRAY element type in a MaxCompute column definition is not one of the supported primitive element types. MaxCompute ARRAY<T> columns are only mapped for a fixed set of element types; others hit the default throw.

Solutions

  1. Cast the array column to an array of a supported element type in the source query (e.g. TRANSFORM/CAST elements to BIGINT or STRING)
  2. Flatten or drop the column from the table read
  3. Extend the ARRAY element-type switch in MaxComputeDataTypeConvertor.toSeaTunnelType()

Example fix

-- before: SELECT arr_col FROM t  -- arr_col is ARRAY<DECIMAL(10,2)>
-- after
SELECT TRANSFORM(arr_col, x -> CAST(x AS DOUBLE)) AS arr_col FROM t
Defensive patterns

Strategy: try-catch

Try / catch

try {
    SeaTunnelDataType<?> t = converter.toSeaTunnelType(field, connectorDataType);
} catch (SeaTunnelConvertException e) {
    LOG.warn("Unmapped MaxCompute array type {} for {}", connectorDataType, field);
    // fallback: treat as STRING array or skip column
}

Prevention

When it happens

Trigger: toSeaTunnelType() is given a MaxCompute type starting with ARRAY whose inner element type (connectorDataType) is not STRING/INT/BIGINT/FLOAT/DOUBLE etc. — e.g. ARRAY<DECIMAL> or ARRAY<MAP<...>>.

Common situations: Reading MaxCompute tables with arrays of complex elements (struct/decimal/map); auto catalog sync of tables using advanced MaxCompute types.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/bcdcd9a318d2b549. Report an issue: GitHub.

Appendix: source

Thrown at seatunnel-connectors-v2/connector-maxcompute/src/main/java/org/apache/seatunnel/connectors/seatunnel/maxcompute/catalog/MaxComputeDataTypeConvertor.java:84

            switch (seaTunnelType.getSqlType()) {
                case STRING:
                    return ArrayType.STRING_ARRAY_TYPE;
                case BOOLEAN:
                    return ArrayType.BOOLEAN_ARRAY_TYPE;
                case BYTES:
                    return ArrayType.BYTE_ARRAY_TYPE;
                case SMALLINT:
                    return ArrayType.SHORT_ARRAY_TYPE;
                case INT:
                    return ArrayType.INT_ARRAY_TYPE;
                case BIGINT:
                    return ArrayType.LONG_ARRAY_TYPE;
                case FLOAT:
                    return ArrayType.FLOAT_ARRAY_TYPE;
                case DOUBLE:
                    return ArrayType.DOUBLE_ARRAY_TYPE;
                default:
                    throw CommonError.convertToSeaTunnelTypeError(
                            MaxcomputeBaseOptions.PLUGIN_NAME, connectorDataType, field);
            }
        }
        if (connectorDataType.startsWith("STRUCT")) {
            // STRUCT<field1:type1,field2:type2...>
            // todo: support struct type
            String substring = connectorDataType.substring(7, connectorDataType.length() - 1);
            String[] entryArray = substring.split(",");
            String[] fieldNames = new String[entryArray.length];
            SeaTunnelDataType<?>[] fieldTypes = new SeaTunnelDataType<?>[entryArray.length];
            for (int i = 0; i < entryArray.length; i++) {
                String[] fieldNameAndType = entryArray[i].split(":");
                fieldNames[i] = fieldNameAndType[0];
                fieldTypes[i] = toSeaTunnelType(fieldNameAndType[0], fieldNameAndType[1]);
            }
            return new SeaTunnelRowType(fieldNames, fieldTypes);
        }
        if (connectorDataType.startsWith("DECIMAL")) {

View on GitHub (pinned to cf67b549a7)