geoHeil opened a new issue, #26998: URL: https://github.com/apache/datafusion/issues/26998
### Describe the bug `datafusion-proto` is built without `avro` by default, since its `default` features are `["parquet"]`. In that build, `PhysicalPlanNode::try_into_physical_plan` panics on an `AvroScan` node: https://github.com/apache/datafusion/blob/934691e9af8f11bf4b629f21bb17795abfb84d93/datafusion/proto/src/physical_plan/mod.rs#L1238-L1247 ```rust #[cfg(not(feature = "avro"))] panic!( "Unable to process a Avro PhysicalPlan when `avro` feature is not enabled" ) ``` The `ParquetScan` arm just above it handles the same situation with `not_impl_err!`: https://github.com/apache/datafusion/blob/934691e9af8f11bf4b629f21bb17795abfb84d93/datafusion/proto/src/physical_plan/mod.rs#L1228-L1237 The same code is in 55.1.0, `src/physical_plan/mod.rs`, lines 1100-1108. ### To Reproduce Build `datafusion-proto` with default features, then decode a `PhysicalPlanNode` whose `physical_plan_type` is `AvroScan(Default::default())`: ```rust let node = protobuf::PhysicalPlanNode { physical_plan_type: Some(protobuf::physical_plan_node::PhysicalPlanType::AvroScan(Default::default())), }; let _ = datafusion_proto::bytes::physical_plan_from_bytes(&node.encode_to_vec(), &ctx.task_ctx()); ``` The arm is an unconditional `panic!`, so this panics before the node's contents are looked at. ### Expected behavior Return `not_impl_err!`, as the `ParquetScan` arm does, so a caller gets `Err` and keeps running. ### Additional context This matters wherever a process decodes plans it did not encode itself. One example is a distributed worker that receives plan stages from peers. A few bytes of input panic the decoding task, and under `panic = "abort"` they stop the whole process. A fix is one line, plus a decode test with the feature off. I can open the PR if that is welcome. -- 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]
