You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
InvalidOperationError: window expression not allowed in aggregation
Is there any particular reason why this is not permitted? Maybe related with how polars decide to plan the expression? Are you planning to enable chained aggregations in the future or it's not possible?
The text was updated successfully, but these errors were encountered:
Is there any particular reason why this is not permitted?
Nested aggregations / window expressions are really hard, and almost impossible to do efficiently in general. We would of course like to support them but to do them right would take a lot of engineering effort, and still would leave it easy to write inefficient queries.
Note that what you wrote isn't a "chained" aggregation, it is a nested one. I don't think we have any plans of changing the semantics of our expression syntax to make this "chained" in some way, you'll have to do it in multiple select/with_column expressions.
Description
Following #14361 and #12051 I would like to do nested aggregations into the same expression but this is not permitted, for example:
InvalidOperationError: window expression not allowed in aggregation
Is there any particular reason why this is not permitted? Maybe related with how polars decide to plan the expression? Are you planning to enable chained aggregations in the future or it's not possible?
The text was updated successfully, but these errors were encountered: