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/09/17 16:19:09 UTC

[GitHub] [incubator-doris] imay commented on a change in pull request #1816: v2 segment support string encode(#1766)

imay commented on a change in pull request #1816: v2 segment support string encode(#1766)
URL: https://github.com/apache/incubator-doris/pull/1816#discussion_r325260234
 
 

 ##########
 File path: be/src/olap/rowset/segment_v2/binary_dict_page.cpp
 ##########
 @@ -102,7 +102,16 @@ Slice BinaryDictPageBuilder::finish() {
     Slice data_slice = _data_page_builder->finish();
     _buffer.append(data_slice.data, data_slice.size);
     encode_fixed32_le(&_buffer[0], _encoding_type);
-    return Slice(_buffer.data(), _buffer.size());
+
+    if (_encoding_type == DICT_ENCODING) {
+        size_t dict_offset = _buffer.size();
+        Slice dictionary_page;
+        get_dictionary_page(&dictionary_page);
 
 Review comment:
   there may be memory leak. You should delete dictionary_page.data after usage

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