File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,9 @@ pub trait NetworkBoundary: ExecutionPlan {
3535 input_tasks : usize ,
3636 ) -> datafusion:: common:: Result < Arc < dyn NetworkBoundary > > ;
3737
38+ /// Returns the input tasks assigned to this [NetworkBoundary].
39+ fn input_task_count ( & self ) -> usize ;
40+
3841 /// Called when a [Stage] is correctly formed. The [NetworkBoundary] can use this
3942 /// information to perform any internal transformations necessary for distributed execution.
4043 ///
Original file line number Diff line number Diff line change @@ -176,6 +176,13 @@ impl NetworkBoundary for NetworkCoalesceExec {
176176 }
177177 } ) )
178178 }
179+
180+ fn input_task_count ( & self ) -> usize {
181+ match self {
182+ Self :: Pending ( v) => v. input_tasks ,
183+ Self :: Ready ( v) => v. input_stage . tasks . len ( ) ,
184+ }
185+ }
179186}
180187
181188impl DisplayAs for NetworkCoalesceExec {
Original file line number Diff line number Diff line change @@ -203,6 +203,13 @@ impl NetworkBoundary for NetworkShuffleExec {
203203 } ) )
204204 }
205205
206+ fn input_task_count ( & self ) -> usize {
207+ match self {
208+ Self :: Pending ( v) => v. input_tasks ,
209+ Self :: Ready ( v) => v. input_stage . tasks . len ( ) ,
210+ }
211+ }
212+
206213 fn with_input_stage (
207214 & self ,
208215 input_stage : Stage ,
You can’t perform that action at this time.
0 commit comments