Skip to content

Commit

Permalink
unused-but-set-variable fix (ydb-platform#789)
Browse files Browse the repository at this point in the history
  • Loading branch information
azevaykin authored and adameat committed Dec 29, 2023
1 parent 968c63d commit 250e069
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions ydb/core/tx/datashard/write_unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,22 +69,18 @@ class TWriteUnit : public TExecutionUnit {
{
keyCells.clear();
keyCells.reserve(TableInfo_.KeyColumnIds.size());
ui64 keyBytes = 0;
for (ui16 keyColIdx = 0; keyColIdx < TableInfo_.KeyColumnIds.size(); ++keyColIdx) {
const TCell& cell = matrix.GetCell(rowIdx, keyColIdx);
keyBytes += cell.IsNull() ? 1 : cell.Size();
keyCells.emplace_back(cell);
}

commands.clear();
Y_ABORT_UNLESS(matrix.GetColCount() >= TableInfo_.KeyColumnIds.size());
commands.reserve(matrix.GetColCount() - TableInfo_.KeyColumnIds.size());

ui64 valueBytes = 0;
for (ui16 valueColIdx = TableInfo_.KeyColumnIds.size(); valueColIdx < matrix.GetColCount(); ++valueColIdx) {
ui32 columnTag = writeTx->RecordOperation().GetColumnIds(valueColIdx);
const TCell& cell = matrix.GetCell(rowIdx, valueColIdx);
valueBytes += cell.IsNull() ? 1 : cell.Size();

NMiniKQL::IEngineFlatHost::TUpdateCommand command = {columnTag, TKeyDesc::EColumnOperation::Set, {}, cell};
commands.emplace_back(std::move(command));
Expand Down

0 comments on commit 250e069

Please sign in to comment.