risingwavelabs/risingwave · error · CheckRelationError
{0}
Error message
{0} What it means
CheckRelationError::Resolve wraps ResolveQualifiedNameError via #[from]; the #[error("{0}")] attribute means the displayed message is the inner error's text. It is produced when a qualified relation name (e.g. schema.table) cannot be resolved against the catalog during relation checks.
Source
Thrown at src/frontend/src/session.rs:857
}
}
pub fn create_table(&mut self, name: String, table: TableCatalog) {
self.tables.insert(name, table);
}
pub fn drop_table(&mut self, name: &str) {
self.tables.remove(name);
}
pub fn get_table(&self, name: &str) -> Option<&TableCatalog> {
self.tables.get(name)
}
}
#[derive(Error, Debug)]
pub enum CheckRelationError {
#[error("{0}")]
Resolve(#[from] ResolveQualifiedNameError),
#[error("{0}")]
Catalog(#[from] CatalogError),
}
impl From<CheckRelationError> for RwError {
fn from(e: CheckRelationError) -> Self {
match e {
CheckRelationError::Resolve(e) => e.into(),
CheckRelationError::Catalog(e) => e.into(),
}
}
}
impl SessionImpl {
pub(crate) fn new(
env: FrontendEnv,
auth_context: AuthContext,View on GitHub (pinned to 6469eb736d)
Solutions
- Check the full qualified name and spelling; use SHOW SCHEMAS to list valid schemas.
- Quote identifiers to preserve case: SELECT * FROM "MySchema"."MyTable".
- Verify you are connected to the intended database (SHOW DATABASES).
- Set search_path correctly or always use fully qualified names.
Example fix
-- before SELECT * FROM pub.orders; -- schema 'pub' not found -- after SHOW SCHEMAS; SELECT * FROM public.orders;
Defensive patterns
Strategy: validation
Validate before calling
-- verify the qualified name resolves before querying SELECT 1 FROM rw_catalog.rw_schemas WHERE name = 'myschema'; SELECT 1 FROM rw_catalog.rw_tables WHERE schema_name = 'myschema' AND name = 'mytable';
Try / catch
match session.check_relation(&qname) {
Err(CheckRelationError::Resolve(e)) => {
log::warn!("bad qualified name: {e}");
suggest_similar_names(&qname);
}
other => other,
} Prevention
- Always use fully qualified, quoted identifiers in generated SQL.
- Verify search_path/database at session start.
- Lint SQL against the catalog in CI before deployment.
- Watch for case sensitivity: unquoted identifiers fold to lowercase.
When it happens
Trigger: Any statement that resolves a possibly-qualified name (schema.table or db.schema.table) where the schema or object path does not exist, e.g. SELECT * FROM nonexistent_schema.t or a bad search_path component.
Common situations: Typo in schema prefix; connecting to a different database than expected; case-sensitivity issues with quoted identifiers; default schema missing after session setup.
Related errors
- {object_type} not found: {name}
- table "{table_name}" does not exist
- relative_error={} does not satisfy 0.0 < relative_error < 1.
- {} must contain 1 argument
- {object_type} named {name} already exists{}
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/39281294d472a258.
Report an issue: GitHub.