casacore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
casacore::TableExprGroupResult Class Reference

Class holding the results of groupby and aggregation. More...

#include <ExprGroup.h>

Public Member Functions

 TableExprGroupResult (const vector< CountedPtr< TableExprGroupFuncSet > > &funcSets)
 Create from the possible set of immediate aggregate functions. More...
 
 TableExprGroupResult (const vector< CountedPtr< TableExprGroupFuncSet > > &funcSets, const vector< CountedPtr< vector< TableExprId > > > &ids)
 Create from the possible set of immediate aggregate functions and the set of TableExprIds per group for lazy aggregate functions. More...
 
uInt ngroup () const
 Get the nr of groups. More...
 
TableExprGroupFuncSetfuncSet (uInt group) const
 Get the set of functions (and their results) for the given group. More...
 
const vector< TableExprId > & ids (uInt group) const
 Get the set of TableExprIds for the given group. More...
 

Private Attributes

vector< CountedPtr
< TableExprGroupFuncSet > > 
itsFuncSets
 
vector< CountedPtr< vector
< TableExprId > > > 
itsIds
 

Detailed Description

Class holding the results of groupby and aggregation.

Intended use:

Internal

Review Status

Test programs:
tTableGram

Synopsis

The SELECT (and HAVING) clause can contain aggregate functions of which the results can be grouped using the GROUPBY clause. This class holds the results of the (immediate) aggregate functions and, if needed, the TableExprId ids of all rows belonging to each group. These ids are used to evaluate the lazy aggregate functions.
An object of this class is part of the TableExprIdAggr object used to get the aggregated values of each group.

Definition at line 144 of file ExprGroup.h.

Constructor & Destructor Documentation

casacore::TableExprGroupResult::TableExprGroupResult ( const vector< CountedPtr< TableExprGroupFuncSet > > &  funcSets)
explicit

Create from the possible set of immediate aggregate functions.

No immediate functions were used, thus no TableExprIds needed.

casacore::TableExprGroupResult::TableExprGroupResult ( const vector< CountedPtr< TableExprGroupFuncSet > > &  funcSets,
const vector< CountedPtr< vector< TableExprId > > > &  ids 
)

Create from the possible set of immediate aggregate functions and the set of TableExprIds per group for lazy aggregate functions.

Member Function Documentation

TableExprGroupFuncSet& casacore::TableExprGroupResult::funcSet ( uInt  group) const
inline

Get the set of functions (and their results) for the given group.

Definition at line 160 of file ExprGroup.h.

References itsFuncSets.

const vector<TableExprId>& casacore::TableExprGroupResult::ids ( uInt  group) const
inline

Get the set of TableExprIds for the given group.

Definition at line 163 of file ExprGroup.h.

References itsIds.

uInt casacore::TableExprGroupResult::ngroup ( ) const
inline

Get the nr of groups.

Definition at line 157 of file ExprGroup.h.

References itsFuncSets.

Member Data Documentation

vector<CountedPtr<TableExprGroupFuncSet> > casacore::TableExprGroupResult::itsFuncSets
private

Definition at line 166 of file ExprGroup.h.

Referenced by funcSet(), and ngroup().

vector<CountedPtr<vector<TableExprId> > > casacore::TableExprGroupResult::itsIds
private

Definition at line 167 of file ExprGroup.h.

Referenced by ids().


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