gaodayue commented on a change in pull request #2050: segment_v2: Support 
bitmap index build
URL: https://github.com/apache/incubator-doris/pull/2050#discussion_r347888331
 
 

 ##########
 File path: be/src/olap/rowset/segment_v2/rle_page.h
 ##########
 @@ -86,14 +86,12 @@ class RlePageBuilder : public PageBuilder {
 
     Status add(const uint8_t* vals, size_t* count) override {
         DCHECK(!_finished);
-        DCHECK_EQ(reinterpret_cast<uintptr_t>(vals) & (alignof(CppType) - 1), 
0)
-                << "Pointer passed to Add() must be naturally-aligned";
-
-        const CppType* new_vals = reinterpret_cast<const CppType*>(vals);
+        auto new_vals = reinterpret_cast<const CppType*>(vals);
         for (int i = 0; i < *count; ++i) {
-            _rle_encoder->Put(new_vals[i]);
+            CppType value;
+            memcpy(&value, &new_vals[i], SIZE_OF_TYPE);
 
 Review comment:
   ok

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to