alamb commented on code in PR #16632: URL: https://github.com/apache/datafusion/pull/16632#discussion_r2192561119
########## datafusion/proto/src/logical_plan/mod.rs: ########## @@ -916,40 +915,13 @@ impl AsLogicalPlan for LogicalPlanNode { LogicalPlanType::Unnest(unnest) => { let input: LogicalPlan = into_logical_plan!(unnest.input, ctx, extension_codec)?; - Ok(LogicalPlan::Unnest(Unnest { - input: Arc::new(input), - exec_columns: unnest.exec_columns.iter().map(|c| c.into()).collect(), - list_type_columns: unnest - .list_type_columns - .iter() - .map(|c| { - let recursion_item = c.recursion.as_ref().unwrap(); - ( - c.input_index as _, - ColumnUnnestList { - output_column: recursion_item - .output_column - .as_ref() - .unwrap() - .into(), - depth: recursion_item.depth as _, - }, - ) - }) - .collect(), - struct_type_columns: unnest - .struct_type_columns - .iter() - .map(|c| *c as usize) - .collect(), - dependency_indices: unnest - .dependency_indices - .iter() - .map(|c| *c as usize) - .collect(), - schema: Arc::new(convert_required!(unnest.schema)?), - options: into_required!(unnest.options)?, - })) + + LogicalPlanBuilder::from(input) Review Comment: this is a nice improvement too -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org