From b64bb8af1481870efbd526da38360ee0409ec065 Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Mon, 20 Aug 2018 15:57:31 +0300 Subject: [PATCH] Fix tests. --- dbms/src/Interpreters/InterpreterSelectQuery.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dbms/src/Interpreters/InterpreterSelectQuery.cpp b/dbms/src/Interpreters/InterpreterSelectQuery.cpp index e191c1a49b3..c248340dd82 100644 --- a/dbms/src/Interpreters/InterpreterSelectQuery.cpp +++ b/dbms/src/Interpreters/InterpreterSelectQuery.cpp @@ -438,6 +438,12 @@ void InterpreterSelectQuery::executeImpl(Pipeline & pipeline, const BlockInputSt { pipeline.streams.emplace_back(std::make_shared(source_header)); expressions = analyzeExpressions(QueryProcessingStage::FetchColumns, true); + + if (expressions.prewhere_info) + pipeline.streams.back() = std::make_shared( + pipeline.streams.back(), expressions.prewhere_info->prewhere_actions, + expressions.prewhere_info->prewhere_column_name, expressions.prewhere_info->remove_prewhere_column + ); } else {