risingwavelabs/risingwave · error · ResolveRegclassError

parse object name failed

Error message

parse object name failed: {0}

What it means

In cast_regclass handling, the stored expression text is re-parsed as an object name with the SQL parser; when that parse fails (the text is not a valid identifier/qualified name), this error is returned. The faulty input is the regclass-typed string constant that cannot be parsed into an object name.

Solutions

  1. Check the SQL object name given (e.g., in a cast/`::regclass`-style usage) for syntax errors.
  2. Ensure the identifier is properly quoted and resolves to an existing relation.
  3. Fix the query's object reference and retry.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/frontend/src/expr/function_impl/cast_regclass.rs:31 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11). Data as JSON: /api/errors/54409a6b998b3d61. Report an issue: GitHub.

Appendix: source

Thrown at src/frontend/src/expr/function_impl/cast_regclass.rs:31

// limitations under the License.

use risingwave_common::id::ObjectId;
use risingwave_common::session_config::SearchPath;
use risingwave_expr::{ExprError, capture_context, function};
use risingwave_sqlparser::parser::{Parser, ParserError};
use thiserror::Error;
use thiserror_ext::AsReport;

use super::context::{AUTH_CONTEXT, CATALOG_READER, DB_NAME, SEARCH_PATH};
use crate::Binder;
use crate::binder::ResolveQualifiedNameError;
use crate::catalog::root_catalog::SchemaPath;
use crate::catalog::{CatalogError, CatalogReader};
use crate::session::AuthContext;

#[derive(Error, Debug)]
enum ResolveRegclassError {
    #[error("parse object name failed: {0}")]
    Parser(#[from] ParserError),
    #[error("catalog error: {0}")]
    Catalog(#[from] CatalogError),
    #[error("resolve qualified name error: {0}")]
    ResolveQualifiedName(#[from] ResolveQualifiedNameError),
}

impl From<ResolveRegclassError> for ExprError {
    fn from(e: ResolveRegclassError) -> Self {
        match e {
            ResolveRegclassError::Parser(e) => ExprError::Parse(e.to_report_string().into()),
            ResolveRegclassError::Catalog(e) => ExprError::InvalidParam {
                name: "name",
                reason: e.to_report_string().into(),
            },
            ResolveRegclassError::ResolveQualifiedName(e) => ExprError::InvalidParam {
                name: "name",
                reason: e.to_report_string().into(),

View on GitHub (pinned to 6469eb736d)