Add documentation for enable_date32_results option

This commit is contained in:
Roman Vasin 2022-09-12 09:09:01 +00:00
parent 3aa33f39ac
commit bc2c2130fc
2 changed files with 25 additions and 3 deletions

View File

@ -1259,7 +1259,7 @@ Possible values:
Default value: 1.
By default, blocks inserted into replicated tables by the `INSERT` statement are deduplicated (see [Data Replication](../../engines/table-engines/mergetree-family/replication.md)).
By default, blocks inserted into replicated tables by the `INSERT` statement are deduplicated (see [Data Replication](../../engines/table-engines/mergetree-family/replication.md)).
For the replicated tables by default the only 100 of the most recent blocks for each partition are deduplicated (see [replicated_deduplication_window](merge-tree-settings.md#replicated-deduplication-window), [replicated_deduplication_window_seconds](merge-tree-settings.md/#replicated-deduplication-window-seconds)).
For not replicated tables see [non_replicated_deduplication_window](merge-tree-settings.md/#non-replicated-deduplication-window).
@ -3144,6 +3144,17 @@ Result:
└─────┴─────┴───────┘
```
## enable_date32_results {#enable-date32-results}
Enables or disables returning results of type Date32 for functions toStartOfYear, toStartOfISOYear, toStartOfQuarter, toStartOfMonth, toStartOfWeek, toMonday and toLastDayOfMonth.
Possible values:
- 0 — Functions return Date for all types of arguments.
- 1 — Functions return Date32 for Date32 or DateTime64 arguments and Date otherwise.
Default value: `0`.
## optimize_move_to_prewhere {#optimize_move_to_prewhere}
Enables or disables automatic [PREWHERE](../../sql-reference/statements/select/prewhere.md) optimization in [SELECT](../../sql-reference/statements/select/index.md) queries.
@ -3529,8 +3540,8 @@ desc format(JSONEachRow, '{"x" : 1, "y" : "String", "z" : "0.0.0.0" }') settings
Result:
```sql
x UInt8
y Nullable(String)
x UInt8
y Nullable(String)
z IPv4
```

View File

@ -3799,6 +3799,17 @@ Exception: Total regexp lengths too large.
Значение по умолчанию: `1`.
## enable_date32_results {#enable-date32-results}
Включает и отключает возвращение результатов типа Date32 для функций toStartOfYear, toStartOfISOYear, toStartOfQuarter, toStartOfMonth, toStartOfWeek, toMonday и toLastDayOfMonth
Возможные значения:
- 0 — Функции возвращают результаты типа Date для всех типов аргументов.
- 1 — Функции возвращают результаты типа Date32 для аргументов типа Date32 или DateTime64 и возвращают Date в других случаях.
Значение по умолчанию: `0`.
**Пример**
Запрос: