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,