Skip to content

Commit 482e6ea

Browse files
fix: resolve PR comments
1 parent f78b55e commit 482e6ea

File tree

1 file changed

+3
-5
lines changed
  • src/datanode/src/instance

1 file changed

+3
-5
lines changed

src/datanode/src/instance/sql.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,11 @@ impl Instance {
138138
unimplemented!("SHOW CREATE TABLE is unimplemented yet");
139139
}
140140
QueryStatement::Sql(Statement::Use(schema)) => {
141-
let catalog = query_ctx
142-
.current_catalog()
143-
.as_deref()
144-
.unwrap_or(DEFAULT_CATALOG_NAME);
141+
let catalog = query_ctx.current_catalog();
142+
let catalog = catalog.as_deref().unwrap_or(DEFAULT_CATALOG_NAME);
145143

146144
ensure!(
147-
self.is_valid_schema(&catalog, &schema)?,
145+
self.is_valid_schema(catalog, &schema)?,
148146
error::DatabaseNotFoundSnafu { catalog, schema }
149147
);
150148

0 commit comments

Comments
 (0)