zclllyybb commented on code in PR #47566:
URL: https://github.com/apache/doris/pull/47566#discussion_r1944997012


##########
be/src/util/block_compression.cpp:
##########
@@ -906,8 +919,13 @@ class ZlibBlockCompression : public BlockCompressionCodec {
         size_t input_size = input.size;
         auto zres =
                 ::uncompress2((Bytef*)output->data, &output->size, 
(Bytef*)input.data, &input_size);
-        if (zres != Z_OK) {
+        if (zres == Z_DATA_ERROR) {
             return Status::InvalidArgument("Fail to do ZLib decompress, 
error={}", zError(zres));
+        } else if (zres == Z_MEM_ERROR) {
+            return Status::MemoryLimitExceeded("Fail to do ZLib decompress, 
error={}",
+                                               zError(zres));
+        } else if (zres == Z_BUF_ERROR) {
+            return Status::InternalError("Fail to do ZLib decompress, 
error={}", zError(zres));
         }

Review Comment:
   I think here should be a cover branch of zres != Z_OK. and check other 
changes for this problem



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