TangSiyang2001 commented on code in PR #15339: URL: https://github.com/apache/doris/pull/15339#discussion_r1112116359
########## be/src/vec/aggregate_functions/aggregate_function_collect.h: ########## @@ -202,27 +266,36 @@ class AggregateFunctionCollect final } DataTypePtr get_return_type() const override { - return std::make_shared<DataTypeArray>(make_nullable(_argument_type)); + return std::make_shared<DataTypeArray>(make_nullable(return_type)); } + bool allocates_memory_in_arena() const override { return ENABLE_ARENA; } + void add(AggregateDataPtr __restrict place, const IColumn** columns, size_t row_num, Arena* arena) const override { - assert(!columns[0]->is_null_at(row_num)); - if constexpr (alloc_memory_in_arena) { - this->data(place).add(*columns[0], row_num, arena); + auto& data = this->data(place); + if constexpr (HasLimit::value) { + data.max_size = + (UInt64) static_cast<const ColumnInt32*>(columns[1])->get_element(row_num); Review Comment: > Could you please specify it further? Thanks a lot. -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org