You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +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:
@ -322,6 +322,8 @@ RGData::RGData(const RowGroup& rg, uint32_t rowCount)
|
||||
memset(rowData.get(), 0, rg.getDataSize(rowCount)); // XXXPAT: make valgrind happy temporarily
|
||||
#endif
|
||||
memset(rowData.get(), 0, rg.getDataSize(rowCount)); // XXXPAT: make valgrind happy temporarily
|
||||
columnCount = rg.getColumnCount();
|
||||
rowSize = rg.getRowSize();
|
||||
}
|
||||
|
||||
RGData::RGData(const RowGroup& rg)
|
||||
@ -341,6 +343,8 @@ RGData::RGData(const RowGroup& rg)
|
||||
*/
|
||||
memset(rowData.get(), 0, rg.getMaxDataSize());
|
||||
#endif
|
||||
columnCount = rg.getColumnCount();
|
||||
rowSize = rg.getRowSize();
|
||||
}
|
||||
|
||||
void RGData::reinit(const RowGroup& rg, uint32_t rowCount)
|
||||
@ -360,6 +364,8 @@ void RGData::reinit(const RowGroup& rg, uint32_t rowCount)
|
||||
*/
|
||||
memset(rowData.get(), 0, rg.getDataSize(rowCount));
|
||||
#endif
|
||||
columnCount = rg.getColumnCount();
|
||||
rowSize = rg.getRowSize();
|
||||
}
|
||||
|
||||
void RGData::reinit(const RowGroup& rg)
|
||||
@ -372,6 +378,8 @@ void RGData::serialize(ByteStream& bs, uint32_t amount) const
|
||||
// cout << "serializing!\n";
|
||||
bs << (uint32_t)RGDATA_SIG;
|
||||
bs << (uint32_t)amount;
|
||||
bs << columnCount;
|
||||
bs << rowSize;
|
||||
bs.append(rowData.get(), amount);
|
||||
|
||||
if (strings)
|
||||
@ -402,6 +410,14 @@ void RGData::deserialize(ByteStream& bs, uint32_t defAmount)
|
||||
{
|
||||
bs >> sig;
|
||||
bs >> amount;
|
||||
uint32_t colCountTemp;
|
||||
uint32_t rowSizeTemp;
|
||||
bs >> colCountTemp;
|
||||
bs >> rowSizeTemp;
|
||||
if (rowSize != 0)
|
||||
{
|
||||
idbassert(colCountTemp == columnCount && rowSize == rowSizeTemp);
|
||||
}
|
||||
rowData.reset(new uint8_t[std::max(amount, defAmount)]);
|
||||
buf = bs.buf();
|
||||
memcpy(rowData.get(), buf, amount);
|
||||
|
Reference in New Issue
Block a user