Skip to content

Commit cf3493e

Browse files
committed
fix(cube): Use less stack in debug mode in LogicalPlanNode::try_from_logical_plan
1 parent 4ade7f6 commit cf3493e

File tree

1 file changed

+4
-4
lines changed
  • datafusion/proto/src/logical_plan

1 file changed

+4
-4
lines changed

datafusion/proto/src/logical_plan/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ impl AsLogicalPlan for LogicalPlanNode {
903903
Self: Sized,
904904
{
905905
match plan {
906-
LogicalPlan::Values(Values { values, .. }) => {
906+
LogicalPlan::Values(Values { values, .. }) => (|values: &Vec<Vec<Expr>>, extension_codec: &dyn LogicalExtensionCodec| -> Result<LogicalPlanNode> {
907907
let n_cols = if values.is_empty() {
908908
0
909909
} else {
@@ -919,14 +919,14 @@ impl AsLogicalPlan for LogicalPlanNode {
919919
},
920920
)),
921921
})
922-
}
922+
})(values, extension_codec),
923923
LogicalPlan::TableScan(TableScan {
924924
table_name,
925925
source,
926926
filters,
927927
projection,
928928
..
929-
}) => {
929+
}) => (|table_name: &TableReference, source: &Arc<dyn datafusion_expr::TableSource>, filters: &Vec<Expr>, projection: &Option<Vec<usize>>, extension_codec: &dyn LogicalExtensionCodec| -> Result<LogicalPlanNode> {
930930
let provider = source_as_provider(source)?;
931931
let schema = provider.schema();
932932
let source = provider.as_any();
@@ -1065,7 +1065,7 @@ impl AsLogicalPlan for LogicalPlanNode {
10651065
};
10661066
Ok(node)
10671067
}
1068-
}
1068+
})(table_name, source, filters, projection, extension_codec),
10691069
LogicalPlan::Projection(Projection { expr, input, .. }) => {
10701070
Ok(protobuf::LogicalPlanNode {
10711071
logical_plan_type: Some(LogicalPlanType::Projection(Box::new(

0 commit comments

Comments
 (0)