-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add zstd long range option #17184
add zstd long range option #17184
Conversation
@@ -22,7 +22,7 @@ struct MergeTreeWriterSettings | |||
MergeTreeWriterSettings(const Settings & global_settings, bool can_use_adaptive_granularity_, | |||
size_t aio_threshold_, bool blocks_are_granules_size_ = false) | |||
: min_compress_block_size(global_settings.min_compress_block_size) | |||
, max_compress_block_size(global_settings.min_compress_block_size) | |||
, max_compress_block_size(global_settings.max_compress_block_size) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
src/Core/Settings.h
Outdated
@@ -33,7 +33,7 @@ class IColumn; | |||
|
|||
#define COMMON_SETTINGS(M) \ | |||
M(UInt64, min_compress_block_size, 65536, "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.", 0) \ | |||
M(UInt64, max_compress_block_size, 1048576, "The maximum size of blocks of uncompressed data before compressing for writing to a table.", 0) \ | |||
M(UInt64, max_compress_block_size, 8048576, "The maximum size of blocks of uncompressed data before compressing for writing to a table.", 0) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not change it by default, because it will slow down point queries.
currently failing fast tests are
and
|
68390c6
to
8dc7d12
Compare
8dc7d12
to
5d8869a
Compare
Is it ready for review? Can you fix the title and description then. |
updated |
5d8869a
to
0abf724
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code is good, but there is a couple of minor issues. The main request is to add a simple test that will cover your new code at least: like reading and writing with custom window log param.
if (arguments->children.size() > 1) | ||
{ | ||
const auto * window_literal = children[1]->as<ASTLiteral>(); | ||
if (!window_literal) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're not checking if this is really an integer at this point
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm, this code does the same as other compression codecs (and same what is done for first parameters in zstd codec, above)
test added |
4b0fb2f
to
72765cd
Compare
72765cd
to
4a7854d
Compare
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
add support for zstd long option for better compression of string columns to save space
Detailed description / Documentation draft:
ZSTD compression codec now takes second optional argument - window size (expressed as power of 2). If this argument is missing or specified as zero - zstd will use default window size.