{"record":{"id":"a1f696715e64c7fc","repo":"dbt-labs/dbt-core","slug":"trino-a1f696","errorCode":null,"errorMessage":"Trino","messagePattern":"Trino","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-adapter/src/relation/factory.rs","lineNumber":29,"sourceCode":"/// Create a static relation value from an adapter type\n/// To be used as api.Relation in the Jinja environment\npub fn create_static_relation(\n    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":11,"sourceCodeEnd":36,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-adapter/src/relation/factory.rs#L11-L36","documentation":"This is a Rust `todo!()` panic from `create_static_relation` in crates/dbt-adapter/src/relation/factory.rs:29. The `Trino` match arm is an unimplemented placeholder, so a call resolving to `AdapterType::Trino` panics with the message 'Trino'. It signals that static relation creation for Trino has not been ported yet.","triggerScenarios":"Calling `create_static_relation` (directly, via `get_value`/`adapter_api_value`, or via the static-relation quote-policy tests) with `adapter_type == AdapterType::Trino`.","commonSituations":"A Trino-profiled dbt run where jinja invokes the relation factory; a test sweep or adapter-dispatch loop iterating all AdapterType variants; someone wiring a new Trino integration before the factory arm exists.","solutions":["Implement the `Trino` arm in `create_static_relation`, constructing the Trino-appropriate `RelationStatic`/`StaticBaseRelationObject`","Intercept `AdapterType::Trino` at call sites and return an explicit unsupported-adapter error instead of reaching the panic","Use an adapter whose factory arm is implemented while Trino support is pending"],"exampleFix":"// before\nTrino => todo!(\"Trino\"),\n// after\nTrino => {\n    let relation_type = RelationStatic { adapter_type, quoting };\n    StaticBaseRelationObject::new(Arc::new(relation_type))\n}","handlingStrategy":"validation","validationCode":"if matches!(adapter_type, AdapterType::Trino) {\n    return Err(\"create_static_relation is not implemented for Trino\".into());\n}","typeGuard":"fn static_relation_supported(t: AdapterType) -> bool {\n    !matches!(t, AdapterType::Trino | AdapterType::Starburst | AdapterType::Athena | AdapterType::Dremio | AdapterType::Oracle | AdapterType::Datafusion)\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 Trino\"),\n}","preventionTips":["Check the implemented arms in relation/factory.rs before enabling a Trino profile that uses the relation factory","Replace todo!() arms with explicit unsupported-adapter errors during adapter porting","Add a test sweep over all AdapterType variants so placeholders fail as test failures, not panics"],"tags":["rust","panic","unimplemented","adapter","trino"],"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"}