Skip to content

Commit 7f6e9dd

Browse files
committed
CalculateKeyBytes fix
1 parent 1dd36c2 commit 7f6e9dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ydb/core/tx/datashard/datashard_user_db.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ NTable::EReady TDataShardUserDb::SelectRow(
4949
}
5050

5151
ui64 CalculateKeyBytes(const TArrayRef<const TRawTypeValue> key) {
52-
return std::accumulate(key.begin(), key.end(), 0, [](ui64 bytes, const TRawTypeValue& value) { return bytes + value.IsEmpty() ? 1 : value.Size(); });
52+
return std::accumulate(key.begin(), key.end(), 0ull, [](ui64 bytes, const TRawTypeValue& value) { return bytes + (value.IsEmpty() ? 1ull : value.Size()); });
5353
};
5454

5555
ui64 CalculateValueBytes(const TArrayRef<const NIceDb::TUpdateOp> ops) {
56-
return std::accumulate(ops.begin(), ops.end(), 0, [](ui64 bytes, const NIceDb::TUpdateOp& op) { return bytes + op.Value.IsEmpty() ? 1 : op.Value.Size(); });
56+
return std::accumulate(ops.begin(), ops.end(), 0ull, [](ui64 bytes, const NIceDb::TUpdateOp& op) { return bytes + (op.Value.IsEmpty() ? 1ull : op.Value.Size()); });
5757
};
5858

5959
void TDataShardUserDb::UpdateRow(

0 commit comments

Comments
 (0)