BiteTheDDDDt commented on code in PR #10700: URL: https://github.com/apache/doris/pull/10700#discussion_r916872115
########## be/src/vec/exec/vaggregation_node.h: ########## @@ -50,13 +50,41 @@ struct AggregationMethodSerialized { Data data; Iterator iterator; bool inited = false; + std::vector<StringRef> keys; + AggregationMethodSerialized() + : _serialized_key_buffer_size(0), + _serialized_key_buffer(nullptr), + _mem_pool(new MemPool) {} - AggregationMethodSerialized() = default; + using State = ColumnsHashing::HashMethodSerialized<typename Data::value_type, Mapped, true>; template <typename Other> explicit AggregationMethodSerialized(const Other& other) : data(other.data) {} - using State = ColumnsHashing::HashMethodSerialized<typename Data::value_type, Mapped>; + void serialize_keys(const ColumnRawPtrs& key_columns, const size_t num_rows) { + size_t max_one_row_byte_size = 0; + for (const auto& column : key_columns) { + max_one_row_byte_size += column->get_max_row_byte_size(); Review Comment: Does we should consider case that some string column have few long string? This may increase a lot of memory allocation. -- 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