From 02b32dde79c218b5653eeeb93e578535aee96186 Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Mon, 19 Mar 2018 19:06:14 +0300 Subject: [PATCH] fix build --- dbms/src/Core/Block.cpp | 4 ++-- dbms/src/Core/Block.h | 4 ++-- dbms/src/DataStreams/SquashingTransform.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dbms/src/Core/Block.cpp b/dbms/src/Core/Block.cpp index c969e3256da..bfe3df4f67a 100644 --- a/dbms/src/Core/Block.cpp +++ b/dbms/src/Core/Block.cpp @@ -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; } diff --git a/dbms/src/Core/Block.h b/dbms/src/Core/Block.h index 7c836e49532..0afbd800539 100644 --- a/dbms/src/Core/Block.h +++ b/dbms/src/Core/Block.h @@ -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); diff --git a/dbms/src/DataStreams/SquashingTransform.cpp b/dbms/src/DataStreams/SquashingTransform.cpp index 9e8f590f171..d31ff6f8063 100644 --- a/dbms/src/DataStreams/SquashingTransform.cpp +++ b/dbms/src/DataStreams/SquashingTransform.cpp @@ -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); }