msaule opened a new pull request, #24073: URL: https://github.com/apache/datafusion/pull/24073
## Which issue does this PR close? - Closes #21246. ## Rationale for this change `ProjectionExec` can currently be constructed with duplicate output aliases. This violates DataFusion's unique-column-name invariant and makes name-based physical-plan rewrites, including filter pushdown, ambiguous and capable of producing incorrect results. ## What changes are included in this PR? - Reject duplicate output column names in `ProjectionExec::try_new` with a planning error. - Add a regression test that constructs a projection with duplicate aliases and verifies the error. ## Are these changes tested? - `cargo test -p datafusion-physical-plan --lib` - `cargo clippy -p datafusion-physical-plan --all-targets --all-features -- -D warnings` ## Are there any user-facing changes? Physical-plan API users that construct a `ProjectionExec` with duplicate output aliases now receive a planning error instead of an ambiguous plan. SQL planning already enforces unique names. -- 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]
