risingwavelabs/risingwave · error · ConnectorError

SET type not supported

Error message

SET type not supported

What it means

RisingWave has no SET data type equivalent, and mysql_type_to_rw_type refuses to degrade SET columns to another type, returning 'SET type not supported'. SET columns (comma-separated bitset strings) cannot be faithfully replicated through CDC type mapping.

Source

Thrown at src/connector/src/source/cdc/external/mysql.rs:420

        ColumnType::Timestamp(_) => DataType::Timestamptz,
        ColumnType::Year => DataType::Int32,
        ColumnType::Char(_)
        | ColumnType::NChar(_)
        | ColumnType::Varchar(_)
        | ColumnType::NVarchar(_) => DataType::Varchar,
        ColumnType::Binary(_) | ColumnType::Varbinary(_) => DataType::Bytea,
        ColumnType::Text(_)
        | ColumnType::TinyText(_)
        | ColumnType::MediumText(_)
        | ColumnType::LongText(_) => DataType::Varchar,
        ColumnType::Blob(_)
        | ColumnType::TinyBlob
        | ColumnType::MediumBlob
        | ColumnType::LongBlob => DataType::Bytea,
        ColumnType::Enum(_) => DataType::Varchar,
        ColumnType::Json => DataType::Jsonb,
        ColumnType::Set(_) => {
            return Err(anyhow!("SET type not supported").into());
        }
        ColumnType::Geometry(_) => {
            return Err(anyhow!("GEOMETRY type not supported").into());
        }
        ColumnType::Point(_) => {
            return Err(anyhow!("POINT type not supported").into());
        }
        ColumnType::LineString(_) => {
            return Err(anyhow!("LINE string type not supported").into());
        }
        ColumnType::Polygon(_) => {
            return Err(anyhow!("POLYGON type not supported").into());
        }
        ColumnType::MultiPoint(_) => {
            return Err(anyhow!("MULTI POINT type not supported").into());
        }
        ColumnType::MultiLineString(_) => {
            return Err(anyhow!("MULTI LINE STRING type not supported").into());

View on GitHub (pinned to 6469eb736d)

Solutions

  1. Normalize the SET column into a separate join table or individual BOOLEAN columns in MySQL.
  2. Change the column to VARCHAR and store comma-separated values, then parse in RW if needed.
  3. Exclude the SET column from the replicated table.

Example fix

// before (MySQL)
CREATE TABLE t (perms SET('read','write','admin'));
// after
CREATE TABLE t (perms VARCHAR(64)); -- store 'read,write' as text
Defensive patterns

Strategy: validation

Validate before calling

SELECT COLUMN_NAME, COLUMN_TYPE FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA='mydb' AND TABLE_NAME='t' AND DATA_TYPE = 'set';

Type guard

function isSetColumn(colType) { return /^set\s*\(/i.test(colType); }

Try / catch

try { await createCdcTable('t'); } catch (e) { if (String(e).includes('SET type not supported')) { /* normalize SET column to VARCHAR or boolean columns, then retry */ } else throw e; }

Prevention

When it happens

Trigger: Creating a CDC table whose MySQL schema includes a column declared as SET('a','b','c'); or a schema change adding a SET column.

Common situations: Old MySQL schemas using SET for multi-select flags; migrating tables that predate normalized designs.

Related errors


AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11). Data as JSON: /api/errors/c709fb10c917ec59. Report an issue: GitHub.