{"record":{"id":"ac38fe34fc7b5fc1","repo":"dbt-labs/dbt-core","slug":"decimalvalue-has-no-method-named-method","errorCode":null,"errorMessage":"DecimalValue has no method named {method}","messagePattern":"DecimalValue has no method named (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-agate/src/decimal.rs","lineNumber":157,"sourceCode":"\n    fn is_true(self: &Arc<Self>) -> bool {\n        !self.is_zero()\n    }\n\n    fn call_method(\n        self: &Arc<Self>,\n        state: &minijinja::State<'_, '_>,\n        method: &str,\n        args: &[Value],\n        listeners: &[std::rc::Rc<dyn minijinja::listener::RenderingEventListener>],\n    ) -> Result<Value, Error> {\n        if let Some(value) = self.get_value(&Value::from(method)) {\n            return value.call(state, args, listeners);\n        }\n\n        // TODO: implement decimal methods\n\n        Err(Error::new(\n            minijinja::ErrorKind::UnknownMethod,\n            format!(\"DecimalValue has no method named {method}\"),\n        ))\n    }\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n    use arrow::datatypes::Decimal128Type;\n\n    #[test]\n    fn decimal_value_truthiness_tracks_zero_state() {\n        let zero = Arc::new(DecimalValue::<Decimal128Type>::new(0, 10, 2));\n        assert!(zero.is_zero());\n        assert!(!zero.is_true());\n\n        let value = Arc::new(DecimalValue::<Decimal128Type>::new(12345, 10, 2));","sourceCodeStart":139,"sourceCodeEnd":175,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-agate/src/decimal.rs#L139-L175","documentation":"DecimalValue's call_method first tries attribute lookup via get_value; if no attribute matched, there is no fallback implementation for decimal-specific methods yet (the TODO notes they are unimplemented), so the call raises UnknownMethod naming DecimalValue and the requested method.","triggerScenarios":"Thrown at crates/dbt-agate/src/decimal.rs:157 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Implement the needed decimal method (quantize, scale, etc.) in call_method","Use arithmetic filters/operators instead of method calls in templates","List available operations in the error to help template authors"],"exampleFix":null,"handlingStrategy":"type-guard","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"}