327561 {
327562 auto agg_func = *w_expr.aggregate;
327563 unique_ptr<FunctionData> bind_info;
327564 if (w_expr.bind_info) {
327565 bind_info = w_expr.bind_info->Copy();
327566 } else {
327567 bind_info = nullptr;
327568 }
327569
327570 vector<unique_ptr<Expression>> children;
327571 for (auto &child : w_expr.children) {
327572 auto child_copy = child->Copy();
327573 VisitExpression(&child_copy);
327574 children.push_back(std::move(child_copy));
327575 }
327576
327577 unique_ptr<Expression>
filter;
327578 if (w_expr.filter_expr) {
327579 filter = w_expr.filter_expr->Copy();
327580 VisitExpression(&filter);
327581 }
327582
327583 auto aggr_type = w_expr.distinct ? AggregateType::DISTINCT : AggregateType::NON_DISTINCT;
327584
327585 auto result = make_uniq<BoundAggregateExpression>(std::move(agg_func), std::move(children), std::move(filter),
327586 std::move(bind_info), aggr_type);
327587
327588 if (!w_expr.arg_orders.empty()) {
327589 result->order_bys = make_uniq<BoundOrderModifier>();
327590 auto &orders = result->order_bys->orders;
327591 for (auto &order : w_expr.arg_orders) {
327592 auto order_copy = order.Copy();
327593 VisitExpression(&order_copy.expression);
327594 orders.emplace_back(std::move(order_copy));
327595 }
327596 }
327597
327598 return std::move(result);
327599 }
void filter(InputArray image, InputArray kernel, OutputArray output)