matrixorigin / matrixone

Hyperconverged cloud-edge native database
https://docs.matrixorigin.cn/en
Apache License 2.0
1.76k stars 273 forks source link

[Bug]: The uuid type does not support receiving with string #17556

Open PHK-20 opened 1 month ago

PHK-20 commented 1 month ago

Is there an existing issue for the same bug?

Branch Name

74f04ebd0

Commit ID

74f04ebd0

Other Environment Information

- Hardware parameters:
- OS type:
- Others:

Actual Behavior

image

snapshot_id is uuid type, but i can use gorm receiving with string

image

2024/07/16 07:15:37.549142 +0000 ERROR backup/backup.go:41 trace {"error": "unknown field type 243", "elapsed": "203.622ms", "rows": 0, "sql": "SELECT * FROM mo_catalog.mo_snapshots WHERE sname = '124' ORDER BY mo_snapshots.snapshot_id LIMIT 1"}

Expected Behavior

No response

Steps to Reproduce

1、create table and set id type with uuid
2、use gorm models, ID string  `gorm:"column:id"`
3、run gorm.models(&table{}).find(result)

Additional information

No response

reusee commented 1 month ago

I don't think GORM supports all MO data types since UUID is not a MySQL data type.

Either use plain SQL or change the schema of the snapshot table to use standard MySQL data types.

DanielZhangQD commented 1 month ago

To be confirmed

PHK-20 commented 1 month ago

Mo needs to implement sanner and valuer of type uuid

daviszhen commented 1 month ago

这个1.3没有计划支持。涉及提供mo的jdbc的内容。看后续安排吧。目前要么cast,要米存成varchar。mysql生态没有uuid

daviszhen commented 1 month ago

未投入

daviszhen commented 1 month ago

未投入

daviszhen commented 1 month ago

未投入

daviszhen commented 1 month ago

未投入

YANGGMM commented 1 month ago

暂时没有需求