{"record":{"id":"86dfd44f269b45f0","repo":"risingwavelabs/risingwave","slug":"multi-polygon-type-not-supported","errorCode":null,"errorMessage":"MULTI POLYGON type not supported","messagePattern":"MULTI POLYGON type not supported","errorType":"validation","errorClass":"ConnectorError","httpStatus":null,"severity":"error","filePath":"src/connector/src/source/cdc/external/mysql.rs","lineNumber":441,"sourceCode":"            return Err(anyhow!(\"GEOMETRY type not supported\").into());\n        }\n        ColumnType::Point(_) => {\n            return Err(anyhow!(\"POINT type not supported\").into());\n        }\n        ColumnType::LineString(_) => {\n            return Err(anyhow!(\"LINE string type not supported\").into());\n        }\n        ColumnType::Polygon(_) => {\n            return Err(anyhow!(\"POLYGON type not supported\").into());\n        }\n        ColumnType::MultiPoint(_) => {\n            return Err(anyhow!(\"MULTI POINT type not supported\").into());\n        }\n        ColumnType::MultiLineString(_) => {\n            return Err(anyhow!(\"MULTI LINE STRING type not supported\").into());\n        }\n        ColumnType::MultiPolygon(_) => {\n            return Err(anyhow!(\"MULTI POLYGON type not supported\").into());\n        }\n        ColumnType::GeometryCollection(_) => {\n            return Err(anyhow!(\"GEOMETRY COLLECTION type not supported\").into());\n        }\n        ColumnType::Unknown(_) => {\n            return Err(anyhow!(\"Unknown MySQL data type\").into());\n        }\n    };\n\n    Ok(dtype)\n}\n\npub struct MySqlExternalTableReader {\n    rw_schema: Schema,\n    pk_indices: Vec<usize>,\n    field_names: String,\n    pool: mysql_async::Pool,\n    upstream_mysql_pk_infos: Vec<(String, ColumnType)>, // (column_name, column_type)","sourceCodeStart":423,"sourceCodeEnd":459,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/source/cdc/external/mysql.rs#L423-L459","documentation":"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.","triggerScenarios":"connect or parse_schema_change encounters MULTIPOLYGON in the upstream schema.","commonSituations":"Administrative-boundary or country-map tables; users CDC them and the CREATE TABLE fails.","solutions":["Remove the MULTIPOLYGON column from the CDC table.","Replicate an ST_AsText generated column instead.","Ingest geometry via a connector that serializes to text/JSON.","Check newer RisingWave versions for spatial support."],"exampleFix":"// before\nCREATE TABLE countries (id INT PRIMARY KEY, border MULTIPOLYGON);\n// after\nCREATE TABLE countries (id INT PRIMARY KEY, border_wkt TEXT AS (ST_AsText(border)));","handlingStrategy":"validation","validationCode":"if col.data_type.eq_ignore_ascii_case(\"MULTIPOLYGON\") {\n    return Err(format!(\"column '{}' is MULTIPOLYGON; unsupported for MySQL CDC\", col.name));\n}","typeGuard":null,"tryCatchPattern":"match connect_mysql_cdc(schema).await {\n    Err(e) if e.to_string().contains(\"MULTI POLYGON\") => eprintln!(\"Replicate boundary data as WKT text instead\"),\n    other => other?,\n}","preventionTips":["Pre-check for multipolygon columns in CDC candidates.","Use generated WKT text columns for boundary data.","Keep GIS-heavy tables out of CDC pipelines."],"tags":["cdc","mysql","unsupported-type","spatial"],"backgroundTag":"unsupported-enum-value","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}