The class compRange stores computed ranges. More...
#include <qExpr.h>
Public Member Functions | |
compRange () | |
Default constructor. | |
compRange (ibis::math::term *me1, COMPARE lop, ibis::math::term *me2) | |
Constructor with two arithmetic expressions. | |
compRange (ibis::math::term *me1, ibis::qExpr::COMPARE lop, ibis::math::term *me2, ibis::qExpr::COMPARE rop, ibis::math::term *me3) | |
Constructor with three arithmetic expressions. | |
compRange (const compRange &rhs) | |
Copy constructor. Deep copy -- actually copy the math expressions. | |
virtual qExpr * | dup () const |
Duplicate this object. Return a pointer to the new copy. | |
virtual void | getTableNames (std::set< std::string > &plist) const |
Identify the data partitions involved in the query expression. | |
ibis::math::term * | getTerm3 () |
const ibis::math::term * | getTerm3 () const |
bool | inRange () const |
Evaluate the logical expression. | |
virtual bool | isConstant () const |
Is this expression a constant? A constant remains the same not matter which row it is applied to. | |
virtual bool | isSimple () const |
Is the expression simple? A simple expression contains only range conditions connected with logical operators. | |
bool | isSimpleRange () const |
Is this a simple range expression that can be stored as ibis::qRange? | |
ibis::qExpr::COMPARE | leftOperator () const |
bool | maybeStringCompare () const |
Is the expression possibly a simple string comparison? | |
virtual uint32_t | nItems () const |
Count the number of items in the query expression. | |
virtual void | print (std::ostream &) const |
Print the query expression. | |
virtual void | printFull (std::ostream &out) const |
Print out the full expression. | |
ibis::qExpr::COMPARE | rightOperator () const |
void | setTerm3 (ibis::math::term *t) |
ibis::qContinuousRange * | simpleRange () const |
virtual | ~compRange () |
Destructor. | |
Static Public Member Functions | |
static compRange * | makeConstantFalse () |
Create a constant expression that always evaluates to false. | |
static compRange * | makeConstantTrue () |
Create a constant expression that always evaluates to true. |
The class compRange stores computed ranges.
It is for those comparisons involving nontrivial arithmetic expression.
ibis::compRange::compRange | ( | ibis::math::term * | me1, |
COMPARE | lop, | ||
ibis::math::term * | me2 | ||
) | [inline] |
Constructor with two arithmetic expressions.
Takes the ownership of me1 and me2.
ibis::compRange::compRange | ( | ibis::math::term * | me1, |
ibis::qExpr::COMPARE | lop, | ||
ibis::math::term * | me2, | ||
ibis::qExpr::COMPARE | rop, | ||
ibis::math::term * | me3 | ||
) | [inline] |
Constructor with three arithmetic expressions.
Takes the ownership of me1, me2, and me3.
void ibis::compRange::getTableNames | ( | std::set< std::string > & | plist | ) | const [virtual] |
Identify the data partitions involved in the query expression.
Return the list of data partition names in a set.
It records a '*' for the variables without explicit partition names.
Reimplemented from ibis::qExpr.
bool ibis::compRange::inRange | ( | ) | const [inline] |
Evaluate the logical expression.
Does the input value match any of the values on record ? It returns false in case of error.
References ibis::math::term::eval().
Referenced by ibis::query::doEstimate(), ibis::countQuery::doEvaluate(), ibis::query::doEvaluate(), ibis::countQuery::doScan(), ibis::part::doScan(), and ibis::query::doScan().
virtual bool ibis::compRange::isConstant | ( | ) | const [inline, virtual] |
Is this expression a constant? A constant remains the same not matter which row it is applied to.
Reimplemented from ibis::qExpr.
References ibis::qExpr::getLeft(), and ibis::qExpr::getRight().
Referenced by ibis::query::doEstimate(), ibis::countQuery::doEvaluate(), ibis::query::doEvaluate(), ibis::countQuery::doScan(), and ibis::query::doScan().
virtual bool ibis::compRange::isSimple | ( | ) | const [inline, virtual] |
Is the expression simple? A simple expression contains only range conditions connected with logical operators.
Reimplemented from ibis::qExpr.
References isSimpleRange().
virtual void ibis::compRange::printFull | ( | std::ostream & | out | ) | const [inline, virtual] |
Print out the full expression.
The long form of the print function.
It recursively prints out the whole query expression tree, which can be quite long.
Reimplemented from ibis::qExpr.
References print().
![]() |