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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]