aboutsummaryrefslogtreecommitdiffstats
path: root/yt
diff options
context:
space:
mode:
authorbabenko <babenko@yandex-team.com>2024-06-09 10:48:21 +0300
committerbabenko <babenko@yandex-team.com>2024-06-09 10:56:54 +0300
commitec25b4e8449ebde3645c3851e6cbf031ea271c5d (patch)
treea13e92827fe46f6e8c0cf2cc6ad607fe67239e49 /yt
parent1f41aead77a6ea2fbc9ff48092b7bda4981bbe7a (diff)
downloadydb-ec25b4e8449ebde3645c3851e6cbf031ea271c5d.tar.gz
ssize_t -> int
374685c51b1f030e977512b9ea4442eba8c0a6ff
Diffstat (limited to 'yt')
-rw-r--r--yt/yt/client/table_client/key_bound_compressor.cpp14
-rw-r--r--yt/yt/client/table_client/key_bound_compressor.h6
2 files changed, 10 insertions, 10 deletions
diff --git a/yt/yt/client/table_client/key_bound_compressor.cpp b/yt/yt/client/table_client/key_bound_compressor.cpp
index 35b87c7190..203cefb86e 100644
--- a/yt/yt/client/table_client/key_bound_compressor.cpp
+++ b/yt/yt/client/table_client/key_bound_compressor.cpp
@@ -44,7 +44,7 @@ void TKeyBoundCompressor::InitializeMapping()
// Prepare component-wise image prefixes.
ComponentWisePrefixes_.resize(SortedKeyBounds_.size());
- for (ssize_t index = 0; index < ssize(SortedKeyBounds_); ++index) {
+ for (int index = 0; index < ssize(SortedKeyBounds_); ++index) {
ComponentWisePrefixes_[index] = RowBuffer_->AllocateUnversioned(SortedKeyBounds_[index].Prefix.GetCount());
}
@@ -55,7 +55,7 @@ void TKeyBoundCompressor::InitializeMapping()
// * >[foo], <=[foo]
// * but not >=[foo] with [foo].
for (
- ssize_t beginIndex = 0, endIndex = 0, currentImage = 0;
+ int beginIndex = 0, endIndex = 0, currentImage = 0;
beginIndex < ssize(SortedKeyBounds_);
beginIndex = endIndex, ++currentImage)
{
@@ -80,7 +80,7 @@ void TKeyBoundCompressor::InitializeMapping()
// Second, calculate component-wise images.
CalculateComponentWise(/*fromIndex*/ 0, /*toIndex*/ SortedKeyBounds_.size(), /*componentIndex*/ 0);
- for (ssize_t index = 0; index < ssize(SortedKeyBounds_); ++index) {
+ for (int index = 0; index < ssize(SortedKeyBounds_); ++index) {
const auto& keyBound = SortedKeyBounds_[index];
auto& componentWiseImage = Mapping_[keyBound].ComponentWise;
componentWiseImage.Prefix = ComponentWisePrefixes_[index];
@@ -89,13 +89,13 @@ void TKeyBoundCompressor::InitializeMapping()
}
}
-void TKeyBoundCompressor::CalculateComponentWise(ssize_t fromIndex, ssize_t toIndex, ssize_t componentIndex)
+void TKeyBoundCompressor::CalculateComponentWise(int fromIndex, int toIndex, int componentIndex)
{
if (fromIndex == toIndex || componentIndex == Comparator_.GetLength()) {
return;
}
for (
- ssize_t beginIndex = fromIndex, endIndex = fromIndex, currentImage = 0;
+ int beginIndex = fromIndex, endIndex = fromIndex, currentImage = 0;
beginIndex < toIndex;
beginIndex = endIndex, ++currentImage)
{
@@ -105,7 +105,7 @@ void TKeyBoundCompressor::CalculateComponentWise(ssize_t fromIndex, ssize_t toIn
break;
}
auto beginBound = SortedKeyBounds_[beginIndex];
- if (beginBound.Prefix.GetCount() > componentIndex) {
+ if (static_cast<int>(beginBound.Prefix.GetCount()) > componentIndex) {
break;
}
++beginIndex;
@@ -122,7 +122,7 @@ void TKeyBoundCompressor::CalculateComponentWise(ssize_t fromIndex, ssize_t toIn
break;
}
auto endBound = SortedKeyBounds_[endIndex];
- if (endBound.Prefix.GetCount() <= componentIndex) {
+ if (static_cast<int>(endBound.Prefix.GetCount()) <= componentIndex) {
break;
}
if (endBound.Prefix[componentIndex] != beginBound.Prefix[componentIndex]) {
diff --git a/yt/yt/client/table_client/key_bound_compressor.h b/yt/yt/client/table_client/key_bound_compressor.h
index 98b0bffb02..cfbe1bb759 100644
--- a/yt/yt/client/table_client/key_bound_compressor.h
+++ b/yt/yt/client/table_client/key_bound_compressor.h
@@ -52,7 +52,7 @@ public:
TImage GetImage(TKeyBound keyBound) const;
private:
- TComparator Comparator_;
+ const TComparator Comparator_;
THashSet<TKeyBound> AddedKeyBounds_;
@@ -62,10 +62,10 @@ private:
THashMap<TKeyBound, TImage> Mapping_;
bool MappingInitialized_ = false;
- TRowBufferPtr RowBuffer_ = New<TRowBuffer>();
+ const TRowBufferPtr RowBuffer_ = New<TRowBuffer>();
//! Recursive method for calculating component-wise images.
- void CalculateComponentWise(ssize_t fromIndex, ssize_t toIndex, ssize_t componentIndex);
+ void CalculateComponentWise(int fromIndex, int toIndex, int componentIndex);
};
////////////////////////////////////////////////////////////////////////////////