aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormikhnenko <mikhnenko@yandex-team.com>2024-10-09 10:27:00 +0300
committermikhnenko <mikhnenko@yandex-team.com>2024-10-09 10:42:06 +0300
commitf77f95225df990636722a97078583a1b8a6727c5 (patch)
treef7a603b8b72e1e46677d5081ca09463bb5948d5c
parent1db0d996fe595d61da8ddef5f4fa54465a82a324 (diff)
downloadydb-f77f95225df990636722a97078583a1b8a6727c5.tar.gz
Use lower case for TString methods Data, Size and Empty in ysite, yt, ytech, yweb
Если вы считаете, что это pr сломал ваши тесты - смело откатываете.\ Если проблема нетривиальная - приходите в [саппорт](https://nda.ya.ru/t/a1JIzEbo78mtfQ) commit_hash:dee982cfbb70b978ace5417b4619e78212000179
-rw-r--r--yt/cpp/mapreduce/client/init.cpp2
-rw-r--r--yt/cpp/mapreduce/client/operation.cpp4
-rw-r--r--yt/cpp/mapreduce/http/http.cpp2
-rw-r--r--yt/cpp/mapreduce/http/ut/http_ut.cpp2
-rw-r--r--yt/yt/client/complex_types/uuid_text.cpp4
-rw-r--r--yt/yt/client/table_client/composite_compare.cpp4
-rw-r--r--yt/yt/client/unittests/logical_type_ut.cpp2
-rw-r--r--yt/yt/core/compression/unittests/stream_ut.cpp2
-rw-r--r--yt/yt/core/json/json_writer.cpp4
-rw-r--r--yt/yt/core/json/unittests/writer_ut.cpp4
-rw-r--r--yt/yt/core/logging/compression.cpp2
-rw-r--r--yt/yt/core/misc/coro_pipe.cpp8
-rw-r--r--yt/yt/core/misc/statistic_path.cpp4
-rw-r--r--yt/yt/core/misc/unittests/checksum_ut.cpp2
-rw-r--r--yt/yt/core/rpc/http/server.cpp4
-rw-r--r--yt/yt/core/yson/unittests/yson_parser_ut.cpp8
-rw-r--r--yt/yt/core/ytree/unittests/serialize_ut.cpp2
-rw-r--r--yt/yt/core/ytree/ypath_service.cpp2
-rw-r--r--yt/yt/library/decimal/decimal.cpp18
-rw-r--r--yt/yt/library/formats/arrow_parser.cpp4
-rw-r--r--yt/yt/library/formats/arrow_writer.cpp2
-rw-r--r--yt/yt/library/formats/skiff_writer.cpp2
-rw-r--r--yt/yt/library/formats/skiff_yson_converter-inl.h2
-rw-r--r--yt/yt/library/formats/yql_yson_converter.cpp10
-rw-r--r--yt/yt/library/quantile_digest/quantile_digest.cpp2
25 files changed, 51 insertions, 51 deletions
diff --git a/yt/cpp/mapreduce/client/init.cpp b/yt/cpp/mapreduce/client/init.cpp
index f05888befb..e55fc51388 100644
--- a/yt/cpp/mapreduce/client/init.cpp
+++ b/yt/cpp/mapreduce/client/init.cpp
@@ -159,7 +159,7 @@ void CommonInitialize(int argc, const char** argv)
}
auto logPath = TConfig::Get()->LogPath;
- auto logger = logPath.Empty() ? CreateStdErrLogger(logLevel) : CreateFileLogger(logLevel, logPath);
+ auto logger = logPath.empty() ? CreateStdErrLogger(logLevel) : CreateFileLogger(logLevel, logPath);
SetLogger(logger);
TProcessState::Get()->SetCommandLine(argc, argv);
diff --git a/yt/cpp/mapreduce/client/operation.cpp b/yt/cpp/mapreduce/client/operation.cpp
index 0d5e892214..a0d857d553 100644
--- a/yt/cpp/mapreduce/client/operation.cpp
+++ b/yt/cpp/mapreduce/client/operation.cpp
@@ -2527,8 +2527,8 @@ void TOperation::TOperationImpl::AnalyzeUnrecognizedSpec(TNode unrecognizedSpec)
YT_LOG_INFO(
"WARNING! Unrecognized spec for operation %s is not empty "
"(fields added by the YT API library are excluded): %s",
- GetGuidAsString(*Id_).Data(),
- NodeToYsonString(unrecognizedSpec).Data());
+ GetGuidAsString(*Id_).data(),
+ NodeToYsonString(unrecognizedSpec).data());
}
}
diff --git a/yt/cpp/mapreduce/http/http.cpp b/yt/cpp/mapreduce/http/http.cpp
index 987b6daf4a..f9eb8539b5 100644
--- a/yt/cpp/mapreduce/http/http.cpp
+++ b/yt/cpp/mapreduce/http/http.cpp
@@ -293,7 +293,7 @@ TString THttpHeader::GetHeaderAsString(const TString& hostName, const TString& r
result << Method << " " << GetUrl() << " HTTP/1.1\r\n";
- GetHeader(HostPort.Empty() ? hostName : HostPort, requestId, includeParameters).Get()->WriteTo(&result);
+ GetHeader(HostPort.empty() ? hostName : HostPort, requestId, includeParameters).Get()->WriteTo(&result);
if (ShouldAcceptFraming()) {
result << "X-YT-Accept-Framing: 1\r\n";
diff --git a/yt/cpp/mapreduce/http/ut/http_ut.cpp b/yt/cpp/mapreduce/http/ut/http_ut.cpp
index 0c0ab3363e..ca260841d0 100644
--- a/yt/cpp/mapreduce/http/ut/http_ut.cpp
+++ b/yt/cpp/mapreduce/http/ut/http_ut.cpp
@@ -15,7 +15,7 @@ using namespace NYT;
void WriteDataFrame(TStringBuf string, IOutputStream* stream)
{
stream->Write("\x01");
- ui32 size = string.Size();
+ ui32 size = string.size();
auto littleEndianSize = HostToLittle(size);
stream->Write(&littleEndianSize, sizeof(littleEndianSize));
stream->Write(string);
diff --git a/yt/yt/client/complex_types/uuid_text.cpp b/yt/yt/client/complex_types/uuid_text.cpp
index 02f0419932..6c2aaefa75 100644
--- a/yt/yt/client/complex_types/uuid_text.cpp
+++ b/yt/yt/client/complex_types/uuid_text.cpp
@@ -45,7 +45,7 @@ void TextYqlUuidToBytes(TStringBuf uuid, char* ptr)
}
};
- const char* input = uuid.Data();
+ const char* input = uuid.data();
for (int i = 3; i >= 0; --i) {
*ptr++ = parseByte(input + 2 * i);
}
@@ -115,7 +115,7 @@ TGuid GuidFromBytes(TStringBuf bytes)
// https://a.yandex-team.ru/arc/trunk/arcadia/yt/yt/client/formats/skiff_yson_converter-inl.h?rev=r8579019#L124
CheckUuidSize(bytes);
- const char* ptr = bytes.Data();
+ const char* ptr = bytes.data();
auto low = InetToHost(ReadUnaligned<ui64>(ptr + sizeof(ui64)));
auto high = InetToHost(ReadUnaligned<ui64>(ptr));
diff --git a/yt/yt/client/table_client/composite_compare.cpp b/yt/yt/client/table_client/composite_compare.cpp
index 168a311a99..1ae23952a6 100644
--- a/yt/yt/client/table_client/composite_compare.cpp
+++ b/yt/yt/client/table_client/composite_compare.cpp
@@ -310,7 +310,7 @@ TFingerprint CompositeFarmHash(TYsonStringBuf value)
break;
case EYsonItemType::StringValue: {
auto string = item.UncheckedAsString();
- result = FarmFingerprint(FarmFingerprint(string.Data(), string.size()));
+ result = FarmFingerprint(FarmFingerprint(string.data(), string.size()));
break;
}
case EYsonItemType::EndOfStream:
@@ -351,7 +351,7 @@ TFingerprint CompositeFarmHash(TYsonStringBuf value)
continue;
case EYsonItemType::StringValue: {
auto string = item.UncheckedAsString();
- result = FarmFingerprint(result, FarmFingerprint(string.Data(), string.size()));
+ result = FarmFingerprint(result, FarmFingerprint(string.data(), string.size()));
continue;
}
case EYsonItemType::EndOfStream:
diff --git a/yt/yt/client/unittests/logical_type_ut.cpp b/yt/yt/client/unittests/logical_type_ut.cpp
index e3eed48de3..2435f37120 100644
--- a/yt/yt/client/unittests/logical_type_ut.cpp
+++ b/yt/yt/client/unittests/logical_type_ut.cpp
@@ -955,7 +955,7 @@ std::vector<std::vector<TString>> ParseData(TStringBuf data, int expectedFieldsC
std::vector<std::vector<TString>> result;
for (TStringBuf record : StringSplitter(noComments).SplitByString(";;")) {
record = StripString(record);
- if (record.Empty()) {
+ if (record.empty()) {
continue;
}
std::vector<TString> fields;
diff --git a/yt/yt/core/compression/unittests/stream_ut.cpp b/yt/yt/core/compression/unittests/stream_ut.cpp
index d20c788855..252a40fc7a 100644
--- a/yt/yt/core/compression/unittests/stream_ut.cpp
+++ b/yt/yt/core/compression/unittests/stream_ut.cpp
@@ -66,7 +66,7 @@ TEST(TBrotliStreamTest, IncompleteStream)
{
TString manyAs(64 * 1024, 'a');
auto compressed = Compress<TBrotliCompress>(manyAs);
- TString truncated(compressed.Data(), compressed.Size() - 1);
+ TString truncated(compressed.data(), compressed.size() - 1);
EXPECT_THROW(Decompress<TBrotliDecompress>(truncated), std::exception);
}
diff --git a/yt/yt/core/json/json_writer.cpp b/yt/yt/core/json/json_writer.cpp
index 7412002ebd..6a74bed6c2 100644
--- a/yt/yt/core/json/json_writer.cpp
+++ b/yt/yt/core/json/json_writer.cpp
@@ -202,7 +202,7 @@ void TJsonWriter::Flush()
{
auto buf = GetBuffer();
Output_->Write(buf);
- WrittenToOutputByteCount_ += buf.Size();
+ WrittenToOutputByteCount_ += buf.size();
yajl_gen_clear(Handle_);
}
@@ -288,7 +288,7 @@ void TJsonWriter::OnRaw(TStringBuf /*yson*/, NYT::NYson::EYsonType /*type*/)
ui64 TJsonWriter::GetWrittenByteCount() const
{
- return GetBuffer().Size() + WrittenToOutputByteCount_;
+ return GetBuffer().size() + WrittenToOutputByteCount_;
}
////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/json/unittests/writer_ut.cpp b/yt/yt/core/json/unittests/writer_ut.cpp
index a3468cdf48..52ed555ba3 100644
--- a/yt/yt/core/json/unittests/writer_ut.cpp
+++ b/yt/yt/core/json/unittests/writer_ut.cpp
@@ -720,7 +720,7 @@ TEST(TJsonConsumerTest, TestNodeWeightLimitAccepted)
auto consumer = CreateJsonConsumer(&outputStream, EYsonType::Node, std::move(config));
TString yson = "<\"attr\"=123>\"456\"";
- consumer->OnNodeWeightLimited(yson, yson.Size() - 1);
+ consumer->OnNodeWeightLimited(yson, yson.size() - 1);
consumer->Flush();
TString expectedOutput =
@@ -738,7 +738,7 @@ TEST(TJsonConsumerTest, TestNodeWeightLimitRejected)
auto consumer = CreateJsonConsumer(&outputStream);
TString yson = "<\"attr\"=123>\"456\"";
- consumer->OnNodeWeightLimited(yson, yson.Size());
+ consumer->OnNodeWeightLimited(yson, yson.size());
consumer->Flush();
TString expectedOutput =
diff --git a/yt/yt/core/logging/compression.cpp b/yt/yt/core/logging/compression.cpp
index 0fc42506eb..68d2623a2c 100644
--- a/yt/yt/core/logging/compression.cpp
+++ b/yt/yt/core/logging/compression.cpp
@@ -27,7 +27,7 @@ TAppendableCompressedFile::TAppendableCompressedFile(
message.AppendFormat("Truncated %v bytes due to zstd repair.\n", fileSize - OutputPosition_);
TString messageStr = message.Flush();
- Input_.Append(messageStr.Data(), messageStr.Size());
+ Input_.Append(messageStr.data(), messageStr.size());
Flush();
}
}
diff --git a/yt/yt/core/misc/coro_pipe.cpp b/yt/yt/core/misc/coro_pipe.cpp
index 3b2c504c3d..1f3426c40a 100644
--- a/yt/yt/core/misc/coro_pipe.cpp
+++ b/yt/yt/core/misc/coro_pipe.cpp
@@ -26,14 +26,14 @@ public:
return 0;
}
std::tie(PendingData_) = Coroutine_->Yield();
- if (PendingData_.Empty()) {
+ if (PendingData_.empty()) {
Finished_ = true;
*ptr = nullptr;
return 0;
}
}
- *ptr = PendingData_.Data();
- len = Min(len, PendingData_.Size());
+ *ptr = PendingData_.data();
+ len = Min(len, PendingData_.size());
PendingData_.Skip(len);
return len;
}
@@ -42,7 +42,7 @@ public:
{
if (!Finished_) {
const void* ptr;
- if (!PendingData_.Empty() || DoNext(&ptr, 1)) {
+ if (!PendingData_.empty() || DoNext(&ptr, 1)) {
THROW_ERROR_EXCEPTION("Stray data in stream");
}
}
diff --git a/yt/yt/core/misc/statistic_path.cpp b/yt/yt/core/misc/statistic_path.cpp
index e59dddcf05..58fdcbb5ea 100644
--- a/yt/yt/core/misc/statistic_path.cpp
+++ b/yt/yt/core/misc/statistic_path.cpp
@@ -10,7 +10,7 @@ namespace NYT::NStatisticPath {
TError CheckStatisticPathLiteral(const TStatisticPathType& literal)
{
- if (literal.Empty()) {
+ if (literal.empty()) {
return TError("Empty statistic path literal");
}
constexpr static TChar invalidCharacters[2]{Delimiter, 0};
@@ -158,7 +158,7 @@ TStatisticPath::const_iterator::value_type TStatisticPath::Back() const noexcept
void TStatisticPath::PopBack()
{
YT_VERIFY(!Empty());
- Path_.resize(Path_.size() - Back().Size() - 1);
+ Path_.resize(Path_.size() - Back().size() - 1);
}
////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/misc/unittests/checksum_ut.cpp b/yt/yt/core/misc/unittests/checksum_ut.cpp
index 99febad6f9..ffd2026e2b 100644
--- a/yt/yt/core/misc/unittests/checksum_ut.cpp
+++ b/yt/yt/core/misc/unittests/checksum_ut.cpp
@@ -66,7 +66,7 @@ TEST(TChecksumTest, TestStreams)
{
auto size = 0;
for (const auto& test : Cases) {
- size += test.Data.Size();
+ size += test.Data.size();
}
TBlob blob(GetRefCountedTypeCookie<TDefaultBlobTag>(), size);
diff --git a/yt/yt/core/rpc/http/server.cpp b/yt/yt/core/rpc/http/server.cpp
index cce02b7779..81a37e6edf 100644
--- a/yt/yt/core/rpc/http/server.cpp
+++ b/yt/yt/core/rpc/http/server.cpp
@@ -238,12 +238,12 @@ private:
}
const auto& url = req->GetUrl();
- if (url.Path.Size() <= BaseUrl_.Size()) {
+ if (url.Path.size() <= BaseUrl_.size()) {
return TError("Invalid URL");
}
ToProto(rpcHeader->mutable_service(), Underlying_->GetServiceId().ServiceName);
- ToProto(rpcHeader->mutable_method(), url.Path.substr(BaseUrl_.Size()));
+ ToProto(rpcHeader->mutable_method(), url.Path.substr(BaseUrl_.size()));
const auto& httpHeaders = req->GetHeaders();
diff --git a/yt/yt/core/yson/unittests/yson_parser_ut.cpp b/yt/yt/core/yson/unittests/yson_parser_ut.cpp
index bab4920a68..b07c160829 100644
--- a/yt/yt/core/yson/unittests/yson_parser_ut.cpp
+++ b/yt/yt/core/yson/unittests/yson_parser_ut.cpp
@@ -647,23 +647,23 @@ public:
const char* Begin() const
{
- return Data_[Index_].Data();
+ return Data_[Index_].data();
}
const char* Current() const
{
- return Data_[Index_].Data() + Pointer_;
+ return Data_[Index_].data() + Pointer_;
}
void Skip(size_t size)
{
Pointer_ += size;
- YT_VERIFY(Pointer_ < Data_[Index_].Size());
+ YT_VERIFY(Pointer_ < Data_[Index_].size());
}
const char* End() const
{
- return Data_[Index_].Data() + Data_[Index_].Size();
+ return Data_[Index_].data() + Data_[Index_].size();
}
void RefreshBlock()
diff --git a/yt/yt/core/ytree/unittests/serialize_ut.cpp b/yt/yt/core/ytree/unittests/serialize_ut.cpp
index 421baf9fb2..ee36997f70 100644
--- a/yt/yt/core/ytree/unittests/serialize_ut.cpp
+++ b/yt/yt/core/ytree/unittests/serialize_ut.cpp
@@ -69,7 +69,7 @@ void TestSerializationDeserializationPullParser(const TOriginal& original, EYson
auto yson = ConvertToYsonString(original);
if (ysonType != EYsonType::Node) {
auto buf = yson.AsStringBuf();
- yson = TYsonString(buf.SubString(1, buf.Size() - 2), ysonType);
+ yson = TYsonString(buf.SubString(1, buf.size() - 2), ysonType);
}
auto deserialized = PullParserConvert<TResult>(yson);
EXPECT_EQ(original, deserialized);
diff --git a/yt/yt/core/ytree/ypath_service.cpp b/yt/yt/core/ytree/ypath_service.cpp
index b5b901dcda..b078379c81 100644
--- a/yt/yt/core/ytree/ypath_service.cpp
+++ b/yt/yt/core/ytree/ypath_service.cpp
@@ -873,7 +873,7 @@ void TCachedYPathService::RebuildCache()
auto yson = WaitFor(asyncYson)
.ValueOrThrow();
- ProfilingCounters_->ByteSize.Update(yson.AsStringBuf().Size());
+ ProfilingCounters_->ByteSize.Update(yson.AsStringBuf().size());
UpdateCachedTree(ConvertToNode(yson));
} catch (const std::exception& ex) {
diff --git a/yt/yt/library/decimal/decimal.cpp b/yt/yt/library/decimal/decimal.cpp
index 0d3363baba..e1674f84e2 100644
--- a/yt/yt/library/decimal/decimal.cpp
+++ b/yt/yt/library/decimal/decimal.cpp
@@ -150,7 +150,7 @@ template <typename T>
static T DecimalBinaryToIntegerUnchecked(TStringBuf binaryValue)
{
T result;
- memcpy(&result, binaryValue.Data(), sizeof(result));
+ memcpy(&result, binaryValue.data(), sizeof(result));
result = DecimalInetToHost(result);
constexpr auto one = DecimalIntegerToUnsigned(T{1});
@@ -177,15 +177,15 @@ static void CheckDecimalValueSize(TStringBuf value, int precision, int scale)
"Decimal<%v,%v> binary value representation has invalid length: actual %v, expected %v",
precision,
scale,
- value.Size(),
+ value.size(),
expectedSize);
}
}
static Y_FORCE_INLINE TStringBuf PlaceOnBuffer(TStringBuf value, char* buffer)
{
- memcpy(buffer, value.Data(), value.Size());
- return TStringBuf(buffer, value.Size());
+ memcpy(buffer, value.data(), value.size());
+ return TStringBuf(buffer, value.size());
}
// TODO(ermolovd): make it FASTER (check NYT::WriteDecIntToBufferBackwards)
@@ -367,7 +367,7 @@ TStringBuf TDecimal::BinaryToText(TStringBuf binaryDecimal, int precision, int s
ValidatePrecisionAndScale(precision, scale);
YT_VERIFY(bufferSize >= MaxTextSize);
- switch (binaryDecimal.Size()) {
+ switch (binaryDecimal.size()) {
case 4:
return DecimalBinaryToTextUncheckedImpl<i32>(binaryDecimal, scale, buffer);
case 8:
@@ -471,7 +471,7 @@ static void ValidateDecimalBinaryValueImpl(TStringBuf binaryDecimal, int precisi
void TDecimal::ValidateBinaryValue(TStringBuf binaryDecimal, int precision, int scale)
{
CheckDecimalValueSize(binaryDecimal, precision, scale);
- switch (binaryDecimal.Size()) {
+ switch (binaryDecimal.size()) {
case 4:
return ValidateDecimalBinaryValueImpl<i32>(binaryDecimal, precision, scale);
case 8:
@@ -564,19 +564,19 @@ Y_FORCE_INLINE void CheckBufferLength(int precision, size_t bufferLength)
i32 TDecimal::ParseBinary32(int precision, TStringBuf buffer)
{
- CheckBufferLength<i32>(precision, buffer.Size());
+ CheckBufferLength<i32>(precision, buffer.size());
return DecimalBinaryToIntegerUnchecked<i32>(buffer);
}
i64 TDecimal::ParseBinary64(int precision, TStringBuf buffer)
{
- CheckBufferLength<i64>(precision, buffer.Size());
+ CheckBufferLength<i64>(precision, buffer.size());
return DecimalBinaryToIntegerUnchecked<i64>(buffer);
}
TDecimal::TValue128 TDecimal::ParseBinary128(int precision, TStringBuf buffer)
{
- CheckBufferLength<i128>(precision, buffer.Size());
+ CheckBufferLength<i128>(precision, buffer.size());
auto result = DecimalBinaryToIntegerUnchecked<i128>(buffer);
return {GetLow(result), static_cast<i64>(GetHigh(result))};
}
diff --git a/yt/yt/library/formats/arrow_parser.cpp b/yt/yt/library/formats/arrow_parser.cpp
index f815aaefed..cc31e25335 100644
--- a/yt/yt/library/formats/arrow_parser.cpp
+++ b/yt/yt/library/formats/arrow_parser.cpp
@@ -1083,8 +1083,8 @@ public:
void Read(TStringBuf data) override
{
- i64 restSize = data.Size();
- const char* currentPtr = data.Data();
+ i64 restSize = data.size();
+ const char* currentPtr = data.data();
while (restSize > 0) {
i64 nextRequiredSize = Decoder_->next_required_size();
auto currentSize = std::min(nextRequiredSize, restSize);
diff --git a/yt/yt/library/formats/arrow_writer.cpp b/yt/yt/library/formats/arrow_writer.cpp
index 9c21cd9477..657da97ce5 100644
--- a/yt/yt/library/formats/arrow_writer.cpp
+++ b/yt/yt/library/formats/arrow_writer.cpp
@@ -1435,7 +1435,7 @@ private:
output->Write(&metadataAlignSize, sizeof(ui32));
output->Write(metadataPtr, metadataSize);
- output->Write(AlignmentString.Data(), metadataAlignSize - metadataSize);
+ output->Write(AlignmentString.data(), metadataAlignSize - metadataSize);
// Body
if (message.BodyWriter) {
diff --git a/yt/yt/library/formats/skiff_writer.cpp b/yt/yt/library/formats/skiff_writer.cpp
index 2d7290a490..3bc6965219 100644
--- a/yt/yt/library/formats/skiff_writer.cpp
+++ b/yt/yt/library/formats/skiff_writer.cpp
@@ -473,7 +473,7 @@ TUnversionedValueToSkiffConverter CreateComplexValueConverter(
input.Reset(value.Data.String, value.Length);
} else if (value.Type == EValueType::Null) {
static const TStringBuf empty = "#";
- input.Reset(empty.Data(), empty.Size());
+ input.Reset(empty.data(), empty.size());
} else {
THROW_ERROR_EXCEPTION("Internal error; unexpected value type: expected %Qlv or %Qlv, actual %Qlv",
EValueType::Composite,
diff --git a/yt/yt/library/formats/skiff_yson_converter-inl.h b/yt/yt/library/formats/skiff_yson_converter-inl.h
index 2c667b35d6..43dabc63a5 100644
--- a/yt/yt/library/formats/skiff_yson_converter-inl.h
+++ b/yt/yt/library/formats/skiff_yson_converter-inl.h
@@ -127,7 +127,7 @@ void TUuidWriter::operator()(TStringBuf value, NSkiff::TCheckedInDebugSkiffWrite
ExpectedSize,
value.size());
}
- const ui64* array = reinterpret_cast<const ui64*>(value.Data());
+ const ui64* array = reinterpret_cast<const ui64*>(value.data());
writer->WriteUint128(NSkiff::TUint128{InetToHost(array[1]), InetToHost(array[0])});
}
diff --git a/yt/yt/library/formats/yql_yson_converter.cpp b/yt/yt/library/formats/yql_yson_converter.cpp
index a9b7b3fe08..964fd84199 100644
--- a/yt/yt/library/formats/yql_yson_converter.cpp
+++ b/yt/yt/library/formats/yql_yson_converter.cpp
@@ -169,19 +169,19 @@ void TYqlJsonWriter::OnStringScalarWeightLimited(TStringBuf value, i64 limit)
auto incomplete = false;
auto base64 = false;
if (IsUtf(valueToWrite)) {
- if (static_cast<i64>(valueToWrite.Size()) > limit) {
+ if (static_cast<i64>(valueToWrite.size()) > limit) {
valueToWrite = TruncateUtf8(valueToWrite, limit);
incomplete = true;
}
} else {
base64 = true;
- auto maxEncodedSize = Base64EncodeBufSize(valueToWrite.Size());
+ auto maxEncodedSize = Base64EncodeBufSize(valueToWrite.size());
if (static_cast<i64>(maxEncodedSize) > limit) {
auto truncatedLen = (limit - 1) / 4 * 3;
- incomplete = (truncatedLen < static_cast<i64>(valueToWrite.Size()));
+ incomplete = (truncatedLen < static_cast<i64>(valueToWrite.size()));
valueToWrite.Trunc(truncatedLen);
}
- Buffer_.Resize(Base64EncodeBufSize(valueToWrite.Size()));
+ Buffer_.Resize(Base64EncodeBufSize(valueToWrite.size()));
valueToWrite = Base64Encode(valueToWrite, Buffer_.Begin());
}
OnStringScalarImpl(valueToWrite, incomplete, base64);
@@ -198,7 +198,7 @@ void TYqlJsonWriter::TransferYsonWeightLimited(
callback(&writer);
}
auto yson = TStringBuf(Buffer_.Begin(), Buffer_.End());
- if (static_cast<i64>(yson.Size()) > limit) {
+ if (static_cast<i64>(yson.size()) > limit) {
OnStringScalarImpl("", /* incomplete */ true, /* base64 */ false);
} else {
WriteWithWrapping(
diff --git a/yt/yt/library/quantile_digest/quantile_digest.cpp b/yt/yt/library/quantile_digest/quantile_digest.cpp
index b500ab1aa3..db377c044d 100644
--- a/yt/yt/library/quantile_digest/quantile_digest.cpp
+++ b/yt/yt/library/quantile_digest/quantile_digest.cpp
@@ -71,7 +71,7 @@ IQuantileDigestPtr CreateTDigest(const TTDigestConfigPtr& config)
IQuantileDigestPtr LoadQuantileDigest(TStringBuf serialized)
{
NProto::TQuantileDigest quantileDigest;
- if (!quantileDigest.ParseFromArray(serialized.begin(), serialized.Size())) {
+ if (!quantileDigest.ParseFromArray(serialized.begin(), serialized.size())) {
THROW_ERROR_EXCEPTION("Failed to parse quantile digest from proto");
}