abp002 opened a new pull request, #27436: URL: https://github.com/apache/datafusion/pull/27436
## Which issue does this PR close? - Closes #27315. ## Rationale for this change `WindowAggExec::try_new` and `BoundedWindowAggExec::try_new` panic when the list of window expressions is empty, although both return `Result`. The physical plan decoder reaches them with a `WindowAggExecNode` that has no `window_expr`, so decoding such a plan panics instead of returning an error. ## What changes are included in this PR? Both constructors return a `Plan` error when the list is empty, before deriving the schema. The bounded constructor reuses the partition by expressions it already read instead of indexing again. ## What is the testing strategy for this PR? A unit test for each constructor. Both panic without the fix. I also checked that the 21 byte plan from the issue now returns the error when decoded. ## Are there any user-facing changes? No. An empty list was a panic before and is an error now. -- 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]
