risingwavelabs/risingwave · error · SinkError::BigQuery
VECTOR is not supported for BigQuery sink.
Error message
VECTOR is not supported for BigQuery sink.
What it means
The BigQuery sink's type mapping function `get_string_and_check_support_from_datatype` encountered `DataType::Vector`, which has no mapping to a BigQuery column type. VECTOR (embedding/vector-index) columns are not supported by this sink, so it raises `SinkError::BigQuery` and halts.
Source
Thrown at src/connector/src/sink/big_query.rs:433
Ok(format!("STRUCT<{}>", elements_vec.join(", ")))
}
DataType::List(l) => {
let element_string = Self::get_string_and_check_support_from_datatype(l.elem())?;
Ok(format!("ARRAY<{}>", element_string))
}
DataType::Bytea => Ok("BYTES".to_owned()),
DataType::Jsonb => Ok("JSON".to_owned()),
DataType::Variant => Err(SinkError::BigQuery(anyhow::anyhow!(
"VARIANT is not supported for BigQuery sink."
))),
DataType::Serial => Ok("INT64".to_owned()),
DataType::Int256 => Err(SinkError::BigQuery(anyhow::anyhow!(
"INT256 is not supported for BigQuery sink."
))),
DataType::Map(_) => Err(SinkError::BigQuery(anyhow::anyhow!(
"MAP is not supported for BigQuery sink."
))),
DataType::Vector(_) => Err(SinkError::BigQuery(anyhow::anyhow!(
"VECTOR is not supported for BigQuery sink."
))),
}
}
fn map_field(rw_field: &Field) -> Result<TableFieldSchema> {
let tfs = match &rw_field.data_type {
DataType::Boolean => TableFieldSchema::bool(&rw_field.name),
DataType::Int16 | DataType::Int32 | DataType::Int64 | DataType::Serial => {
TableFieldSchema::integer(&rw_field.name)
}
DataType::Float32 => {
return Err(SinkError::BigQuery(anyhow::anyhow!(
"REAL is not supported for BigQuery sink. Please convert to FLOAT64 or other supported types."
)));
}
DataType::Float64 => TableFieldSchema::float(&rw_field.name),
DataType::Decimal => TableFieldSchema::numeric(&rw_field.name),View on GitHub (pinned to 6469eb736d)
Solutions
- Exclude the vector column from the sink by selecting only supported columns.
- Serialize the vector to JSONB or VARCHAR (e.g. cast to a string representation) before sinking.
- Store the vector as an ARRAY<FLOAT64>-compatible representation (e.g. float array) if downstream BigQuery usage allows.
Example fix
// before CREATE SINK s FROM mv WITH (...) TYPE bigquery; -- mv.embedding VECTOR(3) // after: expose vector as JSON string CREATE MATERIALIZED VIEW mv2 AS SELECT cast_to_json(embedding) AS embedding FROM mv; CREATE SINK s FROM mv2 WITH (...) TYPE bigquery;
Defensive patterns
Strategy: validation
Validate before calling
-- Verify no VECTOR columns before sinking:
SELECT column_name, data_type
FROM rw_catalog.rw_columns
WHERE relation_id = ('<schema>.<mv_name>')::regclass
AND data_type ILIKE 'vector%'; Type guard
fn is_bigquery_supported(dt: &DataType) -> bool {
!matches!(dt, DataType::Vector(_) | DataType::Map(_) | DataType::Int256 | DataType::Variant)
} Prevention
- Keep vector/embedding columns out of sinked views; project them into separate non-sinked MVs.
- Serialize vectors to JSONB when cross-store export is required.
- Re-check sink support when upgrading RisingWave, as new types may lack sink mappings.
When it happens
Trigger: Creating or validating a BigQuery sink whose source schema includes a VECTOR-typed column (e.g. from a vector index or embedding column).
Common situations: Users embedding ML vectors in RisingWave tables and attempting to replicate them to BigQuery; vector types are a newer RisingWave feature and most sinks predate their support.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Don't support Vector
- MAP is not supported for BigQuery sink.
- INTERVAL is not supported for BigQuery sink. Please convert
- vector is not supported yet
- end of stream
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/12583e875f33419d.
Report an issue: GitHub.