{"record":{"id":"549ba78d4919d32b","repo":"risingwavelabs/risingwave","slug":"geometry-collection-type-not-supported","errorCode":null,"errorMessage":"GEOMETRY COLLECTION type not supported","messagePattern":"GEOMETRY COLLECTION type not supported","errorType":"validation","errorClass":"ConnectorError","httpStatus":null,"severity":"error","filePath":"src/connector/src/source/cdc/external/mysql.rs","lineNumber":444,"sourceCode":"            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)\n    mysql_version: (u8, u8),\n    is_mariadb: bool,\n}","sourceCodeStart":426,"sourceCodeEnd":462,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/source/cdc/external/mysql.rs#L426-L462","documentation":"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.","triggerScenarios":"A GEOMETRYCOLLECTION column appears in the MySQL table during schema discovery or schema-change parsing.","commonSituations":"Mixed-geometry GIS tables (points+lines+polygons in one column); CDC setup fails at CREATE TABLE or on upstream DDL change.","solutions":["Drop the GEOMETRYCOLLECTION column from replication.","Decompose into typed columns or replicate as ST_AsText text.","Use a non-CDC ingestion path that serializes geometry.","Look for spatial-type support in newer RisingWave releases."],"exampleFix":"// before\nCREATE TABLE shapes (id INT PRIMARY KEY, geom GEOMETRYCOLLECTION);\n// after\nCREATE TABLE shapes (id INT PRIMARY KEY, geom_wkt TEXT AS (ST_AsText(geom)));","handlingStrategy":"validation","validationCode":"if col.data_type.eq_ignore_ascii_case(\"GEOMETRYCOLLECTION\") {\n    return Err(format!(\"column '{}' is GEOMETRYCOLLECTION; unsupported for MySQL CDC\", col.name));\n}","typeGuard":null,"tryCatchPattern":"match create_mysql_cdc_table().await {\n    Err(e) if e.to_string().contains(\"GEOMETRY COLLECTION\") => eprintln!(\"Decompose or text-serialize geometry collection before CDC\"),\n    other => other?,\n}","preventionTips":["Avoid mixed-geometry columns in replicated tables.","Serialize to WKT/GeoJSON text upstream.","Audit schema with information_schema before CDC setup."],"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-23T08:17:48.524Z"}