apache/seatunnel · error · UnsupportedOperationException

Unsupported type:

Error message

Unsupported type: 

What it means

convertValue switches on the SeaTunnel SqlType to produce an Iceberg-compatible value; a SqlType with no case in the switch (e.g. ARRAY/MAP/ROW variants or newer types depending on version) falls through to the final throw of UnsupportedOperationException.

Source

Thrown at seatunnel-connectors-v2/connector-iceberg/src/main/java/org/apache/seatunnel/connectors/seatunnel/iceberg/data/RowConverter.java:214

            case DECIMAL:
                return convertDecimal(value, (Types.DecimalType) type);
            case BOOLEAN:
                return convertBoolean(value);
            case STRING:
                return convertString(value);
            case UUID:
                return convertUUID(value);
            case BINARY:
            case FIXED:
                return convertBase64Binary(value);
            case DATE:
                return convertDateValue(value);
            case TIME:
                return convertTimeValue(value);
            case TIMESTAMP:
                return convertTimestampValue(value, (Types.TimestampType) type);
        }
        throw new UnsupportedOperationException("Unsupported type: " + type.typeId());
    }

    private Types.NestedField lookupStructField(
            String fieldName, Types.StructType schema, int structFieldId) {
        if (nameMapping == null) {
            return config.isCaseSensitive()
                    ? schema.caseInsensitiveField(fieldName)
                    : schema.field(fieldName);
        }

        return structNames
                .computeIfAbsent(structFieldId, notUsed -> createStructNameMap(schema))
                .get(fieldName);
    }

    private Map<String, Types.NestedField> createStructNameMap(Types.StructType schema) {
        Map<String, Types.NestedField> map = Maps.newHashMap();
        schema.fields()

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Use a supported SeaTunnel type for the field or cast/flatten it in a transform before the sink.
  2. Upgrade the connector to a version covering the type.
  3. Align the Iceberg table schema and SeaTunnelRowType so every field maps to a handled SqlType.
  4. Catch UnsupportedOperationException per record and route to error handling.

Example fix

// before
SeaTunnelRowType with unhandled SqlType (e.g. NULL_TYPE) field
// after
Cast the field to STRING/BIGINT etc. via SQL transform before the Iceberg sink
Defensive patterns

Strategy: validation

Validate before calling

Set<SqlType> handled = Set.of(BYTE,SHORT,INT,LONG,FLOAT,DOUBLE,DECIMAL,BOOLEAN,STRING,DATE,TIME,TIMESTAMP,ROW,ARRAY,MAP...); // keep in sync with RowConverter
rowType.getFieldTypes().forEach(t -> check(handled.contains(t.getSqlType())));

Try / catch

try { record = converter.convert(row, fromType, schema); } catch (UnsupportedOperationException e) { log.error("Unsupported SqlType: {}", e.getMessage()); }

Prevention

When it happens

Trigger: Writing a SeaTunnel field whose SqlType is not handled by convertValue (reaches convertToStruct/convertListValue/convertMapValue paths or a raw unsupported SqlType) into an Iceberg table.

Common situations: New SeaTunnel SQL types not yet mapped in the connector, complex nested schemas whose branches are missing, schema mismatch between the declared SeaTunnelRowType and handled cases.

Related errors


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