File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
ballista/rust/core/src/serde/physical_plan Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ mod roundtrip_tests {
4545
4646 use super :: super :: super :: error:: Result ;
4747 use super :: super :: protobuf;
48+ use crate :: execution_plans:: ShuffleWriterExec ;
4849
4950 fn roundtrip_test ( exec_plan : Arc < dyn ExecutionPlan > ) -> Result < ( ) > {
5051 let proto: protobuf:: PhysicalPlanNode = exec_plan. clone ( ) . try_into ( ) ?;
@@ -184,4 +185,19 @@ mod roundtrip_tests {
184185 Arc :: new ( EmptyExec :: new ( false , schema) ) ,
185186 ) ?) )
186187 }
188+
189+ #[ test]
190+ fn roundtrip_shuffle_writer ( ) -> Result < ( ) > {
191+ let field_a = Field :: new ( "a" , DataType :: Int64 , false ) ;
192+ let field_b = Field :: new ( "b" , DataType :: Int64 , false ) ;
193+ let schema = Arc :: new ( Schema :: new ( vec ! [ field_a, field_b] ) ) ;
194+
195+ roundtrip_test ( Arc :: new ( ShuffleWriterExec :: try_new (
196+ "job123" . to_string ( ) ,
197+ 123 ,
198+ Arc :: new ( EmptyExec :: new ( false , schema) ) ,
199+ "" . to_string ( ) ,
200+ Some ( Partitioning :: Hash ( vec ! [ Arc :: new( Column :: new( "a" , 0 ) ) ] , 4 ) ) ,
201+ ) ?) )
202+ }
187203}
You can’t perform that action at this time.
0 commit comments