friendlymatthew opened a new pull request, #21094: URL: https://github.com/apache/datafusion/pull/21094
## Rationale for this change This PR adds a length guard in `subquery_alias_inner_query_and_columns` to prevent a panic when outer and inner projections have different expression counts Without this fix, optimizer passes like `CommonSubexprEliminate` can produce stacked projections where the inner projections has more exprs than the outer. The function iterates over `inner_projection.expr` by index and uses the _same_ index to access `outer_projections.expr`, causing an index oob panic This PR bails out early when the lengths don't match. This is consistent with all the other early returns in the function that reject non-matching plan shapes -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
