Skip to content

Commit e1a75be

Browse files
committed
Refactored TTopicFiltersSet -> TTopicFilters
1 parent 692de3d commit e1a75be

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

ydb/core/fq/libs/row_dispatcher/format_handler/filters/filters_set.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace NFq::NRowDispatcher {
66

77
namespace {
88

9-
class TTopicFiltersSet : public ITopicFiltersSet {
9+
class TTopicFilters : public ITopicFilters {
1010
struct TCounters {
1111
const NMonitoring::TDynamicCounterPtr Counters;
1212

@@ -42,7 +42,7 @@ class TTopicFiltersSet : public ITopicFiltersSet {
4242

4343
class TFilterHandler {
4444
public:
45-
TFilterHandler(TTopicFiltersSet& self, IFilteredDataConsumer::TPtr consumer, IPurecalcFilter::TPtr purecalcFilter)
45+
TFilterHandler(TTopicFilters& self, IFilteredDataConsumer::TPtr consumer, IPurecalcFilter::TPtr purecalcFilter)
4646
: Self(self)
4747
, Consumer(std::move(consumer))
4848
, PurecalcFilter(std::move(purecalcFilter))
@@ -117,7 +117,7 @@ class TTopicFiltersSet : public ITopicFiltersSet {
117117
}
118118

119119
private:
120-
TTopicFiltersSet& Self;
120+
TTopicFilters& Self;
121121
const IFilteredDataConsumer::TPtr Consumer;
122122
const IPurecalcFilter::TPtr PurecalcFilter;
123123
const TString LogPrefix;
@@ -127,14 +127,14 @@ class TTopicFiltersSet : public ITopicFiltersSet {
127127
};
128128

129129
public:
130-
explicit TTopicFiltersSet(NActors::TActorId owner, const TTopicFiltersSetConfig& config, NMonitoring::TDynamicCounterPtr counters)
130+
explicit TTopicFilters(NActors::TActorId owner, const TTopicFiltersConfig& config, NMonitoring::TDynamicCounterPtr counters)
131131
: Config(config)
132132
, Owner(owner)
133-
, LogPrefix("TTopicFiltersSet: ")
133+
, LogPrefix("TTopicFilters: ")
134134
, Counters(counters)
135135
{}
136136

137-
~TTopicFiltersSet() {
137+
~TTopicFilters() {
138138
Filters.clear();
139139
}
140140

@@ -251,7 +251,7 @@ class TTopicFiltersSet : public ITopicFiltersSet {
251251
}
252252

253253
private:
254-
const TTopicFiltersSetConfig Config;
254+
const TTopicFiltersConfig Config;
255255
const NActors::TActorId Owner;
256256
const TString LogPrefix;
257257

@@ -266,8 +266,8 @@ class TTopicFiltersSet : public ITopicFiltersSet {
266266

267267
} // anonymous namespace
268268

269-
ITopicFiltersSet::TPtr CreateTopicFiltersSet(NActors::TActorId owner, const TTopicFiltersSetConfig& config, NMonitoring::TDynamicCounterPtr counters) {
270-
return MakeIntrusive<TTopicFiltersSet>(owner, config, counters);
269+
ITopicFilters::TPtr CreateTopicFilters(NActors::TActorId owner, const TTopicFiltersConfig& config, NMonitoring::TDynamicCounterPtr counters) {
270+
return MakeIntrusive<TTopicFilters>(owner, config, counters);
271271
}
272272

273273
} // namespace NFq::NRowDispatcher

ydb/core/fq/libs/row_dispatcher/format_handler/filters/filters_set.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ class IFilteredDataConsumer : public IPurecalcFilterConsumer {
2121
virtual void OnFilteringError(TStatus status) = 0;
2222
};
2323

24-
class ITopicFiltersSet : public TThrRefBase, public TNonCopyable {
24+
class ITopicFilters : public TThrRefBase, public TNonCopyable {
2525
public:
26-
using TPtr = TIntrusivePtr<ITopicFiltersSet>;
26+
using TPtr = TIntrusivePtr<ITopicFilters>;
2727

2828
public:
2929
// columnIndex - mapping from stable column id to index in values array
@@ -36,10 +36,10 @@ class ITopicFiltersSet : public TThrRefBase, public TNonCopyable {
3636
virtual TFiltersStatistic GetStatistics() = 0;
3737
};
3838

39-
struct TTopicFiltersSetConfig {
39+
struct TTopicFiltersConfig {
4040
NActors::TActorId CompileServiceId;
4141
};
4242

43-
ITopicFiltersSet::TPtr CreateTopicFiltersSet(NActors::TActorId owner, const TTopicFiltersSetConfig& config, NMonitoring::TDynamicCounterPtr counters);
43+
ITopicFilters::TPtr CreateTopicFilters(NActors::TActorId owner, const TTopicFiltersConfig& config, NMonitoring::TDynamicCounterPtr counters);
4444

4545
} // namespace NFq::NRowDispatcher

ydb/core/fq/libs/row_dispatcher/format_handler/format_handler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ class TTopicFormatHandler : public NActors::TActor<TTopicFormatHandler>, public
498498

499499
void CreateFilters() {
500500
if (!Filters) {
501-
Filters = CreateTopicFiltersSet(SelfId(), Config.FiltersConfig, Counters.CountersSubgroup);
501+
Filters = CreateTopicFilters(SelfId(), Config.FiltersConfig, Counters.CountersSubgroup);
502502
}
503503
}
504504

@@ -544,7 +544,7 @@ class TTopicFormatHandler : public NActors::TActor<TTopicFormatHandler>, public
544544
// Perser and filters
545545
ITopicParser::TPtr Parser;
546546
TParserHandler::TPtr ParserHandler;
547-
ITopicFiltersSet::TPtr Filters;
547+
ITopicFilters::TPtr Filters;
548548

549549
// Parsed data
550550
const TVector<ui64>* Offsets;

ydb/core/fq/libs/row_dispatcher/format_handler/format_handler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class ITopicFormatHandler : public TNonCopyable {
6363
// Static properties for all format handlers
6464
struct TFormatHandlerConfig {
6565
TJsonParserConfig JsonParserConfig;
66-
TTopicFiltersSetConfig FiltersConfig;
66+
TTopicFiltersConfig FiltersConfig;
6767
};
6868

6969
ITopicFormatHandler::TPtr CreateTopicFormatHandler(const NActors::TActorContext& owner, const TFormatHandlerConfig& config, const ITopicFormatHandler::TSettings& settings, NMonitoring::TDynamicCounterPtr counters);

ydb/core/fq/libs/row_dispatcher/format_handler/ut/topic_filter_ut.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ class TFilterSetFixture : public TFiterFixture {
204204
TBase::SetUp(ctx);
205205

206206
CompileNotifier = Runtime.AllocateEdgeActor();
207-
FiltersSet = CreateTopicFiltersSet(CompileNotifier, {.CompileServiceId = CompileServiceActorId}, MakeIntrusive<NMonitoring::TDynamicCounters>());
207+
FiltersSet = CreateTopicFilters(CompileNotifier, {.CompileServiceId = CompileServiceActorId}, MakeIntrusive<NMonitoring::TDynamicCounters>());
208208
}
209209

210210
void TearDown(NUnitTest::TTestContext& ctx) override {
@@ -253,7 +253,7 @@ class TFilterSetFixture : public TFiterFixture {
253253
std::unordered_map<TString, ui64> ColumnIndex;
254254

255255
NActors::TActorId CompileNotifier;
256-
ITopicFiltersSet::TPtr FiltersSet;
256+
ITopicFilters::TPtr FiltersSet;
257257
};
258258

259259
} // anonymous namespace

0 commit comments

Comments
 (0)