bert-beyondloops commented on issue #16623: URL: https://github.com/apache/datafusion/issues/16623#issuecomment-3019062655
Experimenting with a potential fix by treating the unnest logical plan the same as a limit plan seems to solve this issue? : optimize_projections/mod.rs : ` LogicalPlan::Limit(_) | LogicalPlan::Unnest(_) => { // Pass index requirements from the parent as well as column indices // that appear in this plan's expressions to its child. These operators // do not benefit from "small" inputs, so the projection_beneficial // flag is `false`. plan.inputs() .into_iter() .map(|input| indices.clone().with_plan_exprs(&plan, input.schema())) .collect::<Result<_>>()? }` Fix: Just passing down the requirements together with the required unnest exec columns towards the input child but I leave it up to the community/experts to tackle possible issues with some corner cases? -- 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