linrrzqqq commented on code in PR #70774:
URL: https://github.com/apache/doris/pull/70774#discussion_r4661699063


##########
be/src/core/data_type/data_type_bitmap.cpp:
##########
@@ -61,17 +61,12 @@ char* DataTypeBitMap::serialize(const IColumn& column, 
char* buf, int be_exec_ve
     const auto& data_column = assert_cast<const ColumnBitmap&>(*bitmap_column);
     // serialize the bitmap size array
     auto* meta_ptr = reinterpret_cast<size_t*>(buf);
-    for (size_t i = 0; i < real_need_copy_num; ++i) {
-        auto& bitmap = data_column.get_element(i);
-        unaligned_store<size_t>(&meta_ptr[i], bitmap.getSizeInBytes());
-    }
-
-    // serialize each bitmap
     char* data_ptr = buf + sizeof(size_t) * real_need_copy_num;
     for (size_t i = 0; i < real_need_copy_num; ++i) {
         auto& bitmap = data_column.get_element(i);
-        bitmap.write_to(data_ptr);
-        data_ptr += unaligned_load<size_t>(&meta_ptr[i]);
+        const auto size = bitmap.write_optimized_to(data_ptr);

Review Comment:
   `get_uncompressed_serialized_bytes()` 本来就是upper-bound, hll 也是一样的行为



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to