risingwavelabs/risingwave · error · ConnectorError

MULTI POLYGON type not supported

Error message

MULTI POLYGON type not supported

What it means

Sentinel rejection inside mysql_type_to_rw_type: the upstream MySQL CDC table contains a MULTI POLYGON spatial column, which RisingWave's CDC type mapping cannot translate to a RW type. It fires whenever a schema parse or connection discovers such a column type; the table must be altered or the column excluded from the CDC source.

Source

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

            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());
        }
        ColumnType::MultiPolygon(_) => {
            return Err(anyhow!("MULTI POLYGON type not supported").into());
        }
        ColumnType::GeometryCollection(_) => {
            return Err(anyhow!("GEOMETRY COLLECTION type not supported").into());
        }
        ColumnType::Unknown(_) => {
            return Err(anyhow!("Unknown MySQL data type").into());
        }
    };

    Ok(dtype)
}

pub struct MySqlExternalTableReader {
    rw_schema: Schema,
    pk_indices: Vec<usize>,
    field_names: String,
    pool: mysql_async::Pool,
    upstream_mysql_pk_infos: Vec<(String, ColumnType)>, // (column_name, column_type)

View on GitHub (pinned to 6469eb736d)

Solutions

  1. Remove the MULTIPOLYGON column from the CDC table.
  2. Replicate an ST_AsText generated column instead.
  3. Ingest geometry via a connector that serializes to text/JSON.
  4. Check newer RisingWave versions for spatial support.

Example fix

// before
CREATE TABLE countries (id INT PRIMARY KEY, border MULTIPOLYGON);
// after
CREATE TABLE countries (id INT PRIMARY KEY, border_wkt TEXT AS (ST_AsText(border)));
Defensive patterns

Strategy: validation

Validate before calling

if col.data_type.eq_ignore_ascii_case("MULTIPOLYGON") {
    return Err(format!("column '{}' is MULTIPOLYGON; unsupported for MySQL CDC", col.name));
}

Try / catch

match connect_mysql_cdc(schema).await {
    Err(e) if e.to_string().contains("MULTI POLYGON") => eprintln!("Replicate boundary data as WKT text instead"),
    other => other?,
}

Prevention

When it happens

Trigger: connect or parse_schema_change encounters MULTIPOLYGON in the upstream schema.

Common situations: Administrative-boundary or country-map tables; users CDC them and the CREATE TABLE fails.

Related errors


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