risingwavelabs/risingwave · error · SinkError::BigQuery
Don't support Float32 and Int256
Error message
Don't support Float32 and Int256
What it means
During protobuf schema construction for the BigQuery sink, FLOAT32 and INT256 column types have no supported protobuf field mapping, so build_protobuf_field returns this error and sink creation fails. The sink intentionally rejects these types instead of silently lossy-casting.
Source
Thrown at src/connector/src/sink/big_query.rs:1009
field.r#type = Some(field_descriptor_proto::Type::Message.into());
let name = format!("Struct{}", name);
let sub_proto = build_protobuf_schema(s.iter(), name.clone())?;
field.type_name = Some(name);
return Ok((field, Some(sub_proto)));
}
DataType::List(l) => {
let (mut field, proto) = build_protobuf_field(l.elem(), index, name)?;
field.label = Some(field_descriptor_proto::Label::Repeated.into());
return Ok((field, proto));
}
DataType::Bytea => field.r#type = Some(field_descriptor_proto::Type::Bytes.into()),
DataType::Jsonb => field.r#type = Some(field_descriptor_proto::Type::String.into()),
DataType::Variant => {
return Err(SinkError::BigQuery(anyhow::anyhow!("Don't support Variant")));
}
DataType::Serial => field.r#type = Some(field_descriptor_proto::Type::Int64.into()),
DataType::Float32 | DataType::Int256 => {
return Err(SinkError::BigQuery(anyhow::anyhow!(
"Don't support Float32 and Int256"
)));
}
DataType::Map(_) => return Err(SinkError::BigQuery(anyhow::anyhow!("Don't support Map"))),
DataType::Vector(_) => {
return Err(SinkError::BigQuery(anyhow::anyhow!("Don't support Vector")));
}
}
Ok((field, None))
}
#[cfg(test)]
mod test {
use std::assert_matches;
use std::collections::HashMap;
use risingwave_common::catalog::{Field, Schema};View on GitHub (pinned to 6469eb736d)
Solutions
- Cast FLOAT32 columns to DOUBLE PRECISION (Float64) in the sink query: `CREATE SINK s AS SELECT x::double precision AS x FROM mv`.
- Cast INT256 columns to BIGINT if values fit, or to a supported DECIMAL mapping.
- Exclude the offending column from the sink schema via an explicit column list.
- Request support for these types in the BigQuery connector if needed.
Example fix
// before CREATE SINK s FROM mv; -- mv.val is real // after CREATE SINK s AS SELECT id, val::double AS val FROM mv;
Defensive patterns
Strategy: validation
Validate before calling
-- Reject Float32/Int256 columns before CREATE SINK: -- inspect the schema and cast: float32 -> double precision, int256 -> bigint/decimal.
Try / catch
match sink_creation {
Err(SinkError::BigQuery(e)) if e.to_string().contains("Don't support Float32 and Int256") => {
// cast offending columns in the sink SELECT and retry
}
other => other?,
} Prevention
- Prefer DOUBLE PRECISION over REAL/FLOAT32 when targeting BigQuery.
- Avoid INT256 columns in tables that feed a BigQuery sink, or cast to BIGINT/DECIMAL.
- Add schema checks in CI for pipelines that end in BigQuery sinks.
- Re-check sinks after upstream type changes.
When it happens
Trigger: BigQuerySinkWriter::new -> build_protobuf_schema encounters a column of DataType::Float32 or DataType::Int256 in the sink schema.
Common situations: Sinking a table with `real`/float32 columns or hugeint/int256 columns to BigQuery; upstream MV type changes introducing these types.
Related errors
- Don't support Variant
- Don't support Map
- REAL is not supported for BigQuery sink. Please convert to F
- VARIANT is not supported for BigQuery sink.
- INT256 is not supported for BigQuery sink.
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/8cb47af66a4e294d.
Report an issue: GitHub.