Skip to content

Commit

Permalink
Create temporary PredicateBuilder class
Browse files Browse the repository at this point in the history
In the original FastADC pull request this class manages creation of
predicates, so it initializes PredicateProvider. But in this pr this
class is not required for DC verification. Hence adding a temorary
class just to make the tests work
  • Loading branch information
ol-imorozko committed Jun 4, 2024
1 parent d238e95 commit 2f7d757
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/core/algorithms/dc/predicate_builder.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#pragma once

#include "dc/predicate_provider.h"

namespace model {

class PredicateBuilder {
public:
PredicateBuilder() {
PredicateProvider::CreateInstance();
}
};
} // namespace model
3 changes: 3 additions & 0 deletions src/tests/test_dc_structures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "dc/column_operand.h"
#include "dc/operator.h"
#include "dc/predicate.h"
#include "dc/predicate_builder.h"
#include "table/column_layout_typed_relation_data.h"

namespace tests {
Expand Down Expand Up @@ -218,6 +219,8 @@ TEST(Predicate, PredicateCreatesCorrectly) {
mo::ColumnLayoutTypedRelationData::CreateFrom(parser, true);
std::vector<mo::TypedColumnData> col_data = std::move(table->GetColumnData());
Column const *first = col_data[0].GetColumn(), *second = col_data[1].GetColumn();
// FIXME: temprorary to make test work
model::PredicateBuilder pbuilder;

mo::PredicatePtr s_a_less_t_b =
mo::GetPredicate(mo::Operator(mo::OperatorType::kLess), mo::ColumnOperand(first, true),
Expand Down

0 comments on commit 2f7d757

Please sign in to comment.