risingwavelabs/risingwave · error · ArrayError
Convert from arrow error: {0}
Error message
Convert from arrow error: {0} What it means
ArrayError::FromArrow wraps a boxed error produced when converting an Apache Arrow array into a RisingWave array failed — for example unsupported Arrow types, negative decimal scale, or nullability issues. The original arrow::arrow_err is preserved as the source.
Source
Thrown at src/common/src/array/error.rs:39
use crate::error::BoxedError;
#[derive(Error, Debug, Construct)]
pub enum ArrayError {
#[error("Pb decode error: {0}")]
PbDecode(#[from] prost::DecodeError),
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
#[error(transparent)]
Internal(
#[from]
#[backtrace]
anyhow::Error,
),
#[error("Convert from arrow error: {0}")]
FromArrow(
#[source]
#[backtrace]
BoxedError,
),
#[error("Convert to arrow error: {0}")]
ToArrow(
#[source]
#[backtrace]
BoxedError,
),
}
impl From<PbFieldNotFound> for ArrayError {
fn from(err: PbFieldNotFound) -> Self {
anyhow!("Failed to decode prost: field not found `{}`", err.0).into()
}View on GitHub (pinned to 6469eb736d)
Solutions
- Read the wrapped source error for the specific Arrow failure
- Cast or sanitize the Arrow data to a supported type before conversion (e.g. fix decimal scale/precision)
- Ensure the source schema matches the expected RW column types
Defensive patterns
Strategy: validation
Validate before calling
fn ensure_arrow_convertible(dt: &arrow::datatypes::DataType) -> Result<(), String> {
use arrow::datatypes::DataType::*;
match dt {
Decimal128(p, s) if *s < 0 => Err("negative-scale decimal not convertible".into()),
Decimal128(p, _) if *p > 38 => Err("precision > 38 not convertible".into()),
_ => Ok(()),
}
} Try / catch
match result {
Err(ArrayError::FromArrow(src)) => {
log::error!("arrow->RW conversion failed: {src}");
// cast the arrow data to a supported type and retry
}
other => other,
} Prevention
- Validate Arrow schemas against supported RW type mappings before ingestion
- Sanitize invalid UTF-8 and out-of-range decimals upstream
- Keep source schema changes reviewed against the converter's supported types
When it happens
Trigger: Any TryFrom<&dyn ArrowArray>-style conversion from Arrow to RW arrays that returns arrow::error::ArrowError, converted into ArrayError::FromArrow.
Common situations: Reading data sources (Iceberg, Parquet, external tables) whose Arrow types are unsupported or out of range for RW types; decimal precision/scale mismatches; invalid UTF-8 in string arrays.
Understand the failure class
Background: Type mismatch errors: IllegalArgumentException, TypeError and type guards across 150 open-source libraries — this error's family across 150 libraries.
Related errors
- Convert to arrow error: {0}
- error converting StreamChunk to Arrow RecordBatch: {err}
- column '{}' type mismatch: LanceDB type is {:?}, RisingWave
- UDF returned a value of type {} while the declared return ty
- UDF returned {:?}, but expected {:?}
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/69ea5e261f71f70c.
Report an issue: GitHub.