{"record":{"id":"2c9dd48f46b7dca6","repo":"risingwavelabs/risingwave","slug":"polygon-type-not-supported","errorCode":null,"errorMessage":"POLYGON type not supported","messagePattern":"POLYGON type not supported","errorType":"validation","errorClass":"ConnectorError","httpStatus":null,"severity":"error","filePath":"src/connector/src/source/cdc/external/mysql.rs","lineNumber":432,"sourceCode":"        | 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());\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","sourceCodeStart":414,"sourceCodeEnd":450,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/source/cdc/external/mysql.rs#L414-L450","documentation":"Type-mapping guard in mysql_type_to_rw_type: when a CDC schema snapshot or schema-change event from a MySQL source contains a POLYGON column, mapping to a RisingWave DataType is impossible (no spatial types), so the mapping returns an error and the source/schema change fails for tables with POLYGON columns.","triggerScenarios":"A MySQL CDC table's schema contains a POLYGON column when connect/parse_schema_change builds the RW schema.","commonSituations":"Geofencing or region-boundary tables; users CDC a table with area polygons and hit this during `CREATE TABLE ... connector='mysql-cdc'`.","solutions":["Drop the POLYGON column from the CDC table.","Expose it as text via ST_AsText (generated column) so it maps to VARCHAR.","Ingest via a connector that supports geometry serialization instead of CDC.","Check for RisingWave spatial-type support in newer versions."],"exampleFix":"// before\nCREATE TABLE zones (id INT PRIMARY KEY, area POLYGON);\n// after\nCREATE TABLE zones (id INT PRIMARY KEY, area_wkt TEXT AS (ST_AsText(area)));","handlingStrategy":"validation","validationCode":"if col.data_type.eq_ignore_ascii_case(\"POLYGON\") {\n    return Err(format!(\"column '{}' is POLYGON; convert to WKT text before CDC\", col.name));\n}","typeGuard":null,"tryCatchPattern":"match create_mysql_cdc_table().await {\n    Err(e) if e.to_string().contains(\"POLYGON type not supported\") => {\n        eprintln!(\"Convert polygon column to text (ST_AsText) upstream\");\n    }\n    other => other?,\n}","preventionTips":["Scan information_schema.COLUMNS for polygon/geometry types before CDC setup.","Use generated WKT columns for area data.","Avoid replicating GIS tables via CDC."],"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"}