matrixone
matrixone copied to clipboard
[Feature Request]: Support uuid function
Is there an existing issue for the same feature request?
- [X] I have checked the existing issues.
Is your feature request related to a problem?
No response
Describe the feature you'd like
Such as MySQL, the uuid funciton will return column's uuid in storage level.
create table t1(a varchar(20)); insert into t1 values('123123sdafsdf');
select uuid(),a from t1; +--------------------------------------+---------------+ | uuid() | a | +--------------------------------------+---------------+ | 976efd08-041a-11ed-a36c-c48e7bbf4d43 | 123123sdafsdf | +--------------------------------------+---------------+
Describe implementation you've considered
No response
Documentation, Adoption, Use Case, Migration Strategy
No response
Additional information
No response
uuid() is just a new function. It is arguably important enough so that we create a uuid type.
mysql UUID: https://dev.mysql.com/doc/refman/8.0/en/miscellaneous-functions.html#function_uuid
This feature request of uuid function has been fixed, unit test and bvt test have been completed, and now request acceptance test, please know! @fengttt @domingozhang @daviszhen @aressu1985
Let me reactivate this one and repurpose it.
Can we add a UUID type? [16]byte. Just 3 functions on this, cast/parse string to uuid, cast uuid to string, and uuid1 equal uuid2.
now,the Mo database will supports UUID data types. The functions involved are as follows:
- The DDL table creation statement supports UUID type fields
- UUID type fields can be used as primary key columns of tables
- UUID type fields can be queried and displayed in the client in string form
- Fields of UUID type can be sorted (order by clause)
- The UUID type supports comparison operation, and the UUID field can be used in the where / having condition
- The group by clause supports the UUID field as a grouping condition
- UUID type fields can be used as parameters of aggregation functions (max, min, count)
- The insert statement supports the insertion of UUID type data
- The update statement supports updating the field data of the UUID type table
- The delete statement supports deleting data according to the UUID type table field
- UUID type data can be converted to and from string type
- Support uuid() built-in functions
The feature requests related to uuid type and uuid function had been fixed, unit test and bvt test have been completed, and now request acceptance test, please know! @fengttt @yingfeng @daviszhen @domingozhang @aressu1985