diff --git a/dbms/src/IO/Compression/CompressionCodecFOR.cpp b/dbms/src/IO/Compression/CompressionCodecFOR.cpp index db3b7511bb0..55f0fadc803 100644 --- a/dbms/src/IO/Compression/CompressionCodecFOR.cpp +++ b/dbms/src/IO/Compression/CompressionCodecFOR.cpp @@ -53,8 +53,7 @@ template UInt32 CompressionCodecFOR::compressData(const T * source, UInt32 count, char * dest) { assert(count > 0); // doCompressData ensure it - std::vector values(count); - values.assign(source, source + count); + std::vector values(source, source + count); T frame_of_reference = *std::min_element(values.cbegin(), values.cend()); UInt8 width = DB::Compression::FOREncodingWidth(values, frame_of_reference); return DB::Compression::FOREncoding>(values, frame_of_reference, width, dest);