aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Doronin <dorooleg@yandex.ru>2025-02-18 14:02:05 +0300
committerGitHub <noreply@github.com>2025-02-18 14:02:05 +0300
commit6de49ad6e204de9d4e2e0e7f7d1d8c4e2da8a2bd (patch)
tree5a9e7a8b189ef5c62b71b15e6d0b1348a500827f
parentde9cf623eafa6d3670e6892f2dcd81bc2f8216f3 (diff)
downloadydb-6de49ad6e204de9d4e2e0e7f7d1d8c4e2da8a2bd.tar.gz
useless code have been rid off (#14600)
-rw-r--r--ydb/core/sys_view/resource_pool_classifiers/resource_pool_classifiers.cpp26
1 files changed, 2 insertions, 24 deletions
diff --git a/ydb/core/sys_view/resource_pool_classifiers/resource_pool_classifiers.cpp b/ydb/core/sys_view/resource_pool_classifiers/resource_pool_classifiers.cpp
index a7852e1f92..efcea7d6bd 100644
--- a/ydb/core/sys_view/resource_pool_classifiers/resource_pool_classifiers.cpp
+++ b/ydb/core/sys_view/resource_pool_classifiers/resource_pool_classifiers.cpp
@@ -39,17 +39,7 @@ public:
, UserToken(std::move(userToken))
, Database(database)
, Reverse(reverse)
- {
- const auto& cellsFrom = TableRange.From.GetCells();
- if (cellsFrom.size() == 1 && !cellsFrom[0].IsNull()) {
- From = TString{cellsFrom[0].Data(), cellsFrom[0].Size()};
- }
-
- const auto& cellsTo = TableRange.To.GetCells();
- if (cellsTo.size() == 1 && !cellsTo[0].IsNull()) {
- To = TString{cellsTo[0].Data(), cellsTo[0].Size()};
- }
- }
+ {}
STFUNC(StateScan) {
try {
@@ -138,7 +128,7 @@ private:
batch->Finished = true;
// It's a mandatory condition to keep sorted PK here
for (const auto& [name, config] : std::map(resourcePoolsIt->second.begin(), resourcePoolsIt->second.end())) {
- if (!IsInRange(name)) {
+ if (!StringKeyIsInTableRange({name})) {
continue;
}
TVector<TCell> cells;
@@ -160,19 +150,7 @@ private:
SendBatch(std::move(batch));
}
- bool IsInRange(const TString& name) const {
- if ((From && name < From) || (!TableRange.FromInclusive && From && name == From)) {
- return false;
- }
- if ((To && To < name) || (!TableRange.ToInclusive && To && name == To)) {
- return false;
- }
- return true;
- }
-
private:
- TMaybe<TString> From;
- TMaybe<TString> To;
const TIntrusiveConstPtr<NACLib::TUserToken> UserToken;
TString Database;
const bool Reverse;