Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vlad-gogov committed Jan 13, 2025
1 parent c4c56e6 commit bd406a7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions ydb/core/tx/schemeshard/olap/column_families/update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,12 @@ NKikimr::TConclusion<NKikimrSchemeOp::TOlapColumn::TSerializer> ConvertFamilyDes
<< "` is not support compression level");
}
if (familyDescription.HasColumnCodecLevel()) {
int level = familyDescription.GetColumnCodecLevel();
int minLevel = NArrow::MinimumCompressionLevel(codec.value()).value();
int maxLevel = NArrow::MaximumCompressionLevel(codec.value()).value();
if (level < minLevel || level > maxLevel) {
if (!NArrow::SupportsCompressionLevel(codec.value(), familyDescription.GetColumnCodecLevel())) {
return NKikimr::TConclusionStatus::Fail(TStringBuilder()
<< "family `" << familyDescription.GetName() << "`: incorrect level for codec `"
<< NArrow::CompressionToString(familyDescription.GetColumnCodec()) << "`. expected: ["
<< minLevel << ":" << maxLevel << "]");
<< NArrow::MinimumCompressionLevel(codec.value()).value() << ":"
<< NArrow::MaximumCompressionLevel(codec.value()).value() << "]");
}
}

Expand Down

0 comments on commit bd406a7

Please sign in to comment.