Skip to content

Commit e16c24f

Browse files
committed
fix proto test
1 parent 238d58b commit e16c24f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

datafusion/proto/tests/cases/roundtrip_physical_plan.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,16 @@ fn roundtrip_test_and_return(
144144
protobuf::PhysicalPlanNode::try_from_physical_plan(exec_plan.clone(), codec)
145145
.expect("to proto");
146146
let runtime = ctx.runtime_env();
147-
let result_exec_plan: Arc<dyn ExecutionPlan> = proto
147+
let mut result_exec_plan: Arc<dyn ExecutionPlan> = proto
148148
.try_into_physical_plan(ctx, runtime.deref(), codec)
149149
.expect("from proto");
150150

151+
// Qi: workaround for NodeId not being serialized/deserialized,
152+
// otherwise the assert_eq! below will fail
153+
let mut annotator2 = NodeIdAnnotator::new();
154+
result_exec_plan =
155+
annotate_node_id_for_execution_plan(&result_exec_plan, &mut annotator2)?;
156+
151157
pretty_assertions::assert_eq!(
152158
format!("{exec_plan:?}"),
153159
format!("{result_exec_plan:?}")

0 commit comments

Comments
 (0)