Skip to content

Commit 20109c1

Browse files
committed
merge from master
2 parents aa2719e + 2176ff5 commit 20109c1

File tree

1 file changed

+16
-0
lines changed
  • ballista/rust/core/src/serde/physical_plan

1 file changed

+16
-0
lines changed

ballista/rust/core/src/serde/physical_plan/mod.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)