Skip to content

Commit

Permalink
Update dbms/src/IO/Compression/CompressionCodecFOR.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: jinhelin <linjinhe33@gmail.com>
  • Loading branch information
Lloyd-Pottiger and JinheLin committed Jun 21, 2024
1 parent 9fb1b33 commit b2b7319
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions dbms/src/IO/Compression/CompressionCodecFOR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ template <std::integral T>
UInt32 CompressionCodecFOR::compressData(const T * source, UInt32 count, char * dest)
{
assert(count > 0); // doCompressData ensure it
std::vector<T> values(count);
values.assign(source, source + count);
std::vector<T> 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<T, std::is_signed_v<T>>(values, frame_of_reference, width, dest);
Expand Down

0 comments on commit b2b7319

Please sign in to comment.