Skip to content

Commit 0f7f433

Browse files
authored
feat(clp-s): Add an initialization method in SchemaReader that passes the column map to FilterClass. (#709)
1 parent d86e4b7 commit 0f7f433

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-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: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,19 @@ class FilterClass {
3232
std::vector<BaseColumnReader*> const& column_readers
3333
) = 0;
3434

35+
/**
36+
* Initializes the filter with a column map.
37+
* Note: the column map only contains the ordered columns in a schema.
38+
* @param reader
39+
* @param schema_id
40+
* @param column_map
41+
*/
42+
virtual void init(
43+
SchemaReader* reader,
44+
int32_t schema_id,
45+
std::unordered_map<int32_t, BaseColumnReader*> const& column_map
46+
) {}
47+
3548
/**
3649
* Filters the message
3750
* @param cur_message
@@ -180,6 +193,13 @@ class SchemaReader {
180193
*/
181194
void initialize_filter(FilterClass* filter);
182195

196+
/**
197+
* Initializes the filter with a column map.
198+
* Note: the column map only contains the ordered columns in a schema.
199+
* @param filter
200+
*/
201+
void initialize_filter_with_column_map(FilterClass* filter);
202+
183203
/**
184204
* Marks a column as timestamp
185205
* @param column_reader

0 commit comments

Comments
 (0)