HappenLee commented on a change in pull request #7828: URL: https://github.com/apache/incubator-doris/pull/7828#discussion_r806712392
########## File path: be/src/vec/data_types/data_type_hll.cpp ########## @@ -76,10 +79,12 @@ int64_t DataTypeHLL::get_uncompressed_serialized_bytes(const IColumn& column) co auto allocate_content_size = 0; for (size_t i = 0; i < column.size(); ++i) { auto& hll = const_cast<HyperLogLog&>(data_column.get_element(i)); - allocate_content_size += hll.max_serialized_size(); + std::string result(hll.max_serialized_size(), '0'); + size_t actual_size = hll.serialize((uint8_t*)result.c_str()); Review comment: should not serialize two times -- 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