jonahgao commented on code in PR #13965: URL: https://github.com/apache/datafusion/pull/13965#discussion_r1900511366
########## datafusion/core/src/physical_optimizer/enforce_distribution.rs: ########## @@ -1208,7 +1208,7 @@ fn ensure_distribution( // We store the updated children in `new_children`. let children = izip!( children.into_iter(), - plan.required_input_ordering().iter(), + plan.required_input_ordering(), Review Comment: The new version of itertools will expand `izip!` to ```rust { let iter = ::itertools::__std_iter::IntoIterator::into_iter( children.into_iter(), ); let iter = ::itertools::__std_iter::Iterator::zip( iter, plan.required_input_ordering().iter(), ); let iter = ::itertools::__std_iter::Iterator::zip( iter, plan.maintains_input_order(), ); let iter = ::itertools::__std_iter::Iterator::zip( iter, repartition_status_flags.into_iter(), ); ::itertools::__std_iter::Iterator::map( iter, |(((a, b), b), b)| (a, b, b, b), ) } ``` `plan.required_input_ordering().iter()` creates a temporary value which is freed while still in use later. It was previously expanded as ```rust ::itertools::__std_iter::IntoIterator::into_iter( children.into_iter(), ) .zip(plan.required_input_ordering().iter()) .zip(plan.maintains_input_order()) .zip(repartition_status_flags.into_iter()) .map(|(((a, b), b), b)| (a, b, b, b)) ``` Related upstream PR: https://github.com/rust-itertools/itertools/pull/943 -- 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