Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Impala 2.10.0
-
None
-
ghx-label-4
Description
Every call to RowBatch::RowBatch(..., const TRowBatch&, ...) or RowBatch::Serialize() creates a (de)compressor object. That uses the Codec::CreateCompressor() interface which returns a pointer to a Codec object, so that the virtual compression interface can be used.
However, we always use LZ4 compression, and so needlessly heap-allocate the compressor objects to get the advantage of implementation hiding which we don't actually need. We should just declare a stack-allocated LZ4 (de)compressor when needed.