Skip to content

Commit

Permalink
chore: fmt code
Browse files Browse the repository at this point in the history
  • Loading branch information
e1ijah1 committed Jan 6, 2023
1 parent 68f7517 commit c232259
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/catalog/src/local/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,8 @@ impl CatalogManager for LocalCatalogManager {
let schema = catalog
.schema(schema_name)?
.with_context(|| SchemaNotFoundSnafu {
schema_info: format!("{catalog_name}.{schema_name}"),
catalog: catalog_name,
schema: schema_name,
})?;

schema
Expand Down
3 changes: 2 additions & 1 deletion src/catalog/src/local/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ impl CatalogManager for MemoryCatalogManager {
let schema = catalog
.schema(&request.schema)?
.with_context(|| SchemaNotFoundSnafu {
schema_info: format!("{}.{}", &request.catalog, &request.schema),
catalog: &request.catalog,
schema: &request.schema,
})?;
schema
.rename_table(&request.table_name, request.new_table_name, request.table)
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/instance/distributed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ impl DistInstance {
let mut context = AlterContext::with_capacity(1);
context.insert(expr);

table.alter(context, request).await.context(TableSnafu)?;
table.alter(context, &request).await.context(TableSnafu)?;

Ok(Output::AffectedRows(0))
}
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ impl Table for DistTable {
Ok(FilterPushDownType::Inexact)
}

async fn alter(&self, context: AlterContext, request: AlterTableRequest) -> table::Result<()> {
async fn alter(&self, context: AlterContext, request: &AlterTableRequest) -> table::Result<()> {
self.handle_alter(context, request)
.await
.map_err(BoxedError::new)
Expand Down Expand Up @@ -413,7 +413,7 @@ impl DistTable {
.context(CatalogSnafu)
}

async fn handle_alter(&self, context: AlterContext, request: AlterTableRequest) -> Result<()> {
async fn handle_alter(&self, context: AlterContext, request: &AlterTableRequest) -> Result<()> {
let alter_expr = context
.get::<AlterExpr>()
.context(ContextValueNotFoundSnafu { key: "AlterExpr" })?;
Expand Down

0 comments on commit c232259

Please sign in to comment.