Skip to content

Commit d68f8cf

Browse files
authored
Merge 3a9d51e into 0a9693f
2 parents 0a9693f + 3a9d51e commit d68f8cf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ydb/core/kqp/runtime/kqp_stream_lookup_worker.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,13 +349,15 @@ class TKqpLookupRows : public TKqpStreamLookupWorker {
349349
auto row = HolderFactory.CreateDirectArrayHolder(Columns.size(), rowItems);
350350

351351
i64 rowSize = 0;
352+
i64 storageRowSize = 0;
352353
for (size_t colIndex = 0, resultColIndex = 0; colIndex < Columns.size(); ++colIndex) {
353354
const auto& column = Columns[colIndex];
354355
if (IsSystemColumn(column.Name)) {
355356
NMiniKQL::FillSystemColumn(rowItems[colIndex], result.ShardId, column.Id, column.PType);
356357
rowSize += sizeof(NUdf::TUnboxedValue);
357358
} else {
358359
YQL_ENSURE(resultColIndex < resultRow.size());
360+
storageRowSize += resultRow[resultColIndex].Size();
359361
rowItems[colIndex] = NMiniKQL::GetCellValue(resultRow[resultColIndex], column.PType);
360362
rowSize += NMiniKQL::GetUnboxedValueSize(rowItems[colIndex], column.PType).AllocatedBytes;
361363
++resultColIndex;
@@ -371,9 +373,9 @@ class TKqpLookupRows : public TKqpStreamLookupWorker {
371373
batch.push_back(std::move(row));
372374

373375
resultStats.ReadRowsCount += 1;
374-
resultStats.ReadBytesCount += rowSize;
376+
resultStats.ReadBytesCount += storageRowSize;
375377
resultStats.ResultRowsCount += 1;
376-
resultStats.ResultBytesCount += rowSize;
378+
resultStats.ResultBytesCount += storageRowSize;
377379
}
378380

379381
if (result.UnprocessedResultRow == result.ReadResult->Get()->GetRowsCount()) {

0 commit comments

Comments
 (0)