Skip to content

Commit

Permalink
fix(cube): Use less stack in debug mode in LogicalPlanNode::try_from_…
Browse files Browse the repository at this point in the history
…logical_plan
  • Loading branch information
srh committed Dec 16, 2024
1 parent 4ade7f6 commit cf3493e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions datafusion/proto/src/logical_plan/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ impl AsLogicalPlan for LogicalPlanNode {
Self: Sized,
{
match plan {
LogicalPlan::Values(Values { values, .. }) => {
LogicalPlan::Values(Values { values, .. }) => (|values: &Vec<Vec<Expr>>, extension_codec: &dyn LogicalExtensionCodec| -> Result<LogicalPlanNode> {
let n_cols = if values.is_empty() {
0
} else {
Expand All @@ -919,14 +919,14 @@ impl AsLogicalPlan for LogicalPlanNode {
},
)),
})
}
})(values, extension_codec),
LogicalPlan::TableScan(TableScan {
table_name,
source,
filters,
projection,
..
}) => {
}) => (|table_name: &TableReference, source: &Arc<dyn datafusion_expr::TableSource>, filters: &Vec<Expr>, projection: &Option<Vec<usize>>, extension_codec: &dyn LogicalExtensionCodec| -> Result<LogicalPlanNode> {
let provider = source_as_provider(source)?;
let schema = provider.schema();
let source = provider.as_any();
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit cf3493e

Please sign in to comment.