Skip to content

Commit d328a94

Browse files
Add forgotten changes
1 parent 0c56d2b commit d328a94

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

dbcon/joblist/groupconcat.cpp

+6-3
Original file line numberDiff line numberDiff line change
@@ -329,14 +329,15 @@ void GroupConcatAg::initialize()
329329
fRowGroup.resetRowGroup(0);
330330
fRowGroup.initRow(&fRow);
331331
fRowGroup.getRow(0, &fRow);
332+
fMemSize = fRowGroup.getSizeWithStrings(1);
332333
}
333334
else
334335
{
335336
fGroupConcat->fRowGroup.initRow(&fRow, true);
336337
fData.reset(new uint8_t[fRow.getSize()]);
337338
fRow.setData(rowgroup::Row::Pointer(fData.get()));
339+
fMemSize = fRow.getSize();
338340
}
339-
fMemSize = fRowGroup.getSizeWithStrings(1);
340341
}
341342

342343
void GroupConcatAg::processRow(const rowgroup::Row& inRow)
@@ -1055,7 +1056,7 @@ void GroupConcatOrderBy::deserialize(messageqcpp::ByteStream& bs)
10551056

10561057
void GroupConcatOrderBy::createNewRGData()
10571058
{
1058-
auto newSize = fRowGroup.getDataSize(fRowsPerRG);
1059+
auto newSize = fRowGroup.getSizeWithStrings(fRowsPerRG);
10591060

10601061
fMemSize += newSize;
10611062

@@ -1069,7 +1070,9 @@ void GroupConcatOrderBy::createNewRGData()
10691070

10701071
rowgroup::RGDataSizeType GroupConcatOrderBy::getDataSize() const
10711072
{
1072-
return fMemSize;
1073+
return fMemSize
1074+
+ fOrderByQueue->capacity() * sizeof(OrderByRow)
1075+
+ fDistinctMap->size() * 32 /* TODO: speculative unordered_map memory consumption per item, replace it with counting allocator */;
10731076
}
10741077

10751078
void GroupConcatOrderBy::processRow(const rowgroup::Row& row)

0 commit comments

Comments
 (0)