apache/seatunnel · error · IotdbConnectorException

UNSUPPORTED_DATA_TYPE

UNSUPPORTED_DATA_TYPE

Error message

Unsupported data type: 

What it means

In DefaultSeaTunnelRowDeserializer.convert(), when the IoTDB field is INT32, only TINYINT, SMALLINT and INT SeaTunnel types are supported; any other target type hits the default branch and throws UNSUPPORTED_DATA_TYPE with the SeaTunnel field type.

Source

Thrown at seatunnel-connectors-v2/connector-iotdb-v2/src/main/java/org/apache/seatunnel/connectors/seatunnel/iotdbv2/serialize/DefaultSeaTunnelRowDeserializer.java:105

            SeaTunnelDataType<?> seaTunnelFieldType = rowType.getFieldType(i);
            seaTunnelFields[i] = convert(seaTunnelFieldType, field);
        }
        return new SeaTunnelRow(seaTunnelFields);
    }

    private Object convert(SeaTunnelDataType<?> seaTunnelFieldType, Field field) {
        switch (field.getDataType()) {
            case INT32:
                Number int32 = field.getIntV();
                switch (seaTunnelFieldType.getSqlType()) {
                    case TINYINT:
                        return int32.byteValue();
                    case SMALLINT:
                        return int32.shortValue();
                    case INT:
                        return int32.intValue();
                    default:
                        throw new IotdbConnectorException(
                                CommonErrorCode.UNSUPPORTED_DATA_TYPE,
                                "Unsupported data type: " + seaTunnelFieldType);
                }
            case INT64:
                return field.getLongV();
            case FLOAT:
                return field.getFloatV();
            case DOUBLE:
                return field.getDoubleV();
            case TEXT:
            case STRING:
                return field.getStringValue();
            case BOOLEAN:
                return field.getBoolV();
            case TIMESTAMP:
                long timestamp = (long) field.getObjectValue(TSDataType.TIMESTAMP);
                switch (seaTunnelFieldType.getSqlType()) {
                    case TIMESTAMP:

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Change the SeaTunnel column type to INT, SMALLINT or TINYINT to match the IoTDB INT32 field.
  2. Cast/transform the data upstream if a different type is required.
  3. Extend the deserializer's switch to support the desired mapping.

Example fix

// before
field type = FLOAT  // IoTDB field is INT32
// after
field type = INT
Defensive patterns

Strategy: validation

Validate before calling

// check mapping compatibility
Set<SqlType> allowed = Set.of(SqlType.TINYINT, SqlType.SMALLINT, SqlType.INT);
if (iotdbField.getDataType() == TSDataType.INT32 && !allowed.contains(seaTunnelFieldType.getSqlType())) {
    throw new IllegalStateException("INT32 cannot map to " + seaTunnelFieldType);
}

Prevention

When it happens

Trigger: An IoTDB INT32 field mapped to a SeaTunnel type outside {TINYINT, SMALLINT, INT}, e.g., FLOAT, DOUBLE or BOOLEAN.

Common situations: Schema declares a wider or different type than the IoTDB storage type; users assume automatic numeric widening.

Related errors


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