diff --git a/datafusion/proto/src/logical_plan/mod.rs b/datafusion/proto/src/logical_plan/mod.rs index 94fbe5c27eb5..dc865ba845de 100644 --- a/datafusion/proto/src/logical_plan/mod.rs +++ b/datafusion/proto/src/logical_plan/mod.rs @@ -903,7 +903,7 @@ impl AsLogicalPlan for LogicalPlanNode { Self: Sized, { match plan { - LogicalPlan::Values(Values { values, .. }) => { + LogicalPlan::Values(Values { values, .. }) => (|values: &Vec>, extension_codec: &dyn LogicalExtensionCodec| -> Result { let n_cols = if values.is_empty() { 0 } else { @@ -919,14 +919,14 @@ impl AsLogicalPlan for LogicalPlanNode { }, )), }) - } + })(values, extension_codec), LogicalPlan::TableScan(TableScan { table_name, source, filters, projection, .. - }) => { + }) => (|table_name: &TableReference, source: &Arc, filters: &Vec, projection: &Option>, extension_codec: &dyn LogicalExtensionCodec| -> Result { let provider = source_as_provider(source)?; let schema = provider.schema(); let source = provider.as_any(); @@ -1065,7 +1065,7 @@ impl AsLogicalPlan for LogicalPlanNode { }; Ok(node) } - } + })(table_name, source, filters, projection, extension_codec), LogicalPlan::Projection(Projection { expr, input, .. }) => { Ok(protobuf::LogicalPlanNode { logical_plan_type: Some(LogicalPlanType::Projection(Box::new(