Jefffrey commented on code in PR #19350:
URL: https://github.com/apache/datafusion/pull/19350#discussion_r2623585639


##########
datafusion/proto/src/physical_plan/mod.rs:
##########
@@ -155,14 +155,26 @@ impl AsExecutionPlan for protobuf::PhysicalPlanNode {
             PhysicalPlanType::JsonScan(scan) => {
                 self.try_into_json_scan_physical_plan(scan, ctx, 
extension_codec)
             }
-            #[cfg_attr(not(feature = "parquet"), allow(unused_variables))]
+            #[cfg(feature = "parquet")]
             PhysicalPlanType::ParquetScan(scan) => {
                 self.try_into_parquet_scan_physical_plan(scan, ctx, 
extension_codec)
             }
-            #[cfg_attr(not(feature = "avro"), allow(unused_variables))]
+            #[cfg(not(feature = "parquet"))]
+            PhysicalPlanType::ParquetScan(_) => {
+                panic!(
+                    "Unable to process a Parquet PhysicalPlan when `parquet` 
feature is not enabled"
+                )
+            }
+            #[cfg(feature = "avro")]
             PhysicalPlanType::AvroScan(scan) => {

Review Comment:
   I still don't see why these changes are necessary to fix the lints 🤔
   
   Can we just keep things simple? I believe we can just remove these 
`cfg_attr`s and at the actual functions (e.g. 
`try_into_parquet_scan_physical_plan`) we fix the lint to use expect. I don't 
expect code changes other than to attributes



-- 
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