Skip to content

Commit

Permalink
Compression: enable lightweight temporarily (#9416)
Browse files Browse the repository at this point in the history
close #8982

Compression: enable lightweight temporarily

Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>

Co-authored-by: JaySon <tshent@qq.com>
Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Sep 11, 2024
1 parent 1be6569 commit 305dba4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dbms/src/IO/Compression/CompressionCodecLightweight.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class CompressionCodecLightweight : public ICompressionCodec
{
public:
explicit IntegerCompressContext(int round_count_)
: round_count(round_count_)
: round_count(std::min(1, round_count_))
{}

template <std::integral T>
Expand Down
4 changes: 2 additions & 2 deletions dbms/src/Interpreters/Settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ struct Settings
/* Checksum and compressions */ \
M(SettingUInt64, dt_checksum_frame_size, DBMS_DEFAULT_BUFFER_SIZE, "Frame size for delta tree stable storage") \
M(SettingChecksumAlgorithm, dt_checksum_algorithm, ChecksumAlgo::XXH3, "Checksum algorithm for delta tree stable storage") \
M(SettingCompressionMethod, dt_compression_method, CompressionMethod::LZ4, "The method of data compression when writing.") \
M(SettingInt64, dt_compression_level, 1, "The compression level.") \
M(SettingCompressionMethod, dt_compression_method, CompressionMethod::Lightweight, "The method of data compression when writing.") \
M(SettingInt64, dt_compression_level, 3, "The compression level.") \
M(SettingUInt64, min_compress_block_size, DEFAULT_MIN_COMPRESS_BLOCK_SIZE, "The actual size of the block to compress, if the uncompressed data less than max_compress_block_size is no less than this value " \
"and no less than the volume of data for one mark.") \
M(SettingUInt64, max_compress_block_size, DEFAULT_MAX_COMPRESS_BLOCK_SIZE, "The maximum size of blocks of uncompressed data before compressing for writing to a table.") \
Expand Down
3 changes: 1 addition & 2 deletions dbms/src/Storages/DeltaMerge/tests/gtest_dm_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,8 @@ try
files.insert(itr.name());
}
}
ASSERT_EQ(files.size(), 3); // handle, col data and merged file
ASSERT_EQ(files.size(), 2); // col data and merged file
ASSERT(files.find("0.merged") != files.end());
ASSERT(files.find("%2D1.dat") != files.end());
ASSERT(files.find("1.dat") != files.end());
}

Expand Down

0 comments on commit 305dba4

Please sign in to comment.