mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2026-10-28 16:18:23 +08:00
89 lines
5.8 KiB
Plaintext
89 lines
5.8 KiB
Plaintext
---
|
|
title: 'function_* session settings'
|
|
sidebarTitle: 'function_*'
|
|
toc_max_heading_level: 2
|
|
description: 'ClickHouse session settings in the function_* generated group.'
|
|
doc_type: 'reference'
|
|
---
|
|
|
|
{/*AUTOGENERATED_START*/}
|
|
|
|
import SettingsInfoBlock from "/snippets/components/SettingsInfoBlock/SettingsInfoBlock.jsx";
|
|
import { VersionHistory } from "/snippets/components/VersionHistory/VersionHistory.jsx";
|
|
|
|
These settings are available in [system.settings](/reference/system-tables/settings) and are autogenerated from [source](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp).
|
|
|
|
## function_base58_max_input_size {#function_base58_max_input_size}
|
|
|
|
<SettingsInfoBlock type="UInt64" default_value="10000" />
|
|
|
|
<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.6"},{"label": "10000"},{"label": "New setting that limits the input size of `base58Encode`, `base58Decode` and `tryBase58Decode` (whose conversion is quadratic in the input length) to 10 KB by default. The compatibility value `0` disables the limit, restoring the previous behavior of accepting arbitrarily large inputs."}]}]}/>
|
|
|
|
Maximum size, in bytes, of a single input value for the functions `base58Encode`, `base58Decode` and `tryBase58Decode`. The generic `base58` conversion is quadratic in the input length, so a single large value can run for a very long time. `base58` is meant for short data (keys, hashes, addresses), so the default of 10 KB is a generous safety threshold. `base58Encode` and `base58Decode` throw `TOO_LARGE_STRING_SIZE` for larger inputs, while `tryBase58Decode` returns an empty string. A value of `0` disables the limit (the behavior before this setting was introduced). The linear `base32` and `base64` functions are unaffected.
|
|
|
|
## function_date_trunc_return_type_behavior {#function_date_trunc_return_type_behavior}
|
|
|
|
<SettingsInfoBlock type="UInt64" default_value="0" />
|
|
|
|
<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.7"},{"label": "0"},{"label": "Add new setting to preserve old behaviour of dateTrunc function"}]}, {"id": "row-2","items": [{"label": "25.4"},{"label": "0"},{"label": "Change the result type for dateTrunc function for DateTime64\/Date32 arguments to DateTime64\/Date32 regardless of time unit to get correct result for negative values"}]}]}/>
|
|
|
|
Allows to change the behaviour of the result type of `dateTrunc` function.
|
|
|
|
Possible values:
|
|
|
|
- 0 - When the second argument is `DateTime64/Date32` the return type will be `DateTime64/Date32` regardless of the time unit in the first argument.
|
|
- 1 - For `Date32` the result is always `Date`. For `DateTime64` the result is `DateTime` for time units `second` and higher.
|
|
|
|
## function_locate_has_mysql_compatible_argument_order {#function_locate_has_mysql_compatible_argument_order}
|
|
|
|
<SettingsInfoBlock type="Bool" default_value="1" />
|
|
|
|
<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.3"},{"label": "1"},{"label": "Increase compatibility with MySQL's locate function."}]}]}/>
|
|
|
|
Controls the order of arguments in function [locate](/reference/functions/regular-functions/string-search-functions#locate).
|
|
|
|
Possible values:
|
|
|
|
- 0 — Function `locate` accepts arguments `(haystack, needle[, start_pos])`.
|
|
- 1 — Function `locate` accepts arguments `(needle, haystack, [, start_pos])` (MySQL-compatible behavior)
|
|
|
|
## function_range_max_elements_in_block {#function_range_max_elements_in_block}
|
|
|
|
<SettingsInfoBlock type="UInt64" default_value="500000000" />
|
|
|
|
Sets the safety threshold for data volume generated by functions [range](/reference/functions/regular-functions/array-functions#range),
|
|
[arrayPermutations](/reference/functions/regular-functions/array-functions#arrayPermutations),
|
|
[arrayPartialPermutations](/reference/functions/regular-functions/array-functions#arrayPartialPermutations),
|
|
[arrayCombinations](/reference/functions/regular-functions/array-functions#arrayCombinations),
|
|
[timeSeriesRange](/reference/functions/regular-functions/time-series-functions#timeSeriesRange),
|
|
and [timeSeriesFromGrid](/reference/functions/regular-functions/time-series-functions#timeSeriesFromGrid).
|
|
Defines the maximum number of values generated by functions per block of data (sum of array sizes for every row in a block).
|
|
For the combinatorics functions, which return `Array(Array(T))`, every generated inner array counts as its size plus one, so zero-length results still consume the limit.
|
|
|
|
Possible values:
|
|
|
|
- Positive integer.
|
|
|
|
**See Also**
|
|
|
|
- [`max_block_size`](/reference/settings/session-settings/max#max_block_size)
|
|
- [`min_insert_block_size_rows`](/reference/settings/session-settings/min-insert#min_insert_block_size_rows)
|
|
|
|
## function_sleep_max_microseconds_per_block {#function_sleep_max_microseconds_per_block}
|
|
|
|
<SettingsInfoBlock type="UInt64" default_value="3000000" />
|
|
|
|
<VersionHistory rows={[{"id": "row-1","items": [{"label": "23.7"},{"label": "3000000"},{"label": "In previous versions, the maximum sleep time of 3 seconds was applied only for `sleep`, but not for `sleepEachRow` function. In the new version, we introduce this setting. If you set compatibility with the previous versions, we will disable the limit altogether."}]}]}/>
|
|
|
|
Maximum number of microseconds the function `sleep` is allowed to sleep for each block. If a user called it with a larger value, it throws an exception. It is a safety threshold.
|
|
|
|
## function_visible_width_behavior {#function_visible_width_behavior}
|
|
|
|
<SettingsInfoBlock type="UInt64" default_value="1" />
|
|
|
|
<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.1"},{"label": "1"},{"label": "We changed the default behavior of `visibleWidth` to be more precise"}]}]}/>
|
|
|
|
The version of `visibleWidth` behavior. 0 - only count the number of code points; 1 - correctly count zero-width and combining characters, count full-width characters as two, estimate the tab width, count delete characters.
|
|
|
|
{/*AUTOGENERATED_END*/}
|