Skip to content

Commit 60e0ee3

Browse files
committed
Add an initialization method in SchemaReader to pass the column map to FilterClass
1 parent ebe30e1 commit 60e0ee3

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

components/core/src/clp_s/SchemaReader.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,10 @@ void SchemaReader::initialize_filter(FilterClass* filter) {
259259
filter->init(this, m_schema_id, m_columns);
260260
}
261261

262+
void SchemaReader::initialize_filter_with_column_map(FilterClass* filter) {
263+
filter->init(this, m_schema_id, m_column_map);
264+
}
265+
262266
void SchemaReader::generate_local_tree(int32_t global_id) {
263267
std::stack<int32_t> global_id_stack;
264268
global_id_stack.emplace(global_id);

components/core/src/clp_s/SchemaReader.hpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,18 @@ class FilterClass {
3232
std::vector<BaseColumnReader*> const& column_readers
3333
) = 0;
3434

35+
/**
36+
* Initializes the filter with a column map
37+
* @param reader
38+
* @param schema_id
39+
* @param column_map
40+
*/
41+
virtual void init(
42+
SchemaReader* reader,
43+
int32_t schema_id,
44+
std::unordered_map<int32_t, BaseColumnReader*> const& column_map
45+
) {}
46+
3547
/**
3648
* Filters the message
3749
* @param cur_message
@@ -180,6 +192,12 @@ class SchemaReader {
180192
*/
181193
void initialize_filter(FilterClass* filter);
182194

195+
/**
196+
* Initializes the filter with a column map
197+
* @param filter
198+
*/
199+
void initialize_filter_with_column_map(FilterClass* filter);
200+
183201
/**
184202
* Marks a column as timestamp
185203
* @param column_reader

0 commit comments

Comments
 (0)