{"record":{"id":"95e2f6b0708b5841","repo":"risingwavelabs/risingwave","slug":"chunk-operation-error-0","errorCode":null,"errorMessage":"Chunk operation error: {0}","messagePattern":"Chunk operation error: (.+?)","errorType":"error_code","errorClass":"StreamExecutorError","httpStatus":null,"severity":"error","filePath":"src/stream/src/executor/error.rs","lineNumber":48,"sourceCode":"\n/// A specialized Result type for streaming executors.\npub type StreamExecutorResult<T> = std::result::Result<T, StreamExecutorError>;\n\n/// The error type for streaming executors.\n#[derive(\n    thiserror::Error, thiserror_ext::ReportDebug, thiserror_ext::Box, thiserror_ext::Construct,\n)]\n#[thiserror_ext(newtype(name = StreamExecutorError, backtrace))]\n#[derive(AsRefStr)]\npub enum ErrorKind {\n    #[error(\"Storage error: {0}\")]\n    Storage(\n        #[backtrace]\n        #[from]\n        StorageError,\n    ),\n\n    #[error(\"Chunk operation error: {0}\")]\n    ArrayError(\n        #[from]\n        #[backtrace]\n        ArrayError,\n    ),\n\n    #[error(\"Chunk operation error: {0}\")]\n    ExprError(\n        #[from]\n        #[backtrace]\n        ExprError,\n    ),\n\n    // TODO: remove this after state table is fully used\n    #[error(\"Serialize/deserialize error: {0}\")]\n    SerdeError(\n        #[source]\n        #[backtrace]","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/stream/src/executor/error.rs#L30-L66","documentation":"`ErrorKind::ArrayError` wraps an `ArrayError` with the message \"Chunk operation error: {0}\". RisingWave columnar chunks (DataChunk/ArrayRef) raise `ArrayError` for invalid operations on column arrays; this variant is the automatic conversion into the stream executor error type via `#[from]`.","triggerScenarios":"Any column-array operation in a streaming executor that fails — building/appending to an array with the wrong type, out-of-bounds access on a chunk, type mismatch when casting or serializing chunk data — propagated as a StreamExecutorError.","commonSituations":"A schema mismatch between an executor's expected column types and the actual upstream chunk (e.g., after altering a source); buggy UDF or expression producing unexpected types; serialization of Protobuf-encoded stream chunks that don't match the local schema.","solutions":["Read the inner ArrayError message to find which column/type mismatched.","Verify the stream chunk schema matches the executor's expected schema; recreate affected MVs/sources after DDL changes.","Check for version-skew between nodes (rolling upgrades) that could change the wire schema mid-flight.","Reproduce with the specific query/connector and file a bug with the inner error if it looks like an executor bug."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Validate upstream chunk schema matches expectations before deployment:\n// compare column types of the source/MV with the executor's schema after any DDL change.\nSHOW COLUMNS FROM mv_name;","typeGuard":null,"tryCatchPattern":"// Operators: catch the actor failure via logs/alerts and rebuild the affected MV:\n// grep 'Chunk operation error' .risingwave/log/*.log\nDROP MATERIALIZED VIEW mv_name; CREATE MATERIALIZED VIEW mv_name AS ...;","preventionTips":["Avoid altering source schemas in ways that change column types feeding MVs.","Complete rolling upgrades without mixed node versions.","Test UDFs against all expected input types."],"tags":["streaming","data-chunk","array","type-mismatch","rust"],"backgroundTag":"type-mismatch","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"}