Skip to content

Commit

Permalink
Add an initialization method in SchemaReader to pass the column map t…
Browse files Browse the repository at this point in the history
…o FilterClass
  • Loading branch information
wraymo committed Jan 31, 2025
1 parent ebe30e1 commit 60e0ee3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/core/src/clp_s/SchemaReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,10 @@ void SchemaReader::initialize_filter(FilterClass* filter) {
filter->init(this, m_schema_id, m_columns);
}

void SchemaReader::initialize_filter_with_column_map(FilterClass* filter) {
filter->init(this, m_schema_id, m_column_map);
}

void SchemaReader::generate_local_tree(int32_t global_id) {
std::stack<int32_t> global_id_stack;
global_id_stack.emplace(global_id);
Expand Down
18 changes: 18 additions & 0 deletions components/core/src/clp_s/SchemaReader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@ class FilterClass {
std::vector<BaseColumnReader*> const& column_readers
) = 0;

/**
* Initializes the filter with a column map
* @param reader
* @param schema_id
* @param column_map
*/
virtual void init(
SchemaReader* reader,
int32_t schema_id,
std::unordered_map<int32_t, BaseColumnReader*> const& column_map
) {}

/**
* Filters the message
* @param cur_message
Expand Down Expand Up @@ -180,6 +192,12 @@ class SchemaReader {
*/
void initialize_filter(FilterClass* filter);

/**
* Initializes the filter with a column map
* @param filter
*/
void initialize_filter_with_column_map(FilterClass* filter);

/**
* Marks a column as timestamp
* @param column_reader
Expand Down

0 comments on commit 60e0ee3

Please sign in to comment.