github-actions[bot] commented on code in PR #65421:
URL: https://github.com/apache/doris/pull/65421#discussion_r3555684518


##########
be/src/core/value/bitmap_value.h:
##########
@@ -1980,23 +2439,14 @@ class BitmapValue {
                 throw Exception(ErrorCode::INTERNAL_ERROR,
                                 "bitmap value with incorrect set count, count: 
{}", count);
             }
-            _set.reserve(count);
-            for (uint8_t i = 0; i != count; ++i, src += sizeof(uint64_t)) {
-                _set.insert(decode_fixed64_le(reinterpret_cast<const 
uint8_t*>(src)));
-            }
-            if (_set.size() != count) {
+            if (!_set.read(src, count)) {
                 throw Exception(ErrorCode::INTERNAL_ERROR,

Review Comment:
   This now reads the historical SET payload with a raw copy through 
`BitmapSmallSet::read`, but the writer above still emits every value with 
`encode_fixed64_le` and the old reader used `decode_fixed64_le` for each 
element. On a big-endian BE, a persisted SET value like `1` is stored as bytes 
`01 00 00 00 00 00 00 00`, and this path would load it as `0x0100000000000000`. 
Please keep the fixed little-endian decode here, either by decoding in this 
loop before inserting into `BitmapSmallSet` or by making `BitmapSmallSet::read` 
decode the serialized payload.



-- 
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