Skip to content

Commit 96e08b8

Browse files
authored
fix (#29485)
1 parent 8f09fc5 commit 96e08b8

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

ydb/core/formats/arrow/program/abstract.h

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,12 @@ class TFetchingCalculationPolicy: public IMemoryCalculationPolicy {
4848
return EStage::Fetching;
4949
}
5050
virtual ui64 GetReserveMemorySize(
51-
const ui64 blobsSize, const ui64 rawSize, const std::optional<ui32> /*limit*/, const ui32 /*recordsCount*/) const override {
52-
return std::max<ui64>(blobsSize, rawSize);
53-
// FIXME after futher memory usage investagiation
54-
// if (limit) {
55-
// return std::max<ui64>(blobsSize, rawSize * (1.0 * *limit) / recordsCount);
56-
// } else {
57-
// return std::max<ui64>(blobsSize, rawSize);
58-
// }
51+
const ui64 blobsSize, const ui64 rawSize, const std::optional<ui32> limit, const ui32 recordsCount) const override {
52+
if (limit && *limit < recordsCount) {
53+
return std::max<ui64>(blobsSize, rawSize * (1.0 * *limit) / recordsCount);
54+
} else {
55+
return std::max<ui64>(blobsSize, rawSize);
56+
}
5957
}
6058
};
6159

0 commit comments

Comments
 (0)