Skip to content

Commit f9fcb8a

Browse files
azevaykinanton-bobkovblinkov
committed
Docs: Parameterized decimal (#19482)
Co-authored-by: anton-bobkov <anton-bobkov@ydb.tech> Co-authored-by: Ivan Blinkov <ivan@ydb.tech>
1 parent 090ea14 commit f9fcb8a

File tree

5 files changed

+69
-2
lines changed

5 files changed

+69
-2
lines changed

ydb/docs/en/core/reference/ydb-cli/_includes/workload/init_options_tpc.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,11 @@
77
| `--external-s3-endpoint <value>` or `-e <value>` | Relevant only for external tables. Link to the S3 bucket with data. | |
88
| `--string` | Use the `String` type for text fields. | `Utf8` |
99
| `--datetime` | Use for time-related fields of type `Date`, `Datetime`, and `Timestamp`. | `Date32`, `Datetime64`, `Timestamp64` |
10+
<<<<<<< HEAD
1011
| `--float-mode <value>` | Specifies the data type to use for fractional fields. Possible values are `float`, `decimal`, and `decimal_ydb`. `float` uses the `Float` type, `decimal` uses `Decimal` with dimensions specified by the test standard, and `decimal_ydb` uses `Decimal(22,9)` — the only type currently supported by {{ ydb-short-name }}. | `float` |
12+
=======
13+
| `--partition-size` | Maximum partition size in megabytes (AUTO_PARTITIONING_PARTITION_SIZE_MB) for row tables. | 2000 |
14+
| `--float-mode <value>` | Specifies the data type to use for fractional fields. Possible values are `float`, `decimal`, and `decimal_ydb`. `float` uses the `Float` type, `decimal` uses `Decimal` with dimensions specified by the test standard, and `decimal_ydb` uses `Decimal(22,9)`. | `float` |
15+
| `--scale` | Sets the percentage of the benchmark's data size and workload to use, relative to full scale. | 1 |
16+
>>>>>>> bffc067fe7b (Docs: Parameterized decimal (#19482))
1117
| `--clear` | If the table at the specified path already exists, it will be deleted. | |

ydb/docs/en/core/yql/reference/types/json.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Real 8-byte number.
4242

4343
## Decimal {#decimal}
4444

45-
Fixed-precision number. Only Decimal(22, 9) is supported.
45+
Fixed-precision number.
4646

4747
* Type in JSON: `string`.
4848
* Sample {{ backend_name }} value: `-320.789`.

ydb/docs/en/core/yql/reference/types/primitive.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The terms "simple", "primitive", and "elementary" data types are used synonymous
1919
| `Uint64` | An unsigned integer.<br/>Acceptable values: from 0 to 2<sup>64</sup>–1. | |
2020
| `Float` | A real number with variable precision, 4 bytes in size. | {% if feature_map_tables %}Can't be used in the primary key{% endif %} |
2121
| `Double` | A real number with variable precision, 8 bytes in size. | {% if feature_map_tables %}Can't be used in the primary key{% endif %} |
22-
| `Decimal` | A real number with the specified precision, up to 35 decimal digits | {% if feature_map_tables %}When used in table columns, the precision is fixed: Decimal(22,9){% endif %} |
22+
| `Decimal(precision, scale)` | A real number with the specified precision, 16 bytes in size. Precision is the maximum total number of decimal digits stored and can range from 1 to 35. Scale is the maximum number of decimal digits stored to the right of the decimal point and can range from 0 to the precision value. | |
2323
{% if feature_map_tables %}
2424
|`DyNumber` | A binary representation of a real number with an accuracy of up to 38 digits.<br/>Acceptable values: positive numbers from 1×10<sup>-130</sup> up to 1×10<sup>126</sup>–1, negative numbers from -1×10<sup>126</sup>–1 to -1×10<sup>-130</sup>, and 0.<br/>Compatible with the `Number` type in AWS DynamoDB. It's not recommended for {{ backend_name_lower }}-native applications. | |
2525
{% endif %}

ydb/docs/ru/core/reference/ydb-cli/_includes/workload/init_options_tpc.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,12 @@
77
`--external-s3-endpoint <значение>` или `-e <значение>` | Актуально только для внешних таблиц. Ссылка на S3-Bucket с данными. |
88
`--string` | Использовать для текстовых полей тип `String`. | `Utf8`
99
`--datetime` | Использовать для полей, связанных со временем типа `Date`, `Datetime` и `Timestamp`. | `Date32`, `Datetime64` и `Timestamp64`
10+
<<<<<<< HEAD
1011
`--float-mode <значение>` | Какой тип данных использовать для полей вещественного типа. Возможные значения: `float`, `decimal` и `decimal_ydb`. `float` - использовать тип `Float`, `decimal` - `Decimal` с размерностью, заданной стандартом теста, а `decimal_ydb` - использовать тип `Decimal(22,9)` - единственный, который сейчас поддерживает YDB. | `float`
12+
=======
13+
| `--partition-size` | Максимальный размер партиции в мегабайтах (AUTO_PARTITIONING_PARTITION_SIZE_MB) для строчных таблиц | 2000 |
14+
`--float-mode <значение>` | Какой тип данных использовать для полей вещественного типа. Возможные значения: `float`, `decimal` и `decimal_ydb`. `float` - использовать тип `Float`, `decimal` - `Decimal` с размерностью, заданной стандартом теста, а `decimal_ydb` - использовать тип `Decimal(22,9)`. | `float`
15+
`--scale` | Задает процент от полного размера данных и нагрузки теста, который будет использоваться. | 1
16+
17+
>>>>>>> bffc067fe7b (Docs: Parameterized decimal (#19482))
1118
`--clear` | Если по указанному пути таблица уже была создана, она будет удалена. |

ydb/docs/ru/core/yql/reference/types/primitive.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
## Числовые типы {#numeric}
88

9+
<<<<<<< HEAD
910
| Тип | Описание | Примечания |
1011
| ----- | ----- | ----- |
1112
| `Bool` | Логическое значение. | |
@@ -20,6 +21,59 @@
2021
| `Float` | Вещественное число с переменной точностью размером 4 байта. | {% if feature_map_tables %}Не может быть использован в первичном ключе{% endif %} |
2122
| `Double` | Вещественное число с переменной точностью размером 8 байт. | {% if feature_map_tables %}Не может быть использован в первичном ключе{% endif %} |
2223
| `Decimal` | Вещественное число с указанной точностью, до 35 десятичных знаков | {% if feature_map_tables %}При использовании в колонках таблиц точность фиксирована: Decimal (22,9).{% endif %} |
24+
=======
25+
#|
26+
|| Тип |
27+
Описание |
28+
Примечания
29+
||
30+
|| `Bool` |
31+
Логическое значение. |
32+
||
33+
|| `Int8` |
34+
Целое число со знаком.
35+
Допустимые значения: от –2<sup>7</sup> до 2<sup>7</sup>–1. |
36+
||
37+
|| `Int16` |
38+
Целое число со знаком.
39+
Допустимые значения: от –2<sup>15</sup> до 2<sup>15</sup>–1. |
40+
||
41+
|| `Int32` |
42+
Целое число со знаком.
43+
Допустимые значения: от –2<sup>31</sup> до 2<sup>31</sup>–1. |
44+
||
45+
|| `Int64` |
46+
Целое число со знаком.
47+
Допустимые значения: от –2<sup>63</sup> до 2<sup>63</sup>–1. |
48+
||
49+
|| `Uint8` |
50+
Беззнаковое целое число.
51+
Допустимые значения: от 0 до 2<sup>8</sup>–1. |
52+
||
53+
|| `Uint16` |
54+
Беззнаковое целое число.
55+
Допустимые значения: от 0 до 2<sup>16</sup>–1. |
56+
||
57+
|| `Uint32` |
58+
Беззнаковое целое число.
59+
Допустимые значения: от 0 до 2<sup>32</sup>–1. |
60+
||
61+
|| `Uint64` |
62+
Беззнаковое целое число.
63+
Допустимые значения: от 0 до 2<sup>64</sup>–1. |
64+
||
65+
|| `Float` |
66+
Вещественное число с переменной точностью размером 4 байта. |
67+
{% if feature_map_tables %}Не может быть использован в первичном ключе{% endif %}
68+
||
69+
|| `Double` |
70+
Вещественное число с переменной точностью размером 8 байт. |
71+
{% if feature_map_tables %}Не может быть использован в первичном ключе{% endif %}
72+
||
73+
|| `Decimal(precision, scale)` |
74+
Вещественное число с фиксированной точностью размером 16 байт. Точность (precision) — максимальное общее число хранимых десятичных разрядов, принимает значения от 1 до 35. Масштаб (scale) — максимальное число хранимых десятичных разрядов справа от десятичной запятой, принимает значения от 0 до значения precision. |
75+
||
76+
>>>>>>> bffc067fe7b (Docs: Parameterized decimal (#19482))
2377
{% if feature_map_tables %}
2478
| `DyNumber` | Бинарное представление вещественного числа точностью до 38 знаков.<br/>Допустимые значения: положительные от 1×10<sup>-130</sup> до 1×10<sup>126</sup>–1, отрицательные от -1×10<sup>126</sup>–1 до -1×10<sup>-130</sup> и 0.<br/>Совместим с типом `Number` AWS DynamoDB. Не рекомендуется для использования в {{ backend_name_lower }}-native приложениях. | |
2579
{% endif %}

0 commit comments

Comments
 (0)