@@ -38,7 +38,7 @@ impl TreeNodeRewriter for TaskMetricsCollector {
3838 type Node = Arc < dyn ExecutionPlan > ;
3939
4040 fn f_down ( & mut self , plan : Self :: Node ) -> Result < Transformed < Self :: Node > > {
41- // If the plan is an ArrowFlightReadExec , assume it has collected metrics already
41+ // If the plan is an NetworkShuffleExec , assume it has collected metrics already
4242 // from child tasks.
4343 let metrics_collection =
4444 if let Some ( node) = plan. as_any ( ) . downcast_ref :: < NetworkShuffleExec > ( ) {
@@ -79,7 +79,7 @@ impl TreeNodeRewriter for TaskMetricsCollector {
7979 }
8080 }
8181 }
82- // Skip the subtree of the ArrowFlightReadExec .
82+ // Skip the subtree of the NetworkShuffleExec .
8383 return Ok ( Transformed :: new ( plan, false , TreeNodeRecursion :: Jump ) ) ;
8484 }
8585
@@ -107,7 +107,7 @@ impl TaskMetricsCollector {
107107 /// collect metrics from a StageExec plan and any child tasks.
108108 /// Returns
109109 /// - a vec representing the metrics for the current task (ordered using a pre-order traversal)
110- /// - a map representing the metrics for some subset of child tasks collected from ArrowFlightReadExec leaves
110+ /// - a map representing the metrics for some subset of child tasks collected from NetworkShuffleExec leaves
111111 #[ allow( dead_code) ]
112112 pub fn collect ( mut self , stage : & StageExec ) -> Result < MetricsCollectorResult , DataFusionError > {
113113 stage. plan . clone ( ) . rewrite ( & mut self ) ?;
@@ -123,14 +123,14 @@ impl TaskMetricsCollector {
123123/// Ex. for a plan with the form
124124/// AggregateExec
125125/// └── ProjectionExec
126- /// └── ArrowFlightReadExec
126+ /// └── NetworkShuffleExec
127127///
128128/// the task will be rewritten as
129129///
130130/// MetricsWrapperExec (wrapped: AggregateExec)
131131/// └── MetricsWrapperExec (wrapped: ProjectionExec)
132- /// └── ArrowFlightReadExec
133- /// (Note that the ArrowFlightReadExec node is not wrapped)
132+ /// └── NetworkShuffleExec
133+ /// (Note that the NetworkShuffleExec node is not wrapped)
134134pub struct TaskMetricsRewriter {
135135 metrics : Vec < MetricsSetProto > ,
136136 idx : usize ,
@@ -402,7 +402,7 @@ mod tests {
402402 #[ ignore]
403403 async fn test_metrics_rewriter ( ) {
404404 let ( test_stage, _ctx) = make_test_stage_exec_with_5_nodes ( ) . await ;
405- let test_metrics_sets = ( 0 ..5 ) // 5 nodes excluding ArrowFlightReadExec
405+ let test_metrics_sets = ( 0 ..5 ) // 5 nodes excluding NetworkShuffleExec
406406 . map ( |i| make_distinct_metrics_set ( i + 10 ) )
407407 . collect :: < Vec < MetricsSetProto > > ( ) ;
408408
@@ -420,7 +420,7 @@ mod tests {
420420 r" ProjectionExec: expr=[id@0 as id, count(Int64(1))@1 as count], metrics=[output_rows=12, elapsed_compute=12ns, start_timestamp=2025-09-18 13:00:12 UTC, end_timestamp=2025-09-18 13:00:13 UTC]" ,
421421 r" AggregateExec: mode=FinalPartitioned, gby=[id@0 as id], aggr=[count(Int64(1))], metrics=[output_rows=13, elapsed_compute=13ns, start_timestamp=2025-09-18 13:00:13 UTC, end_timestamp=2025-09-18 13:00:14 UTC]" ,
422422 r" CoalesceBatchesExec: target_batch_size=8192, metrics=[output_rows=14, elapsed_compute=14ns, start_timestamp=2025-09-18 13:00:14 UTC, end_timestamp=2025-09-18 13:00:15 UTC]" ,
423- r" ArrowFlightReadExec , metrics=[]" ,
423+ r" NetworkShuffleExec , metrics=[]" ,
424424 "" // trailing newline
425425 ] . join ( "\n " ) ;
426426 assert_eq ! ( expected, plan_str. to_string( ) ) ;
0 commit comments