{"record":{"id":"2da06d27bcb5fb19","repo":"dbt-labs/dbt-core","slug":"render-should-be-accessible","errorCode":null,"errorMessage":"render should be accessible","messagePattern":"render should be accessible","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-adapter/src/relation/databricks/config/components/constraints.rs","lineNumber":968,"sourceCode":"            .expect(\"unset_constraints should be accessible\");\n        let mut iter = unset\n            .try_iter()\n            .expect(\"unset_constraints should be iterable\");\n        let constraint_val = iter.next().expect(\"should have one constraint\");\n\n        let type_val = constraint_val\n            .get_attr(\"type\")\n            .expect(\"type should be accessible\");\n        assert_eq!(type_val.as_str(), Some(\"primary_key\"));\n\n        let name_val = constraint_val\n            .get_attr(\"name\")\n            .expect(\"name should be accessible\");\n        assert_eq!(name_val.as_str(), Some(\"pk_id\"));\n\n        let render_val = constraint_val\n            .get_attr(\"render\")\n            .expect(\"render should be accessible\");\n        assert!(\n            !render_val.is_undefined(),\n            \"render should be a callable function\"\n        );\n    }\n\n    #[test]\n    fn test_constraint_normalization_and_diff() {\n        let prev_constraint = TypedConstraint::Check {\n            name: Some(\"test_check\".to_string()),\n            expression: \"value > 0\".to_string(),\n            columns: Some(vec![\"value\".to_string()]), // With columns (from dbt definition)\n        };\n        let next_constraint = TypedConstraint::Check {\n            name: Some(\"test_check\".to_string()),\n            expression: \"value > 0\".to_string(),\n            columns: None, // No columns (like Databricks stores it)\n        };","sourceCodeStart":950,"sourceCodeEnd":986,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-adapter/src/relation/databricks/config/components/constraints.rs#L950-L986","documentation":"Test-only assertion in test_constraints_to_jinja_exposes_object_attributes: the constraint object must expose a `render` attribute (the rendered DDL fragment) usable from Jinja. Fires only if the render method disappears from the per-constraint Jinja object.","triggerScenarios":"Thrown at crates/dbt-adapter/src/relation/databricks/config/components/constraints.rs:968 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Expose a render method/attribute on the per-constraint Jinja object","Check the method dispatch table of the constraint wrapper type","Treat failure as a regression in Jinja constraint rendering"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}