-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOCSUP-2954: Documented the view function #15881
DOCSUP-2954: Documented the view function #15881
Conversation
Создал файл view.md и сделал описание функции view.
@@ -0,0 +1,61 @@ | |||
## View {#view} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## View {#view} | |
## view {#view} |
@@ -0,0 +1,61 @@ | |||
## View {#view} | |||
|
|||
Turns an subquery into a table object. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function works similarly to the view table engine. There is no much information, but it can help to make the description more informative.
|
||
**Parameters** | ||
|
||
- `subquery` — An example: SELECT a, b, c FROM table_name. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Subquery can be only of the SELECT type.
|
||
**Returned value** | ||
|
||
- A table object. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Table object" is the internal term. For users it's just "A table".
└──────────┘ | ||
``` | ||
|
||
The function view helps passing queries around. For instance, it can be used in remote/cluster table functions: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does it mean "passing queries around"?
I made changes.
Changed parametrs.
|
||
**Parameters** | ||
|
||
- `subquery` — Subquery of the `SELECT` type only. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `subquery` — Subquery of the `SELECT` type only. | |
- `subquery` — `SELECT` query. |
└──────────┘ | ||
``` | ||
|
||
Function `view` can be used in `remote` or `cluster` table functions: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function `view` can be used in `remote` or `cluster` table functions: | |
You can use the `view` function as a parameter of the `remote` and `cluster` table functions: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, missing links to the remote
and cluster
table functions.
|
||
## view {#view} | ||
|
||
Turns an subquery into a table. Used for implementing views (for more information, see the `CREATE VIEW query`). It does not store data, but only stores the specified `SELECT` query. When reading from a table, it runs this query (and deletes all unnecessary columns from the query). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns an subquery into a table. Used for implementing views (for more information, see the `CREATE VIEW query`). It does not store data, but only stores the specified `SELECT` query. When reading from a table, it runs this query (and deletes all unnecessary columns from the query). | |
Turns a subquery into a table. The function implements views (for more information, see the `CREATE VIEW query`). The resulting table doesn't store data, but only the specified `SELECT` query. when When reading from the table, ClickHouse executes the query and and deletes all unnecessary columns from the result. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing link to CREATE VIEW.
Changed by comments.
Перевел на русский язык.
|
||
## view {#view} | ||
|
||
Turns a subquery into a table. The function implements views (for more information, see the [CREATE VIEW](https://clickhouse.tech/docs/en/sql-reference/statements/create/view/#create-view). The resulting table doesn't store data, but only stores the specified `SELECT` query. When reading from the table, ClickHouse executes the query and deletes all unnecessary columns from the result. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- "the CREATE VIEW query" or "CREATE VIEW"
- "For more information" is a redundant phrase with zero use. Please delete it.
|
||
**Входные параметры** | ||
|
||
- `subquery` — `SELECT` запрос. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `subquery` — `SELECT` запрос. | |
- `subquery` — запрос `SELECT`. |
Changed by comments.
Changed links.
* master: (719 commits) Revert "scipy" DOCSUP-3478: Documented the iLike function (ClickHouse#15880) DOCSUP-2954: Documented the view function (ClickHouse#15881) DOCSUP-2861: Translate on Russian (ClickHouse#16042) fix for floats tests for nullable_aggregate_states Update settings.md Update replication.md Update replication.md Update replication.md Update settings.md test for the bug 8580 test for the bug ClickHouse#8490 test for the bug ClickHouse#8425 Update run.sh done remove warnings in integration tests reset error code in ast fuzzer fix segfault with wrong aggregation in lambdas restart the tests ... # Conflicts: # src/Access/IAccessStorage.cpp # src/Access/IAccessStorage.h # src/Access/LDAPAccessStorage.cpp # src/Access/LDAPAccessStorage.h # src/Access/LDAPParams.h # src/Access/MultipleAccessStorage.cpp # src/Common/ErrorCodes.cpp # src/Server/HTTPHandler.cpp
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Changelog category: