fix build

This commit is contained in:
Nikolai Kochetov 2018-03-19 19:06:14 +03:00
parent 97b9e97487
commit 02b32dde79
3 changed files with 5 additions and 5 deletions

View File

@ -307,12 +307,12 @@ MutableColumns Block::cloneEmptyColumns() const
}
MutableColumns Block::mutateColumns() const
MutableColumns Block::mutateColumns()
{
size_t num_columns = data.size();
MutableColumns columns(num_columns);
for (size_t i = 0; i < num_columns; ++i)
columns[i] = data[i].column ? data[i].column->mutate() : data[i].type->createColumn();
columns[i] = data[i].column ? (*std::move(data[i].column)).mutate() : data[i].type->createColumn();
return columns;
}

View File

@ -109,8 +109,8 @@ public:
/** Get empty columns with the same types as in block. */
MutableColumns cloneEmptyColumns() const;
/** Get columns from block for mutation. */
MutableColumns mutateColumns() const;
/** Get columns from block for mutation. All columns in block will be nullptr. */
MutableColumns mutateColumns();
/** Replace columns in a block */
void setColumns(MutableColumns && columns);

View File

@ -62,7 +62,7 @@ void SquashingTransform::append(Block && block)
for (size_t i = 0; i < columns; ++i)
{
MutableColumnPtr mutable_column = accumulated_block.getByPosition(i).column->mutate();
MutableColumnPtr mutable_column = (*std::move(accumulated_block.getByPosition(i).column)).mutate();
mutable_column->insertRangeFrom(*block.getByPosition(i).column, 0, rows);
accumulated_block.getByPosition(i).column = std::move(mutable_column);
}