{"record":{"id":"4d37bb6ceb59ff79","repo":"risingwavelabs/risingwave","slug":"register-table-is-not-supported-in-storage-catalog","errorCode":null,"errorMessage":"register_table is not supported in storage catalog","messagePattern":"register_table is not supported in storage catalog","errorType":"error_code","errorClass":"iceberg::Error(ErrorKind::Unexpected)","httpStatus":null,"severity":"error","filePath":"src/connector/src/connector_common/iceberg/storage_catalog.rs","lineNumber":405,"sourceCode":"        for update in updates {\n            metadata_builder = update.apply(metadata_builder)?;\n        }\n\n        self.commit_table(\n            &self.table_path(table.identifier()),\n            metadata_builder.build()?.metadata,\n        )\n        .await?;\n\n        self.load_table(commit.identifier()).await\n    }\n\n    async fn register_table(\n        &self,\n        _table_ident: &TableIdent,\n        _metadata_location: String,\n    ) -> iceberg::Result<Table> {\n        Err(Error::new(\n            ErrorKind::Unexpected,\n            \"register_table is not supported in storage catalog\",\n        ))\n    }\n}\n","sourceCodeStart":387,"sourceCodeEnd":411,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/connector_common/iceberg/storage_catalog.rs#L387-L411","documentation":"The IcebergCatalog trait defines register_table (attaching an existing metadata file to the catalog without copying data), but the storage catalog intentionally does not implement it and always returns this error. There is no metadata pointer store in a pure filesystem catalog, so registration by location is impossible.","triggerScenarios":"Calling register_table on a catalog instantiated as the storage/filesystem catalog — e.g. client code that tries to attach an existing Iceberg table by metadata location.","commonSituations":"Trying to import an externally-created Iceberg table into RisingWave via the storage catalog; code written against a Hive/REST/Glue catalog being reused with a storage catalog; generic tooling that unconditionally calls register_table.","solutions":["Use a catalog implementation that supports register_table (Hive, REST, Glue) instead of the storage catalog.","Create the table through the storage catalog's create_table/commit path so the version hint is generated.","Restructure the calling code to check catalog capabilities before invoking register_table."],"exampleFix":"// before\ncatalog.register_table(&ident, metadata_location)?; // storage catalog\n// after: use a REST catalog for registration\nlet catalog = RestCatalog::builder().uri(rest_uri).build()?;\ncatalog.register_table(&ident, metadata_location)?;","handlingStrategy":"validation","validationCode":"// only call register_table on catalogs that support it\nfn supports_register(catalog_type: &str) -> bool {\n    matches!(catalog_type, \"rest\" | \"hive\" | \"glue\" | \"jdbc\")\n}","typeGuard":null,"tryCatchPattern":"match catalog.register_table(&ident, location).await {\n    Err(e) if e.to_string().contains(\"register_table is not supported\") => {\n        anyhow::bail!(\"storage catalog cannot register tables; use create_table or a REST/Hive catalog\");\n    }\n    other => other,\n}","preventionTips":["Check catalog capabilities before calling register_table","Import external tables via a REST/Hive/Glue catalog","Create new tables through create_table so the storage catalog generates metadata"],"tags":["iceberg","catalog","unsupported-operation"],"backgroundTag":"operation-not-supported","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"}