apache/seatunnel · error · CassandraConnectorException

UNSUPPORTED_DATA_TYPE

UNSUPPORTED_DATA_TYPE

Error message

Unsupported this data type: " + type

What it means

TypeConvertUtil.convert maps Cassandra protocol data types (MAP, LIST, SET, and primitive codes) to SeaTunnel data types. When the Cassandra DataType code is not one of the handled ProtocolConstants.DataType values, it throws UNSUPPORTED_DATA_TYPE via CassandraConnectorException. This typically means the table contains a column type the connector has no SeaTunnel mapping for.

Source

Thrown at seatunnel-connectors-v2/connector-cassandra/src/main/java/org/apache/seatunnel/connectors/seatunnel/cassandra/util/TypeConvertUtil.java:103

                return BasicType.BOOLEAN_TYPE;
            case ProtocolConstants.DataType.TIME:
                return LocalTimeType.LOCAL_TIME_TYPE;
            case ProtocolConstants.DataType.DATE:
                return LocalTimeType.LOCAL_DATE_TYPE;
            case ProtocolConstants.DataType.TIMESTAMP:
                return LocalTimeType.LOCAL_DATE_TIME_TYPE;
            case ProtocolConstants.DataType.BLOB:
                return ArrayType.BYTE_ARRAY_TYPE;
            case ProtocolConstants.DataType.MAP:
                return new MapType<>(
                        convert(((DefaultMapType) type).getKeyType()),
                        convert(((DefaultMapType) type).getValueType()));
            case ProtocolConstants.DataType.LIST:
                return convertToArrayType(convert(((DefaultListType) type).getElementType()));
            case ProtocolConstants.DataType.SET:
                return convertToArrayType(convert(((DefaultSetType) type).getElementType()));
            default:
                throw new CassandraConnectorException(
                        CommonErrorCodeDeprecated.UNSUPPORTED_DATA_TYPE,
                        "Unsupported this data type: " + type);
        }
    }

    private static ArrayType<?, ?> convertToArrayType(SeaTunnelDataType<?> dataType) {
        if (dataType.equals(BasicType.STRING_TYPE)) {
            return ArrayType.STRING_ARRAY_TYPE;
        } else if (dataType.equals(BasicType.BYTE_TYPE)) {
            return ArrayType.BYTE_ARRAY_TYPE;
        } else if (dataType.equals(BasicType.SHORT_TYPE)) {
            return ArrayType.SHORT_ARRAY_TYPE;
        } else if (dataType.equals(BasicType.INT_TYPE)) {
            return ArrayType.INT_ARRAY_TYPE;
        } else if (dataType.equals(BasicType.LONG_TYPE)) {
            return ArrayType.LONG_ARRAY_TYPE;
        } else if (dataType.equals(BasicType.FLOAT_TYPE)) {
            return ArrayType.FLOAT_ARRAY_TYPE;

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Identify the column whose type printed in the message is unsupported and exclude it from the query/schema
  2. Change the table column to a supported type (e.g. basic primitives, list/set/map)
  3. Extend TypeConvertUtil.convert with a mapping for the missing DataType
  4. Upgrade SeaTunnel to a version that supports the type
Defensive patterns

Strategy: validation

Validate before calling

ProtocolConstants.DataType code = type.asCqlType().getProtocolCode();
// allow only codes mapped in TypeConvertUtil.convert before running the source

Type guard

boolean isSupportedCassandraType(DataType t) {
    switch (t.getProtocolCode()) {
        case ProtocolConstants.DataType.VARCHAR:
        case ProtocolConstants.DataType.INT:
        case ProtocolConstants.DataType.BIGINT:
        case ProtocolConstants.DataType.DOUBLE:
        case ProtocolConstants.DataType.BOOLEAN:
            return true;
        default:
            return false;
    }
}

Try / catch

try {
    SeaTunnelDataType<?> st = TypeConvertUtil.convert(cqlType);
} catch (CassandraConnectorException e) {
    if (CommonErrorCodeDeprecated.UNSUPPORTED_DATA_TYPE.equals(e.getCode())) {
        LOG.warn("Skipping unsupported column type: {}", e.getMessage());
    } else { throw e; }
}

Prevention

When it happens

Trigger: Reading a Cassandra table whose column uses a protocol DataType not covered by the switch (e.g. custom/UDT types, exotic protocol types), during split/type resolution in the Cassandra source.

Common situations: Tables with user-defined types (UDT), tuples, or newer Cassandra data types the connector mapping was never extended for; schema drift after ALTER TABLE adding an unmapped column.

Related errors


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