{"record":{"id":"5bde19f217a86b1c","repo":"risingwavelabs/risingwave","slug":"geometry-type-not-supported","errorCode":null,"errorMessage":"GEOMETRY type not supported","messagePattern":"GEOMETRY type not supported","errorType":"validation","errorClass":"ConnectorError","httpStatus":null,"severity":"error","filePath":"src/connector/src/source/cdc/external/mysql.rs","lineNumber":423,"sourceCode":"        | ColumnType::NChar(_)\n        | ColumnType::Varchar(_)\n        | ColumnType::NVarchar(_) => DataType::Varchar,\n        ColumnType::Binary(_) | ColumnType::Varbinary(_) => DataType::Bytea,\n        ColumnType::Text(_)\n        | ColumnType::TinyText(_)\n        | ColumnType::MediumText(_)\n        | ColumnType::LongText(_) => DataType::Varchar,\n        ColumnType::Blob(_)\n        | ColumnType::TinyBlob\n        | ColumnType::MediumBlob\n        | ColumnType::LongBlob => DataType::Bytea,\n        ColumnType::Enum(_) => DataType::Varchar,\n        ColumnType::Json => DataType::Jsonb,\n        ColumnType::Set(_) => {\n            return Err(anyhow!(\"SET type not supported\").into());\n        }\n        ColumnType::Geometry(_) => {\n            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());","sourceCodeStart":405,"sourceCodeEnd":441,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/source/cdc/external/mysql.rs#L405-L441","documentation":"GEOMETRY (and other spatial types like POINT, LINESTRING) have no RisingWave counterpart, so mysql_type_to_rw_type returns an error instead of a lossy mapping. This specific error fires for ColumnType::Geometry, i.e. any MySQL GEOMETRY-spatial column variant mapped to Geometry.","triggerScenarios":"Creating a CDC table on a MySQL table containing a GEOMETRY column, or adding one via schema change during CDC replication.","commonSituations":"GIS-enabled tables (locations, shapes) built on MySQL spatial extensions; schemas synced from PostGIS-like designs.","solutions":["Store the geometry as serialized text/JSON (e.g. WKT or GeoJSON in a TEXT column) in MySQL and parse externally.","Exclude the GEOMETRY column from the CDC table.","Keep spatial data in a separate system (e.g. PostGIS) and reference it by ID from the replicated table."],"exampleFix":"// before (MySQL)\nCREATE TABLE t (area GEOMETRY);\n// after\nCREATE TABLE t (area_wkt TEXT); -- store 'POLYGON((...))' as WKT text","handlingStrategy":"validation","validationCode":"SELECT COLUMN_NAME, COLUMN_TYPE FROM information_schema.COLUMNS\nWHERE TABLE_SCHEMA='mydb' AND TABLE_NAME='t'\n  AND DATA_TYPE IN ('geometry','point','linestring','polygon','multipoint','multilinestring','multipolygon','geomcollection');","typeGuard":"function isSpatialColumn(dataType) {\n  return [\"geometry\",\"point\",\"linestring\",\"polygon\",\"multipoint\",\"multilinestring\",\"multipolygon\",\"geomcollection\"].includes(dataType.toLowerCase());\n}","tryCatchPattern":"try { await createCdcTable('t'); } catch (e) { if (String(e).includes('GEOMETRY type not supported')) { /* export geometry as WKT/TEXT column and retry */ } else throw e; }","preventionTips":["Keep spatial columns out of CDC-replicated tables","Store geometries as WKT/GeoJSON text if they must be replicated","Scan information_schema for spatial DATA_TYPEs before onboarding"],"tags":["cdc","mysql","type-mapping","unsupported-type"],"backgroundTag":"unsupported-dtype","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"}