ClickHouse/tests/queries/0_stateless/02810_convert_uuid_to_uint128.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

8 lines
613 B
MySQL
Raw Normal View History

2023-06-30 09:49:29 +00:00
SELECT toUInt128(toUUID('00000000-0000-0000-0000-000000000000'));
SELECT toUInt128(toUUID('f82aef31-279e-431f-8b00-2899ad387aea'));
SELECT toUInt128(toUUID('ffffffff-ffff-ffff-ffff-ffffffffffff'));
SELECT toUInt64(toUUID('00000000-0000-0000-0000-000000000000')); -- { serverError NOT_IMPLEMENTED }
SELECT toInt128(toUUID('00000000-0000-0000-0000-000000000000')); -- { serverError NOT_IMPLEMENTED }
SELECT cast(toUUID('f82aef31-279e-431f-8b00-2899ad387aea'), 'UInt128');
select accurateCast(toUUID('f82aef31-279e-431f-8b00-2899ad387aea'), 'UInt128');
select toUUID('f82aef31-279e-431f-8b00-2899ad387aea')::UInt128;