From 8311c23d83f0dacb7894ff5953548352f8519d60 Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Fri, 7 Sep 2018 23:23:28 +0300 Subject: [PATCH] Fix test. --- dbms/src/Interpreters/ExpressionAnalyzer.cpp | 3 +-- dbms/src/Storages/MergeTree/MergeTreeBlockInputStream.cpp | 2 +- .../src/Storages/MergeTree/MergeTreeThreadBlockInputStream.cpp | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/dbms/src/Interpreters/ExpressionAnalyzer.cpp b/dbms/src/Interpreters/ExpressionAnalyzer.cpp index c0667c500ff..4fad806bef0 100644 --- a/dbms/src/Interpreters/ExpressionAnalyzer.cpp +++ b/dbms/src/Interpreters/ExpressionAnalyzer.cpp @@ -207,8 +207,7 @@ ExpressionAnalyzer::ExpressionAnalyzer( source_columns.swap(physical_columns); else { - physical_columns.insert(physical_columns.end(), source_columns.begin(), source_columns.end()); - source_columns.swap(physical_columns); + source_columns.insert(source_columns.end(), physical_columns.begin(), physical_columns.end()); removeDuplicateColumns(source_columns); } } diff --git a/dbms/src/Storages/MergeTree/MergeTreeBlockInputStream.cpp b/dbms/src/Storages/MergeTree/MergeTreeBlockInputStream.cpp index 8a3fccc5e43..01548d0971d 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeBlockInputStream.cpp +++ b/dbms/src/Storages/MergeTree/MergeTreeBlockInputStream.cpp @@ -77,8 +77,8 @@ MergeTreeBlockInputStream::MergeTreeBlockInputStream( } } - injectVirtualColumns(header); executePrewhereActions(header, prewhere_info); + injectVirtualColumns(header); ordered_names = getHeader().getNames(); } diff --git a/dbms/src/Storages/MergeTree/MergeTreeThreadBlockInputStream.cpp b/dbms/src/Storages/MergeTree/MergeTreeThreadBlockInputStream.cpp index f1a23933e65..7cfd8f9d539 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeThreadBlockInputStream.cpp +++ b/dbms/src/Storages/MergeTree/MergeTreeThreadBlockInputStream.cpp @@ -42,8 +42,8 @@ MergeTreeThreadBlockInputStream::MergeTreeThreadBlockInputStream( Block MergeTreeThreadBlockInputStream::getHeader() const { auto res = pool->getHeader(); - injectVirtualColumns(res); executePrewhereActions(res, prewhere_info); + injectVirtualColumns(res); return res; }