Merge pull request #23799 from kitaisreal/function-default-implementation-for-nulls-small-optimization

Function default implementation for nulls small optimization
This commit is contained in:
alexey-milovidov 2021-04-30 21:50:24 +03:00 committed by GitHub
commit eeae539a9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -149,8 +149,7 @@ ColumnPtr wrapInNullable(const ColumnPtr & src, const ColumnsWithTypeAndName & a
const NullMap & src_null_map = assert_cast<const ColumnUInt8 &>(*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;