fix unknown stage bug
@@ -58,8 +58,7 @@ impl Interpreter for DropUserStageInterpreter {
let tenant = self.ctx.get_tenant();
let user_mgr = self.ctx.get_user_manager();
- let stage = user_mgr.get_stage(&tenant, plan.name.as_str()).await?;
-
+ if let Ok(stage) = user_mgr.get_stage(&tenant, plan.name.as_str()).await {
if matches!(&stage.stage_type, StageType::Internal) {
let op = StageSource::get_op(&self.ctx, &stage).await?;
let absolute_path = format!("/stage/{}/", stage.stage_name);
@@ -70,11 +69,11 @@ impl Interpreter for DropUserStageInterpreter {
stage.stage_name
);
}
+ }
user_mgr
- .drop_stage(&tenant, &stage.stage_name, plan.if_exists)
+ .drop_stage(&tenant, plan.name.as_str(), plan.if_exists)
.await?;
-
Ok(Box::pin(DataBlockStream::create(
self.plan.schema(),
None,
