Fixed errors [#CLICKHOUSE-2].

This commit is contained in:
Alexey Milovidov 2017-07-25 01:41:35 +03:00
parent 8760387b80
commit 17be9125a0
2 changed files with 2 additions and 5 deletions

View File

@ -96,7 +96,7 @@ void FunctionIsNotNull::executeImpl(Block & block, const ColumnNumbers & argumen
}; };
FunctionIsNull{}.executeImpl(temp_block, {0}, 1); FunctionIsNull{}.executeImpl(temp_block, {0}, 1);
FunctionNot{}.executeImpl(temp_block, {1}, 2); FunctionNot{}.execute(temp_block, {1}, 2);
block.getByPosition(result).column = std::move(temp_block.getByPosition(2).column); block.getByPosition(result).column = std::move(temp_block.getByPosition(2).column);
} }

View File

@ -163,10 +163,7 @@ bool defaultImplementationForConstantArguments(
{ {
const ColumnWithTypeAndName & column = block.getByPosition(args[arg_num]); const ColumnWithTypeAndName & column = block.getByPosition(args[arg_num]);
/// Don't materialize NULL constant column, because it is needed for subsequent defaultImplementationForNulls. if (arguments_to_remain_constants.end() != std::find(arguments_to_remain_constants.begin(), arguments_to_remain_constants.end(), arg_num))
if (column.column->isNull()
|| arguments_to_remain_constants.end() != std::find(arguments_to_remain_constants.begin(), arguments_to_remain_constants.end(), arg_num))
temporary_block.insert(column); temporary_block.insert(column);
else else
temporary_block.insert({ static_cast<const ColumnConst *>(column.column.get())->getDataColumnPtr(), column.type, column.name }); temporary_block.insert({ static_cast<const ColumnConst *>(column.column.get())->getDataColumnPtr(), column.type, column.name });