Skip to content

Commit

Permalink
fix v1
Browse files Browse the repository at this point in the history
  • Loading branch information
kwannoel committed Jun 28, 2024
1 parent 2dfb3e5 commit 044525f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/frontend/src/catalog/root_catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ impl Catalog {
pub fn update_table(&mut self, proto: &PbTable) {
let database = self.get_database_mut(proto.database_id).unwrap();
let schema = database.get_schema_mut(proto.schema_id).unwrap();
let table = if schema.get_created_table_by_id(&proto.id.into()).is_some() {
let table = if schema.get_table_by_id(&proto.id.into()).is_some() {
schema.update_table(proto)
} else {
// Enter this branch when schema is changed by `ALTER ... SET SCHEMA ...` statement.
Expand Down
4 changes: 4 additions & 0 deletions src/frontend/src/catalog/schema_catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,10 @@ impl SchemaCatalog {
.filter(|&table| table.stream_job_status != StreamJobStatus::Creating)
}

pub fn get_table_by_id(&self, table_id: &TableId) -> Option<&Arc<TableCatalog>> {
self.table_by_id.get(table_id)
}

pub fn get_created_table_by_id(&self, table_id: &TableId) -> Option<&Arc<TableCatalog>> {
self.table_by_id
.get(table_id)
Expand Down

0 comments on commit 044525f

Please sign in to comment.