mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
fix function 'empty' with uuid type
This commit is contained in:
parent
de7f5dc2a5
commit
7237343fd6
@ -58,7 +58,7 @@ struct EmptyImpl
|
||||
static void uuid(const ColumnUUID::Container & container, size_t n, PaddedPODArray<UInt8> & res)
|
||||
{
|
||||
for (size_t i = 0; i < n; ++i)
|
||||
res[i] = negative ^ (container.data()->toUnderType() == 0);
|
||||
res[i] = negative ^ (container[i].toUnderType() == 0);
|
||||
}
|
||||
};
|
||||
|
||||
|
4
tests/queries/0_stateless/02124_empty_uuid.reference
Normal file
4
tests/queries/0_stateless/02124_empty_uuid.reference
Normal file
@ -0,0 +1,4 @@
|
||||
00000000-0000-0000-0000-000000000000 1
|
||||
992f6910-42b2-43cd-98bc-c812fbf9b683 0
|
||||
992f6910-42b2-43cd-98bc-c812fbf9b683 0
|
||||
00000000-0000-0000-0000-000000000000 1
|
7
tests/queries/0_stateless/02124_empty_uuid.sql
Normal file
7
tests/queries/0_stateless/02124_empty_uuid.sql
Normal file
@ -0,0 +1,7 @@
|
||||
SELECT
|
||||
arrayJoin([toUUID('00000000-0000-0000-0000-000000000000'), toUUID('992f6910-42b2-43cd-98bc-c812fbf9b683')]) AS x,
|
||||
empty(x) AS emp;
|
||||
|
||||
SELECT
|
||||
arrayJoin([toUUID('992f6910-42b2-43cd-98bc-c812fbf9b683'), toUUID('00000000-0000-0000-0000-000000000000')]) AS x,
|
||||
empty(x) AS emp;
|
Loading…
Reference in New Issue
Block a user