{"record":{"id":"097991878086cb38","repo":"risingwavelabs/risingwave","slug":"unsupported-array-type","errorCode":null,"errorMessage":"unsupported array type: {:?}","messagePattern":"unsupported array type: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/connector/src/connector_common/postgres.rs","lineNumber":842,"sourceCode":"                SeaType::Uuid => Ok(PgType::UUID_ARRAY),\n                SeaType::Json => Ok(PgType::JSON_ARRAY),\n                SeaType::JsonBinary => Ok(PgType::JSONB_ARRAY),\n                SeaType::Array(_) => bail!(\"nested array type is not supported\"),\n                SeaType::Unknown(name) => {\n                    // Treat as enum type\n                    Ok(PgType::new(\n                        name.clone(),\n                        0,\n                        PgKind::Array(PgType::new(\n                            name.clone(),\n                            0,\n                            PgKind::Enum(vec![]),\n                            \"\".into(),\n                        )),\n                        \"\".into(),\n                    ))\n                }\n                _ => bail!(\"unsupported array type: {:?}\", t),\n            }\n        }\n        SeaType::Unknown(name) => {\n            // Treat as enum type\n            Ok(PgType::new(\n                name.clone(),\n                0,\n                PgKind::Enum(vec![]),\n                \"\".into(),\n            ))\n        }\n        _ => bail!(\"unsupported type: {:?}\", sea_type),\n    }\n}\n\n#[cfg(test)]\nmod tests {\n    use super::{","sourceCodeStart":824,"sourceCodeEnd":860,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/connector_common/postgres.rs#L824-L860","documentation":"Inside sea_type_to_pg_type, when a column's element type inside an array cannot be mapped to a concrete PostgreSQL array element type (an unhandled inner type in the array arm), the mapper bails with this error. It means the array's element type is not one of the supported scalar types.","triggerScenarios":"Creating a Postgres sink whose source table has an array column with an element type not covered by the match arms (e.g. arrays of unknown/custom inner types beyond the handled Interval/Boolean/Point/Uuid/Json cases).","commonSituations":"Sinking tables with exotic array element types or user-defined types inside arrays to Postgres; schema drift upstream introduces an array element type the mapper does not handle.","solutions":["Change the array element type to a supported scalar (int, text, bool, uuid, jsonb, etc.)","Cast the column to a supported array type in the sink query","Store the column as a JSONB string instead of an array"],"exampleFix":"// before\ncol custom_type[]  -- element type unsupported\n// after\ncol text[]  -- or cast: col::text[]","handlingStrategy":"validation","validationCode":"const SUPPORTED_ELEM: &[DataType] = &[DataType::Int16, DataType::Int32, DataType::Int64, DataType::Varchar, DataType::Boolean, DataType::Timestamp];\nfn array_elem_supported(t: &DataType) -> bool {\n    match t { DataType::List(e) => SUPPORTED_ELEM.contains(&*e), _ => true }\n}","typeGuard":"fn is_supported_array(t: &DataType) -> bool {\n    matches!(t, DataType::List(e) if !matches!(&**e, DataType::List(_)))\n}","tryCatchPattern":null,"preventionTips":["Keep array element types to simple scalars","Cast exotic element types to text/JSONB at ingestion time","Check RisingWave docs for supported sink column types"],"tags":["postgres","sink","type-mapping","array"],"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"}