risingwavelabs/risingwave · error · ConnectorError

LINE string type not supported

Error message

LINE string type not supported

What it means

Same mapper as above: LINESTRING columns have no RisingWave DataType equivalent in the MySQL CDC connector, so mysql_type_to_rw_type returns an error instead of a type. This fails schema parsing before table creation. It is an explicit, not incidental, rejection.

Source

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

        | 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());
        }
        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());

View on GitHub (pinned to 6469eb736d)

Solutions

  1. Remove the LINESTRING column from the replicated table or replicate a projection without it.
  2. Convert to WKT text upstream (ST_AsText) via a generated or materialized column.
  3. Use a non-CDC ingestion path that serializes geometry.
  4. Upgrade RisingWave / check release notes for spatial type support.

Example fix

// before
CREATE TABLE routes (id INT PRIMARY KEY, path LINESTRING);
// after
CREATE TABLE routes (id INT PRIMARY KEY, path_wkt TEXT AS (ST_AsText(path)));
Defensive patterns

Strategy: validation

Validate before calling

let forbidden = ["LINESTRING", "GEOMETRY", "POINT", "POLYGON", "MULTIPOINT", "MULTILINESTRING", "MULTIPOLYGON", "GEOMETRYCOLLECTION"];
if forbidden.iter().any(|t| col.data_type.eq_ignore_ascii_case(t)) {
    return Err(format!("{} column '{}' unsupported for CDC", col.data_type, col.name));
}

Try / catch

match connect_mysql_cdc(schema).await {
    Err(e) if e.to_string().contains("not supported") => fallback_to_wkt_projection(schema)?,
    other => other?,
}

Prevention

When it happens

Trigger: parse_schema_change, connect, or schema discovery encounters a MySQL column of type LINESTRING in the CDC table's schema.

Common situations: CDC on tables storing route/line geometry (maps, logistics routes); schema evolution adds a LINESTRING column and the CDC pipeline errors on refresh.

Related errors


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