@@ -134,6 +134,7 @@ where
134134
135135 /// Adds a new child to the subgraph.
136136 pub fn add_child ( & mut self , child : Box < dyn Operate < TInner > > , index : usize , identifier : usize ) {
137+ let child = PerOperatorState :: new ( child, index, identifier, self . logging . clone ( ) , & mut self . summary_logging ) ;
137138 if let Some ( l) = & mut self . logging {
138139 let mut child_path = Vec :: with_capacity ( self . path . len ( ) + 1 ) ;
139140 child_path. extend_from_slice ( & self . path [ ..] ) ;
@@ -142,10 +143,10 @@ where
142143 l. log ( crate :: logging:: OperatesEvent {
143144 id : identifier,
144145 addr : child_path,
145- name : child. name ( ) . to_owned ( ) ,
146+ name : child. name . to_owned ( ) ,
146147 } ) ;
147148 }
148- self . children . push ( PerOperatorState :: new ( child, index , identifier , self . logging . clone ( ) , & mut self . summary_logging ) ) ;
149+ self . children . push ( child) ;
149150 }
150151
151152 /// Now that initialization is complete, actually build a subgraph.
@@ -545,7 +546,7 @@ where
545546
546547 // produces connectivity summaries from inputs to outputs, and reports initial internal
547548 // capabilities on each of the outputs (projecting capabilities from contained scopes).
548- fn get_internal_summary ( & mut self ) -> ( Connectivity < TOuter :: Summary > , Rc < RefCell < SharedProgress < TOuter > > > ) {
549+ fn initialize ( mut self : Box < Self > ) -> ( Connectivity < TOuter :: Summary > , Rc < RefCell < SharedProgress < TOuter > > > , Box < dyn Schedule > ) {
549550
550551 // double-check that child 0 (the outside world) is correctly shaped.
551552 assert_eq ! ( self . children[ 0 ] . outputs, self . inputs( ) ) ;
@@ -583,7 +584,7 @@ where
583584 self . propagate_pointstamps ( ) ; // Propagate expressed capabilities to output frontiers.
584585
585586 // Return summaries and shared progress information.
586- ( internal_summary, Rc :: clone ( & self . shared_progress ) )
587+ ( internal_summary, Rc :: clone ( & self . shared_progress ) , self )
587588 }
588589}
589590
@@ -598,13 +599,13 @@ struct PerOperatorState<T: Timestamp> {
598599 inputs : usize , // number of inputs to the operator
599600 outputs : usize , // number of outputs from the operator
600601
601- operator : Option < Box < dyn Operate < T > > > ,
602+ operator : Option < Box < dyn Schedule > > ,
602603
603604 edges : Vec < Vec < Target > > , // edges from the outputs of the operator
604605
605606 shared_progress : Rc < RefCell < SharedProgress < T > > > ,
606607
607- internal_summary : Connectivity < T :: Summary > , // cached result from get_internal_summary .
608+ internal_summary : Connectivity < T :: Summary > , // cached result from initialize .
608609
609610 logging : Option < Logger > ,
610611}
@@ -632,7 +633,7 @@ impl<T: Timestamp> PerOperatorState<T> {
632633 }
633634
634635 pub fn new (
635- mut scope : Box < dyn Operate < T > > ,
636+ scope : Box < dyn Operate < T > > ,
636637 index : usize ,
637638 identifier : usize ,
638639 logging : Option < Logger > ,
@@ -644,7 +645,7 @@ impl<T: Timestamp> PerOperatorState<T> {
644645 let outputs = scope. outputs ( ) ;
645646 let notify = scope. notify_me ( ) ;
646647
647- let ( internal_summary, shared_progress) = scope. get_internal_summary ( ) ;
648+ let ( internal_summary, shared_progress, operator ) = scope. initialize ( ) ;
648649
649650 if let Some ( l) = summary_logging {
650651 l. log ( crate :: logging:: OperatesSummaryEvent {
@@ -666,8 +667,8 @@ impl<T: Timestamp> PerOperatorState<T> {
666667 ) ;
667668
668669 PerOperatorState {
669- name : scope . name ( ) . to_owned ( ) ,
670- operator : Some ( scope ) ,
670+ name : operator . name ( ) . to_owned ( ) ,
671+ operator : Some ( operator ) ,
671672 index,
672673 id : identifier,
673674 local,
0 commit comments