HappenLee commented on code in PR #12573:
URL: https://github.com/apache/doris/pull/12573#discussion_r971445477


##########
be/src/util/block_compression.h:
##########
@@ -44,20 +48,23 @@ class BlockCompressionCodec {
     // output should be preallocated, and its capacity must be large enough
     // for compressed input, which can be get through max_compressed_len 
function.
     // Size of compressed data will be set in output's size.
-    virtual Status compress(const Slice& input, Slice* output) const = 0;
+    virtual Status compress(const Slice& input, faststring* output) = 0;
 
     // Default implementation will merge input list into a big buffer and call
     // compress(Slice) to finish compression. If compression type support 
digesting
     // slice one by one, it should reimplement this function.
-    virtual Status compress(const std::vector<Slice>& input, Slice* output) 
const;
+    virtual Status compress(const std::vector<Slice>& input, size_t 
uncompressed_size,
+                            faststring* output);
 
     // Decompress input data into output, output's capacity should be large 
enough
     // for decompressed data.
     // Size of decompressed data will be set in output's size.
-    virtual Status decompress(const Slice& input, Slice* output) const = 0;
+    virtual Status decompress(const Slice& input, Slice* output) = 0;
 
     // Returns an upper bound on the max compressed length.
-    virtual size_t max_compressed_len(size_t len) const = 0;
+    virtual size_t max_compressed_len(size_t len) = 0;
+
+    virtual bool exceed_max_compress_len(size_t uncompressed_size);

Review Comment:
   seems this function do not need be virtual function



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to