@@ -155,7 +155,8 @@ impl ExecutionNodeRef {
155155            | ExecutionOperation :: Function ( subnode,  _) 
156156            | ExecutionOperation :: Null ( subnode) 
157157            | ExecutionOperation :: Aggregate ( subnode,  _) 
158-             | ExecutionOperation :: IncrementalImport ( subnode,  _)  => vec ! [ subnode. clone( ) ] , 
158+             | ExecutionOperation :: IncrementalImport ( subnode,  _) 
159+             | ExecutionOperation :: Rename ( subnode)  => vec ! [ subnode. clone( ) ] , 
159160        } 
160161    } 
161162} 
@@ -197,6 +198,8 @@ pub(crate) enum ExecutionOperation {
197198Aggregate ( ExecutionNodeRef ,  AggregateAssignment ) , 
198199    /// Perform an incremental import 
199200IncrementalImport ( ExecutionNodeRef ,  Rc < Box < dyn  TableProvider > > ) , 
201+     /// Renaming of the columns of the table 
202+ Rename ( ExecutionNodeRef ) , 
200203} 
201204
202205/// Declares whether the resulting table form executing a plan should be kept temporarily or permamently 
@@ -421,6 +424,16 @@ impl ExecutionPlan {
421424
422425        import_node
423426    } 
427+ 
428+     /// Return an [ExecutionNodeRef] with renamed column markers. 
429+ pub  fn  rename ( 
430+         & mut  self , 
431+         subnode :  ExecutionNodeRef , 
432+         markers :  OperationTable , 
433+     )  -> ExecutionNodeRef  { 
434+         let  operation = ExecutionOperation :: Rename ( subnode) ; 
435+         self . push_and_return_reference ( operation,  markers) 
436+     } 
424437} 
425438
426439impl  ExecutionPlan  { 
@@ -732,6 +745,7 @@ impl ExecutionPlan {
732745            } 
733746            ExecutionOperation :: Subtract ( subnode_main,  subnodes_subtract)  => { 
734747                let  markers_main = node_markers; 
748+ 
735749                let  ( markers_subtract,  subtract_reorderings) :  ( 
736750                    Vec < OperationTable > , 
737751                    Vec < Permutation > , 
@@ -905,6 +919,15 @@ impl ExecutionPlan {
905919                    subnode :  subtree, 
906920                } 
907921            } 
922+             ExecutionOperation :: Rename ( subnode)  => Self :: execution_node ( 
923+                 root_node_id, 
924+                 subnode. clone ( ) , 
925+                 order, 
926+                 output_nodes, 
927+                 computed_trees, 
928+                 computed_trees_map, 
929+                 loaded_tables, 
930+             ) , 
908931        } 
909932    } 
910933
0 commit comments