{"record":{"id":"7805263ac5b27781","repo":"risingwavelabs/risingwave","slug":"not-yet-implemented-780526","errorCode":null,"errorMessage":"not yet implemented","messagePattern":"not yet implemented","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/connector/src/connector_common/iceberg/mock_catalog.rs","lineNumber":169,"sourceCode":"                        field_id: Some(8),\n                        name: \"f4\".to_owned(),\n                        transform: Transform::Hour,\n                    },\n                ])\n                .unwrap()\n                .build(),\n        )\n    }\n}\n\n#[async_trait]\nimpl CatalogV2 for MockCatalog {\n    /// List namespaces from table.\n    async fn list_namespaces(\n        &self,\n        _parent: Option<&NamespaceIdent>,\n    ) -> iceberg::Result<Vec<NamespaceIdent>> {\n        todo!()\n    }\n\n    /// Create a new namespace inside the catalog.\n    async fn create_namespace(\n        &self,\n        _namespace: &iceberg::NamespaceIdent,\n        _properties: HashMap<String, String>,\n    ) -> iceberg::Result<iceberg::Namespace> {\n        todo!()\n    }\n\n    /// Get a namespace information from the catalog.\n    async fn get_namespace(&self, _namespace: &NamespaceIdent) -> iceberg::Result<Namespace> {\n        todo!()\n    }\n\n    /// Check if namespace exists in catalog.\n    async fn namespace_exists(&self, _namespace: &NamespaceIdent) -> iceberg::Result<bool> {","sourceCodeStart":151,"sourceCodeEnd":187,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/connector_common/iceberg/mock_catalog.rs#L151-L187","documentation":"MockCatalog's CatalogV2::list_namespaces is a test stub implemented with todo!(); calling it always panics with 'not yet implemented'. It exists only so test code can construct the trait object; namespace listing is intentionally unimplemented in the mock. Any test path that reaches it is using the wrong mock method or needs the stub fleshed out.","triggerScenarios":"Calling list_namespaces on the MockCatalog — e.g. a test or tooling path that enumerates namespaces of an Iceberg catalog wired to MockCatalog.","commonSituations":"Unit tests exercising generic CatalogV2 namespace APIs against the mock; accidentally shipping test/mock configuration into a code path that lists namespaces.","solutions":["Do not call namespace-listing APIs on MockCatalog; back the test with a real catalog implementation if listing is exercised","Extend MockCatalog to return a canned Vec<NamespaceIdent> for tests","Ensure production code paths use a real catalog, not the mock"],"exampleFix":"// before\nlet namespaces = catalog.list_namespaces(None).await?;\n// after (in test setup with MockCatalog)\n// assert only table-level APIs, or use a real catalog for namespace tests","handlingStrategy":"fallback","validationCode":"// Do not exercise namespace listing against MockCatalog in tests\nfn mock_supports_namespace_listing() -> bool { false }","typeGuard":"fn is_mock_catalog(c: &dyn Any) -> bool { c.is::<MockCatalog>() }","tryCatchPattern":"// list_namespaces panics (todo!()); guard BEFORE calling\nif is_mock_catalog(&catalog) {\n    return Ok(vec![]); // or skip the test section\n}\nlet namespaces = catalog.list_namespaces(parent).await?;","preventionTips":["Keep MockCatalog tests to table-level APIs only","Back namespace-listing tests with a real catalog","Extend MockCatalog with canned namespace data if needed"],"tags":["iceberg","mock","catalog","todo-panic","not-implemented"],"backgroundTag":"method-not-implemented","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}