aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/histogram/adaptive/block_histogram.cpp
diff options
context:
space:
mode:
authorilnurkh <ilnurkh@yandex-team.com>2023-10-09 23:39:40 +0300
committerilnurkh <ilnurkh@yandex-team.com>2023-10-09 23:57:14 +0300
commite601ca03f859335d57ecff2e5aa6af234b6052ed (patch)
treede519a847e58a1b3993fcbfe05ff44cc946a3e24 /library/cpp/histogram/adaptive/block_histogram.cpp
parentbbf2b6878af3854815a2c0ecb07a687071787639 (diff)
downloadydb-e601ca03f859335d57ecff2e5aa6af234b6052ed.tar.gz
Y_VERIFY->Y_ABORT_UNLESS at ^l
https://clubs.at.yandex-team.ru/arcadia/29404
Diffstat (limited to 'library/cpp/histogram/adaptive/block_histogram.cpp')
-rw-r--r--library/cpp/histogram/adaptive/block_histogram.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/library/cpp/histogram/adaptive/block_histogram.cpp b/library/cpp/histogram/adaptive/block_histogram.cpp
index 6586d13ff6..55337488ac 100644
--- a/library/cpp/histogram/adaptive/block_histogram.cpp
+++ b/library/cpp/histogram/adaptive/block_histogram.cpp
@@ -149,7 +149,7 @@ namespace NKiwiAggr {
histo.GetType() == HT_ADAPTIVE_WARD_HISTOGRAM ||
histo.GetType() == HT_ADAPTIVE_HISTOGRAM)
{
- Y_VERIFY(histo.FreqSize() == histo.PositionSize(), "Corrupted histo");
+ Y_ABORT_UNLESS(histo.FreqSize() == histo.PositionSize(), "Corrupted histo");
for (size_t j = 0; j < histo.FreqSize(); ++j) {
double value = histo.GetPosition(j);
double weight = histo.GetFreq(j);
@@ -204,7 +204,7 @@ namespace NKiwiAggr {
}
void TBlockHistogram::FromProto(const THistogram& histo) {
- Y_VERIFY(histo.HasType(), "Attempt to parse TBlockHistogram from THistogram protobuf with no Type field set");
+ Y_ABORT_UNLESS(histo.HasType(), "Attempt to parse TBlockHistogram from THistogram protobuf with no Type field set");
;
switch (histo.GetType()) { // check that histogram type is correct
case HT_ADAPTIVE_DISTANCE_HISTOGRAM:
@@ -286,7 +286,7 @@ namespace NKiwiAggr {
}
void TBlockHistogram::SortAndShrink(size_t intervals, bool final) {
- Y_VERIFY(intervals > 0);
+ Y_ABORT_UNLESS(intervals > 0);
if (Bins.size() <= intervals) {
return;
@@ -382,7 +382,7 @@ namespace NKiwiAggr {
ui32 a = (ui32)(bins[b].Prev() - bins);
ui32 c = (ui32)(bins[b].Next() - bins);
ui32 d = (ui32)(bins[b].Next()->Next() - bins);
- Y_VERIFY(Bins[c].second != -1);
+ Y_ABORT_UNLESS(Bins[c].second != -1);
double mass = Bins[b].second + Bins[c].second;
Bins[c].first = (Bins[b].first * Bins[b].second + Bins[c].first * Bins[c].second) / mass;
@@ -411,7 +411,7 @@ namespace NKiwiAggr {
Bins.resize(pos);
PrevSize = pos;
- Y_VERIFY(pos == intervals);
+ Y_ABORT_UNLESS(pos == intervals);
}
double TBlockHistogram::GetSumInRange(double leftBound, double rightBound) {
@@ -528,7 +528,7 @@ namespace NKiwiAggr {
}
void TBlockWardHistogram::FastGreedyShrink(size_t intervals) {
- Y_VERIFY(intervals > 0);
+ Y_ABORT_UNLESS(intervals > 0);
if (Bins.size() <= intervals) {
return;