From 899ed17306e349ac33a651b88eb26175a1e2214e Mon Sep 17 00:00:00 2001 From: Sebastian Gruza Date: Wed, 30 Sep 2026 12:51:52 +0000 Subject: [PATCH 1/3] docs: add the DECIMAL property data type (apache/hugegraph#3209, apache/hugegraph-toolchain#771) Co-Authored-By: Claude Opus 4.8 --- content/cn/docs/clients/hugegraph-client.md | 1 + content/cn/docs/clients/restful-api/propertykey.md | 2 +- content/en/docs/clients/hugegraph-client.md | 1 + content/en/docs/clients/restful-api/propertykey.md | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/content/cn/docs/clients/hugegraph-client.md b/content/cn/docs/clients/hugegraph-client.md index 8d357c3f28..e08cc398bf 100644 --- a/content/cn/docs/clients/hugegraph-client.md +++ b/content/cn/docs/clients/hugegraph-client.md @@ -120,6 +120,7 @@ PropertyKey 允许定义的约束信息包括:name、datatype、cardinality、 | asByte() | Byte | | asBlob() | Byte[] | | asDouble() | Double | +| asDecimal() | BigDecimal | | asFloat() | Float | | asLong() | Long | diff --git a/content/cn/docs/clients/restful-api/propertykey.md b/content/cn/docs/clients/restful-api/propertykey.md index fc04e8456f..82c47822ba 100644 --- a/content/cn/docs/clients/restful-api/propertykey.md +++ b/content/cn/docs/clients/restful-api/propertykey.md @@ -10,7 +10,7 @@ description: "PropertyKey(属性键)REST 接口:定义图中所有属性的 Params 说明: - name:属性类型名称,必填 -- data_type:属性类型数据类型,包括:bool、byte、int、long、float、double、text、date、uuid、blob,默认 `text` 类型 (代表 string 字符串类型) +- data_type:属性类型数据类型,包括:bool、byte、int、long、float、double、decimal、text、date、uuid、blob,默认 `text` 类型 (代表 string 字符串类型)。`decimal` 为精确十进制数 (Java `BigDecimal`):最多 128 位有效数字,小数位数 (scale) 绝对值不超过 128;请求和响应中均以带全部数字的 JSON 数字表示,客户端不应按 double 解析 - cardinality:属性类型基数,包括:single、list、set,默认 `single` (代表单属性值) 请求体字段说明: diff --git a/content/en/docs/clients/hugegraph-client.md b/content/en/docs/clients/hugegraph-client.md index a0d50d2d5a..0e10f10277 100644 --- a/content/en/docs/clients/hugegraph-client.md +++ b/content/en/docs/clients/hugegraph-client.md @@ -119,6 +119,7 @@ The constraint information that PropertyKey allows to define includes: name, dat | asByte() | Byte | | asBlob() | Byte[] | | asDouble() | Double | +| asDecimal() | BigDecimal | | asFloat() | Float | | asLong() | Long | diff --git a/content/en/docs/clients/restful-api/propertykey.md b/content/en/docs/clients/restful-api/propertykey.md index ec7888bff9..d6575a0bdb 100644 --- a/content/en/docs/clients/restful-api/propertykey.md +++ b/content/en/docs/clients/restful-api/propertykey.md @@ -10,7 +10,7 @@ description: "PropertyKey REST API: Define data types and cardinality constraint Params Description: - name: The name of the property type, required. -- data_type: The data type of the property type, including: bool, byte, int, long, float, double, text, blob, date, uuid. The default data type is `text` (Represent a `string` type) +- data_type: The data type of the property type, including: bool, byte, int, long, float, double, decimal, text, blob, date, uuid. The default data type is `text` (Represent a `string` type). `decimal` holds an exact decimal number (Java `BigDecimal`): at most 128 significant digits and a scale of at most 128 in either direction; it is sent and returned as a plain JSON number with every digit, so a client must not parse it as a double - cardinality: The cardinality of the property type, including: single, list, set. The default cardinality is `single`. Request Body Field Description: From 4e4d3f16e172fd8d5b9bb0faa6082eb38ba6c91e Mon Sep 17 00:00:00 2001 From: Sebastian Gruza Date: Thu, 1 Oct 2026 08:48:30 +0000 Subject: [PATCH 2/3] docs: DECIMAL is accepted as a number or a string and returned as a string Co-Authored-By: Claude Opus 4.8 --- content/cn/docs/clients/restful-api/propertykey.md | 2 +- content/en/docs/clients/restful-api/propertykey.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/content/cn/docs/clients/restful-api/propertykey.md b/content/cn/docs/clients/restful-api/propertykey.md index 82c47822ba..fd966190e6 100644 --- a/content/cn/docs/clients/restful-api/propertykey.md +++ b/content/cn/docs/clients/restful-api/propertykey.md @@ -10,7 +10,7 @@ description: "PropertyKey(属性键)REST 接口:定义图中所有属性的 Params 说明: - name:属性类型名称,必填 -- data_type:属性类型数据类型,包括:bool、byte、int、long、float、double、decimal、text、date、uuid、blob,默认 `text` 类型 (代表 string 字符串类型)。`decimal` 为精确十进制数 (Java `BigDecimal`):最多 128 位有效数字,小数位数 (scale) 绝对值不超过 128;请求和响应中均以带全部数字的 JSON 数字表示,客户端不应按 double 解析 +- data_type:属性类型数据类型,包括:bool、byte、int、long、float、double、decimal、text、date、uuid、blob,默认 `text` 类型 (代表 string 字符串类型)。`decimal` 为精确十进制数 (Java `BigDecimal`):最多 128 位有效数字,小数位数 (scale) 绝对值不超过 128;请求中可以用 JSON 数字或字符串传入,两种形式都会被精确读取;响应中以字符串返回(例如 `"amount": "12345678901234567890.123456789012345678"`),客户端应使用 `new BigDecimal(String)` 解析,不要按 double 解析 - cardinality:属性类型基数,包括:single、list、set,默认 `single` (代表单属性值) 请求体字段说明: diff --git a/content/en/docs/clients/restful-api/propertykey.md b/content/en/docs/clients/restful-api/propertykey.md index d6575a0bdb..9c5099eba0 100644 --- a/content/en/docs/clients/restful-api/propertykey.md +++ b/content/en/docs/clients/restful-api/propertykey.md @@ -10,7 +10,7 @@ description: "PropertyKey REST API: Define data types and cardinality constraint Params Description: - name: The name of the property type, required. -- data_type: The data type of the property type, including: bool, byte, int, long, float, double, decimal, text, blob, date, uuid. The default data type is `text` (Represent a `string` type). `decimal` holds an exact decimal number (Java `BigDecimal`): at most 128 significant digits and a scale of at most 128 in either direction; it is sent and returned as a plain JSON number with every digit, so a client must not parse it as a double +- data_type: The data type of the property type, including: bool, byte, int, long, float, double, decimal, text, blob, date, uuid. The default data type is `text` (Represent a `string` type). `decimal` holds an exact decimal number (Java `BigDecimal`): at most 128 significant digits and a scale of at most 128 in either direction; in a request it may be sent as a JSON number or as a string and is read exactly either way; in a response it is returned as a string (e.g. `"amount": "12345678901234567890.123456789012345678"`), so a client parses it with `new BigDecimal(String)`, never as a double - cardinality: The cardinality of the property type, including: single, list, set. The default cardinality is `single`. Request Body Field Description: From 2c8bcbe5c5235870cc1d18433899a3a525902fd0 Mon Sep 17 00:00:00 2001 From: Sebastian Gruza Date: Fri, 2 Oct 2026 10:47:13 +0000 Subject: [PATCH 3/3] docs: DECIMAL limits (no index, primary key, sort key, OLAP index write type) and the release it ships in Co-Authored-By: Claude Opus 4.8 --- content/cn/docs/clients/hugegraph-client.md | 2 +- content/cn/docs/clients/restful-api/propertykey.md | 2 +- content/en/docs/clients/hugegraph-client.md | 2 +- content/en/docs/clients/restful-api/propertykey.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/content/cn/docs/clients/hugegraph-client.md b/content/cn/docs/clients/hugegraph-client.md index e08cc398bf..d20fa10782 100644 --- a/content/cn/docs/clients/hugegraph-client.md +++ b/content/cn/docs/clients/hugegraph-client.md @@ -120,7 +120,7 @@ PropertyKey 允许定义的约束信息包括:name、datatype、cardinality、 | asByte() | Byte | | asBlob() | Byte[] | | asDouble() | Double | -| asDecimal() | BigDecimal | +| asDecimal() | BigDecimal(精确十进制;不可索引,不可作主键/排序键;自包含 apache/hugegraph#3209 与 #771 的版本起可用) | | asFloat() | Float | | asLong() | Long | diff --git a/content/cn/docs/clients/restful-api/propertykey.md b/content/cn/docs/clients/restful-api/propertykey.md index fd966190e6..01400c57c1 100644 --- a/content/cn/docs/clients/restful-api/propertykey.md +++ b/content/cn/docs/clients/restful-api/propertykey.md @@ -10,7 +10,7 @@ description: "PropertyKey(属性键)REST 接口:定义图中所有属性的 Params 说明: - name:属性类型名称,必填 -- data_type:属性类型数据类型,包括:bool、byte、int、long、float、double、decimal、text、date、uuid、blob,默认 `text` 类型 (代表 string 字符串类型)。`decimal` 为精确十进制数 (Java `BigDecimal`):最多 128 位有效数字,小数位数 (scale) 绝对值不超过 128;请求中可以用 JSON 数字或字符串传入,两种形式都会被精确读取;响应中以字符串返回(例如 `"amount": "12345678901234567890.123456789012345678"`),客户端应使用 `new BigDecimal(String)` 解析,不要按 double 解析 +- data_type:属性类型数据类型,包括:bool、byte、int、long、float、double、decimal、text、date、uuid、blob,默认 `text` 类型 (代表 string 字符串类型)。`decimal` 为精确十进制数 (Java `BigDecimal`):最多 128 位有效数字,小数位数 (scale) 绝对值不超过 128;请求中可以用 JSON 数字或字符串传入,两种形式都会被精确读取;响应中以字符串返回(例如 `"amount": "12345678901234567890.123456789012345678"`),客户端应使用 `new BigDecimal(String)` 解析,不要按 double 解析。decimal 属性不能建索引,不能作为主键或边的排序键,也不能设置 OLAP 索引类的 write type(仅支持 `OLAP_COMMON`)。自包含 apache/hugegraph#3209 与 apache/hugegraph-toolchain#771 的版本起可用 - cardinality:属性类型基数,包括:single、list、set,默认 `single` (代表单属性值) 请求体字段说明: diff --git a/content/en/docs/clients/hugegraph-client.md b/content/en/docs/clients/hugegraph-client.md index 0e10f10277..fe9b713fb5 100644 --- a/content/en/docs/clients/hugegraph-client.md +++ b/content/en/docs/clients/hugegraph-client.md @@ -119,7 +119,7 @@ The constraint information that PropertyKey allows to define includes: name, dat | asByte() | Byte | | asBlob() | Byte[] | | asDouble() | Double | -| asDecimal() | BigDecimal | +| asDecimal() | BigDecimal (exact decimal, not indexable, not a primary/sort key; from the release with apache/hugegraph#3209 and #771) | | asFloat() | Float | | asLong() | Long | diff --git a/content/en/docs/clients/restful-api/propertykey.md b/content/en/docs/clients/restful-api/propertykey.md index 9c5099eba0..d75af4f980 100644 --- a/content/en/docs/clients/restful-api/propertykey.md +++ b/content/en/docs/clients/restful-api/propertykey.md @@ -10,7 +10,7 @@ description: "PropertyKey REST API: Define data types and cardinality constraint Params Description: - name: The name of the property type, required. -- data_type: The data type of the property type, including: bool, byte, int, long, float, double, decimal, text, blob, date, uuid. The default data type is `text` (Represent a `string` type). `decimal` holds an exact decimal number (Java `BigDecimal`): at most 128 significant digits and a scale of at most 128 in either direction; in a request it may be sent as a JSON number or as a string and is read exactly either way; in a response it is returned as a string (e.g. `"amount": "12345678901234567890.123456789012345678"`), so a client parses it with `new BigDecimal(String)`, never as a double +- data_type: The data type of the property type, including: bool, byte, int, long, float, double, decimal, text, blob, date, uuid. The default data type is `text` (Represent a `string` type). `decimal` holds an exact decimal number (Java `BigDecimal`): at most 128 significant digits and a scale of at most 128 in either direction; in a request it may be sent as a JSON number or as a string and is read exactly either way; in a response it is returned as a string (e.g. `"amount": "12345678901234567890.123456789012345678"`), so a client parses it with `new BigDecimal(String)`, never as a double. A decimal key cannot be indexed, used as a primary key or an edge sort key, or given an OLAP index write type (only `OLAP_COMMON`). Available from the release that ships apache/hugegraph#3209 and apache/hugegraph-toolchain#771 - cardinality: The cardinality of the property type, including: single, list, set. The default cardinality is `single`. Request Body Field Description: