mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
Store null map size into a variable
This commit is contained in:
parent
04cf144edc
commit
d5f413304d
@ -786,16 +786,17 @@ ColumnPtr ColumnNullable::getNestedColumnWithDefaultOnNull() const
|
||||
auto res = nested_column->cloneEmpty();
|
||||
const auto & null_map_data = getNullMapData();
|
||||
size_t start = 0;
|
||||
size_t end = null_map->size();
|
||||
while (start < nested_column->size())
|
||||
{
|
||||
size_t next_null_index = start;
|
||||
while (next_null_index < null_map->size() && !null_map_data[next_null_index])
|
||||
while (next_null_index < end && !null_map_data[next_null_index])
|
||||
++next_null_index;
|
||||
|
||||
if (next_null_index != start)
|
||||
res->insertRangeFrom(*nested_column, start, next_null_index - start);
|
||||
|
||||
if (next_null_index < null_map->size())
|
||||
if (next_null_index < end)
|
||||
res->insertDefault();
|
||||
|
||||
start = next_null_index + 1;
|
||||
|
Loading…
Reference in New Issue
Block a user