fix build after merge [#CLICKHOUSE-13]

This commit is contained in:
Alexey Zatelepin 2018-09-07 22:14:05 +03:00
parent 133c9c7c37
commit 949b4b640e
2 changed files with 6 additions and 4 deletions

View File

@ -209,11 +209,11 @@ void MutationsInterpreter::prepare(bool dry_run)
validateUpdateColumns(storage, updated_columns, column_to_affected_materialized);
/// First, break a sequence of commands into stages.
stages.emplace_back();
stages.emplace_back(context);
for (const auto & command : commands)
{
if (!stages.back().column_to_updated.empty())
stages.emplace_back();
stages.emplace_back(context);
if (command.type == MutationCommand::DELETE)
{
@ -223,7 +223,7 @@ void MutationsInterpreter::prepare(bool dry_run)
else if (command.type == MutationCommand::UPDATE)
{
if (stages.size() == 1) /// First stage only supports filtering and can't update columns.
stages.emplace_back();
stages.emplace_back(context);
NameSet affected_materialized;
@ -250,7 +250,7 @@ void MutationsInterpreter::prepare(bool dry_run)
if (!affected_materialized.empty())
{
stages.emplace_back();
stages.emplace_back(context);
for (const auto & column : columns_desc.materialized)
{
stages.back().column_to_updated.emplace(

View File

@ -59,6 +59,8 @@ private:
struct Stage
{
Stage(const Context & context) : expressions_chain(context) {}
ASTs filters;
std::unordered_map<String, ASTPtr> column_to_updated;