MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / resolve_optional_schema

Method resolve_optional_schema

src/sql/src/plan/statement.rs:716–727  ·  view source on GitHub ↗
(
        &self,
        schema_name: &Option<ResolvedSchemaName>,
    )

Source from the content-addressed store, hash-verified

714 }
715
716 pub fn resolve_optional_schema(
717 &self,
718 schema_name: &Option<ResolvedSchemaName>,
719 ) -> Result<SchemaSpecifier, PlanError> {
720 match schema_name {
721 Some(ResolvedSchemaName::Schema { schema_spec, .. }) => Ok(schema_spec.clone()),
722 None => self.resolve_active_schema().map(|spec| spec.clone()),
723 Some(ResolvedSchemaName::Error) => {
724 unreachable!("should have been handled by name resolution")
725 }
726 }
727 }
728
729 pub fn resolve_active_schema(&self) -> Result<&SchemaSpecifier, PlanError> {
730 match self.current_schema() {

Callers 8

show_connectionsFunction · 0.80
show_tablesFunction · 0.80
show_sourcesFunction · 0.80
show_viewsFunction · 0.80
show_materialized_viewsFunction · 0.80
show_typesFunction · 0.80
show_all_objectsFunction · 0.80
show_secretsFunction · 0.80

Calls 3

resolve_active_schemaMethod · 0.80
cloneMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected