You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
feat(runtime)!: MCOL-678 A "GROUP BY ... WITH ROLLUP" support
Adds a special column which helps to differentiate data and rollups of various depts and a simple logic to row aggregation to add processing of subtotals.
This commit is contained in:
@ -151,7 +151,7 @@ class CalpontSelectExecutionPlan : public CalpontExecutionPlan
|
||||
CalpontSelectExecutionPlan(const ReturnedColumnList& returnedCols, ParseTree* filters,
|
||||
const SelectList& subSelects, const GroupByColumnList& groupByCols,
|
||||
ParseTree* having, const OrderByColumnList& orderByCols, const std::string alias,
|
||||
const int location, const bool dependent);
|
||||
const int location, const bool dependent, const bool withRollup);
|
||||
|
||||
CalpontSelectExecutionPlan(const std::string data);
|
||||
|
||||
@ -244,6 +244,18 @@ class CalpontSelectExecutionPlan : public CalpontExecutionPlan
|
||||
fGroupByCols = groupByCols;
|
||||
}
|
||||
|
||||
/**
|
||||
* Subtotals.
|
||||
*/
|
||||
bool withRollup() const
|
||||
{
|
||||
return fWithRollup;
|
||||
}
|
||||
void withRollup(bool withRollup)
|
||||
{
|
||||
fWithRollup = withRollup;
|
||||
}
|
||||
|
||||
/**
|
||||
* order by column list
|
||||
*/
|
||||
@ -957,6 +969,10 @@ class CalpontSelectExecutionPlan : public CalpontExecutionPlan
|
||||
long fTimeZone = 0;
|
||||
std::vector<execplan::ParseTree*> fDynamicParseTreeVec;
|
||||
std::string fPron;
|
||||
/**
|
||||
* A flag to compute subtotals, related to GROUP BY operation.
|
||||
*/
|
||||
bool fWithRollup;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user