You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2019/11/19 12:12:31 UTC

[GitHub] [incubator-doris] gaodayue commented on a change in pull request #2050: segment_v2: Support bitmap index build

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


With regards,
Apache Git Services

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