5 #ifndef IBIS_COUNTQUERY_H
6 #define IBIS_COUNTQUERY_H
31 : mypart(et), m_sel(s), hits(0), cand(0) {};
61 long getHitRows(std::vector<uint32_t> &rids)
const;
96 if (s == 0)
return -1;
100 #endif // IBIS_COUNTQUERY_H
int doEvaluate(const qExpr *term, const ibis::bitvector &mask, ibis::bitvector &hits) const
Evaluate one term of a query expression.
Definition: countQuery.cpp:929
A representation of the where clause.
Definition: whereClause.h:161
void clear()
Releases the resources held by the query object and re-initialize the select clause and the where cla...
Definition: countQuery.cpp:1200
ibis::bitvector * hits
!< Select clause.
Definition: countQuery.h:77
const ibis::bitvector * getCandVector() const
Return the pointer to the candidates vector.
Definition: countQuery.h:67
The top level query expression object.
Definition: qExpr.h:36
A class to represent the select clause.
Definition: selectClause.h:112
int estimate()
Functions to perform estimation.
Definition: countQuery.cpp:200
int evaluate()
Computes the exact hits.
Definition: countQuery.cpp:292
The current implementation of FastBit is code named IBIS; most data structures and functions are in t...
Definition: bord.h:16
A simple count query.
Definition: countQuery.h:25
const selectClause * m_sel
!< Data partition used to process the query.
Definition: countQuery.h:76
long getNumHits() const
Return the number of records in the exact solution.
Definition: countQuery.cpp:376
virtual ~countQuery()
Destructor.
Definition: countQuery.h:28
const part * mypart
!< Query conditions.
Definition: countQuery.h:75
const char * getWhereClause() const
Return the where clause string.
Definition: countQuery.h:38
const part * getPartition() const
Return the pointer to the data partition used to process the count.
Definition: countQuery.h:43
int setSelectClause(const ibis::selectClause *s)
Change the select clause.
Definition: countQuery.h:95
int doScan(const ibis::qExpr *term, const ibis::bitvector &mask, ibis::bitvector &ht) const
Evaluate one term using the base data.
Definition: countQuery.cpp:718
int setWhereClause(const char *str)
Specify the where clause in string form.
Definition: countQuery.cpp:81
The class ibis::part represents a partition of a relational table.
Definition: part.h:27
ibis::bitvector * cand
!< Solution in bitvector form (or lower bound)
Definition: countQuery.h:78
const ibis::bitvector * getHitVector() const
Return the pointer to the internal hit vector.
Definition: countQuery.h:64
long getHitRows(std::vector< uint32_t > &rids) const
Get the row numbers of the hits.
Definition: countQuery.cpp:387
countQuery(const part *et=0, const ibis::selectClause *s=0)
Constructor. Generates a new countQuery on the data partition et.
Definition: countQuery.h:30
A data structure to represent a sequence of bits.
Definition: bitvector.h:62
void doEstimate(const qExpr *term, ibis::bitvector &low, ibis::bitvector &high) const
!< Candidate query results.
Definition: countQuery.cpp:423
long getMinNumHits() const
Return the number of records in the lower bound.
Definition: countQuery.cpp:276
Declares ibis::whereClause class.
int setPartition(const ibis::part *tbl)
Resets the data partition used to evaluate the query conditions to the partition specified in the arg...
Definition: countQuery.cpp:34
long getMaxNumHits() const
Return the number of records in the upper bound.
Definition: countQuery.cpp:281
const selectClause * getSelectClause() const
Return the pointer to the select clause.
Definition: countQuery.h:47
Define the class ibis::part.