From e74ba9560c4ad5a1c478a95b37a0e27e3dcc41de Mon Sep 17 00:00:00 2001 From: Denis Smirnov <sd@picodata.io> Date: Thu, 18 Aug 2022 13:15:06 +0700 Subject: [PATCH] perf: remove redundunt clone while getting motion alias --- src/executor/ir.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/executor/ir.rs b/src/executor/ir.rs index 77e9d390c1..6d026a7b7a 100644 --- a/src/executor/ir.rs +++ b/src/executor/ir.rs @@ -82,12 +82,12 @@ impl ExecutionPlan { /// /// # Errors /// - node is not valid - pub fn get_motion_alias(&self, node_id: usize) -> Result<Option<String>, QueryPlannerError> { + pub fn get_motion_alias(&self, node_id: usize) -> Result<Option<&String>, QueryPlannerError> { let sq_id = &self.get_motion_child(node_id)?; if let Relational::ScanSubQuery { alias, .. } = self.get_ir_plan().get_relation_node(*sq_id)? { - return Ok(alias.clone()); + return Ok(alias.as_ref()); } Ok(None) -- GitLab