github-actions[bot] commented on code in PR #27383:
URL: https://github.com/apache/doris/pull/27383#discussion_r1405861182


##########
be/src/util/block_compression.cpp:
##########
@@ -183,6 +185,31 @@ class Lz4BlockCompression : public BlockCompressionCodec {
     static const int32_t ACCELARATION = 1;
 };
 
+class HadoopLz4BlockCompression : public Lz4BlockCompression {
+public:
+    static HadoopLz4BlockCompression* instance() {
+        static HadoopLz4BlockCompression s_instance;
+        return &s_instance;
+    }
+    Status decompress(const Slice& input, Slice* output) override {
+        
RETURN_IF_ERROR(Decompressor::create_decompressor(CompressType::LZ4BLOCK, 
&_decompressor));
+        size_t input_bytes_read = 0;
+        size_t decompressed_len = 0;
+        size_t more_input_bytes = 0;
+        size_t more_output_bytes = 0;
+        bool stream_end = false;
+        auto st = _decompressor->decompress((uint8_t*)input.data, input.size, 
&input_bytes_read,
+                                            (uint8_t*)output->data, 
output->size, &decompressed_len,
+                                            &stream_end, &more_input_bytes, 
&more_output_bytes);
+        //try decompress use hadoopLz4 ,if failed fall back lz4.
+        return (st != Status::OK() || stream_end != true)

Review Comment:
   warning: redundant boolean literal supplied to boolean operator 
[readability-simplify-boolean-expr]
   
   ```suggestion
           return (st != Status::OK() || !stream_end)
   ```
   



-- 
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-unsubscr...@doris.apache.org

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


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

Reply via email to