Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Impala 2.0
-
None
-
None
Description
We hit a DCHECK failure in Compress() because output_length isn't always set. We need to set the output_length to the real output buffer size or zlib won't make any progress (or return with an error).
create table temp like tpch_text_gzip.lineitem ; set compression_codec=GZIP; set ALLOW_UNSUPPORTED_FORMATS=1; insert into temp select * from tpch_text_gzip.lineitem;
I think the fix is trivial (see below), but we should add a test case for this too.
diff --git a/be/src/util/compress.cc b/be/src/util/compress.cc index 3713626..d0f57e4 100644 --- a/be/src/util/compress.cc +++ b/be/src/util/compress.cc @@ -118,6 +118,7 @@ Status GzipCompressor::ProcessBlock(bool output_preallocated, *output_length = buffer_length_; } *output = out_buffer_; + *output_length = buffer_length_; } else if (*output_length < max_compressed_len) { return Status("GzipCompressor::ProcessBlock: output length too small"); }