Added examples

This commit is contained in:
Sergei Bocharov 2019-11-25 11:55:33 +03:00
parent 03fbe8864c
commit 5c9e6900b5
2 changed files with 29 additions and 1 deletions

View File

@ -817,4 +817,18 @@ Result:
└──────────────┘
```
Query:
```sql
SELECT (SELECT toDate('2015-01-02'), 'Hello') AS x, x, identity((SELECT 1)), identity((SELECT 1) AS y);
```
Result:
```text
─x──────────────────────┬─x──────────────────────┬─identity(_subquery7)─┬─identity(y)─┐
│ ('2015-01-02','Hello') │ ('2015-01-02','Hello') │ 1 │ 1 │
└────────────────────────┴────────────────────────┴──────────────────────┴─────────────┘
```
[Original article](https://clickhouse.yandex/docs/en/query_language/functions/other_functions/) <!--hide-->

View File

@ -778,7 +778,7 @@ identity()
**Возвращаемое значение**
Возвращает то же значение, которое использовалось в качестве аргумента.
Возвращает значение переданное в аргументе.
**Пример**
@ -796,6 +796,20 @@ SELECT identity(43)
└──────────────┘
```
Запрос:
```sql
SELECT (SELECT toDate('2015-01-02'), 'Hello') AS x, x, identity((SELECT 1)), identity((SELECT 1) AS y);
```
Ответ:
```text
─x──────────────────────┬─x──────────────────────┬─identity(_subquery7)─┬─identity(y)─┐
│ ('2015-01-02','Hello') │ ('2015-01-02','Hello') │ 1 │ 1 │
└────────────────────────┴────────────────────────┴──────────────────────┴─────────────┘
```
[Оригинальная статья](https://clickhouse.yandex/docs/ru/query_language/functions/other_functions/) <!--hide-->
## modelEvaluate(model_name, ...) {#function-modelevaluate}