risingwavelabs/risingwave · error · iceberg::Error(ErrorKind::Unexpected)
register_table is not supported in storage catalog
Error message
register_table is not supported in storage catalog
What it means
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.
Source
Thrown at src/connector/src/connector_common/iceberg/storage_catalog.rs:405
for update in updates {
metadata_builder = update.apply(metadata_builder)?;
}
self.commit_table(
&self.table_path(table.identifier()),
metadata_builder.build()?.metadata,
)
.await?;
self.load_table(commit.identifier()).await
}
async fn register_table(
&self,
_table_ident: &TableIdent,
_metadata_location: String,
) -> iceberg::Result<Table> {
Err(Error::new(
ErrorKind::Unexpected,
"register_table is not supported in storage catalog",
))
}
}
View on GitHub (pinned to 6469eb736d)
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.
Example fix
// before catalog.register_table(&ident, metadata_location)?; // storage catalog // after: use a REST catalog for registration let catalog = RestCatalog::builder().uri(rest_uri).build()?; catalog.register_table(&ident, metadata_location)?;
Defensive patterns
Strategy: validation
Validate before calling
// only call register_table on catalogs that support it
fn supports_register(catalog_type: &str) -> bool {
matches!(catalog_type, "rest" | "hive" | "glue" | "jdbc")
} Try / catch
match catalog.register_table(&ident, location).await {
Err(e) if e.to_string().contains("register_table is not supported") => {
anyhow::bail!("storage catalog cannot register tables; use create_table or a REST/Hive catalog");
}
other => other,
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- `catalog.type` must be set
- Failed to list iceberg namespaces.
- Failed to load iceberg table.
- Failed to drop iceberg table.
- register_table is not supported by JniCatalog
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/4d37bb6ceb59ff79.
Report an issue: GitHub.