Column-oriented GPU-accelerated Database Management System
CoGaDB
|
#include <sql_parsetree.hpp>
Public Member Functions | |
ComparisonPredicate (ScalarExpressionPtr _lvalue, ValueComparator _op, ScalarExpressionPtr _rvalue) | |
KNF_Selection_Expression | getCNF (TypedNodePtr &io_node) |
Get Conjunctive Normal Form of a search condition predicate. | |
Public Attributes | |
ScalarExpressionPtr | lvalue |
ValueComparator | op |
ScalarExpressionPtr | rvalue |
CoGaDB::SQL::ParseTree::ComparisonPredicate::ComparisonPredicate | ( | ScalarExpressionPtr | _lvalue, |
ValueComparator | _op, | ||
ScalarExpressionPtr | _rvalue | ||
) | [inline] |
KNF_Selection_Expression CoGaDB::SQL::ParseTree::ComparisonPredicate::getCNF | ( | TypedNodePtr & | io_node | ) | [virtual] |
Get Conjunctive Normal Form of a search condition predicate.
Converting a single predicate to CNF is trivial - it is simply wrapped in a disjunction that is wrapped in a conjunction.
Since predicates in a CNF structure have their atomic type always on the right side of the operator (as in Column > Atom), the predicate operator might have to be flipped.
io_node | Reference to node pointer that holds the current chain of algebraic logical operators that is updated during CNF construction. |
map SQL comparison operators to CoGaDB's limited set of operators.
Implements CoGaDB::SQL::ParseTree::SearchCondition.
References CoGaDB::KNF_Selection_Expression::disjunctions, CoGaDB::EQUAL, CoGaDB::GREATER, CoGaDB::GREATER_EQUAL, CoGaDB::LESSER, CoGaDB::LESSER_EQUAL, CoGaDB::SQL::ParseTree::make_pred(), CoGaDB::SQL::ParseTree::UNEQUAL, CoGaDB::ValueConstantPredicate, and CoGaDB::ValueValuePredicate.