11use crate :: channel_resolver_ext:: get_distributed_channel_resolver;
22use crate :: distributed_physical_optimizer_rule:: NetworkBoundaryExt ;
33use crate :: execution_plans:: common:: require_one_child;
4- use crate :: stage:: { ExecutionTask , Stage } ;
5- use crate :: protobuf:: { DistributedCodec , StageKey } ;
4+ use crate :: protobuf:: DistributedCodec ;
65use crate :: stage:: DisplayCtx ;
7- use bytes :: Bytes ;
6+ use crate :: stage :: { ExecutionTask , Stage } ;
87use datafusion:: common:: exec_err;
98use datafusion:: common:: tree_node:: { Transformed , TreeNode } ;
109use datafusion:: error:: DataFusionError ;
@@ -27,7 +26,6 @@ use url::Url;
2726#[ derive( Debug , Clone ) ]
2827pub struct DistributedExec {
2928 pub plan : Arc < dyn ExecutionPlan > ,
30-
3129 pub prepared_plan : Arc < Mutex < Option < Arc < dyn ExecutionPlan > > > > ,
3230 pub display_ctx : Option < DisplayCtx > ,
3331}
@@ -41,25 +39,15 @@ impl DistributedExec {
4139 }
4240 }
4341
44- /// Returns a special stage key used to identify the root "stage" of the distributed plan.
45- /// TODO: reconcile this with display_plan_graphviz
46- pub ( crate ) fn to_stage_key ( & self ) -> StageKey {
47- StageKey {
48- query_id : Bytes :: new ( ) ,
49- stage_id : 0_u64 ,
50- task_number : 0 ,
51- }
52- }
53-
5442 pub ( crate ) fn with_display_ctx ( & self , display_ctx : DisplayCtx ) -> Self {
5543 Self {
5644 display_ctx : Some ( display_ctx) ,
5745 ..self . clone ( )
5846 }
5947 }
6048
61- /// Returns the prepared plan which is lazily prepared on execute(). It is updated on every
62- /// call. Returns an error if .execute() has not been called.
49+ /// Returns the plan which is lazily prepared on execute() and actually gets executed.
50+ /// It is updated on every call to execute() . Returns an error if .execute() has not been called.
6351 pub ( crate ) fn pepared_plan ( & self ) -> Result < Arc < dyn ExecutionPlan > , DataFusionError > {
6452 self . prepared_plan
6553 . lock ( )
0 commit comments