Column-oriented GPU-accelerated Database Management System
CoGaDB
|
#include <sql_parsetree.hpp>
Public Member Functions | |
BetweenPredicate (ScalarExpressionPtr _exp, ScalarExpressionPtr _lvalue, ScalarExpressionPtr _rvalue) | |
Construct BETWEEN predicate. | |
KNF_Selection_Expression | getCNF (TypedNodePtr &io_node) |
Calculate CNF of a BETWEEN predicate. | |
Public Attributes | |
AndConditionPtr | and_cond |
CoGaDB::SQL::ParseTree::BetweenPredicate::BetweenPredicate | ( | ScalarExpressionPtr | _exp, |
ScalarExpressionPtr | _lvalue, | ||
ScalarExpressionPtr | _rvalue | ||
) |
Construct BETWEEN predicate.
Currently the BETWEEN predicate is implemented as a conjunction of to predicates using parse tree nodes. With CoGaDB's current set of supported predicate operators, this results in a CNF like "(exp = val1 OR exp > val1) AND (exp = val2 OR exp < val2)".
In the future, we might represent BETWEEN predicates as entirely distinct nodes with custom implementations of getCNF(). This would allow us to minimize the amount of logical query plan operators for algebraic operations in the predicate.
_exp | The value that should be checked |
_lvalue | The lower inclusive value |
_rvalue | The upper inclusive value |
References CoGaDB::GREATER_EQUAL, and CoGaDB::LESSER_EQUAL.
KNF_Selection_Expression CoGaDB::SQL::ParseTree::BetweenPredicate::getCNF | ( | TypedNodePtr & | io_node | ) | [virtual] |
Calculate CNF of a BETWEEN predicate.
Implements CoGaDB::SQL::ParseTree::SearchCondition.