diff options
| author | mzinal <[email protected]> | 2022-10-12 20:03:57 +0300 |
|---|---|---|
| committer | mzinal <[email protected]> | 2022-10-12 20:03:57 +0300 |
| commit | 4658f53c7e2b1311431ff2d3d34050f9b9dee45d (patch) | |
| tree | 74e48de54a405521e474145cc17f2a256be52481 | |
| parent | 2b82718da2e3dc27cf6457ccc6d04835f5a68577 (diff) | |
added explicit notes about the usage of container types
6 files changed, 24 insertions, 2 deletions
diff --git a/ydb/docs/en/core/cluster/system-requirements.md b/ydb/docs/en/core/cluster/system-requirements.md index 3c1171a448d..5e49145a670 100644 --- a/ydb/docs/en/core/cluster/system-requirements.md +++ b/ydb/docs/en/core/cluster/system-requirements.md @@ -8,7 +8,7 @@ The number of servers and disks is determined by the fault-tolerance requirement * **Processor** - A {{ ydb-short-name }} server can only run on x86-64 processors with AVX2 instruction support (Intel Haswell (4th generation) and later, AMD EPYC and later). + A {{ ydb-short-name }} server can only run on x86-64 processors with AVX2 instruction support: Intel Haswell (4th generation) and later, AMD EPYC and later. The ARM architecture is currently not supported. diff --git a/ydb/docs/en/core/yql/reference/yql-core/types/_includes/containers.md b/ydb/docs/en/core/yql/reference/yql-core/types/_includes/containers.md index b9146a071d0..c350fa9f07a 100644 --- a/ydb/docs/en/core/yql/reference/yql-core/types/_includes/containers.md +++ b/ydb/docs/en/core/yql/reference/yql-core/types/_includes/containers.md @@ -1,5 +1,9 @@ # Containers +YQL supports containers as a way to define a complex data structure organized in a certain way. +Values of container types can be passed to YQL queries as input parameters, or returned from YQL queries as output result set columns. +Container types cannot be used as the types of columns in {{ ydb-short-name }} tables. + | Type | Declaration,</br>example | Description | | ------------ | ---------------- | ------------- | | List | `List<Type>`,</br>`List<Int32>` | A variable-length sequence consisting of same-type elements. | diff --git a/ydb/docs/en/core/yql/reference/yql-core/types/_includes/optional.md b/ydb/docs/en/core/yql/reference/yql-core/types/_includes/optional.md index 2d01114405f..713798ee50b 100644 --- a/ydb/docs/en/core/yql/reference/yql-core/types/_includes/optional.md +++ b/ydb/docs/en/core/yql/reference/yql-core/types/_includes/optional.md @@ -13,6 +13,13 @@ The following operations are most often performed on optional data types: `Optional` (nullable) isn't a property of a data type or column, but a container type where [containers](../containers.md) can be arbitrarily nested into each other. For example, a column with the type `Optional<Optional<Boolean>>` can accept 4 values: `NULL` of the whole container, `NULL` of the inner container, `TRUE`, and `FALSE`. The above-declared type differs from `List<List<Boolean>>`, because it uses `NULL` as an empty list, and you can't put more than one non-null element in it. In addition, `Optional<Optional<T>>` type values are returned as results when searching by the key in the `Dict(k,v)` dictionary with `Optional<T>` type values. Using this type of result data, you can distinguish between a `NULL` value in the dictionary and a situation when the key is missing. +{% note info %} + +Currently container types (including the `Optional<T>` containers and more complex types based on them) cannot be used as the types of columns in {{ ydb-short-name }} tables. +YQL queries may return the values of container types, and can take them as input parameters. + +{% endnote %} + **Example** ```sql diff --git a/ydb/docs/ru/core/cluster/system-requirements.md b/ydb/docs/ru/core/cluster/system-requirements.md index edad28571d0..3707dd89eff 100644 --- a/ydb/docs/ru/core/cluster/system-requirements.md +++ b/ydb/docs/ru/core/cluster/system-requirements.md @@ -8,7 +8,7 @@ * **Процессор** - {{ ydb-short-name }} сервер может быть запущен только на процессорах с архитектурой x86-64 с поддержкой AVX2 инструкций (Intel Haswell (4 поколение) и более поздние, AMD EPYC и более поздние). + {{ ydb-short-name }} сервер может быть запущен только на процессорах с архитектурой x86-64 с поддержкой AVX2 инструкций: Intel Haswell (4 поколение) и более поздние, AMD EPYC и более поздние. ARM архитектура в настоящее время не поддерживается. diff --git a/ydb/docs/ru/core/yql/reference/yql-core/types/_includes/containers.md b/ydb/docs/ru/core/yql/reference/yql-core/types/_includes/containers.md index 807576552b2..d20d858511d 100644 --- a/ydb/docs/ru/core/yql/reference/yql-core/types/_includes/containers.md +++ b/ydb/docs/ru/core/yql/reference/yql-core/types/_includes/containers.md @@ -1,5 +1,9 @@ # Контейнеры +YQL поддерживает контейнерные типы для определения сложных структур данных различной организации. +Значения контейнерных типов могут быть переданы в запросы YQL в качестве входных параметров, либо возвращены из запросов YQL в качестве выходных колонок набора результатов. +Контейнерные типы не могут быть использованы в качестве типов данных колонок таблиц {{ ydb-short-name }}. + | Тип | Объявление,</br>пример | Описание | | ------------ | ---------------- | ------------- | | Список | `List<Type>`,</br>`List<Int32>` | Последовательность переменной длины, состоящая из элементов одного типа.| diff --git a/ydb/docs/ru/core/yql/reference/yql-core/types/_includes/optional.md b/ydb/docs/ru/core/yql/reference/yql-core/types/_includes/optional.md index d54682e6d0b..30b299815a9 100644 --- a/ydb/docs/ru/core/yql/reference/yql-core/types/_includes/optional.md +++ b/ydb/docs/ru/core/yql/reference/yql-core/types/_includes/optional.md @@ -13,6 +13,13 @@ `Optional` (nullable) является не свойством типа данных или колонки, а одним из видов [контейнеров](../containers.md), которые могут быть произвольным образом вложены друг в друга. Так, например, столбец с типом `Optional<Optional<Boolean>>` может принимать 4 значения - `NULL` всего контейнера, `NULL` внутреннего контейнера, `TRUE` и `FALSE`. Описанный тип отличается от `List<List<Boolean>>` тем, что роль пустого списка в нем играет `NULL` и отсутствует возможность положить больше одного содержательного элемента. Также значения типа `Optional<Optional<T>>` возвращаются в качестве результата поиска по ключу в словаре `Dict(k,v)` со значениями типа `Optional<T>`. Такой тип данных результата позволяет отличать лежащий в словаре `NULL` от ситуации отсутствия ключа. +{% note info %} + +Контейнерные типы (включая контейнеры `Optional<T>` и производные от них более сложные типы) в настоящее время нельзя использовать в качестве типов данных колонок при создании таблиц {{ ydb-short-name }}. +Запросы YQL могут возвращать значения контейнерных типов, а также принимать их в качестве входных параметров. + +{% endnote %} + **Пример** ```sql |
