Apply a window functions to extend the schema
(
self,
window_expr: impl IntoIterator<Item = impl Into<Expr>>,
)
| 1269 | |
| 1270 | /// Apply a window functions to extend the schema |
| 1271 | pub fn window( |
| 1272 | self, |
| 1273 | window_expr: impl IntoIterator<Item = impl Into<Expr>>, |
| 1274 | ) -> Result<Self> { |
| 1275 | let window_expr = normalize_cols(window_expr, &self.plan)?; |
| 1276 | validate_unique_names("Windows", &window_expr)?; |
| 1277 | Ok(Self::new(LogicalPlan::Window(Window::try_new( |
| 1278 | window_expr, |
| 1279 | self.plan, |
| 1280 | )?))) |
| 1281 | } |
| 1282 | |
| 1283 | /// Apply an aggregate: grouping on the `group_expr` expressions |
| 1284 | /// and calculating `aggr_expr` aggregates for each distinct |
no test coverage detected