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 2022/05/14 01:10:14 UTC

[GitHub] [incubator-doris] yiguolei commented on a diff in pull request #9556: [bugfix](vectorized) vectorized write: invalid memory access caused by podarray resize

yiguolei commented on code in PR #9556:
URL: https://github.com/apache/incubator-doris/pull/9556#discussion_r872907806


##########
be/src/vec/olap/olap_data_convertor.cpp:
##########
@@ -222,6 +221,22 @@ Status OlapBlockDataConvertor::OlapColumnDataConvertorBitMap::convert_to_olap()
             ++bitmap_value_cur;
         }
         assert(nullmap_cur == _nullmap + _row_pos + _num_rows && slice == _slice.get_end_ptr());
+
+        slice = _slice.data();
+        raw_data = _raw_data.data();

Review Comment:
   The previous code will resize the podarray when insert a bitmap everytime, it will call resize too many times, the performance is very bad.
   Maybe we could compute the podarray size at the beginning by tranverse all bitmap value. And call resize only one time.
   Then all the slice->data do not need re calculate any more. The code will be more simple.



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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