@@ -24,12 +24,13 @@ use crate::serde::scheduler::PartitionLocation;
24
24
25
25
use arrow:: datatypes:: SchemaRef ;
26
26
use async_trait:: async_trait;
27
- use datafusion:: physical_plan:: { ExecutionPlan , Partitioning } ;
27
+ use datafusion:: physical_plan:: { DisplayFormatType , ExecutionPlan , Partitioning } ;
28
28
use datafusion:: {
29
29
error:: { DataFusionError , Result } ,
30
30
physical_plan:: RecordBatchStream ,
31
31
} ;
32
32
use log:: info;
33
+ use std:: fmt:: Formatter ;
33
34
34
35
/// ShuffleReaderExec reads partitions that have already been materialized by an executor.
35
36
#[ derive( Debug , Clone ) ]
@@ -103,4 +104,31 @@ impl ExecutionPlan for ShuffleReaderExec {
103
104
. await
104
105
. map_err ( |e| DataFusionError :: Execution ( format ! ( "Ballista Error: {:?}" , e) ) )
105
106
}
107
+
108
+ fn fmt_as (
109
+ & self ,
110
+ t : DisplayFormatType ,
111
+ f : & mut std:: fmt:: Formatter ,
112
+ ) -> std:: fmt:: Result {
113
+ match t {
114
+ DisplayFormatType :: Default => {
115
+ let loc_str = self
116
+ . partition_location
117
+ . iter ( )
118
+ . map ( |l| {
119
+ format ! (
120
+ "[executor={} part={}:{}:{} stats={:?}]" ,
121
+ l. executor_meta. id,
122
+ l. partition_id. job_id,
123
+ l. partition_id. stage_id,
124
+ l. partition_id. partition_id,
125
+ l. partition_stats
126
+ )
127
+ } )
128
+ . collect :: < Vec < String > > ( )
129
+ . join ( "," ) ;
130
+ write ! ( f, "ShuffleReaderExec: partition_locations={}" , loc_str)
131
+ }
132
+ }
133
+ }
106
134
}
0 commit comments