risingwavelabs/risingwave · error · AccessError

CDC auto schema change error: unsupported data type `{ty}` i

Error message

CDC auto schema change error: unsupported data type `{ty}` in table `{table_name}`

What it means

AccessError::CdcAutoSchemaChangeError in src/connector/codec/src/decoder/mod.rs:40. Like UnsupportedType, it signals an unsupported data type, but in the CDC auto-schema-change path it additionally identifies the table `table_name` whose auto schema change failed because of type `ty`.

Source

Thrown at src/connector/codec/src/decoder/mod.rs:40

use thiserror::Error;
use thiserror_ext::Macro;

#[derive(Error, Debug, Macro)]
#[thiserror_ext(macro(mangle, path = "crate::decoder"))]
pub enum AccessError {
    #[error("Undefined field `{name}` at `{path}`")]
    Undefined { name: String, path: String },
    #[error("Cannot parse value `{value}` with type `{got}` into expected type `{expected}`")]
    TypeError {
        expected: String,
        got: String,
        value: String,
    },
    #[error("Unsupported data type `{ty}`")]
    UnsupportedType { ty: String },

    /// CDC auto schema change specific error that may include table context
    #[error("CDC auto schema change error: unsupported data type `{ty}` in table `{table_name}`")]
    CdcAutoSchemaChangeError { ty: String, table_name: String },

    #[error("Unsupported additional column `{name}`")]
    UnsupportedAdditionalColumn { name: String },

    #[error("Fail to convert protobuf Any into jsonb: {0}")]
    ProtobufAnyToJson(#[source] serde_json::Error),

    /// Parquet parser specific errors
    #[error("Parquet parser error: {message}")]
    ParquetParser { message: String },

    /// Errors that are not categorized into variants above.
    #[error("{message}")]
    Uncategorized { message: String },

    #[error(transparent)]
    NotImplemented(#[from] NotImplemented),

View on GitHub (pinned to 6469eb736d)

Solutions

  1. Change the upstream column type to a supported one (e.g. store as TEXT/JSONB) before re-enabling auto schema change
  2. Add the column manually in RisingWave with a supported type so the auto path is not invoked for it
  3. Read `ty` and `table_name` from the error and extend the encoder's type mapping if you control the connector code
  4. Check RisingWave docs/release notes for expanded CDC type support and upgrade

Example fix

-- before (Postgres source column)
ALTER TABLE src ADD COLUMN shape geometry;
-- after
ALTER TABLE src ADD COLUMN shape_wkt TEXT; -- RW column: shape_wkt VARCHAR
Defensive patterns

Strategy: try-catch

Validate before calling

fn cdc_type_supported(ty: &str) -> bool {
    !matches!(ty, "GEOMETRY" | "GEOGRAPHY" | "MONEY" | "UUID[]" | "INTERVAL")
}

Try / catch

match decode_cdc_event(ev) {
    Ok(d) => d,
    Err(AccessError::CdcAutoSchemaChangeError { ty, table_name }) => {
        // stop auto-schema-change for this table; add column manually with supported type
        plan_manual_migration(&table_name, &ty)
    }
    Err(e) => return Err(e.into()),
}

Prevention

When it happens

Trigger: During CDC (Debezium-based) ingestion with auto schema change enabled, a newly arriving event contains a column of a type `ty` that cannot be mapped, so the automatic ALTER/add-column for `table_name` aborts with this error.

Common situations: Upstream OLTP (MySQL/Postgres/Mongo via Debezium) added a column with a type RisingWave cannot map (e.g. geometric, array-of-custom, MONEY, enum variants); schema evolution to types unsupported by the auto-schema-change pipeline.

Related errors


AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11). Data as JSON: /api/errors/ad63f674ea90ccb8. Report an issue: GitHub.