diff options
author | melkov <melkov@yandex-team.com> | 2024-08-02 23:39:10 +0300 |
---|---|---|
committer | melkov <melkov@yandex-team.com> | 2024-08-02 23:48:11 +0300 |
commit | 9fc72f6c2ac91a3cc867ee7b76e6222b0fda72f0 (patch) | |
tree | 1e8f65264eed5b697e889bd75b87c71738633d1a | |
parent | 2610922a0ebe85795934f2695e09392bc900260a (diff) | |
download | ydb-9fc72f6c2ac91a3cc867ee7b76e6222b0fda72f0.tar.gz |
YT-22414: Use TRange constructor directly instead of MakeRange
* Use TMutableRange instead of MakeMutableRange.
No functionality changes expected; [nodiff:caesar]
21be7d7457955cef67f2d8ca9aa00abd30dd58f1
20 files changed, 61 insertions, 61 deletions
diff --git a/yt/yt/client/api/rpc_proxy/client_impl.cpp b/yt/yt/client/api/rpc_proxy/client_impl.cpp index f40496f065c..a854a959fcc 100644 --- a/yt/yt/client/api/rpc_proxy/client_impl.cpp +++ b/yt/yt/client/api/rpc_proxy/client_impl.cpp @@ -343,7 +343,7 @@ TFuture<void> TClient::ReshardTable( for (const auto& pivotKey : pivotKeys) { keys.push_back(pivotKey); } - writer->WriteRowset(MakeRange(keys)); + writer->WriteRowset(TRange(keys)); req->Attachments() = writer->Finish(); ToProto(req->mutable_mutating_options(), options); diff --git a/yt/yt/client/api/rpc_proxy/transaction_impl.cpp b/yt/yt/client/api/rpc_proxy/transaction_impl.cpp index 3aef87b49cc..a5ed64fa5ce 100644 --- a/yt/yt/client/api/rpc_proxy/transaction_impl.cpp +++ b/yt/yt/client/api/rpc_proxy/transaction_impl.cpp @@ -441,7 +441,7 @@ void TTransaction::ModifyRows( req->Attachments() = SerializeRowset( nameTable, - MakeRange(rows), + TRange(rows), req->mutable_rowset_descriptor()); TFuture<void> future; @@ -571,7 +571,7 @@ TFuture<TPushQueueProducerResult> TTransaction::PushQueueProducer( req->Attachments() = SerializeRowset( nameTable, - MakeRange(rows), + TRange(rows), req->mutable_rowset_descriptor()); return req->Invoke().Apply(BIND([] (const TApiServiceProxy::TRspPushQueueProducerPtr& rsp) { diff --git a/yt/yt/client/arrow/arrow_row_stream_encoder.cpp b/yt/yt/client/arrow/arrow_row_stream_encoder.cpp index 5413729fdc1..23a06a45b71 100644 --- a/yt/yt/client/arrow/arrow_row_stream_encoder.cpp +++ b/yt/yt/client/arrow/arrow_row_stream_encoder.cpp @@ -189,7 +189,7 @@ struct TRecordBatchSerializationContext final template <class T> TMutableRange<T> GetTypedValues(TMutableRef ref) { - return MakeMutableRange( + return TMutableRange( reinterpret_cast<T*>(ref.Begin()), reinterpret_cast<T*>(ref.End())); } @@ -1089,7 +1089,7 @@ private: auto [recordBatchOffset, bodySize, bodyWriter] = SerializeRecordBatch( &flatbufBuilder, typedColumn.Column->ValueCount, - MakeRange({typedColumn})); + TRange({typedColumn})); auto dictionaryBatchOffset = org::apache::arrow::flatbuf::CreateDictionaryBatch( flatbufBuilder, diff --git a/yt/yt/client/table_client/key.cpp b/yt/yt/client/table_client/key.cpp index 984dc7d5921..7ba78aa88ed 100644 --- a/yt/yt/client/table_client/key.cpp +++ b/yt/yt/client/table_client/key.cpp @@ -138,7 +138,7 @@ void Serialize(const TKey& key, IYsonConsumer* consumer) { if (key) { BuildYsonFluently(consumer) - .DoListFor(MakeRange(key.Begin(), key.End()), [&] (TFluentList fluent, const TUnversionedValue& value) { + .DoListFor(TRange(key.Begin(), key.End()), [&] (TFluentList fluent, const TUnversionedValue& value) { fluent .Item() .Value(value); diff --git a/yt/yt/client/table_client/key_bound.cpp b/yt/yt/client/table_client/key_bound.cpp index 3274df5ce2f..e02b894afd9 100644 --- a/yt/yt/client/table_client/key_bound.cpp +++ b/yt/yt/client/table_client/key_bound.cpp @@ -421,7 +421,7 @@ TKeyBound KeyBoundFromLegacyRow(TUnversionedRow row, bool isUpper, int keyLength auto [prefixLength, isInclusive] = GetBoundPrefixAndInclusiveness(row, isUpper, keyLength); YT_VERIFY(prefixLength <= static_cast<int>(row.GetCount())); - row = rowBuffer->CaptureRow(MakeRange(row.Begin(), prefixLength)); + row = rowBuffer->CaptureRow(TRange(row.Begin(), prefixLength)); return TKeyBound::FromRow( row, @@ -480,7 +480,7 @@ TKeyBound ShortenKeyBound(TKeyBound keyBound, int length, const TRowBufferPtr& r // If we do perform shortening, resulting key bound is going to be inclusive despite the original inclusiveness. auto result = TKeyBound::FromRowUnchecked( - rowBuffer->CaptureRow(MakeRange(keyBound.Prefix.Begin(), length)), + rowBuffer->CaptureRow(TRange(keyBound.Prefix.Begin(), length)), /* isInclusive */ true, keyBound.IsUpper); diff --git a/yt/yt/client/table_client/unittests/columnar_ut.cpp b/yt/yt/client/table_client/unittests/columnar_ut.cpp index 35e25ecd99e..e095d4f63fc 100644 --- a/yt/yt/client/table_client/unittests/columnar_ut.cpp +++ b/yt/yt/client/table_client/unittests/columnar_ut.cpp @@ -24,7 +24,7 @@ TEST(TBuildValidityBitmapFromDictionaryIndexesWithZeroNullTest, LessThanByte) std::array<ui32, 6> indexes{0, 0, 1, 3, 4, 0}; ui8 result; BuildValidityBitmapFromDictionaryIndexesWithZeroNull( - MakeRange(indexes), + TRange(indexes), TMutableRef(&result, 1)); EXPECT_EQ(0x1c, result); } @@ -37,7 +37,7 @@ TEST(TBuildValidityBitmapFromDictionaryIndexesWithZeroNullTest, TenBytes) } std::array<ui8, indexes.size() / 8> result; BuildValidityBitmapFromDictionaryIndexesWithZeroNull( - MakeRange(indexes), + TRange(indexes), TMutableRef(&result, result.size())); for (int i = 0; i < std::ssize(result); ++i) { EXPECT_EQ(0xaa, result[i]); @@ -52,7 +52,7 @@ TEST(TBuildValidityBitmapFromDictionaryIndexesWithZeroNullTest, ManyBits) } std::array<ui8, indexes.size() / 8 + 1> result; BuildValidityBitmapFromDictionaryIndexesWithZeroNull( - MakeRange(indexes), + TRange(indexes), TMutableRef(&result, result.size())); for (int i = 0; i < std::ssize(result) - 1; ++i) { EXPECT_EQ(0xaa, result[i]); @@ -74,8 +74,8 @@ TEST(TBuildDictionaryIndexesFromDictionaryIndexesWithZeroNullTest, NonEmpty) std::array<ui32, 6> indexes{0, 1, 2, 3, 4, 5}; std::array<ui32, indexes.size()> result; BuildDictionaryIndexesFromDictionaryIndexesWithZeroNull( - MakeRange(indexes), - MakeMutableRange(result)); + TRange(indexes), + TMutableRange(result)); for (int i = 1; i < std::ssize(result); ++i) { EXPECT_EQ(indexes[i] - 1, result[i]); } @@ -91,7 +91,7 @@ TEST(TCountNullsInDictionaryIndexesWithZeroNullTest, Empty) TEST(TCountNullsInDictionaryIndexesWithZeroNullTest, NonEmpty) { std::array<ui32, 6> indexes{0, 1, 2, 0, 4, 5}; - EXPECT_EQ(2, CountNullsInDictionaryIndexesWithZeroNull(MakeRange(indexes))); + EXPECT_EQ(2, CountNullsInDictionaryIndexesWithZeroNull(TRange(indexes))); } //////////////////////////////////////////////////////////////////////////////// @@ -217,7 +217,7 @@ TEST(TTranslateRleIndexTest, CheckAll) { std::array<ui64, 8> rleIndexes{0, 1, 3, 10, 11, 15, 20, 21}; for (ui64 i = 0; i < rleIndexes[rleIndexes.size() - 1] + 10; ++i) { - auto j = TranslateRleIndex(MakeRange(rleIndexes), i); + auto j = TranslateRleIndex(TRange(rleIndexes), i); EXPECT_LE(rleIndexes[j], i); if (j < std::ssize(rleIndexes) - 1) { EXPECT_LT(i, rleIndexes[j + 1]); @@ -291,7 +291,7 @@ TEST_F(TDecodeStringsTest, Single) { std::vector<ui32> result; for (int index = 0; index <= std::ssize(Offsets); ++index) { - result.push_back(DecodeStringOffset(MakeRange(Offsets), AvgLength, index)); + result.push_back(DecodeStringOffset(TRange(Offsets), AvgLength, index)); } EXPECT_EQ(Expected, result); } @@ -301,10 +301,10 @@ TEST_F(TDecodeStringsTest, Multiple) for (int i = 0; i <= std::ssize(Offsets); ++i) { for (int j = i; j <= std::ssize(Offsets); ++j) { std::vector<ui32> result(j - i + 1); - DecodeStringOffsets(MakeRange(Offsets), AvgLength, i, j, MakeMutableRange(result)); + DecodeStringOffsets(TRange(Offsets), AvgLength, i, j, TMutableRange(result)); std::vector<ui32> expected; for (int k = i; k <= j; ++k) { - expected.push_back(Expected[k] - DecodeStringOffset(MakeRange(Offsets), AvgLength, i)); + expected.push_back(Expected[k] - DecodeStringOffset(TRange(Offsets), AvgLength, i)); } EXPECT_EQ(expected, result); } @@ -317,11 +317,11 @@ TEST_F(TDecodeStringsTest, PointersAndLengths) std::vector<const char*> strings(Offsets.size()); std::vector<i32> lengths(Offsets.size()); DecodeStringPointersAndLengths( - MakeRange(Offsets), + TRange(Offsets), AvgLength, TRef(chars.data(), chars.size()), - MakeMutableRange(strings), - MakeMutableRange(lengths)); + TMutableRange(strings), + TMutableRange(lengths)); for (int i = 0; i < std::ssize(Offsets); ++i) { EXPECT_EQ(Expected[i], strings[i] - chars.data()); EXPECT_EQ(static_cast<ssize_t>(Expected[i + 1] - Expected[i]), lengths[i]); @@ -354,8 +354,8 @@ TEST_P(TDecodeNullsFromRleDictionaryIndexesWithZeroNullTest, ValidityBitmap) auto [startIndex, endIndex] = GetParam(); std::vector<ui8> bitmap(GetBitmapByteSize(endIndex - startIndex)); BuildValidityBitmapFromRleDictionaryIndexesWithZeroNull( - MakeRange(DictionaryIndexes), - MakeRange(RleIndexes), + TRange(DictionaryIndexes), + TRange(RleIndexes), startIndex, endIndex, TMutableRef(bitmap.data(), bitmap.size())); @@ -370,11 +370,11 @@ TEST_P(TDecodeNullsFromRleDictionaryIndexesWithZeroNullTest, NullBytemap) auto [startIndex, endIndex] = GetParam(); std::vector<ui8> bytemap(endIndex - startIndex); BuildNullBytemapFromRleDictionaryIndexesWithZeroNull( - MakeRange(DictionaryIndexes), - MakeRange(RleIndexes), + TRange(DictionaryIndexes), + TRange(RleIndexes), startIndex, endIndex, - MakeMutableRange(bytemap)); + TMutableRange(bytemap)); for (int i = startIndex; i < endIndex; ++i) { EXPECT_TRUE(bytemap[i - startIndex] == 0 || bytemap[i - startIndex] == 1); EXPECT_EQ(Expected[i], bytemap[i - startIndex] == 0) @@ -413,11 +413,11 @@ TEST_P(TBuildDictionaryIndexesFromRleDictionaryIndexesWithZeroNullTest, CheckAll auto [startIndex, endIndex] = GetParam(); std::vector<ui32> result(endIndex - startIndex); BuildDictionaryIndexesFromRleDictionaryIndexesWithZeroNull( - MakeRange(DictionaryIndexes), - MakeRange(RleIndexes), + TRange(DictionaryIndexes), + TRange(RleIndexes), startIndex, endIndex, - MakeMutableRange(result)); + TMutableRange(result)); for (int i = startIndex; i < endIndex; ++i) { EXPECT_EQ(Expected[i], result[i - startIndex]) << "i = " << i; @@ -449,10 +449,10 @@ TEST_P(TBuildIotaDictionaryIndexesFromRleIndexesTest, CheckAll) auto [startIndex, endIndex, expected] = GetParam(); std::vector<ui32> result(endIndex - startIndex); BuildIotaDictionaryIndexesFromRleIndexes( - MakeRange(RleIndexes), + TRange(RleIndexes), startIndex, endIndex, - MakeMutableRange(result)); + TMutableRange(result)); EXPECT_EQ(expected, result); } @@ -476,7 +476,7 @@ class TCountNullsInDictionaryIndexesWithZeroNullTest TEST_P(TCountNullsInDictionaryIndexesWithZeroNullTest, CheckAll) { const auto& [indexes, expected] = GetParam(); - EXPECT_EQ(expected, CountNullsInDictionaryIndexesWithZeroNull(MakeRange(indexes))); + EXPECT_EQ(expected, CountNullsInDictionaryIndexesWithZeroNull(TRange(indexes))); } INSTANTIATE_TEST_SUITE_P( @@ -502,7 +502,7 @@ protected: TEST_P(TCountOnesInRleBitmapTest, CheckAll) { auto [startIndex, endIndex, expected] = GetParam(); - EXPECT_EQ(expected, CountOnesInRleBitmap(TRef(&Bitmap, 1), MakeRange(RleIndexes), startIndex, endIndex)); + EXPECT_EQ(expected, CountOnesInRleBitmap(TRef(&Bitmap, 1), TRange(RleIndexes), startIndex, endIndex)); } INSTANTIATE_TEST_SUITE_P( @@ -543,7 +543,7 @@ TEST_P(TDecodeNullsFromRleNullBitmapTest, ValidityBitmap) std::vector<ui8> bitmap(GetBitmapByteSize(endIndex - startIndex)); BuildValidityBitmapFromRleNullBitmap( TRef(&Bitmap, 1), - MakeRange(RleIndexes), + TRange(RleIndexes), startIndex, endIndex, TMutableRef(bitmap.data(), bitmap.size())); @@ -559,10 +559,10 @@ TEST_P(TDecodeNullsFromRleNullBitmapTest, NullBytemap) std::vector<ui8> bytemap(endIndex - startIndex); BuildNullBytemapFromRleNullBitmap( TRef(&Bitmap, 1), - MakeRange(RleIndexes), + TRange(RleIndexes), startIndex, endIndex, - MakeMutableRange(bytemap)); + TMutableRange(bytemap)); for (int i = startIndex; i < endIndex; ++i) { EXPECT_TRUE(bytemap[i - startIndex] == 0 || bytemap[i - startIndex] == 1); EXPECT_EQ(Expected[i], bytemap[i - startIndex] == 0) @@ -614,7 +614,7 @@ TEST_P(TDecodeBytemapFromBitmapTest, CheckAll) TRef(Bitmap.data(), Bitmap.size()), startIndex, endIndex, - MakeMutableRange(bytemap)); + TMutableRange(bytemap)); for (int i = startIndex; i < endIndex; ++i) { EXPECT_TRUE(bytemap[i - startIndex] == 0 || bytemap[i - startIndex] == 1); EXPECT_EQ(Expected[i], bytemap[i - startIndex]) @@ -661,7 +661,7 @@ protected: for (int i = 0; i < std::ssize(Offsets); ++i) { auto [startOffset, endOffset] = DecodeStringRange( - MakeRange(Offsets), + TRange(Offsets), AvgLength, i); Lengths.push_back(endOffset - startOffset); @@ -681,18 +681,18 @@ TEST_P(TCountTotalStringLengthInRleDictionaryIndexesWithZeroNullTest, CheckAll) auto [startIndex, endIndex] = GetParam(); auto actual = CountTotalStringLengthInRleDictionaryIndexesWithZeroNull( - MakeRange(DictionaryIndexes), - MakeRange(RleIndexes), - MakeRange(Lengths), + TRange(DictionaryIndexes), + TRange(RleIndexes), + TRange(Lengths), startIndex, endIndex); i64 expected = 0; for (int i = startIndex; i < endIndex; ++i) { - int j = TranslateRleIndex(MakeRange(RleIndexes), i); + int j = TranslateRleIndex(TRange(RleIndexes), i); auto k = DictionaryIndexes[j]; if (k != 0) { - auto [startOffset, endOffset] = DecodeStringRange(MakeRange(Offsets), AvgLength, k - 1); + auto [startOffset, endOffset] = DecodeStringRange(TRange(Offsets), AvgLength, k - 1); expected += (endOffset - startOffset); } } diff --git a/yt/yt/client/table_client/unittests/helpers/helpers.h b/yt/yt/client/table_client/unittests/helpers/helpers.h index ef17b4cae35..8b917a16e62 100644 --- a/yt/yt/client/table_client/unittests/helpers/helpers.h +++ b/yt/yt/client/table_client/unittests/helpers/helpers.h @@ -69,7 +69,7 @@ void CheckSchemalessResult( ASSERT_LE(std::ssize(actual), options.MaxRowsPerRead); CheckSchemalessResult( - MakeRange(expected).Slice(offset, std::min(expected.size(), offset + actual.size())), + TRange(expected).Slice(offset, std::min(expected.size(), offset + actual.size())), actual, keyColumnCount); offset += actual.size(); @@ -91,7 +91,7 @@ void AppendVector(std::vector<T>* data, const std::vector<T> toAppend) template <class T> TRange<T> GetTypedData(const NTableClient::IUnversionedColumnarRowBatch::TValueBuffer& buffer) { - return MakeRange( + return TRange( reinterpret_cast<const T*>(buffer.Data.Begin()), reinterpret_cast<const T*>(buffer.Data.End())); } diff --git a/yt/yt/client/table_client/unversioned_row.cpp b/yt/yt/client/table_client/unversioned_row.cpp index 24603024a99..e3303daaf4a 100644 --- a/yt/yt/client/table_client/unversioned_row.cpp +++ b/yt/yt/client/table_client/unversioned_row.cpp @@ -1633,7 +1633,7 @@ std::pair<TSharedRange<TUnversionedRow>, i64> CaptureRowsImpl( return { MakeSharedRange( - MakeRange(capturedRows, rows.Size()), + TRange(capturedRows, rows.Size()), std::move(buffer.ReleaseHolder())), bufferSize }; diff --git a/yt/yt/client/table_client/value_consumer.cpp b/yt/yt/client/table_client/value_consumer.cpp index 630f849f97c..b6865a4c68c 100644 --- a/yt/yt/client/table_client/value_consumer.cpp +++ b/yt/yt/client/table_client/value_consumer.cpp @@ -373,7 +373,7 @@ void TWritingValueConsumer::OnMyValue(const TUnversionedValue& value) void TWritingValueConsumer::OnEndRow() { - auto row = RowBuffer_->CaptureRow(MakeRange(Values_), false); + auto row = RowBuffer_->CaptureRow(TRange(Values_), false); Values_.clear(); Rows_.push_back(row); diff --git a/yt/yt/client/table_client/wire_protocol.cpp b/yt/yt/client/table_client/wire_protocol.cpp index 1fab79620ad..6bb5446eca2 100644 --- a/yt/yt/client/table_client/wire_protocol.cpp +++ b/yt/yt/client/table_client/wire_protocol.cpp @@ -392,7 +392,7 @@ private: return lhs.Id < rhs.Id; }); - return MakeRange(PooledValues_); + return TRange(PooledValues_); } void UnsafeWriteNullBitmap(TUnversionedValueRange values) diff --git a/yt/yt/client/unittests/farm_fingerprint_stability_ut.cpp b/yt/yt/client/unittests/farm_fingerprint_stability_ut.cpp index 37f42a529cc..421e8985ff4 100644 --- a/yt/yt/client/unittests/farm_fingerprint_stability_ut.cpp +++ b/yt/yt/client/unittests/farm_fingerprint_stability_ut.cpp @@ -21,7 +21,7 @@ TEST_P(TFarmHashTest, TFarmHashUnversionedValueTest) const auto& params = GetParam(); std::array<TUnversionedValue, 2> values{std::get<0>(params), std::get<1>(params)}; - auto valueRange = MakeRange(values); + auto valueRange = TRange(values); auto expected1 = std::get<2>(params); auto expected2 = std::get<3>(params); diff --git a/yt/yt/core/concurrency/new_fair_share_thread_pool.cpp b/yt/yt/core/concurrency/new_fair_share_thread_pool.cpp index 3f97d725254..d27a1460599 100644 --- a/yt/yt/core/concurrency/new_fair_share_thread_pool.cpp +++ b/yt/yt/core/concurrency/new_fair_share_thread_pool.cpp @@ -1117,7 +1117,7 @@ private: } // Schedule other actions. - for (int threadIndex : MakeRange(threadIds.data(), requestCount)) { + for (int threadIndex : TRange(threadIds.data(), requestCount)) { if (threadRequests[threadIndex]) { if (otherActionCount > 0) { ServeBeginExecute(&ThreadStates_[threadIndex], currentInstant, std::move(OtherActions_[--otherActionCount])); diff --git a/yt/yt/core/logging/unittests/logging_ut.cpp b/yt/yt/core/logging/unittests/logging_ut.cpp index 2d14f8235d0..5461c865b7c 100644 --- a/yt/yt/core/logging/unittests/logging_ut.cpp +++ b/yt/yt/core/logging/unittests/logging_ut.cpp @@ -1204,7 +1204,7 @@ protected: void LogLongMessages() { for (int i = 0; i < N; ++i) { - YT_LOG_INFO("%v", MakeRange(Chunks_.data(), Chunks_.data() + i)); + YT_LOG_INFO("%v", TRange(Chunks_.data(), Chunks_.data() + i)); } } @@ -1215,7 +1215,7 @@ protected: auto lines = ReadPlainTextEvents(fileName); EXPECT_EQ(N, std::ssize(lines)); for (int i = 0; i < N; ++i) { - auto expected = Format("%v", MakeRange(Chunks_.data(), Chunks_.data() + i)); + auto expected = Format("%v", TRange(Chunks_.data(), Chunks_.data() + i)); auto actual = lines[i]; EXPECT_NE(TString::npos, actual.find(expected)); } diff --git a/yt/yt/core/misc/bit_packed_unsigned_vector-inl.h b/yt/yt/core/misc/bit_packed_unsigned_vector-inl.h index 83df7d6708a..d1abbbbd0a2 100644 --- a/yt/yt/core/misc/bit_packed_unsigned_vector-inl.h +++ b/yt/yt/core/misc/bit_packed_unsigned_vector-inl.h @@ -154,7 +154,7 @@ inline size_t TBitPackedUnsignedVectorReader<T, Scan>::GetByteSize() const template <class T, bool Scan> TRange<T> TBitPackedUnsignedVectorReader<T, Scan>::GetData() const { - return MakeRange(Values_, Values_ + Size_); + return TRange(Values_, Values_ + Size_); } template <class T, bool Scan> diff --git a/yt/yt/core/misc/crash_handler.cpp b/yt/yt/core/misc/crash_handler.cpp index 0dcfd437546..af00c512277 100644 --- a/yt/yt/core/misc/crash_handler.cpp +++ b/yt/yt/core/misc/crash_handler.cpp @@ -85,7 +85,7 @@ Y_NO_INLINE TStackTrace GetStackTrace(TStackTraceBuffer* buffer) #endif return NBacktrace::GetBacktrace( &cursor, - MakeMutableRange(*buffer), + TMutableRange(*buffer), /*framesToSkip*/ 2); } @@ -518,7 +518,7 @@ void CrashSignalHandler(int /*signal*/, siginfo_t* si, void* uc) { std::array<const void*, 1> frames{NDetail::GetPC(uc)}; NBacktrace::SymbolizeBacktrace( - MakeRange(frames), + TRange(frames), [] (TStringBuf info) { info.SkipPrefix(" 1. "); WriteToStderr(info); diff --git a/yt/yt/core/misc/unittests/bit_packed_integer_vector_ut.cpp b/yt/yt/core/misc/unittests/bit_packed_integer_vector_ut.cpp index eaa209a13ba..ba53a942b41 100644 --- a/yt/yt/core/misc/unittests/bit_packed_integer_vector_ut.cpp +++ b/yt/yt/core/misc/unittests/bit_packed_integer_vector_ut.cpp @@ -21,7 +21,7 @@ size_t Compress(const std::vector<T> &data, std::vector<ui64> *buffer) // NB: initialize with zeros! buffer->resize(size, 0); - return BitPackUnsignedVector(MakeRange(data), maxValue, buffer->data()); + return BitPackUnsignedVector(TRange(data), maxValue, buffer->data()); } template <class T, class TReader> diff --git a/yt/yt/core/rpc/client.cpp b/yt/yt/core/rpc/client.cpp index acd67934f35..2dbc67f888a 100644 --- a/yt/yt/core/rpc/client.cpp +++ b/yt/yt/core/rpc/client.cpp @@ -619,7 +619,7 @@ void TClientResponse::Deserialize(TSharedRefArray responseMessage) THROW_ERROR_EXCEPTION(NRpc::EErrorCode::ProtocolError, "Error deserializing response body"); } - auto compressedAttachments = MakeRange(ResponseMessage_.Begin() + 2, ResponseMessage_.End()); + auto compressedAttachments = TRange(ResponseMessage_.Begin() + 2, ResponseMessage_.End()); auto memoryUsageTracker = ClientContext_->GetMemoryUsageTracker(); if (attachmentCodecId == NCompression::ECodec::None) { diff --git a/yt/yt/library/backtrace_introspector/introspect.cpp b/yt/yt/library/backtrace_introspector/introspect.cpp index 1f6084549ee..cfbd24a2461 100644 --- a/yt/yt/library/backtrace_introspector/introspect.cpp +++ b/yt/yt/library/backtrace_introspector/introspect.cpp @@ -162,7 +162,7 @@ void FormatBacktrace(TStringBuilder* builder, const std::vector<const void*>& ba if (!backtrace.empty()) { builder->AppendString("Backtrace:\n"); SymbolizeBacktrace( - MakeRange(backtrace), + TRange(backtrace), [&] (TStringBuf str) { builder->AppendFormat(" %v", str); }); diff --git a/yt/yt/library/formats/arrow_writer.cpp b/yt/yt/library/formats/arrow_writer.cpp index 511964738f3..e540c155335 100644 --- a/yt/yt/library/formats/arrow_writer.cpp +++ b/yt/yt/library/formats/arrow_writer.cpp @@ -275,7 +275,7 @@ struct TRecordBatchSerializationContext final template <class T> TMutableRange<T> GetTypedValues(TMutableRef ref) { - return MakeMutableRange( + return TMutableRange( reinterpret_cast<T*>(ref.Begin()), reinterpret_cast<T*>(ref.End())); } @@ -1355,7 +1355,7 @@ private: auto [recordBatchOffset, bodySize, bodyWriter] = SerializeRecordBatch( &flatbufBuilder, typedColumn.Column->ValueCount, - MakeRange({typedColumn})); + TRange({typedColumn})); auto dictionaryBatchOffset = org::apache::arrow::flatbuf::CreateDictionaryBatch( flatbufBuilder, diff --git a/yt/yt/library/oom/oom.cpp b/yt/yt/library/oom/oom.cpp index 10b3e64e7b4..cea6b6a2c2b 100644 --- a/yt/yt/library/oom/oom.cpp +++ b/yt/yt/library/oom/oom.cpp @@ -109,7 +109,7 @@ void OomWatchdog(TOomWatchdogOptions options) rssFile, rssShmem, MakeFormattableView( - MakeRange(TCMallocStats), + TRange(TCMallocStats), [&] (auto* builder, auto metric) { auto value = tcmalloc::MallocExtension::GetNumericProperty(metric); builder->AppendFormat("%v: %v", metric, value); |