Fix function if with nullable constexpr as cond that is not literal NULL

This commit is contained in:
Alexey Milovidov 2020-08-02 04:56:07 +03:00
parent 0adf8c723e
commit 9ad3dcacd6

View File

@ -701,19 +701,13 @@ private:
if (cond_is_true)
{
if (result_column.type->equals(*column1.type))
{
result_column.column = std::move(column1.column);
return true;
}
result_column.column = castColumn(column1, result_column.type);
return true;
}
else if (cond_is_false || cond_is_null)
{
if (result_column.type->equals(*column2.type))
{
result_column.column = std::move(column2.column);
return true;
}
result_column.column = castColumn(column2, result_column.type);
return true;
}
if (const auto * nullable = checkAndGetColumn<ColumnNullable>(*not_const_condition))