| 357 | } |
| 358 | |
| 359 | window_function::window_function(prod *p, sqltype *type_constraint) |
| 360 | : value_expr(p) |
| 361 | { |
| 362 | match(); |
| 363 | aggregate = make_shared<funcall>(this, type_constraint, true); |
| 364 | type = aggregate->type; |
| 365 | partition_by.push_back(make_shared<column_reference>(this)); |
| 366 | while(d6() > 4) |
| 367 | partition_by.push_back(make_shared<column_reference>(this)); |
| 368 | |
| 369 | order_by.push_back(make_shared<column_reference>(this)); |
| 370 | while(d6() > 4) |
| 371 | order_by.push_back(make_shared<column_reference>(this)); |
| 372 | } |
| 373 | |
| 374 | bool window_function::allowed(prod *p) |
| 375 | { |