{"record":{"id":"b1058411bda11467","repo":"dbt-labs/dbt-core","slug":"datafusion-b10584","errorCode":null,"errorMessage":"Datafusion","messagePattern":"Datafusion","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-adapter/src/relation/factory.rs","lineNumber":32,"sourceCode":"    adapter_type: AdapterType,\n    quoting: ResolvedQuoting,\n) -> Option<Value> {\n    use AdapterType::*;\n    let result = match adapter_type {\n        Snowflake | Databricks | Spark | Fabric | DuckDB | LakeCompute | Exasol | Postgres\n        | Redshift | Salesforce | Bigquery | ClickHouse => {\n            let relation_type = RelationStatic {\n                adapter_type,\n                quoting,\n            };\n            StaticBaseRelationObject::new(Arc::new(relation_type))\n        }\n        Starburst => todo!(\"Starburst\"),\n        Athena => todo!(\"Athena\"),\n        Trino => todo!(\"Trino\"),\n        Dremio => todo!(\"Dremio\"),\n        Oracle => todo!(\"Oracle\"),\n        Datafusion => todo!(\"Datafusion\"),\n    };\n    Some(Value::from_object(result))\n}\n","sourceCodeStart":14,"sourceCodeEnd":36,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-adapter/src/relation/factory.rs#L14-L36","documentation":"This is a Rust `todo!()` panic from `create_static_relation` in crates/dbt-adapter/src/relation/factory.rs:32. The `Datafusion` match arm is an unimplemented placeholder, so calls resolving to `AdapterType::Datafusion` panic with the message 'Datafusion'. It indicates Datafusion static relation creation is not yet written in the Rust adapter.","triggerScenarios":"Calling `create_static_relation` (directly, via `get_value`/`adapter_api_value`, or via the static-relation quote-policy tests) with `adapter_type == AdapterType::Datafusion`.","commonSituations":"A Datafusion-profiled dbt session invoking the relation factory from jinja; a developer sweeping all AdapterType variants in tests; onboarding a Datafusion adapter before the factory arm exists.","solutions":["Implement the `Datafusion` arm in `create_static_relation`, constructing the Datafusion-specific `RelationStatic`/`StaticBaseRelationObject`","Guard call sites to return an explicit unsupported-adapter error for `AdapterType::Datafusion`","Exercise the factory only with adapters whose arms are implemented"],"exampleFix":"// before\nDatafusion => todo!(\"Datafusion\"),\n// after\nDatafusion => {\n    let relation_type = RelationStatic { adapter_type, quoting };\n    StaticBaseRelationObject::new(Arc::new(relation_type))\n}","handlingStrategy":"validation","validationCode":"if matches!(adapter_type, AdapterType::Datafusion) {\n    return Err(\"create_static_relation is not implemented for Datafusion\".into());\n}","typeGuard":"fn static_relation_supported(t: AdapterType) -> bool {\n    !matches!(t, AdapterType::Datafusion | AdapterType::Starburst | AdapterType::Athena | AdapterType::Trino | AdapterType::Dremio | AdapterType::Oracle)\n}","tryCatchPattern":"match std::panic::catch_unwind(|| create_static_relation(adapter_type)) {\n    Ok(v) => v,\n    Err(_) => return Err(\"create_static_relation unimplemented for Datafusion\"),\n}","preventionTips":["Check adapter support in the relation factory before running Datafusion models that use the relation factory","Implement new arms immediately when adding AdapterType variants, or return typed errors","Add exhaustiveness/integration tests so placeholder arms are caught in CI, not at runtime"],"tags":["rust","panic","unimplemented","adapter","datafusion"],"backgroundTag":"method-not-implemented","analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}