1
0
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:
Sergey Zefirov
2023-09-26 17:01:53 +03:00
committed by GitHub
parent 5013717730
commit 920607520c
20 changed files with 650 additions and 74 deletions

View File

@ -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;
};
/**