Merge pull request #4367 from yandex/unified-sets-fix-lc-cache

Fix LowCardinality cache for ColumnsHashing
This commit is contained in:
alexey-milovidov 2019-02-12 21:24:52 +03:00 committed by GitHub
commit d8aa74bc64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 0 deletions

View File

@ -364,7 +364,10 @@ struct HashMethodSingleLowCardinalityColumn : public SingleColumnMethod
}
if constexpr (has_mapped)
{
mapped_cache[row] = it->second;
return EmplaceResult(it->second, mapped_cache[row], inserted);
}
else
return EmplaceResult(inserted);
}

View File

@ -0,0 +1 @@
100000000 0123456789

View File

@ -0,0 +1,5 @@
drop table if exists test.lc;
create table test.lc (b LowCardinality(String)) engine=MergeTree order by b;
insert into test.lc select '0123456789' from numbers(100000000);
select count(), b from test.lc group by b;
drop table if exists test.lc;