imay commented on a change in pull request #2549: fix segment size
URL: https://github.com/apache/incubator-doris/pull/2549#discussion_r361086572
##########
File path: be/src/olap/rowset/segment_v2/page_compression.cpp
##########
@@ -88,5 +88,33 @@ Status PageCompressor::compress(const std::vector<Slice>&
raw_data,
return Status::OK();
}
+Status PageCompressor::compress(const std::vector<Slice>& raw_data,
+ OwnedSlice* compressed_data, bool* compressed)
{
+ size_t uncompressed_bytes = Slice::compute_total_size(raw_data);
+ size_t max_compressed_bytes =
_codec->max_compressed_len(uncompressed_bytes);
+ _buf.resize(max_compressed_bytes + 4);
+ Slice compressed_slice(_buf.data(), max_compressed_bytes);
Review comment:
compressed_slice and compressed_data looks alike. Better to choose another
name.
----------------------------------------------------------------
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]