Loading...
Searching...
No Matches
casacore::TableExprGroupResult Class Reference
tables package (libcasa_tables) » TaQL_module » TaQL_module_internal_classes

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

`#include <ExprGroup.h>`

## Public Member Functions

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

## Private Attributes

vector< std::shared_ptr< TableExprGroupFuncSet > > | itsFuncSets
vector< std::shared_ptr< 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 142 of file ExprGroup.h.

## Constructor & Destructor Documentation

## TableExprGroupResult() [1/2]

casacore::TableExprGroupResult::TableExprGroupResult | ( | const vector< std::shared_ptr< TableExprGroupFuncSet > > & | funcSets | ) |

explicit

Create from the possible set of immediate aggregate functions.

No immediate functions were used, thus no TableExprIds needed.

## TableExprGroupResult() [2/2]

casacore::TableExprGroupResult::TableExprGroupResult | ( | const vector< std::shared_ptr< TableExprGroupFuncSet > > & | funcSets,
|  | const vector< std::shared_ptr< vector< TableExprId > > > & | ids )

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

References ids().

## Member Function Documentation

## funcSet()

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

inline

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

Definition at line 158 of file ExprGroup.h.

References itsFuncSets.

## ids()

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

inline

Get the set of TableExprIds for the given group.

Definition at line 161 of file ExprGroup.h.

References itsIds.

Referenced by TableExprGroupResult().

## ngroup()

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

inline

Get the nr of groups.

Definition at line 155 of file ExprGroup.h.

References itsFuncSets.

## Member Data Documentation

## itsFuncSets

vector<std::shared_ptr<TableExprGroupFuncSet> > casacore::TableExprGroupResult::itsFuncSets

private

Definition at line 164 of file ExprGroup.h.

Referenced by funcSet(), and ngroup().

## itsIds

vector<std::shared_ptr<vector<TableExprId> > > casacore::TableExprGroupResult::itsIds

private

Definition at line 165 of file ExprGroup.h.

Referenced by ids().

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

- tables/TaQL/ExprGroup.h