@@ -37,11 +37,22 @@ pub enum CallbackType {
3737pub struct ExecutionInfo {
3838 pub res : Result < ( ) > ,
3939 pub profiling : HashMap < u32 , PlanProfile > ,
40+ // Profiles produced by implementation-only child executors can share the same scope
41+ // as their parent physical plan.
42+ pub profile_scope_id : String ,
4043}
4144
4245impl ExecutionInfo {
43- pub fn create ( res : Result < ( ) > , profiling : HashMap < u32 , PlanProfile > ) -> ExecutionInfo {
44- ExecutionInfo { res, profiling }
46+ pub fn create (
47+ res : Result < ( ) > ,
48+ profiling : HashMap < u32 , PlanProfile > ,
49+ profile_scope_id : impl Into < String > ,
50+ ) -> ExecutionInfo {
51+ ExecutionInfo {
52+ res,
53+ profiling,
54+ profile_scope_id : profile_scope_id. into ( ) ,
55+ }
4556 }
4657}
4758
@@ -314,7 +325,7 @@ mod tests {
314325 ) ;
315326 }
316327
317- chain. apply ( ExecutionInfo :: create ( Ok ( ( ) ) , HashMap :: new ( ) ) ) ?;
328+ chain. apply ( ExecutionInfo :: create ( Ok ( ( ) ) , HashMap :: new ( ) , String :: new ( ) ) ) ?;
318329
319330 assert_eq ! ( seq. load( Ordering :: SeqCst ) , 10 ) ;
320331
@@ -378,7 +389,7 @@ mod tests {
378389 } ) ,
379390 ) ;
380391
381- chain. apply ( ExecutionInfo :: create ( Ok ( ( ) ) , HashMap :: new ( ) ) ) ?;
392+ chain. apply ( ExecutionInfo :: create ( Ok ( ( ) ) , HashMap :: new ( ) , String :: new ( ) ) ) ?;
382393
383394 assert_eq ! ( seq. load( Ordering :: SeqCst ) , 13 ) ;
384395
@@ -443,7 +454,7 @@ mod tests {
443454 } ) ,
444455 ) ;
445456
446- chain. apply ( ExecutionInfo :: create ( Ok ( ( ) ) , HashMap :: new ( ) ) ) ?;
457+ chain. apply ( ExecutionInfo :: create ( Ok ( ( ) ) , HashMap :: new ( ) , String :: new ( ) ) ) ?;
447458
448459 assert_eq ! ( seq. load( Ordering :: SeqCst ) , 13 ) ;
449460
@@ -522,7 +533,7 @@ mod tests {
522533
523534 assert ! (
524535 chain
525- . apply( ExecutionInfo :: create( Ok ( ( ) ) , HashMap :: new( ) ) )
536+ . apply( ExecutionInfo :: create( Ok ( ( ) ) , HashMap :: new( ) , String :: new ( ) , ) )
526537 . is_err( )
527538 ) ;
528539
0 commit comments