mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 00:30:49 +00:00
Merge pull request #47683 from ucasfl/doc
Update document for tupleElement function
This commit is contained in:
commit
a1397d7a0d
@ -22,15 +22,15 @@ tuple(x, y, …)
|
|||||||
## tupleElement
|
## tupleElement
|
||||||
|
|
||||||
A function that allows getting a column from a tuple.
|
A function that allows getting a column from a tuple.
|
||||||
‘N’ is the column index, starting from 1. ‘N’ must be a constant. ‘N’ must be a strict postive integer no greater than the size of the tuple.
|
|
||||||
There is no cost to execute the function.
|
|
||||||
|
|
||||||
The function implements the operator `x.N`.
|
If the second argument is a number `n`, it is the column index, starting from 1. If the second argument is a string `s`, it represents the name of the element. Besides, we can provide the third optional argument, such that when index out of bounds or element for such name does not exist, the default value returned instead of throw exception. The second and third arguments if provided are always must be constant. There is no cost to execute the function.
|
||||||
|
|
||||||
|
The function implements the operator `x.n` and `x.s`.
|
||||||
|
|
||||||
**Syntax**
|
**Syntax**
|
||||||
|
|
||||||
``` sql
|
``` sql
|
||||||
tupleElement(tuple, n)
|
tupleElement(tuple, n/s [, default_value])
|
||||||
```
|
```
|
||||||
|
|
||||||
## untuple
|
## untuple
|
||||||
|
Loading…
Reference in New Issue
Block a user