mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 16:50:48 +00:00
Added documentation
This commit is contained in:
parent
e6bca4d928
commit
562c8984a4
@ -28,7 +28,7 @@ The function also works for [arrays](array-functions.md#function-empty) or [UUID
|
||||
|
||||
**Returned value**
|
||||
|
||||
- Returns `1` for an empty string or `0` for a non-empty string.
|
||||
- Returns `1` for an empty string or `0` for a non-empty string.
|
||||
|
||||
Type: [UInt8](../data-types/int-uint.md).
|
||||
|
||||
@ -68,7 +68,7 @@ The function also works for [arrays](array-functions.md#function-notempty) or [U
|
||||
|
||||
**Returned value**
|
||||
|
||||
- Returns `1` for a non-empty string or `0` for an empty string string.
|
||||
- Returns `1` for a non-empty string or `0` for an empty string string.
|
||||
|
||||
Type: [UInt8](../data-types/int-uint.md).
|
||||
|
||||
@ -313,6 +313,30 @@ SELECT toValidUTF8('\x61\xF0\x80\x80\x80b');
|
||||
└───────────────────────┘
|
||||
```
|
||||
|
||||
## tokens {#tokens}
|
||||
|
||||
Split string into tokens using non-alpha numeric ASCII characters as separators.
|
||||
|
||||
**Arguments**
|
||||
|
||||
- `input_string` — Any set of bytes represented as the [String](../../sql-reference/data-types/string.md) data type object.
|
||||
|
||||
**Returned value**
|
||||
|
||||
- The resulting array of tokens from input string.
|
||||
|
||||
Type: [Array](../data-types/array.md).
|
||||
|
||||
**Example**
|
||||
|
||||
```
|
||||
SELECT tokens('test1,;\\ test2,;\\ test3,;\\ test4') AS tokens;
|
||||
```
|
||||
|
||||
``` text
|
||||
SELECT tokens('test1,;\\ test2,;\\ test3,;\\ test4') AS tokens
|
||||
```
|
||||
|
||||
## repeat {#repeat}
|
||||
|
||||
Repeats a string as many times as specified and concatenates the replicated values as a single string.
|
||||
|
@ -53,7 +53,7 @@ public:
|
||||
auto ngram_input_argument_type = WhichDataType(arguments[0].type);
|
||||
if (!ngram_input_argument_type.isStringOrFixedString())
|
||||
throw Exception(ErrorCodes::BAD_ARGUMENTS,
|
||||
"Function {} second argument type should be String or FixedString. Actual {}",
|
||||
"Function {} first argument type should be String or FixedString. Actual {}",
|
||||
getName(),
|
||||
arguments[0].type->getName());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user