Skip to content

Commit 8153dc6

Browse files
authored
YDB FQ: actualize predicate pushdown docs (#10242)
1 parent 69730cd commit 8153dc6

File tree

14 files changed

+151
-30
lines changed

14 files changed

+151
-30
lines changed

ydb/docs/en/core/concepts/federated_query/_includes/predicate_pushdown.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,3 @@ A specific case of predicate pushdown, where filtering expressions specified aft
99
|Comparison conditions `=`, `<>`, `<`, `<=`, `>`, `>=` with other columns or constants|`WHERE column3 > column4 OR column5 <= 10`|
1010

1111
Supported data types for filter pushdown:
12-
13-
|{{ ydb-short-name }} Data Type|
14-
|----|
15-
|`Bool`|
16-
|`Int8`|
17-
|`Uint8`|
18-
|`Int16`|
19-
|`Uint16`|
20-
|`Int32`|
21-
|`Uint32`|
22-
|`Int64`|
23-
|`Uint64`|
24-
|`Float`|
25-
|`Double`|

ydb/docs/en/core/concepts/federated_query/clickhouse.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,20 @@ There are several limitations when working with ClickHouse clusters:
5151
1. {% include [!](_includes/datetime_limits.md) %}
5252
1. {% include [!](_includes/predicate_pushdown.md) %}
5353

54+
|{{ ydb-short-name }} Data Type|
55+
|----|
56+
|`Bool`|
57+
|`Int8`|
58+
|`Uint8`|
59+
|`Int16`|
60+
|`Uint16`|
61+
|`Int32`|
62+
|`Uint32`|
63+
|`Int64`|
64+
|`Uint64`|
65+
|`Float`|
66+
|`Double`|
67+
5468
## Supported data types
5569

5670
By default, ClickHouse columns cannot physically contain `NULL` values. However, users can create tables with columns of optional or [nullable](https://clickhouse.com/docs/en/sql-reference/data-types/nullable) types. The column types displayed in {{ ydb-short-name }} when extracting data from the external ClickHouse database will depend on whether primitive or optional types are used in the ClickHouse table. Due to the previously discussed limitations of {{ ydb-short-name }} types used to store dates and times, all similar ClickHouse types are displayed in {{ ydb-short-name }} as [optional](../../yql/reference/types/optional.md).

ydb/docs/en/core/concepts/federated_query/greenplum.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,16 @@ When working with Greenplum clusters, there are a number of limitations:
5050
1. {% include [!](_includes/datetime_limits.md) %}
5151
1. {% include [!](_includes/predicate_pushdown.md) %}
5252

53+
|{{ ydb-short-name }} Data Type|
54+
|----|
55+
|`Bool`|
56+
|`Int8`|
57+
|`Int16`|
58+
|`Int32`|
59+
|`Int64`|
60+
|`Float`|
61+
|`Double`|
62+
5363
## Supported data types
5464

5565
In the Greenplum database, the optionality of column values (whether a column can contain `NULL` values) is not part of the data type system. The `NOT NULL` constraint for each column is implemented as the `attnotnull` attribute in the system catalog [pg_attribute](https://www.postgresql.org/docs/current/catalog-pg-attribute.html), i.e., at the metadata level of the table. Therefore, all basic Greenplum types can contain `NULL` values by default, and in the {{ ydb-full-name }} type system, they should be mapped to [optional](../../yql/reference/types/optional.md) types.

ydb/docs/en/core/concepts/federated_query/ms_sql_server.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ When working with Microsoft SQL Server clusters, there are a number of limitatio
4848
2. {% include [!](_includes/datetime_limits.md) %}
4949
3. {% include [!](_includes/predicate_pushdown.md) %}
5050

51+
|{{ ydb-short-name }} Data Type|
52+
|----|
53+
|`Bool`|
54+
|`Int8`|
55+
|`Int16`|
56+
|`Int32`|
57+
|`Int64`|
58+
|`Float`|
59+
|`Double`|
60+
5161
## Supported data types
5262

5363
In the Microsoft SQL Server database, the optionality of column values (whether the column can contain `NULL` values or not) is not a part of the data type system. The `NOT NULL` constraint for any column of any table is stored within the `IS_NULLABLE` column the [INFORMATION_SCHEMA.COLUMNS](https://learn.microsoft.com/en-us/sql/relational-databases/system-information-schema-views/columns-transact-sql?view=sql-server-ver16) system table, i.e., at the table metadata level. Therefore, all basic Microsoft SQL Server types can contain `NULL` values by default, and in the {{ ydb-full-name }} type system, they should be mapped to [optional](../../yql/reference/types/optional.md).

ydb/docs/en/core/concepts/federated_query/mysql.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,20 @@ When working with MySQL clusters, there are a number of limitations:
4848
2. {% include [!](_includes/datetime_limits.md) %}
4949
3. {% include [!](_includes/predicate_pushdown.md) %}
5050

51+
|{{ ydb-short-name }} Data Type|
52+
|----|
53+
|`Bool`|
54+
|`Int8`|
55+
|`Uint8`|
56+
|`Int16`|
57+
|`Uint16`|
58+
|`Int32`|
59+
|`Uint32`|
60+
|`Int64`|
61+
|`Uint64`|
62+
|`Float`|
63+
|`Double`|
64+
5165
## Supported data types
5266

5367
In the MySQL database, the optionality of column values (whether the column can contain `NULL` values or not) is not a part of the data type system. The `NOT NULL` constraint for any column of any table is stored within the `IS_NULLABLE` column the [INFORMATION_SCHEMA.COLUMNS](https://dev.mysql.com/doc/refman/8.4/en/information-schema-columns-table.html) system table, i.e., at the table metadata level. Therefore, all basic MySQL types can contain `NULL` values by default, and in the {{ ydb-full-name }} type system they should be mapped to [optional](../../yql/reference/types/optional.md).

ydb/docs/en/core/concepts/federated_query/postgresql.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,16 @@ When working with PostgreSQL clusters, there are a number of limitations:
5050
1. {% include [!](_includes/datetime_limits.md) %}
5151
1. {% include [!](_includes/predicate_pushdown.md) %}
5252

53+
|{{ ydb-short-name }} Data Type|
54+
|----|
55+
|`Bool`|
56+
|`Int8`|
57+
|`Int16`|
58+
|`Int32`|
59+
|`Int64`|
60+
|`Float`|
61+
|`Double`|
62+
5363
## Supported data types
5464

5565
In the PostgreSQL database, the optionality of column values (whether a column can contain `NULL` values) is not part of the data type system. The `NOT NULL` constraint for each column is implemented as the `attnotnull` attribute in the system catalog [pg_attribute](https://www.postgresql.org/docs/current/catalog-pg-attribute.html), i.e., at the metadata level of the table. Therefore, all basic PostgreSQL types can contain `NULL` values by default, and in the {{ ydb-full-name }} type system, they should be mapped to [optional](../../yql/reference/types/optional.md) types.

ydb/docs/en/core/concepts/federated_query/ydb.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,22 @@ There are several limitations when working with external {{ ydb-short-name }} da
5353
1. {% include [!](_includes/supported_requests.md) %}
5454
1. {% include [!](_includes/predicate_pushdown.md) %}
5555

56+
|{{ ydb-short-name }} Data Type|
57+
|----|
58+
|`Bool`|
59+
|`Int8`|
60+
|`Uint8`|
61+
|`Int16`|
62+
|`Uint16`|
63+
|`Int32`|
64+
|`Uint32`|
65+
|`Int64`|
66+
|`Uint64`|
67+
|`Float`|
68+
|`Double`|
69+
|`String`|
70+
|`Utf8`|
71+
5672
## Supported data types
5773

5874
When working with tables located in the external {{ ydb-short-name }} database, users have access to a limited set of data types. All other types, except for those listed below, are not supported. Type conversion is not performed, meaning that the columns of the table from the external {{ ydb-short-name }} database retain their type after being read by the {{ ydb-short-name }} database processing the federated query.

ydb/docs/ru/core/concepts/federated_query/_includes/predicate_pushdown.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,3 @@
99
|Условий сравнения `=`, `<>`, `<`, `<=`, `>`, `>=` c другими колонками или константами. |`WHERE column3 > column4 OR column5 <= 10`.|
1010

1111
Поддерживаемые типы данных для пушдауна фильтров:
12-
13-
|Тип данных {{ ydb-short-name }}|
14-
|----|
15-
|`Bool`|
16-
|`Int8`|
17-
|`Uint8`|
18-
|`Int16`|
19-
|`Uint16`|
20-
|`Int32`|
21-
|`Uint32`|
22-
|`Int64`|
23-
|`Uint64`|
24-
|`Float`|
25-
|`Double`|

ydb/docs/ru/core/concepts/federated_query/clickhouse.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,20 @@ SELECT * FROM clickhouse_datasource.<table_name>
4949
1. {% include [!](_includes/datetime_limits.md) %}
5050
1. {% include [!](_includes/predicate_pushdown.md) %}
5151

52+
|Тип данных {{ ydb-short-name }}|
53+
|----|
54+
|`Bool`|
55+
|`Int8`|
56+
|`Uint8`|
57+
|`Int16`|
58+
|`Uint16`|
59+
|`Int32`|
60+
|`Uint32`|
61+
|`Int64`|
62+
|`Uint64`|
63+
|`Float`|
64+
|`Double`|
65+
5266
## Поддерживаемые типы данных
5367

5468
По умолчанию в ClickHouse колонки физически не могут содержать значение `NULL`, однако пользователь имеет возможность создать таблицу с колонками опциональных, или [nullable](https://clickhouse.com/docs/ru/sql-reference/data-types/nullable) типов. Типы колонок, отображаемые {{ ydb-short-name }} при извлечении данных из внешней базы данных ClickHouse, будут зависеть от того, используются ли в таблице ClickHouse примитивные или опциональные типы. При этом в связи с рассмотренными выше ограничениями типов {{ ydb-short-name }}, использующихся для хранения дат и времени, все аналогичные типы ClickHouse отображаются в {{ ydb-short-name }} как [опциональные](../../yql/reference/types/optional.md).

ydb/docs/ru/core/concepts/federated_query/greenplum.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
CREATE OBJECT greenplum_datasource_user_password (TYPE SECRET) WITH (value = "<password>");
1111
```
1212
13-
2. Создать [внешний источник данных](../datamodel/external_data_source.md), описывающий определённую базу данных в составе кластера Greenplum. В параметр `LOCATION` нужно передать сетевой адрес [мастер-ноды](https://greenplum.org/introduction-to-greenplum-architecture/) Greenplum. При чтении по умолчанию используется [пространство имен](https://docs.vmware.com/en/VMware-Greenplum/6/greenplum-database/ref_guide-system_catalogs-pg_namespace.html) `public`, но это значение можно изменить с помощью опционального параметра `SCHEMA`. Включить шифрование соединений к внешней базе данных можно с помощью параметра `USE_TLS="TRUE"`.
13+
1. Создать [внешний источник данных](../datamodel/external_data_source.md), описывающий определённую базу данных в составе кластера Greenplum. В параметр `LOCATION` нужно передать сетевой адрес [мастер-ноды](https://greenplum.org/introduction-to-greenplum-architecture/) Greenplum. При чтении по умолчанию используется [пространство имен](https://docs.vmware.com/en/VMware-Greenplum/6/greenplum-database/ref_guide-system_catalogs-pg_namespace.html) `public`, но это значение можно изменить с помощью опционального параметра `SCHEMA`. Включить шифрование соединений к внешней базе данных можно с помощью параметра `USE_TLS="TRUE"`.
1414
1515
```yql
1616
CREATE EXTERNAL DATA SOURCE greenplum_datasource WITH (
@@ -26,7 +26,7 @@
2626
```
2727
2828
1. {% include [!](_includes/connector_deployment.md) %}
29-
2. [Выполнить запрос](#query) к базе данных.
29+
1. [Выполнить запрос](#query) к базе данных.
3030
3131
## Синтаксис запросов {#query}
3232
@@ -49,6 +49,16 @@ SELECT * FROM greenplum_datasource.<table_name>
4949
1. {% include [!](_includes/datetime_limits.md) %}
5050
1. {% include [!](_includes/predicate_pushdown.md) %}
5151

52+
|Тип данных {{ ydb-short-name }}|
53+
|----|
54+
|`Bool`|
55+
|`Int8`|
56+
|`Int16`|
57+
|`Int32`|
58+
|`Int64`|
59+
|`Float`|
60+
|`Double`|
61+
5262
## Поддерживаемые типы данных
5363

5464
В базе данных Greenplum признак опциональности значений колонки (разрешено или запрещено колонке содержать значения `NULL`) не является частью системы типов данных. Ограничение (constraint) `NOT NULL` для каждой колонки реализуется в виде атрибута `attnotnull` в системном каталоге [pg_attribute](https://docs.vmware.com/en/VMware-Greenplum/6/greenplum-database/ref_guide-system_catalogs-pg_attribute.html), то есть на уровне метаданных таблицы. Следовательно, все базовые типы Greenplum по умолчанию могут содержать значения `NULL`, и в системе типов {{ ydb-full-name }} они должны отображаться в [опциональные](../../yql/reference/types/optional.md) типы.

ydb/docs/ru/core/concepts/federated_query/ms_sql_server.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ SELECT * FROM ms_sql_server_datasource.<table_name>
4848
1. {% include [!](_includes/datetime_limits.md) %}
4949
1. {% include [!](_includes/predicate_pushdown.md) %}
5050

51+
|Тип данных {{ ydb-short-name }}|
52+
|----|
53+
|`Bool`|
54+
|`Int8`|
55+
|`Int16`|
56+
|`Int32`|
57+
|`Int64`|
58+
|`Float`|
59+
|`Double`|
60+
5161
## Поддерживаемые типы данных
5262

5363
В базе данных Microsoft SQL Server признак опциональности значений колонки (разрешено или запрещено колонке содержать значения `NULL`) не является частью системы типов данных. Ограничение (constraint) `NOT NULL` для любой колонки любой таблицы хранится в виде значения столбца `IS_NULLABLE` системной таблицы [INFORMATION_SCHEMA.COLUMNS](https://learn.microsoft.com/ru-ru/sql/relational-databases/system-information-schema-views/columns-transact-sql?view=sql-server-ver16), то есть на уровне метаданных таблицы. Следовательно, все базовые типы Microsoft SQL Server по умолчанию могут содержать значения `NULL`, и в системе типов {{ ydb-full-name }} они должны отображаться в [опциональные](../../yql/reference/types/optional.md) типы.

ydb/docs/ru/core/concepts/federated_query/mysql.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,20 @@ SELECT * FROM mysql_datasource.<table_name>
4848
1. {% include [!](_includes/datetime_limits.md) %}
4949
1. {% include [!](_includes/predicate_pushdown.md) %}
5050

51+
|Тип данных {{ ydb-short-name }}|
52+
|----|
53+
|`Bool`|
54+
|`Int8`|
55+
|`Uint8`|
56+
|`Int16`|
57+
|`Uint16`|
58+
|`Int32`|
59+
|`Uint32`|
60+
|`Int64`|
61+
|`Uint64`|
62+
|`Float`|
63+
|`Double`|
64+
5165
## Поддерживаемые типы данных
5266

5367
В базе данных MySQL признак опциональности значений колонки (разрешено или запрещено колонке содержать значения `NULL`) не является частью системы типов данных. Ограничение (constraint) `NOT NULL` для любой колонки любой таблицы хранится в виде значения столбца `IS_NULLABLE` системной таблицы [INFORMATION_SCHEMA.COLUMNS](https://dev.mysql.com/doc/refman/8.4/en/information-schema-columns-table.html), то есть на уровне метаданных таблицы. Следовательно, все базовые типы MySQL по умолчанию могут содержать значения `NULL`, и в системе типов {{ ydb-full-name }} они должны отображаться в [опциональные](../../yql/reference/types/optional.md) типы.

ydb/docs/ru/core/concepts/federated_query/postgresql.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,16 @@ SELECT * FROM postgresql_datasource.<table_name>
5050
1. {% include [!](_includes/datetime_limits.md) %}
5151
1. {% include [!](_includes/predicate_pushdown.md) %}
5252

53+
|Тип данных {{ ydb-short-name }}|
54+
|----|
55+
|`Bool`|
56+
|`Int8`|
57+
|`Int16`|
58+
|`Int32`|
59+
|`Int64`|
60+
|`Float`|
61+
|`Double`|
62+
5363
## Поддерживаемые типы данных
5464

5565
В базе данных PostgreSQL признак опциональности значений колонки (разрешено или запрещено колонке содержать значения `NULL`) не является частью системы типов данных. Ограничение (constraint) `NOT NULL` для каждой колонки реализуется в виде атрибута `attnotnull` в системном каталоге [pg_attribute](https://www.postgresql.org/docs/current/catalog-pg-attribute.html), то есть на уровне метаданных таблицы. Следовательно, все базовые типы PostgreSQL по умолчанию могут содержать значения `NULL`, и в системе типов {{ ydb-full-name }} они должны отображаться в [опциональные](../../yql/reference/types/optional.md) типы.

ydb/docs/ru/core/concepts/federated_query/ydb.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,23 @@ SELECT * FROM ydb_datasource.<table_name>
5353
1. {% include [!](_includes/supported_requests.md) %}
5454
1. {% include [!](_includes/predicate_pushdown.md) %}
5555

56+
|Тип данных {{ ydb-short-name }}|
57+
|----|
58+
|`Bool`|
59+
|`Int8`|
60+
|`Uint8`|
61+
|`Int16`|
62+
|`Uint16`|
63+
|`Int32`|
64+
|`Uint32`|
65+
|`Int64`|
66+
|`Uint64`|
67+
|`Float`|
68+
|`Double`|
69+
|`String`|
70+
|`Utf8`|
71+
72+
5673
## Поддерживаемые типы данных
5774

5875
При работе с таблицами, размещёнными во внешней базе {{ ydb-short-name }}, пользователям доступен ограниченный набор типов данных. Все остальные типы, за исключением перечисленных ниже, не поддерживаются. Преобразование типов не производится, то есть колонки таблицы из внешней базы {{ ydb-short-name }} сохраняют свой тип после вычитывания этой таблицы базой {{ ydb-short-name }}, обрабатывающей федеративный запрос.

0 commit comments

Comments
 (0)