risingwavelabs/risingwave · error · ConnectorError
GEOMETRY type not supported
Error message
GEOMETRY type not supported
What it means
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.
Source
Thrown at src/connector/src/source/cdc/external/mysql.rs:423
| ColumnType::NChar(_)
| ColumnType::Varchar(_)
| ColumnType::NVarchar(_) => DataType::Varchar,
ColumnType::Binary(_) | ColumnType::Varbinary(_) => DataType::Bytea,
ColumnType::Text(_)
| ColumnType::TinyText(_)
| 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());View on GitHub (pinned to 6469eb736d)
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.
Example fix
// before (MySQL) CREATE TABLE t (area GEOMETRY); // after CREATE TABLE t (area_wkt TEXT); -- store 'POLYGON((...))' as WKT text
Defensive patterns
Strategy: validation
Validate before calling
SELECT COLUMN_NAME, COLUMN_TYPE FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA='mydb' AND TABLE_NAME='t'
AND DATA_TYPE IN ('geometry','point','linestring','polygon','multipoint','multilinestring','multipolygon','geomcollection'); Type guard
function isSpatialColumn(dataType) {
return ["geometry","point","linestring","polygon","multipoint","multilinestring","multipolygon","geomcollection"].includes(dataType.toLowerCase());
} Try / catch
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; } Prevention
- 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
When it happens
Trigger: Creating a CDC table on a MySQL table containing a GEOMETRY column, or adding one via schema change during CDC replication.
Common situations: GIS-enabled tables (locations, shapes) built on MySQL spatial extensions; schemas synced from PostGIS-like designs.
Related errors
- BIT({}) type not supported
- SET type not supported
- {:?} data type is not supported
- unsupported data type: {}, set to null
- POINT type not supported
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/5bde19f217a86b1c.
Report an issue: GitHub.