mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 16:50:48 +00:00
Merge pull request #3955 from yandex/low-cardinality-fix-clone-empty
Do not copy dictionary in ColumnLowCardinality::cloneEmpty
This commit is contained in:
commit
b8e847edfd
@ -236,6 +236,9 @@ void ColumnLowCardinality::gather(ColumnGathererStream & gatherer)
|
||||
MutableColumnPtr ColumnLowCardinality::cloneResized(size_t size) const
|
||||
{
|
||||
auto unique_ptr = dictionary.getColumnUniquePtr();
|
||||
if (size == 0)
|
||||
unique_ptr = unique_ptr->cloneEmpty();
|
||||
|
||||
return ColumnLowCardinality::create((*std::move(unique_ptr)).mutate(), getIndexes().cloneResized(size));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user