-
Notifications
You must be signed in to change notification settings - Fork 600
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
Default compression setting via CS config #13203
base: main
Are you sure you want to change the base?
Default compression setting via CS config #13203
Conversation
⚪ Test history | Ya make output | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪ Test history | Ya make output | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪ Test history | Ya make output | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪ Test history | Ya make output | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
459a77f
to
2bb005a
Compare
⚪ Test history | Ya make output | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪ Test history | Ya make output | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
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.
В основном, переиспользовать уже реализованную логику валидации
if (!columnShardConfig.HasDefaultCompression() && !columnShardConfig.HasDefaultCompressionLevel()) { | ||
return EValidationResult::Ok; | ||
} | ||
if (!columnShardConfig.HasDefaultCompression() && columnShardConfig.HasDefaultCompressionLevel()) { |
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.
Такая же логика валидации есть в десериалайзере family. По-моему, этот код надо переиспользовать, чтобы валидация была реализована только один раз.
} | ||
std::optional<arrow::Compression::type> codec = NArrow::CompressionFromProto(columnShardConfig.GetDefaultCompression()); | ||
if (!codec.has_value()) { | ||
msg.push_back("ColumnShardConfig: Unknown compression"); |
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.
Зачем собирать сообщения об ошибках в вектор? Не будет лучше подходить TConclusionStatus: возвращается либо провал валидации и сообщение, либо успех?
if (validateDefaultCompressionResult == EValidationResult::Error) { | ||
return EValidationResult::Error; | ||
} | ||
if (msg.size() > 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.
Если в msg заранее были сообщения, то ValidateColumnShardConfig будет возвращать WARN, что, кажется, неожиданно. Зачем этот случай вообще обрабатывается?
if (!arrow::util::Codec::SupportsCompressionLevel(compression)) { | ||
return false; | ||
} | ||
if (compressionLevel.has_value()) { |
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.
Кажется, этот код дублируется в десериализайзере family. Его можно переиспользовать?
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.
В основном, переиспользовать логику валидации
Changelog entry
Default compression setting via CS config and its validation
Changelog category