Skip to content
Snippets Groups Projects
Verified Commit e74ba956 authored by Denis Smirnov's avatar Denis Smirnov
Browse files

perf: remove redundunt clone while getting motion alias

parent 30806d09
No related branches found
No related tags found
1 merge request!1414sbroad import
...@@ -82,12 +82,12 @@ impl ExecutionPlan { ...@@ -82,12 +82,12 @@ impl ExecutionPlan {
/// ///
/// # Errors /// # Errors
/// - node is not valid /// - 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)?; let sq_id = &self.get_motion_child(node_id)?;
if let Relational::ScanSubQuery { alias, .. } = if let Relational::ScanSubQuery { alias, .. } =
self.get_ir_plan().get_relation_node(*sq_id)? self.get_ir_plan().get_relation_node(*sq_id)?
{ {
return Ok(alias.clone()); return Ok(alias.as_ref());
} }
Ok(None) Ok(None)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment