From 3186a2f2735fd88efe38ef3980a202a13ac729a8 Mon Sep 17 00:00:00 2001 From: Ivan Blinkov Date: Thu, 6 Sep 2018 21:15:16 +0300 Subject: [PATCH] revert more harmful patches --- .../en/query_language/table_functions/file.md | 43 +++---------------- .../query_language/table_functions/numbers.md | 10 ++--- .../query_language/table_functions/remote.md | 7 +-- docs/en/query_language/table_functions/url.md | 14 +++--- docs/en/roadmap.md | 23 +++++----- 5 files changed, 32 insertions(+), 65 deletions(-) diff --git a/docs/en/query_language/table_functions/file.md b/docs/en/query_language/table_functions/file.md index a6b9006d69f..67eb5742988 100644 --- a/docs/en/query_language/table_functions/file.md +++ b/docs/en/query_language/table_functions/file.md @@ -2,48 +2,17 @@ # file -Creates a table from a file. +`file(path, format, structure)` - returns a table created from a path file with a format type, with columns specified in structure. -``` -file(path, format, structure) -``` +path - a relative path to a file from [user_files_path](../../operations/server_settings/settings.md#user_files_path). -**Input parameters** +format - file [format](../../interfaces/formats.md#formats). -- `path` — The relative path to the file from [user_files_path](../../operations/server_settings/settings.md#user_files_path). -- `format` — The [format](../../interfaces/formats.md#formats) of the file. -- `structure` — Structure of the table. Format `'colunmn1_name column1_ype, column2_name column2_type, ...'`. - -**Returned value** - -A table with the specified structure for reading or writing data in the specified file. +structure - table structure in 'UserID UInt64, URL String' format. Determines column names and types. **Example** -Setting `user_files_path` and the contents of the file `test.csv`: - -```bash -$ grep user_files_path /etc/clickhouse-server/config.xml - /var/lib/clickhouse/user_files/ - -$ cat /var/lib/clickhouse/user_files/test.csv - 1,2,3 - 3,2,1 - 78,43,45 -``` - -Table from`test.csv` and selection of the first two rows from it: - ```sql -SELECT * -FROM file('test.csv', 'CSV', 'column1 UInt32, column2 UInt32, column3 UInt32') -LIMIT 2 +-- getting the first 10 lines of a table that contains 3 columns of UInt32 type from a CSV file +SELECT * FROM file('test.csv', 'CSV', 'column1 UInt32, column2 UInt32, column3 UInt32') LIMIT 10 ``` - -``` -┌─column1─┬─column2─┬─column3─┐ -│ 1 │ 2 │ 3 │ -│ 3 │ 2 │ 1 │ -└─────────┴─────────┴─────────┘ -``` - diff --git a/docs/en/query_language/table_functions/numbers.md b/docs/en/query_language/table_functions/numbers.md index 15e62b2abf1..4486fece3d1 100644 --- a/docs/en/query_language/table_functions/numbers.md +++ b/docs/en/query_language/table_functions/numbers.md @@ -1,22 +1,22 @@ # numbers -`numbers(N)` — Returns a table with the single `number` column (UInt64) that contains integers from `0` to `N-1`. -`numbers(N, M)` — Returns a table with the single `number` column (UInt64) that contains integers from `N` to `(N + M - 1)`. +`numbers(N)` – Returns a table with the single 'number' column (UInt64) that contains integers from 0 to N-1. +`numbers(N, M)` - Returns a table with the single 'number' column (UInt64) that contains integers from N to (N + M - 1). -Similar to the `system.numbers` table, it can be used for testing and generating successive values. The `numbers(N, M)` function is more efficient than a selection from `system.numbers`. +Similar to the `system.numbers` table, it can be used for testing and generating successive values, `numbers(N, M)` more efficient than `system.numbers`. The following queries are equivalent: ```sql SELECT * FROM numbers(10); -SELECT * FROM numbers(0,10); +SELECT * FROM numbers(0, 10); SELECT * FROM system.numbers LIMIT 10; ``` Examples: ```sql --- generate a sequence of all dates from 2010-01-01 to 2010-12-31 +-- Generate a sequence of dates from 2010-01-01 to 2010-12-31 select toDate('2010-01-01') + number as d FROM numbers(365); ``` diff --git a/docs/en/query_language/table_functions/remote.md b/docs/en/query_language/table_functions/remote.md index c929176fee1..425c6f81a7d 100644 --- a/docs/en/query_language/table_functions/remote.md +++ b/docs/en/query_language/table_functions/remote.md @@ -13,8 +13,8 @@ remote('addresses_expr', db.table[, 'user'[, 'password']]) `addresses_expr` – An expression that generates addresses of remote servers. This may be just one server address. The server address is `host:port`, or just `host`. The host can be specified as the server name, or as the IPv4 or IPv6 address. An IPv6 address is specified in square brackets. The port is the TCP port on the remote server. If the port is omitted, it uses `tcp_port` from the server's config file (by default, 9000). -!!! Important: -With an IPv6 address, you must specify the port. +!!! important + The port is required for an IPv6 address. Examples: @@ -49,7 +49,7 @@ example01-{01..02}-1 If you have multiple pairs of curly brackets, it generates the direct product of the corresponding sets. -Addresses and parts of addresses in curly brackets can be separated by the pipe symbol (|). In this case, the corresponding sets of addresses are interpreted as replicas, and the query will be sent to the first healthy replica. The replicas are evaluated in the order currently set in the [load_balancing](../../operations/settings/settings.md#settings-load_balancing). +Addresses and parts of addresses in curly brackets can be separated by the pipe symbol (|). In this case, the corresponding sets of addresses are interpreted as replicas, and the query will be sent to the first healthy replica. However, the replicas are iterated in the order currently set in the [load_balancing](../../operations/settings/settings.md#settings-load_balancing) setting. Example: @@ -72,3 +72,4 @@ The `remote` table function can be useful in the following cases: If the user is not specified, `default` is used. If the password is not specified, an empty password is used. + diff --git a/docs/en/query_language/table_functions/url.md b/docs/en/query_language/table_functions/url.md index 3f2a706e208..7e30936bd45 100644 --- a/docs/en/query_language/table_functions/url.md +++ b/docs/en/query_language/table_functions/url.md @@ -2,20 +2,18 @@ # url -`url(URL, format, structure)` — Returns a table with the columns specified in -`structure`, created from data located at `URL` in the specified `format`. +`url(URL, format, structure)` - returns a table created from the `URL` with given +`format` and `structure`. -URL — URL where the server accepts `GET` and/or `POST` requests -over HTTP or HTTPS. +URL - HTTP or HTTPS server address, which can accept `GET` and/or `POST` requests. -format — The data [format](../../interfaces/formats.md#formats). +format - [format](../../interfaces/formats.md#formats) of the data. -structure — The structure of the table in the format `'UserID UInt64, Name String'`. Defines the column names and types. +structure - table structure in `'UserID UInt64, Name String'` format. Determines column names and types. **Example** ```sql --- Get 3 rows of a table consisting of two columns of type String and UInt32 from the server, which returns the data in CSV format +-- getting the first 3 lines of a table that contains columns of String and UInt32 type from HTTP-server which answers in CSV format. SELECT * FROM url('http://127.0.0.1:12345/', CSV, 'column1 String, column2 UInt32') LIMIT 3 ``` - diff --git a/docs/en/roadmap.md b/docs/en/roadmap.md index 21520f92693..51b6df94107 100644 --- a/docs/en/roadmap.md +++ b/docs/en/roadmap.md @@ -2,20 +2,19 @@ ## Q3 2018 -- `ALTER UPDATE` for mass changes to data using an approach similar to `ALTER DELETE` -- Adding Protobuf and Parquet to the range of supported input/output formats -- Improved compatibility with Tableau and other business analytics tools +- `ALTER UPDATE` for batch changing the data with approach similar to `ALTER DELETE` +- Protobuf and Parquet input and output formats +- Improved compatibility with Tableau and other BI tools ## Q4 2018 -- JOIN syntax that conforms to the SQL standard: - - Multiple `JOIN`s in a single `SELECT` - - Setting the relationship between tables via `ON` - - Ability to refer to the table name instead of using a subquery +- JOIN syntax compatible with SQL standard: + - Mutliple `JOIN`s in single `SELECT` + - Connecting tables with `ON` + - Support table reference instead of subquery -- Improvements in the performance of JOIN: - - Distributed JOIN not limited by RAM - - Transferring predicates that depend on only one side via JOIN - -- Resource pools for more accurate distribution of cluster capacity between its users +- JOIN execution improvements: + - Distributed join not limited by memory + - Predicate pushdown through join +- Resource pools for more precise distribution of cluster capacity between users