mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
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:
commit
eeae539a9f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user