risingwavelabs/risingwave · error · ConnectorError

GEOMETRY COLLECTION type not supported

Error message

GEOMETRY COLLECTION type not supported

What it means

Sentinel rejection inside mysql_type_to_rw_type: the upstream MySQL CDC table contains a GEOMETRY COLLECTION spatial column that RisingWave's CDC type mapping cannot translate to a RW type. Raised when schema change parsing or connection setup encounters this column type; the column must be dropped or excluded from the CDC source.

Solutions

  1. Drop the GEOMETRYCOLLECTION column from replication.
  2. Decompose into typed columns or replicate as ST_AsText text.
  3. Use a non-CDC ingestion path that serializes geometry.
  4. Look for spatial-type support in newer RisingWave releases.

Example fix

// before
CREATE TABLE shapes (id INT PRIMARY KEY, geom GEOMETRYCOLLECTION);
// after
CREATE TABLE shapes (id INT PRIMARY KEY, geom_wkt TEXT AS (ST_AsText(geom)));
Defensive patterns

Strategy: validation

Validate before calling

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

Try / catch

match create_mysql_cdc_table().await {
    Err(e) if e.to_string().contains("GEOMETRY COLLECTION") => eprintln!("Decompose or text-serialize geometry collection before CDC"),
    other => other?,
}

Prevention

When it happens

Trigger: A GEOMETRYCOLLECTION column appears in the MySQL table during schema discovery or schema-change parsing.

Common situations: Mixed-geometry GIS tables (points+lines+polygons in one column); CDC setup fails at CREATE TABLE or on upstream DDL change.

Related errors


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

Appendix: source

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

            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)
    mysql_version: (u8, u8),
    is_mariadb: bool,
}

View on GitHub (pinned to 6469eb736d)