aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgrigminakov <grigminakov@yandex-team.com>2024-03-21 14:42:50 +0300
committergrigminakov <grigminakov@yandex-team.com>2024-03-21 15:04:22 +0300
commitb2e858b03f5a3a6209ff4803af9f464ba01a47aa (patch)
tree0c2bcf1b3c5c8431443a3d8b854f32dcde6aaffb
parentb4ebefe8c899818d5950342eaebd4c4ea4553825 (diff)
downloadydb-b2e858b03f5a3a6209ff4803af9f464ba01a47aa.tar.gz
YT: Small fixes in YPathFilteringConsumer
b9389f0fb12e3830d5fdef2606021d58e04b828f
-rw-r--r--yt/yt/core/yson/unittests/ypath_filtering_yson_consumer_ut.cpp52
-rw-r--r--yt/yt/core/yson/ypath_filtering_consumer.cpp12
-rw-r--r--yt/yt/core/yson/ypath_filtering_consumer.h4
3 files changed, 34 insertions, 34 deletions
diff --git a/yt/yt/core/yson/unittests/ypath_filtering_yson_consumer_ut.cpp b/yt/yt/core/yson/unittests/ypath_filtering_yson_consumer_ut.cpp
index 3173d603dc..3fb7db7395 100644
--- a/yt/yt/core/yson/unittests/ypath_filtering_yson_consumer_ut.cpp
+++ b/yt/yt/core/yson/unittests/ypath_filtering_yson_consumer_ut.cpp
@@ -36,7 +36,7 @@ public:
private:
TString ValueString_;
TStringOutput Output_;
- std::unique_ptr<IYsonConsumer> Consumer_;
+ const std::unique_ptr<IYsonConsumer> Consumer_;
};
////////////////////////////////////////////////////////////////////////////////
@@ -46,7 +46,7 @@ TEST_F(TYPathFilteringConsumerTest, BlacklistMap1)
auto consumer = CreateYPathFilteringConsumer(
GetConsumer(),
/*paths*/ {"/forbidden_key"},
- EPathFilteringMode::Blacklist);
+ EYPathFilteringMode::Blacklist);
NYTree::BuildYsonFluently(consumer.get())
.BeginMap()
@@ -61,7 +61,7 @@ TEST_F(TYPathFilteringConsumerTest, BlacklistMap2)
auto consumer = CreateYPathFilteringConsumer(
GetConsumer(),
/*paths*/ {"/forbidden_key"},
- EPathFilteringMode::Blacklist);
+ EYPathFilteringMode::Blacklist);
NYTree::BuildYsonFluently(consumer.get())
.BeginMap()
@@ -76,7 +76,7 @@ TEST_F(TYPathFilteringConsumerTest, BlacklistMap3)
auto consumer = CreateYPathFilteringConsumer(
GetConsumer(),
/*paths*/ {"/forbidden_key"},
- EPathFilteringMode::Blacklist);
+ EYPathFilteringMode::Blacklist);
NYTree::BuildYsonFluently(consumer.get())
.BeginMap()
@@ -92,7 +92,7 @@ TEST_F(TYPathFilteringConsumerTest, BlacklistList)
auto consumer = CreateYPathFilteringConsumer(
GetConsumer(),
/*paths*/ {"/1/key"},
- EPathFilteringMode::Blacklist);
+ EYPathFilteringMode::Blacklist);
NYTree::BuildYsonFluently(consumer.get())
.BeginList()
@@ -118,7 +118,7 @@ TEST_F(TYPathFilteringConsumerTest, BlacklistListNested)
auto consumer = CreateYPathFilteringConsumer(
GetConsumer(),
/*paths*/ {"/1/key"},
- EPathFilteringMode::Blacklist);
+ EYPathFilteringMode::Blacklist);
NYTree::BuildYsonFluently(consumer.get())
.BeginList()
@@ -146,7 +146,7 @@ TEST_F(TYPathFilteringConsumerTest, BlacklistAttributes)
auto consumer = CreateYPathFilteringConsumer(
GetConsumer(),
/*paths*/ {"/@"},
- EPathFilteringMode::Blacklist);
+ EYPathFilteringMode::Blacklist);
NYTree::BuildYsonFluently(consumer.get())
.BeginAttributes()
@@ -162,7 +162,7 @@ TEST_F(TYPathFilteringConsumerTest, BlacklistAttribute)
auto consumer = CreateYPathFilteringConsumer(
GetConsumer(),
/*paths*/ {"/@forbidden_attr"},
- EPathFilteringMode::Blacklist);
+ EYPathFilteringMode::Blacklist);
NYTree::BuildYsonFluently(consumer.get())
.BeginAttributes()
@@ -179,7 +179,7 @@ TEST_F(TYPathFilteringConsumerTest, BlacklistNestedMap)
auto consumer = CreateYPathFilteringConsumer(
GetConsumer(),
/*paths*/ {"/forbidden_key", "/nested_map/forbidden_key"},
- EPathFilteringMode::Blacklist);
+ EYPathFilteringMode::Blacklist);
NYTree::BuildYsonFluently(consumer.get())
.BeginMap()
@@ -200,7 +200,7 @@ TEST_F(TYPathFilteringConsumerTest, BlacklistNestedAsterisk)
auto consumer = CreateYPathFilteringConsumer(
GetConsumer(),
/*paths*/ {"/*/forbidden_key"},
- EPathFilteringMode::Blacklist);
+ EYPathFilteringMode::Blacklist);
NYTree::BuildYsonFluently(consumer.get())
.BeginMap()
@@ -224,7 +224,7 @@ TEST_F(TYPathFilteringConsumerTest, WhitelistMap1)
auto consumer = CreateYPathFilteringConsumer(
GetConsumer(),
/*paths*/ {""},
- EPathFilteringMode::Whitelist);
+ EYPathFilteringMode::Whitelist);
NYTree::BuildYsonFluently(consumer.get())
.BeginMap()
@@ -239,7 +239,7 @@ TEST_F(TYPathFilteringConsumerTest, WhitelistMap2)
auto consumer = CreateYPathFilteringConsumer(
GetConsumer(),
/*paths*/ {"/allowed_key"},
- EPathFilteringMode::Whitelist);
+ EYPathFilteringMode::Whitelist);
NYTree::BuildYsonFluently(consumer.get())
.BeginMap()
@@ -255,7 +255,7 @@ TEST_F(TYPathFilteringConsumerTest, WhitelistNestedMap)
auto consumer = CreateYPathFilteringConsumer(
GetConsumer(),
/*paths*/ {"/allowed_key", "/nested/allowed_key"},
- EPathFilteringMode::Whitelist);
+ EYPathFilteringMode::Whitelist);
NYTree::BuildYsonFluently(consumer.get())
.BeginMap()
@@ -276,7 +276,7 @@ TEST_F(TYPathFilteringConsumerTest, ForcedSimple)
auto consumer = CreateYPathFilteringConsumer(
GetConsumer(),
/*paths*/ {"/forced_key"},
- EPathFilteringMode::WhitelistWithForcedEntities);
+ EYPathFilteringMode::WhitelistWithForcedEntities);
NYTree::BuildYsonFluently(consumer.get())
.BeginMap()
@@ -290,7 +290,7 @@ TEST_F(TYPathFilteringConsumerTest, ForcedNested)
auto consumer = CreateYPathFilteringConsumer(
GetConsumer(),
/*paths*/ {"/data/forced_key"},
- EPathFilteringMode::WhitelistWithForcedEntities);
+ EYPathFilteringMode::WhitelistWithForcedEntities);
NYTree::BuildYsonFluently(consumer.get())
.BeginMap()
@@ -304,7 +304,7 @@ TEST_F(TYPathFilteringConsumerTest, ForcedWhitelistMixedNested)
auto consumer = CreateYPathFilteringConsumer(
GetConsumer(),
/*paths*/ {"/data/forced_key"},
- EPathFilteringMode::WhitelistWithForcedEntities);
+ EYPathFilteringMode::WhitelistWithForcedEntities);
NYTree::BuildYsonFluently(consumer.get())
.BeginMap()
@@ -322,7 +322,7 @@ TEST_F(TYPathFilteringConsumerTest, ForcedMixedNested)
auto consumer = CreateYPathFilteringConsumer(
GetConsumer(),
/*paths*/ {"/data/forced_key"},
- EPathFilteringMode::ForcedEntities);
+ EYPathFilteringMode::ForcedEntities);
NYTree::BuildYsonFluently(consumer.get())
.BeginMap()
@@ -340,7 +340,7 @@ TEST_F(TYPathFilteringConsumerTest, ForcedAttribute)
auto consumer = CreateYPathFilteringConsumer(
GetConsumer(),
/*paths*/ {"/data/@forced_attr"},
- EPathFilteringMode::ForcedEntities);
+ EYPathFilteringMode::ForcedEntities);
NYTree::BuildYsonFluently(consumer.get())
.BeginMap()
@@ -360,7 +360,7 @@ TEST_F(TYPathFilteringConsumerTest, ForcedAttributes1)
auto consumer = CreateYPathFilteringConsumer(
GetConsumer(),
/*paths*/ {"/data/@"},
- EPathFilteringMode::ForcedEntities);
+ EYPathFilteringMode::ForcedEntities);
NYTree::BuildYsonFluently(consumer.get())
.BeginMap()
@@ -378,7 +378,7 @@ TEST_F(TYPathFilteringConsumerTest, ForcedAttributes2)
auto consumer = CreateYPathFilteringConsumer(
GetConsumer(),
/*paths*/ {"/data/@forced_key"},
- EPathFilteringMode::ForcedEntities);
+ EYPathFilteringMode::ForcedEntities);
NYTree::BuildYsonFluently(consumer.get())
.BeginMap()
@@ -396,7 +396,7 @@ TEST_F(TYPathFilteringConsumerTest, ForcedMultiplePaths)
auto consumer = CreateYPathFilteringConsumer(
GetConsumer(),
/*paths*/ {"/forced_key1", "/forced_key2"},
- EPathFilteringMode::WhitelistWithForcedEntities);
+ EYPathFilteringMode::WhitelistWithForcedEntities);
NYTree::BuildYsonFluently(consumer.get())
.BeginMap()
@@ -410,7 +410,7 @@ TEST_F(TYPathFilteringConsumerTest, ForcedMultiplePathsNested)
auto consumer = CreateYPathFilteringConsumer(
GetConsumer(),
/*paths*/ {"/data/forced_key","/forced_key"},
- EPathFilteringMode::WhitelistWithForcedEntities);
+ EYPathFilteringMode::WhitelistWithForcedEntities);
NYTree::BuildYsonFluently(consumer.get())
.BeginMap()
@@ -424,7 +424,7 @@ TEST_F(TYPathFilteringConsumerTest, ForcedFilteringSimple)
auto consumer = CreateYPathFilteringConsumer(
GetConsumer(),
/*paths*/ {"/forced_key"},
- EPathFilteringMode::WhitelistWithForcedEntities);
+ EYPathFilteringMode::WhitelistWithForcedEntities);
NYTree::BuildYsonFluently(consumer.get())
.BeginMap()
@@ -439,7 +439,7 @@ TEST_F(TYPathFilteringConsumerTest, ForcedFilteringSimplePrefix)
auto consumer = CreateYPathFilteringConsumer(
GetConsumer(),
/*paths*/ {"/forced_key"},
- EPathFilteringMode::WhitelistWithForcedEntities);
+ EYPathFilteringMode::WhitelistWithForcedEntities);
NYTree::BuildYsonFluently(consumer.get())
.BeginMap()
@@ -457,7 +457,7 @@ TEST_F(TYPathFilteringConsumerTest, ForcedFilteringNested)
auto consumer = CreateYPathFilteringConsumer(
GetConsumer(),
/*paths*/ {"/data/forced_key"},
- EPathFilteringMode::WhitelistWithForcedEntities);
+ EYPathFilteringMode::WhitelistWithForcedEntities);
NYTree::BuildYsonFluently(consumer.get())
.BeginMap()
@@ -476,7 +476,7 @@ TEST_F(TYPathFilteringConsumerTest, ForcedFilteringMultiplePathsNested)
auto consumer = CreateYPathFilteringConsumer(
GetConsumer(),
/*paths*/ {"/forced_key", "/data/forced_key"},
- EPathFilteringMode::WhitelistWithForcedEntities);
+ EYPathFilteringMode::WhitelistWithForcedEntities);
NYTree::BuildYsonFluently(consumer.get())
.BeginMap()
diff --git a/yt/yt/core/yson/ypath_filtering_consumer.cpp b/yt/yt/core/yson/ypath_filtering_consumer.cpp
index ec1b610623..9adf46c801 100644
--- a/yt/yt/core/yson/ypath_filtering_consumer.cpp
+++ b/yt/yt/core/yson/ypath_filtering_consumer.cpp
@@ -181,7 +181,7 @@ public:
TYPathFilteringConsumer(
NYson::IYsonConsumer* underlying,
std::vector<NYPath::TYPath> paths,
- EPathFilteringMode mode)
+ EYPathFilteringMode mode)
: Underlying_(underlying)
, Paths_(std::move(paths))
, Mode_(mode)
@@ -218,7 +218,7 @@ private:
NYson::IYsonConsumer* Underlying_;
const std::vector<NYPath::TYPath> Paths_;
- const EPathFilteringMode Mode_;
+ const EYPathFilteringMode Mode_;
bool SubtreeFiltering_ = false;
int FilteringDepth_ = -1;
std::vector<TPathFilteringState> PerPathFilteringStates_;
@@ -378,17 +378,17 @@ private:
bool IsBlacklistMode() const
{
- return Mode_ == EPathFilteringMode::Blacklist;
+ return Mode_ == EYPathFilteringMode::Blacklist;
}
bool IsWhitelistMode() const
{
- return Mode_ == EPathFilteringMode::Whitelist || Mode_ == EPathFilteringMode::WhitelistWithForcedEntities;
+ return Mode_ == EYPathFilteringMode::Whitelist || Mode_ == EYPathFilteringMode::WhitelistWithForcedEntities;
}
bool IsForcedEntitiesMode() const
{
- return Mode_ == EPathFilteringMode::ForcedEntities || Mode_ == EPathFilteringMode::WhitelistWithForcedEntities;
+ return Mode_ == EYPathFilteringMode::ForcedEntities || Mode_ == EYPathFilteringMode::WhitelistWithForcedEntities;
}
template <typename TTokenType>
@@ -436,7 +436,7 @@ private:
std::unique_ptr<NYson::IYsonConsumer> CreateYPathFilteringConsumer(
NYson::IYsonConsumer* underlying,
std::vector<NYPath::TYPath> paths,
- EPathFilteringMode mode)
+ EYPathFilteringMode mode)
{
return std::make_unique<TYPathFilteringConsumer>(underlying, std::move(paths), mode);
}
diff --git a/yt/yt/core/yson/ypath_filtering_consumer.h b/yt/yt/core/yson/ypath_filtering_consumer.h
index afbd0c0236..3e76dfd830 100644
--- a/yt/yt/core/yson/ypath_filtering_consumer.h
+++ b/yt/yt/core/yson/ypath_filtering_consumer.h
@@ -8,7 +8,7 @@ namespace NYT::NYson {
///////////////////////////////////////////////////////////////////////////////
-DEFINE_ENUM(EPathFilteringMode,
+DEFINE_ENUM(EYPathFilteringMode,
(Blacklist)
(Whitelist)
(WhitelistWithForcedEntities)
@@ -34,7 +34,7 @@ DEFINE_ENUM(EPathFilteringMode,
std::unique_ptr<NYson::IYsonConsumer> CreateYPathFilteringConsumer(
NYson::IYsonConsumer* underlying,
std::vector<NYPath::TYPath> paths,
- EPathFilteringMode mode);
+ EYPathFilteringMode mode);
////////////////////////////////////////////////////////////////////////////////