{"record":{"id":"3f8a522170acc75c","repo":"risingwavelabs/risingwave","slug":"datafusion-error-0","errorCode":null,"errorMessage":"DataFusion error: {0}","messagePattern":"DataFusion error: (.+?)","errorType":"error_code","errorClass":"ErrorCode::DataFusionError","httpStatus":null,"severity":"error","filePath":"src/frontend/src/error.rs","lineNumber":95,"sourceCode":"        BoxedError,\n    ),\n    // TODO(error-handling): there's a limitation that `#[transparent]` can't be used with `#[backtrace]` if no `#[from]`\n    // So we emulate a transparent error with \"{0}\" display here.\n    #[error(\"{0}\")]\n    BatchError(\n        #[source]\n        #[backtrace]\n        // `BatchError`\n        BoxedError,\n    ),\n    #[error(\"Array error: {0}\")]\n    ArrayError(\n        #[from]\n        #[backtrace]\n        ArrayError,\n    ),\n    #[cfg(feature = \"datafusion\")]\n    #[error(\"DataFusion error: {0}\")]\n    DataFusionError(\n        #[from]\n        #[backtrace]\n        datafusion_common::DataFusionError,\n    ),\n    #[error(\"Stream error: {0}\")]\n    StreamError(\n        #[backtrace]\n        #[source]\n        BoxedError,\n    ),\n    // TODO(error-handling): there's a limitation that `#[transparent]` can't be used with `#[backtrace]` if no `#[from]`\n    // So we emulate a transparent error with \"{0}\" display here.\n    #[error(\"{0}\")]\n    RpcError(\n        #[source]\n        #[backtrace]\n        // `tonic::transport::Error`, `TonicStatusWrapper`, or `RpcError`","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/frontend/src/error.rs#L77-L113","documentation":"`ErrorCode::DataFusionError` converts `datafusion_common::DataFusionError` via `#[from]`. It appears only with the `datafusion` feature and wraps failures from the embedded DataFusion engine (used for batch query acceleration), preserving DataFusion's own error kind.","triggerScenarios":"Running a batch query through the DataFusion path: unsupported SQL pushdown, DataFusion planning failures, or DataFusion execution errors (e.g. invalid cast, missing column in a scanned parquet/table).","commonSituations":"Query features DataFusion can't plan but the standard frontend accepted, schema drift between catalog and underlying data, DataFusion version-specific behavior after upgrade.","solutions":["Read the wrapped DataFusion message to identify the failing phase","Rewrite the query to avoid the unsupported construct or force the non-DataFusion path","Verify table schema matches the data being scanned","Check RisingWave release notes for DataFusion-related changes"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"null","typeGuard":"fn is_datafusion_error(e: &RwError) -> bool { matches!(e.get_code(), ErrorCode::DataFusionError(_)) }","tryCatchPattern":"match err.get_code() { ErrorCode::DataFusionError(inner) => { log::warn!(\"datafusion failed: {inner}\"); run_via_default_engine(query); }, _ => propagate }","preventionTips":["Keep queries within the subset supported by the DataFusion path","Pin and test RisingWave versions against your query suite","Watch for schema drift between catalog and scanned data","Disable/enable the acceleration path explicitly when debugging"],"tags":["datafusion","batch","query-engine"],"backgroundTag":"sql-query-failed","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}