From e8178e4657026b951f6e315d1ea51c8e95fbff15 Mon Sep 17 00:00:00 2001 From: Shanicky Chen Date: Wed, 24 Jul 2024 15:53:47 +0800 Subject: [PATCH] Refactor error handling in ddl_controller.rs --- src/meta/src/rpc/ddl_controller.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/meta/src/rpc/ddl_controller.rs b/src/meta/src/rpc/ddl_controller.rs index 406371b7a734c..240b61aa2a428 100644 --- a/src/meta/src/rpc/ddl_controller.rs +++ b/src/meta/src/rpc/ddl_controller.rs @@ -1091,11 +1091,8 @@ impl DdlController { if let Some(creating_sink_table_fragments) = creating_sink_table_fragments { let sink_fragment = creating_sink_table_fragments.sink_fragment().unwrap(); - - let sink = sink.unwrap(); - + let sink = sink.expect("sink not found"); let uniq_name = &format!("{}.{}.{}", sink.database_id, sink.schema_id, sink.name); - Self::inject_replace_table_plan_for_sink( Some(sink.id), &sink_fragment,