Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 30 additions & 30 deletions reference/tools/ticdc/column-ddl-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,36 +9,36 @@ Column 和 DDL 的类型码是由 [TiCDC Open Protocol](/reference/tools/ticdc/o

## Column Type Code

| 类型 | Code |
| :---------- | :--- |
| Decimal | 0 |
| Tiny | 1 |
| Short | 2 |
| Long | 3 |
| Float | 4 |
| Double | 5 |
| Null | 6 |
| Timestamp | 7 |
| Longlong | 8 |
| Int24 | 9 |
| Date | 10 |
| Duration | 11 |
| Datetime | 12 |
| Year | 13 |
| New Date | 14 |
| Varchar | 15 |
| Bit | 16 |
| JSON | 0xf5 |
| New Decimal | 0xf6 |
| Enum | 0xf7 |
| Set | 0xf8 |
| Tiny Blob | 0xf9 |
| Medium Blob | 0xfa |
| Long Blob | 0xfb |
| Blob | 0xfc |
| Var String | 0xfd |
| String | 0xfe |
| Geometry | 0xff |
| 类型 | Code | 输出示例 | 说明 |
| :---------- | :--- | :------ | :-- |
| Decimal | 0 | {"t":0,"v":"129012.1230000"} | |
| Tiny/Bool | 1 | {"t":1,"v":1} | |
| Short | 2 | {"t":2,"v":1} | |
| Long | 3 | {"t":3,"v":123} | |
| Float | 4 | {"t":4,"v":153.123} | |
| Double | 5 | {"t":5,"v":153.123} | |
| Null | 6 | {"t":6,"v":null} | |
| Timestamp | 7 | {"t":7,"v":"1973-12-30 15:30:00"} | |
| Longlong | 8 | {"t":8,"v":123} | |
| Int24 | 9 | {"t":9,"v":123} | |
| Date | 10 | {"t":10,"v":"2000-01-01"} | |
| Duration | 11 | {"t":11,"v":"23:59:59"} | |
| Datetime | 12 | {"t":12,"v":"2015-12-20 23:58:58"} | |
| Year | 13 | {"t":13,"v":1970} | |
| New Date | 14 | {"t":14,"v":"2000-01-01"} | |
| Varchar | 15 | {"t":15,"v":"测试"} | value 编码为 UTF-8 |
| Bit | 16 | {"t":16,"v":81} | |
| JSON | 245 | {"t":245,"v":"{\\"key1\\": \\"value1\\"}"} | |
| New Decimal | 246 | {"t":246,"v":"129012.1230000"} | |
| Enum | 247 | {"t":247,"v":1} | |
| Set | 248 | {"t":248,"v":3} | |
| Tiny Blob | 249 | {"t":249,"v":"5rWL6K+VdGV4dA=="} | value 编码为 Base64 |
| Medium Blob | 250 | {"t":250,"v":"5rWL6K+VdGV4dA=="} | value 编码为 Base64 |
| Long Blob | 251 | {"t":251,"v":"5rWL6K+VdGV4dA=="} | value 编码为 Base64 |
| Blob | 252 | {"t":252,"v":"5rWL6K+VdGV4dA=="} | value 编码为 Base64 |
| Var String | 253 | {"t":253,"v":"测试"} | value 编码为 UTF-8 |
| String | 254 | {"t":254,"v":"测试"} | value 编码为 UTF-8 |
| Geometry | 255 | | 尚不支持 |

## DDL Type Code

Expand Down