github-actions[bot] commented on code in PR #31913: URL: https://github.com/apache/doris/pull/31913#discussion_r1528075763
########## be/src/vec/aggregate_functions/aggregate_function_collect.h: ########## @@ -21,6 +21,7 @@ #include <glog/logging.h> Review Comment: warning: 'glog/logging.h' file not found [clang-diagnostic-error] ```cpp #include <glog/logging.h> ^ ``` ########## be/src/vec/aggregate_functions/aggregate_function_collect.h: ########## @@ -417,6 +463,46 @@ } to_arr.get_offsets().push_back(to_nested_col.size()); } + + void write(BufferWritable& buf) const { + const size_t size = null_map->size(); + write_binary(size, buf); + for (size_t i = 0; i < size; i++) { + write_binary(null_map->data()[i], buf); + } + for (size_t i = 0; i < size; i++) { + write_string_binary(nested_column->get_data_at(i), buf); + } + } + void read(BufferReadable& buf) { + DCHECK(null_map); + DCHECK(null_map->empty()); + size_t size = 0; + read_binary(size, buf); + null_map->resize(size); + nested_column->reserve(size); + for (size_t i = 0; i < size; i++) { + read_binary(null_map[i], buf); + } + + StringRef s; + for (size_t i = 0; i < size; i++) { + read_string_binary(s, buf); + nested_column->insert_data(s.data, s.size); + } + } + + void merge(const Self& rhs) { Review Comment: warning: method 'merge' can be made const [readability-make-member-function-const] ```suggestion void merge(const Self& rhs) const { ``` ########## be/src/vec/aggregate_functions/aggregate_function_collect.h: ########## @@ -417,6 +463,46 @@ } to_arr.get_offsets().push_back(to_nested_col.size()); } + + void write(BufferWritable& buf) const { + const size_t size = null_map->size(); + write_binary(size, buf); + for (size_t i = 0; i < size; i++) { + write_binary(null_map->data()[i], buf); + } + for (size_t i = 0; i < size; i++) { + write_string_binary(nested_column->get_data_at(i), buf); + } + } + void read(BufferReadable& buf) { Review Comment: warning: method 'read' can be made const [readability-make-member-function-const] ```suggestion void read(BufferReadable& buf) const { ``` -- 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