Skip to content

Commit

Permalink
DOC-1215 INT/UINT width in UDT changed in v3.6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
victorleeTG committed Jun 27, 2023
1 parent 360358d commit 5e9f364
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions modules/ddl-and-loading/pages/system-and-language-basics.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -439,12 +439,12 @@ TYPEDEF TUPLE "<" field_name field_type ["(" field_size ")"]

| `INT`
| Optional
| 1, 2, 4 (default), or 8 bytes
| 1, 2, 4, or 8 bytes. Default: 8 [See Note below]
| 0 to 2{caret}(N*8) - 1

| `UINT`
| Optional
| 1, 2, 4 (default), or 8 bytes
| 1, 2, 4, or 8 bytes. Default: 8 [See Note below]
| -2{caret}(N*8 - 1) to 2{caret}(N*8 - 1) - 1

| `FLOAT`
Expand Down Expand Up @@ -473,6 +473,8 @@ TYPEDEF TUPLE "<" field_name field_type ["(" field_size ")"]
| Any string under N characters
|===

NOTE: Prior to v3.6.2, the default size for INT and UINT fields in a UDT was 4 bytes.

A UDT must be defined before being used as a field in a vertex type or edge type.
To define a UDT, use the `TYPEDEF TUPLE` statement. Here is an example of a `TYPEDEF TUPLE` statement:

Expand All @@ -483,4 +485,4 @@ To define a UDT, use the `TYPEDEF TUPLE` statement. Here is an example of a `TYP
TYPEDEF TUPLE <field1 INT(1), field2 UINT, field3 STRING(10), field4 DOUBLE> My_Tuple
----

In the above example, `My_Tuple` is the name of the UDT. It contains four fields: an 1-byte `INT` field named `field1`, a 4-byte `UINT` field named `field2`, a 10-character `STRING` field named `field3`, and an (8-byte) `DOUBLE` field named `field4`.
In the above example, `My_Tuple` is the name of the UDT. It contains four fields: an 1-byte `INT` field named `field1`, a 4-byte `UINT` field named `field2`, a 10-character `STRING` field named `field3`, and an (8-byte) `DOUBLE` field named `field4`.

0 comments on commit 5e9f364

Please sign in to comment.