This commit is contained in:
Nikolai Kochetov 2018-04-10 17:39:16 +03:00
parent 41145c4e35
commit 0d17af82ac

View File

@ -221,10 +221,7 @@ void MergeTreeBaseBlockInputStream::executePrewhereActions(Block & block) const
{
if (prewhere_actions)
{
bool had_prewhere_column = block.has(prewhere_column_name);
prewhere_actions->execute(block);
if (!had_prewhere_column)
block.erase(prewhere_column_name);
if (block.columns() == 0)
block.insert({nullptr, std::make_shared<DataTypeNothing>(), "_nothing"});