diff --git a/src/Processors/QueryPlan/ReadFromStorageStep.cpp b/src/Processors/QueryPlan/ReadFromStorageStep.cpp index 88248c0d194..fd38dd9218b 100644 --- a/src/Processors/QueryPlan/ReadFromStorageStep.cpp +++ b/src/Processors/QueryPlan/ReadFromStorageStep.cpp @@ -38,19 +38,17 @@ ReadFromStorageStep::ReadFromStorageStep( { if (query_info.prewhere_info->alias_actions) { - auto alias_actions = query_info.prewhere_info->alias_actions->buildExpressions(); pipe.addSimpleTransform([&](const Block & header) { - return std::make_shared(header, alias_actions); + return std::make_shared(header, query_info.prewhere_info->alias_actions); }); } - auto prewhere_actions = query_info.prewhere_info->prewhere_actions->buildExpressions(); pipe.addSimpleTransform([&](const Block & header) { return std::make_shared( header, - prewhere_actions, + query_info.prewhere_info->prewhere_actions, query_info.prewhere_info->prewhere_column_name, query_info.prewhere_info->remove_prewhere_column); }); @@ -61,10 +59,10 @@ ReadFromStorageStep::ReadFromStorageStep( // This leads to mismatched header in distributed table if (query_info.prewhere_info->remove_columns_actions) { - auto remove_actions = query_info.prewhere_info->remove_columns_actions->buildExpressions(); pipe.addSimpleTransform([&](const Block & header) { - return std::make_shared(header, remove_actions); + return std::make_shared( + header, query_info.prewhere_info->remove_columns_actions); }); } }