Skip to content

Commit 6dc162f

Browse files
authored
Preparation for clang-18 migration (#10983)
Co-authored-by: Dmitry Nechitaev <nechda@yandex-team.ru>
1 parent 37ae9cc commit 6dc162f

File tree

3 files changed

+24
-19
lines changed

3 files changed

+24
-19
lines changed

ydb/core/blob_depot/data_uncertain.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,3 +242,15 @@ namespace NKikimr::NBlobDepot {
242242
}
243243

244244
} // NKikimr::NBlobDepot
245+
246+
using TAliasEKeyBlobState = ::NKikimr::NBlobDepot::TUncertaintyResolverScope::EKeyBlobState;
247+
template<>
248+
void Out<TAliasEKeyBlobState>(IOutputStream& s, TAliasEKeyBlobState value) {
249+
switch (value) {
250+
case TAliasEKeyBlobState::INITIAL: s << "INITIAL"; break;
251+
case TAliasEKeyBlobState::QUERY_IN_FLIGHT: s << "QUERY_IN_FLIGHT"; break;
252+
case TAliasEKeyBlobState::CONFIRMED: s << "CONFIRMED"; break;
253+
case TAliasEKeyBlobState::WASNT_WRITTEN: s << "WASNT_WRITTEN"; break;
254+
case TAliasEKeyBlobState::ERROR: s << "ERROR"; break;
255+
}
256+
}

ydb/core/blob_depot/data_uncertain.h

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,18 @@
77

88
namespace NKikimr::NBlobDepot {
99

10+
struct TUncertaintyResolverScope {
11+
enum class EKeyBlobState {
12+
INITIAL, // just created blob, no activity
13+
QUERY_IN_FLIGHT, // blob should have BlobContext referring to this key too
14+
CONFIRMED, // we got OK for this blob
15+
WASNT_WRITTEN, // we got NODATA for this blob, this key needs to be deleted if possible
16+
ERROR, // we got ERROR or any other reply for this blob
17+
};
18+
};
19+
1020
class TBlobDepot::TData::TUncertaintyResolver {
21+
using EKeyBlobState = TUncertaintyResolverScope::EKeyBlobState;
1122
TBlobDepot* const Self;
1223

1324
struct TPendingUncertainKey {};
@@ -21,14 +32,6 @@ namespace NKikimr::NBlobDepot {
2132
{}
2233
};
2334

24-
enum class EKeyBlobState {
25-
INITIAL, // just created blob, no activity
26-
QUERY_IN_FLIGHT, // blob should have BlobContext referring to this key too
27-
CONFIRMED, // we got OK for this blob
28-
WASNT_WRITTEN, // we got NODATA for this blob, this key needs to be deleted if possible
29-
ERROR, // we got ERROR or any other reply for this blob
30-
};
31-
3235
struct TKeyContext {
3336
// requests dependent on this key
3437
std::vector<TIntrusivePtr<TResolveOnHold>> DependentRequests;
@@ -52,16 +55,6 @@ namespace NKikimr::NBlobDepot {
5255
ui64 NumKeysUnresolved = 0;
5356
ui64 NumKeysDropped = 0;
5457

55-
friend void Out<EKeyBlobState>(IOutputStream& s, EKeyBlobState value) {
56-
switch (value) {
57-
case EKeyBlobState::INITIAL: s << "INITIAL"; break;
58-
case EKeyBlobState::QUERY_IN_FLIGHT: s << "QUERY_IN_FLIGHT"; break;
59-
case EKeyBlobState::CONFIRMED: s << "CONFIRMED"; break;
60-
case EKeyBlobState::WASNT_WRITTEN: s << "WASNT_WRITTEN"; break;
61-
case EKeyBlobState::ERROR: s << "ERROR"; break;
62-
}
63-
}
64-
6558
public:
6659
TUncertaintyResolver(TBlobDepot *self);
6760
void PushResultWithUncertainties(TResolveResultAccumulator&& result, std::deque<TKey>&& uncertainties);

ydb/library/yql/dq/runtime/dq_arrow_helpers_ut.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ NUdf::TUnboxedValue GetValueOfBasicType(TType* type, ui64 value) {
4444
case NUdf::EDataSlot::Uint16:
4545
return NUdf::TUnboxedValuePod(static_cast<ui16>(value % (1 << 16)));
4646
case NUdf::EDataSlot::Int32:
47-
return NUdf::TUnboxedValuePod(static_cast<i32>(-(value % ((1 << 31) - 1))));
47+
return NUdf::TUnboxedValuePod(static_cast<i32>(-(value % ((1ULL << 31) - 1))));
4848
case NUdf::EDataSlot::Uint32:
4949
return NUdf::TUnboxedValuePod(static_cast<ui32>(value % (1 << 31)));
5050
case NUdf::EDataSlot::Int64:

0 commit comments

Comments
 (0)