{"record":{"id":"343be445f78a32ea","repo":"risingwavelabs/risingwave","slug":"table-not-found","errorCode":null,"errorMessage":"table {} not found","messagePattern":"table (.+?) not found","errorType":"panic","errorClass":"unimplemented!","httpStatus":null,"severity":"warning","filePath":"src/connector/src/connector_common/iceberg/mock_catalog.rs","lineNumber":223,"sourceCode":"    ) -> iceberg::Result<()> {\n        todo!()\n    }\n\n    /// Create a new table inside the namespace.\n    async fn create_table(\n        &self,\n        _namespace: &NamespaceIdent,\n        _creation: TableCreation,\n    ) -> iceberg::Result<Table> {\n        todo!()\n    }\n\n    /// Load table from the catalog.\n    async fn load_table(&self, table: &TableIdent) -> iceberg::Result<Table> {\n        match table.name.as_ref() {\n            Self::SPARSE_TABLE => Ok(Self::sparse_table()),\n            Self::RANGE_TABLE => Ok(Self::range_table()),\n            _ => unimplemented!(\"table {} not found\", table.name()),\n        }\n    }\n\n    /// Drop a table from the catalog.\n    async fn drop_table(&self, _table: &TableIdent) -> iceberg::Result<()> {\n        todo!()\n    }\n\n    async fn purge_table(&self, table: &TableIdent) -> iceberg::Result<()> {\n        self.drop_table(table).await\n    }\n\n    /// Check if a table exists in the catalog.\n    async fn table_exists(&self, table: &TableIdent) -> iceberg::Result<bool> {\n        match table.name.as_ref() {\n            Self::SPARSE_TABLE => Ok(true),\n            Self::RANGE_TABLE => Ok(true),\n            _ => Ok(false),","sourceCodeStart":205,"sourceCodeEnd":241,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/connector_common/iceberg/mock_catalog.rs#L205-L241","documentation":"load_table in MockIcebergCatalog only recognizes its two hard-coded table names (SPARSE_TABLE, RANGE_TABLE); any other name hits unimplemented!(\"table {} not found\", ...), which panics. Unlike todo!(), this marks a deliberately unsupported input in the mock rather than unwritten code.","triggerScenarios":"Calling load_table (directly or via higher-level helpers) with a TableIdent whose name is neither SPARSE_TABLE nor RANGE_TABLE, including missing/mistyped test table names.","commonSituations":"Tests referencing a table name that does not match the mock's constants; production-like code paths pointed at the mock in unit tests with real table names.","solutions":["Use exactly Self::SPARSE_TABLE or Self::RANGE_TABLE as the table name in tests","Extend the match to return Ok(Self::sparse_table()) (or a new fixture) for additional names","Point code requiring arbitrary table names at a real catalog instead of this mock"],"exampleFix":"// before\n_ => unimplemented!(\"table {} not found\", table.name()),\n// after\nname => Err(iceberg::Error::new(\n    iceberg::ErrorKind::Unexpected,\n    format!(\"table {name} not found in mock catalog\"),\n))","handlingStrategy":"validation","validationCode":"const VALID: [&str; 2] = [\"sparse_table\", \"range_table\"]; // values of SPARSE_TABLE / RANGE_TABLE\nassert!(VALID.contains(&table.name().as_str()), \"table {} not in mock catalog\", table.name());","typeGuard":"fn is_mock_fixture_table(ident: &TableIdent) -> bool {\n    ident.name() == MockIcebergCatalog::SPARSE_TABLE || ident.name() == MockIcebergCatalog::RANGE_TABLE\n}","tryCatchPattern":"// unimplemented! panics; catch only if probing:\nlet ok = std::panic::catch_unwind(AssertUnwindSafe(|| rt.block_on(catalog.load_table(&ident)))).is_ok();","preventionTips":["Reference the mock's SPARSE_TABLE/RANGE_TABLE constants rather than string literals","Update the mock's match arms when adding new fixture tables","Never point production table names at MockIcebergCatalog","Replace unimplemented! with a proper iceberg Error for better diagnostics"],"tags":["rust","test-mock","iceberg"],"backgroundTag":"resource-not-found","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}