-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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 TableBuilderOptions::level and relevant changes #1335
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -199,10 +199,12 @@ int SstFileReader::ShowAllCompressionSizes(size_t block_size) { | |
if (CompressionTypeSupported(i.first)) { | ||
CompressionOptions compress_opt; | ||
std::string column_family_name; | ||
int unknown_level = -1; | ||
TableBuilderOptions tb_opts(imoptions, ikc, &block_based_table_factories, | ||
i.first, compress_opt, | ||
nullptr /* compression_dict */, | ||
false /* skip_filters */, column_family_name); | ||
false /* skip_filters */, column_family_name, | ||
unknown_level); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you think about just passing -1 directly (without using a variable) and adding a comment /* unknown level */ Something like this
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for your review, self explainable variable should be preferred to a comment. thought they are equivalent, as explained in: |
||
uint64_t file_size = CalculateCompressedTableSize(tb_opts, block_size); | ||
fprintf(stdout, "Compression: %s", i.second); | ||
fprintf(stdout, " Size: %" PRIu64 "\n", file_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.
Do you mind making
TableBuilderOptions
constructorexplicit
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.
'explicit' keyword for constructor is useful only when parameter number can be 1.
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 are right ! please ignore my comment