zhuqi-lucas commented on PR #16196: URL: https://github.com/apache/datafusion/pull/16196#issuecomment-2933950378
It's more complex than i expected, i need more time to investigate about the rule plan, because we add a new YieldStreamExec. Several exec will have specified rule to manage the behaviour according the child of it. For example: ```rust /// Keeps track of distribution changing operators (like `RepartitionExec`, /// `SortPreservingMergeExec`, `CoalescePartitionsExec`) and their ancestors. /// Using this information, we can optimize distribution of the plan if/when /// necessary. pub type DistributionContext = PlanContext<bool>; fn update_children(mut dist_context: DistributionContext) -> Result<DistributionContext> { for child_context in dist_context.children.iter_mut() { let child_plan_any = child_context.plan.as_any(); child_context.data = if let Some(repartition) = child_plan_any.downcast_ref::<RepartitionExec>() { !matches!( repartition.partitioning(), Partitioning::UnknownPartitioning(_) ) } else { child_plan_any.is::<SortPreservingMergeExec>() || child_plan_any.is::<CoalescePartitionsExec>() || child_context.plan.children().is_empty() || child_context.children[0].data || child_context .plan .required_input_distribution() .iter() .zip(child_context.children.iter()) .any(|(required_dist, child_context)| { child_context.data && matches!( required_dist, Distribution::UnspecifiedDistribution ) }) } } dist_context.data = false; Ok(dist_context) } ``` We need more effort to bypass the YiledStreamExec, because it will affect other optimization. -- 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