mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Merge pull request #71608 from ClickHouse/backport/24.10/71388
Backport #71388 to 24.10: Fix error Invalid number of rows in Chunk with Variant column
This commit is contained in:
commit
ae1a82c835
@ -919,7 +919,7 @@ ColumnPtr ColumnVariant::permute(const Permutation & perm, size_t limit) const
|
||||
if (hasOnlyNulls())
|
||||
{
|
||||
if (limit)
|
||||
return cloneResized(limit);
|
||||
return cloneResized(limit ? std::min(size(), limit) : size());
|
||||
|
||||
/// If no limit, we can just return current immutable column.
|
||||
return this->getPtr();
|
||||
|
@ -0,0 +1,6 @@
|
||||
set allow_experimental_variant_type=1;
|
||||
create table test (x UInt64, d Variant(UInt64)) engine=Memory;
|
||||
insert into test select number, null from numbers(200000);
|
||||
select d from test order by d::String limit 32213 format Null;
|
||||
drop table test;
|
||||
|
Loading…
Reference in New Issue
Block a user