{"record":{"id":"0c419e1deecb8a3a","repo":"databendlabs/databend","slug":"not-implemented-0c419e","errorCode":null,"errorMessage":"not implemented","messagePattern":"not implemented","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/query/service/src/catalogs/iceberg/iceberg_catalog.rs","lineNumber":169,"sourceCode":"        Ok(self)\n    }\n\n    #[async_backtrace::framed]\n    async fn get_database(&self, tenant: &Tenant, db_name: &str) -> Result<Arc<dyn Database>> {\n        let res = self\n            .immutable_catalog\n            .get_database(tenant, db_name)\n            .await\n            .or_unknown_database()?;\n        if let Some(db) = res {\n            return Ok(db);\n        }\n        self.iceberg_catalog.get_database(tenant, db_name).await\n    }\n\n    #[async_backtrace::framed]\n    async fn list_databases_history(&self, _tenant: &Tenant) -> Result<Vec<Arc<dyn Database>>> {\n        unimplemented!()\n    }\n\n    #[async_backtrace::framed]\n    async fn list_databases(&self, tenant: &Tenant) -> Result<Vec<Arc<dyn Database>>> {\n        let mut dbs = self.immutable_catalog.list_databases(tenant).await?;\n        let mut other = self.iceberg_catalog.list_databases(tenant).await?;\n        dbs.append(&mut other);\n        Ok(dbs)\n    }\n\n    #[async_backtrace::framed]\n    async fn create_database(&self, req: CreateDatabaseReq) -> Result<CreateDatabaseReply> {\n        info!(\"Create database from req:{:?}\", req);\n\n        if self\n            .immutable_catalog\n            .exists_database(req.name_ident.tenant(), req.name_ident.database_name())\n            .await?","sourceCodeStart":151,"sourceCodeEnd":187,"githubUrl":"https://github.com/databendlabs/databend/blob/288d84d76e20a2f8f7173bda9691eb6ece301aa9/src/query/service/src/catalogs/iceberg/iceberg_catalog.rs#L151-L187","documentation":"`list_databases_history` in the IcebergCatalog panics with `unimplemented!()`. The Iceberg catalog only lists current databases (see list_databases combining immutable and iceberg databases); the drop/history database listing is not supported for external Iceberg catalogs. Any call panics with \"not implemented\".","triggerScenarios":"Calling SHOW DATABASES HISTORY / catalog.list_databases_history on a session whose catalog is the Iceberg catalog.","commonSituations":"Running UNDROP/history-oriented SHOW commands against an Iceberg catalog; clients assuming all catalogs support database history.","solutions":["Avoid database history commands on Iceberg catalogs; use the default catalog for those operations.","Guard the command with a catalog-type check before execution.","Replace the panic with a structured unsupported-operation error."],"exampleFix":"// before\nasync fn list_databases_history(&self, _tenant: &Tenant) -> Result<Vec<Arc<dyn Database>>> {\n    unimplemented!()\n}\n// after\nasync fn list_databases_history(&self, _tenant: &Tenant) -> Result<Vec<Arc<dyn Database>>> {\n    Err(ErrorCode::Unsupported(format!(\"list databases history is not supported on iceberg catalog\")))\n}","handlingStrategy":"validation","validationCode":"// only call history listing on the default catalog\nif is_iceberg_catalog(catalog.as_ref()) {\n    return Err(ErrorCode::Unsupported(\"SHOW DATABASES HISTORY not supported on iceberg catalog\"));\n}","typeGuard":"fn is_iceberg_catalog(catalog: &dyn Catalog) -> bool {\n    catalog.name().to_lowercase().contains(\"iceberg\")\n}","tryCatchPattern":"match catalog.list_databases_history(tenant).await {\n    Ok(dbs) => dbs,\n    Err(e) if is_unimplemented(&e) => Vec::new(),\n    Err(e) => return Err(e),\n}","preventionTips":["Skip history/undrop commands when connected via an Iceberg catalog","Check catalog type in the SQL handler before history queries","Document unsupported trait methods per catalog"],"tags":["rust","unimplemented","iceberg","catalog"],"backgroundTag":"method-not-implemented","analyzedSha":"288d84d76e20a2f8f7173bda9691eb6ece301aa9","analyzedAt":"2026-09-11T11:29:36.208Z","contentChangedAt":"2026-09-11T11:29:36.208Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}