adriangb commented on code in PR #23495:
URL: https://github.com/apache/datafusion/pull/23495#discussion_r3597480141


##########
datafusion/proto/src/physical_plan/mod.rs:
##########
@@ -444,16 +456,20 @@ pub trait PhysicalPlanNodeExt: Sized {
         let plan_clone = Arc::clone(&plan);
         let plan = plan.as_ref();
 
-        if let Some(exec) = plan.downcast_ref::<ExplainExec>() {
-            return protobuf::PhysicalPlanNode::try_from_explain_exec(exec, 
codec);
+        // Self-serializing plans handle themselves via the `try_to_proto` hook
+        // (#22419). `Ok(None)` means "not migrated" and falls through to the
+        // central downcast chain below.
+        let encoder = ConverterPlanEncoder {
+            codec,
+            proto_converter,
+        };
+        let encode_ctx = ExecutionPlanEncodeCtx::new(&encoder);
+        if let Some(node) = plan.try_to_proto(&encode_ctx)? {

Review Comment:
   Good catch! This should be fixed in 02108ebfab.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to