Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanmorozov333 committed Feb 1, 2024
1 parent 064cece commit 7dd47e2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ydb/core/tx/columnshard/engines/predicate/range.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ bool TPKRangeFilter::IsPortionInPartialUsage(const NArrow::TReplaceKey& start, c
if (auto from = PredicateFrom.ExtractKey(indexInfo.GetPrimaryKey())) {
AFL_VERIFY(from->Size() <= start.Size());
if (PredicateFrom.IsInclude()) {
startUsage = std::is_gteq(start.ComparePartNotNull(*from, from->Size()));
startUsage = std::is_lt(start.ComparePartNotNull(*from, from->Size()));
} else {
startUsage = std::is_gt(start.ComparePartNotNull(*from, from->Size()));
startUsage = std::is_lteq(start.ComparePartNotNull(*from, from->Size()));
}
} else {
startUsage = true;
Expand All @@ -76,9 +76,9 @@ bool TPKRangeFilter::IsPortionInPartialUsage(const NArrow::TReplaceKey& start, c
if (auto to = PredicateTo.ExtractKey(indexInfo.GetPrimaryKey())) {
AFL_VERIFY(to->Size() <= end.Size());
if (PredicateTo.IsInclude()) {
endUsage = std::is_lteq(end.ComparePartNotNull(*to, to->Size()));
endUsage = std::is_gt(end.ComparePartNotNull(*to, to->Size()));
} else {
endUsage = std::is_lt(end.ComparePartNotNull(*to, to->Size()));
endUsage = std::is_gteq(end.ComparePartNotNull(*to, to->Size()));
}
} else {
endUsage = true;
Expand All @@ -87,7 +87,7 @@ bool TPKRangeFilter::IsPortionInPartialUsage(const NArrow::TReplaceKey& start, c
// AFL_ERROR(NKikimrServices::TX_COLUMNSHARD)("start", start.DebugString())("end", end.DebugString())("from", PredicateFrom.DebugString())("to", PredicateTo.DebugString())
// ("start_usage", startUsage)("end_usage", endUsage);

return endUsage ^ startUsage;
return endUsage || startUsage;
}

std::optional<NKikimr::NOlap::TPKRangeFilter> TPKRangeFilter::Build(TPredicateContainer&& from, TPredicateContainer&& to) {
Expand Down

0 comments on commit 7dd47e2

Please sign in to comment.