Fix selecting with extremes from LowCardinality(UUID)

This commit is contained in:
Vitaly Baranov 2021-08-20 13:10:12 +03:00
parent c257cd61e5
commit cbc1b2e72d
3 changed files with 16 additions and 1 deletions

View File

@ -304,7 +304,7 @@ size_t ColumnUnique<ColumnType>::uniqueInsert(const Field & x)
if (x.getType() == Field::Types::Null)
return getNullValueIndex();
if (isNumeric())
if (valuesHaveFixedSize())
return uniqueInsertData(&x.reinterpret<char>(), size_of_value_if_fixed);
auto & val = x.get<String>();

View File

@ -0,0 +1,4 @@
0562380c-d1f3-4091-83d5-8c972f534317
0562380c-d1f3-4091-83d5-8c972f534317
0562380c-d1f3-4091-83d5-8c972f534317

View File

@ -0,0 +1,11 @@
DROP TABLE IF EXISTS tbl;
SET allow_suspicious_low_cardinality_types = 1;
CREATE TABLE tbl (`lc` LowCardinality(UUID)) ENGINE = Memory;
INSERT INTO tbl VALUES ('0562380c-d1f3-4091-83d5-8c972f534317');
SET extremes = 1;
SELECT * FROM tbl;
DROP TABLE tbl;