Public Member Functions | Static Public Member Functions
ibis::compRange Class Reference

The class compRange stores computed ranges. More...

#include <qExpr.h>

Inheritance diagram for ibis::compRange:
ibis::qExpr

List of all members.

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 qExprdup () 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::termgetTerm3 ()
const ibis::math::termgetTerm3 () 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::qContinuousRangesimpleRange () const
virtual ~compRange ()
 Destructor.

Static Public Member Functions

static compRangemakeConstantFalse ()
 Create a constant expression that always evaluates to false.
static compRangemakeConstantTrue ()
 Create a constant expression that always evaluates to true.

Detailed Description

The class compRange stores computed ranges.

It is for those comparisons involving nontrivial arithmetic expression.


Constructor & Destructor Documentation

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.

Constructor with three arithmetic expressions.

Takes the ownership of me1, me2, and me3.


Member Function Documentation

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().


The documentation for this class was generated from the following files:

Make It A Bit Faster
Contact us
Disclaimers
FastBit source code
FastBit mailing list archive