Skip to content

Commit 6de49ad

Browse files
authored
useless code have been rid off (#14600)
1 parent de9cf62 commit 6de49ad

File tree

1 file changed

+2
-24
lines changed

1 file changed

+2
-24
lines changed

ydb/core/sys_view/resource_pool_classifiers/resource_pool_classifiers.cpp

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,7 @@ class TResourcePoolClassifiersScan : public TScanActorBase<TResourcePoolClassifi
3939
, UserToken(std::move(userToken))
4040
, Database(database)
4141
, Reverse(reverse)
42-
{
43-
const auto& cellsFrom = TableRange.From.GetCells();
44-
if (cellsFrom.size() == 1 && !cellsFrom[0].IsNull()) {
45-
From = TString{cellsFrom[0].Data(), cellsFrom[0].Size()};
46-
}
47-
48-
const auto& cellsTo = TableRange.To.GetCells();
49-
if (cellsTo.size() == 1 && !cellsTo[0].IsNull()) {
50-
To = TString{cellsTo[0].Data(), cellsTo[0].Size()};
51-
}
52-
}
42+
{}
5343

5444
STFUNC(StateScan) {
5545
try {
@@ -138,7 +128,7 @@ class TResourcePoolClassifiersScan : public TScanActorBase<TResourcePoolClassifi
138128
batch->Finished = true;
139129
// It's a mandatory condition to keep sorted PK here
140130
for (const auto& [name, config] : std::map(resourcePoolsIt->second.begin(), resourcePoolsIt->second.end())) {
141-
if (!IsInRange(name)) {
131+
if (!StringKeyIsInTableRange({name})) {
142132
continue;
143133
}
144134
TVector<TCell> cells;
@@ -160,19 +150,7 @@ class TResourcePoolClassifiersScan : public TScanActorBase<TResourcePoolClassifi
160150
SendBatch(std::move(batch));
161151
}
162152

163-
bool IsInRange(const TString& name) const {
164-
if ((From && name < From) || (!TableRange.FromInclusive && From && name == From)) {
165-
return false;
166-
}
167-
if ((To && To < name) || (!TableRange.ToInclusive && To && name == To)) {
168-
return false;
169-
}
170-
return true;
171-
}
172-
173153
private:
174-
TMaybe<TString> From;
175-
TMaybe<TString> To;
176154
const TIntrusiveConstPtr<NACLib::TUserToken> UserToken;
177155
TString Database;
178156
const bool Reverse;

0 commit comments

Comments
 (0)