From e03e85184fdc3b043d312d5fd2d6da280e6851c8 Mon Sep 17 00:00:00 2001 From: Michael Kolupaev Date: Wed, 15 May 2013 09:55:09 +0000 Subject: [PATCH] clickhouse: fixed FINAL ans SAMPLE broken by some changes in Expression [#CONV-7363]. --- dbms/src/Storages/StorageMergeTree.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbms/src/Storages/StorageMergeTree.cpp b/dbms/src/Storages/StorageMergeTree.cpp index 59eceb6ee7d..42b289db7f9 100644 --- a/dbms/src/Storages/StorageMergeTree.cpp +++ b/dbms/src/Storages/StorageMergeTree.cpp @@ -210,7 +210,7 @@ BlockInputStreams StorageMergeTree::read( filter_function->arguments = filter_function_args; filter_function->children.push_back(filter_function->arguments); - filter_expression = new Expression(filter_function, context); + filter_expression = new Expression(filter_function, context, *columns); /// Добавим столбцы, нужные для sampling_expression. std::vector add_columns = filter_expression->getRequiredColumns(); @@ -447,7 +447,7 @@ void StorageMergeTree::createPositiveSignCondition(ExpressionPtr & out_expressio one->type = new DataTypeInt8; one->value = Field(static_cast(1)); - out_expression = new Expression(function_ptr, context); + out_expression = new Expression(function_ptr, context, *columns); out_column = function->getColumnName(); }