@@ -59,17 +59,17 @@ pub struct QueryStageExec {
5959impl QueryStageExec {
6060 /// Create a new query stage
6161 pub fn try_new (
62- job_id : & str ,
62+ job_id : String ,
6363 stage_id : usize ,
6464 plan : Arc < dyn ExecutionPlan > ,
65- work_dir : & str ,
65+ work_dir : String ,
6666 shuffle_output_partitioning : Option < Partitioning > ,
6767 ) -> Result < Self > {
6868 Ok ( Self {
69- job_id : job_id . to_owned ( ) ,
69+ job_id,
7070 stage_id,
7171 plan,
72- work_dir : work_dir . to_owned ( ) ,
72+ work_dir,
7373 shuffle_output_partitioning,
7474 } )
7575 }
@@ -109,10 +109,10 @@ impl ExecutionPlan for QueryStageExec {
109109 ) -> Result < Arc < dyn ExecutionPlan > > {
110110 assert ! ( children. len( ) == 1 ) ;
111111 Ok ( Arc :: new ( QueryStageExec :: try_new (
112- & self . job_id ,
112+ self . job_id . clone ( ) ,
113113 self . stage_id ,
114114 children[ 0 ] . clone ( ) ,
115- & self . work_dir ,
115+ self . work_dir . clone ( ) ,
116116 None ,
117117 ) ?) )
118118 }
@@ -173,7 +173,9 @@ impl ExecutionPlan for QueryStageExec {
173173 //TODO re-use code from RepartitionExec to split each batch into
174174 // partitions and write to one IPC file per partition
175175 // See https://github.com/apache/arrow-datafusion/issues/456
176- unimplemented ! ( )
176+ Err ( DataFusionError :: NotImplemented (
177+ "Shuffle partitioning not implemented yet" . to_owned ( ) ,
178+ ) )
177179 }
178180
179181 _ => Err ( DataFusionError :: Execution (
@@ -195,10 +197,10 @@ mod tests {
195197 let input_plan = create_input_plan ( ) ?;
196198 let work_dir = TempDir :: new ( ) ?;
197199 let query_stage = QueryStageExec :: try_new (
198- "jobOne" ,
200+ "jobOne" . to_owned ( ) ,
199201 1 ,
200202 input_plan,
201- work_dir. into_path ( ) . to_str ( ) . unwrap ( ) ,
203+ work_dir. into_path ( ) . to_str ( ) . unwrap ( ) . to_owned ( ) ,
202204 None ,
203205 ) ?;
204206 let mut stream = query_stage. execute ( 0 ) . await ?;
0 commit comments