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, I'll add the TODO to PageBuilder

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to