{"record":{"id":"d9de1695a8945140","repo":"dbt-labs/dbt-core","slug":"agatetable","errorCode":null,"errorMessage":"AgateTable::{}","messagePattern":"AgateTable::(.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-agate/src/table.rs","lineNumber":1391,"sourceCode":"                                match key.as_str() {\n                                    Some(s) => keys.push(s.to_string()),\n                                    None => unimplemented!(\"distinct with non-string keys\"),\n                                }\n                            }\n                            Some(keys)\n                        } else {\n                            None\n                        }\n                    }\n                    None => None,\n                };\n\n                let result = self.as_ref().distinct(key).map_err(|e| {\n                    Error::new(ErrorKind::InvalidOperation, format!(\"Table.distinct: {e}\"))\n                })?;\n                Ok(Value::from_object(result))\n            }\n            other => unimplemented!(\"AgateTable::{}\", other),\n        }\n    }\n}\n\n#[cfg(test)]\nmod tests {\n    use crate::flat_record_batch::FlatRecordBatch;\n    use crate::test_fixtures::*;\n    use crate::*;\n    use arrow::array::{\n        ArrayRef, BooleanBuilder, DictionaryArray, Float64Builder, Int32Array, Int32Builder,\n        ListBuilder, StringBuilder, StringViewBuilder, StructBuilder,\n    };\n    use arrow::array::{GenericListArray, StringArray};\n    use arrow::csv::reader::ReaderBuilder;\n    use arrow::datatypes::{DataType, Field, Int32Type, Schema};\n    use arrow::record_batch::RecordBatch;\n    use arrow_array::{Array, ListArray, RecordBatchOptions, UInt64Array};","sourceCodeStart":1373,"sourceCodeEnd":1409,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-agate/src/table.rs#L1373-L1409","documentation":"The Rust AgateTable object's call_method dispatch only implements a fixed set of Table methods; calling any other method name falls through to unimplemented!(\"AgateTable::{}\"), naming the missing method. This indicates the requested Table API is not yet bridged in dbt-agate.","triggerScenarios":"Invoking any agate Table method not covered by the match arms in the Object impl for AgateTable (e.g. table.homogenize(), table.exclude(), or any misspelled method name).","commonSituations":"Porting Python agate scripts that use methods not yet implemented in the Rust bridge; typo'd method names; relying on agate's full Python API surface from Rust/dbt integration code.","solutions":["Check the match arms in crates/dbt-agate/src/table.rs (Object impl) for the list of implemented methods and use only those","Implement the missing method arm in the Object::call_method match, following existing arms like \"distinct\"","Work around by using implemented primitives (select, group_by, distinct) to emulate the missing method"],"exampleFix":"// before\ntable.call_method(\"exclude\", args![Value::from(\"secret_col\")])  // panics: AgateTable::exclude\n// after\nlet keep: Vec<_> = table.column_names().into_iter().filter(|c| c != \"secret_col\").map(Value::from).collect();\ntable.call_method(\"select\", args![Value::from(keep)])","handlingStrategy":"validation","validationCode":"const SUPPORTED: &[&str] = &[\"select\", \"group_by\", \"distinct\", \"aggregate\", /* ... */];\nassert!(SUPPORTED.contains(&method_name), \"AgateTable method not implemented: {}\", method_name);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Consult the Object impl match arms in crates/dbt-agate/src/table.rs before calling a Table method","Wrap dynamic method dispatch in a whitelist check","Prefer explicit implemented-method calls over reflection-style dispatch"],"tags":["unimplemented","method-not-implemented","api-coverage","rust"],"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-17T15:17:12.973Z"}