diff --git a/src/Functions/IFunction.cpp b/src/Functions/IFunction.cpp index 0a8e8f426b0..43b344bebc4 100644 --- a/src/Functions/IFunction.cpp +++ b/src/Functions/IFunction.cpp @@ -149,8 +149,7 @@ ColumnPtr wrapInNullable(const ColumnPtr & src, const ColumnsWithTypeAndName & a const NullMap & src_null_map = assert_cast(*null_map_column).getData(); for (size_t i = 0, size = result_null_map.size(); i < size; ++i) - if (src_null_map[i]) - result_null_map[i] = 1; + result_null_map[i] |= src_null_map[i]; result_null_map_column = std::move(mutable_result_null_map_column); } @@ -179,10 +178,8 @@ NullPresence getNullPresense(const ColumnsWithTypeAndName & args) for (const auto & elem : args) { - if (!res.has_nullable) - res.has_nullable = elem.type->isNullable(); - if (!res.has_null_constant) - res.has_null_constant = elem.type->onlyNull(); + res.has_nullable |= elem.type->isNullable(); + res.has_null_constant |= elem.type->onlyNull(); } return res;